diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 3133ff45705..d5ac5b8b875 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -397,5 +397,5 @@ //Engine types #define ENGTYPE_SING "Singularity" -#define ENGTYPE_SM "Supermatter" +#define ENGTYPE_SM "Supermatter" #define ENGTYPE_TESLA "Tesla" \ No newline at end of file diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index d13be3828d0..d9d21c60e1e 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -49,4 +49,4 @@ GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects GLOBAL_LIST_EMPTY(explosive_walls) -GLOBAL_LIST_INIT(engine_beacon_list, list()) \ No newline at end of file +GLOBAL_LIST_EMPTY(engine_beacon_list) \ No newline at end of file diff --git a/code/game/objects/items/devices/enginepicker.dm b/code/game/objects/items/devices/enginepicker.dm index 7c3d6d35b96..9d1077e62b2 100644 --- a/code/game/objects/items/devices/enginepicker.dm +++ b/code/game/objects/items/devices/enginepicker.dm @@ -12,15 +12,25 @@ icon_state = "enginepicker" var/list/list_enginebeacons = list() + var/isactive = FALSE /obj/item/enginepicker/attack_self(mob/living/carbon/user) if(usr.stat || !usr.canmove || usr.restrained()) return + + if(!isactive) + isactive = TRUE //Self-attack spam exploit prevention + else + return + locatebeacons() var/default = null var/E = input("Select the station's Engine:", "[src]", default) as null|anything in list_enginebeacons if(E) processchoice(E, user) + else + isactive = FALSE + return //This proc finds all of the '/obj/item/radio/beacon/engine' in the world and assigns them to a list /obj/item/enginepicker/proc/locatebeacons() @@ -42,6 +52,7 @@ engname = E issuccessful = TRUE else + isactive = FALSE return if(!engname) engname = DEFAULTPICK(choice.enginetype, null) //This should(?) account for a possibly scrambled list with a single entry @@ -68,6 +79,7 @@ qdel(src) //Self-destructs to prevent crew from spawning multiple engines. else visible_message("\The [src] buzzes! No beacon found or selected!") + isactive = FALSE return //Deletes objects and mobs from the beacon's turf.