Skip to content

Commit

Permalink
Adjust power sensor auto-naming
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze authored and comma committed Mar 29, 2024
1 parent 63e4ce1 commit 766576e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/modules/power/sensors/powernet_sensor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
var/area/A = get_area(src)
if(!A)
return // in nullspace
id_tag = "[A.proper_name] #[sequential_id(A.name + "power/sensor")]"
var/suffix = uniqueness_repository.Generate(/datum/uniqueness_generator/id_sequential, "[A.proper_name]power/sensor", 1) // unlike sequential_id, starts at 1 instead of 100
if(suffix == 1)
suffix = null
id_tag = "[A.proper_name][suffix ? " #[suffix]" : null]"
name = "[id_tag] - powernet sensor"

// Proc: check_grid_warning()
Expand Down

0 comments on commit 766576e

Please sign in to comment.