diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 03b16f38efe..510be54c75c 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -10,6 +10,7 @@ var/global/list/spacepods_list = list() //list of all space pods. Used by hos var/global/list/joblist = list() //list of all jobstypes, minus borg and AI var/global/list/flag_list = list() //list of flags during Nations gamemode var/global/list/airlocks = list() //list of all airlocks +var/global/list/singularities = list() //list of all singularities var/global/list/aibots = list() // AI controlled bots var/global/list/table_recipes = list() //list of all table craft recipes diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 762235d30a0..a616a7b3381 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -344,7 +344,7 @@ field_generator power level display //I want to avoid using global variables. spawn(1) var/temp = 1 //stops spam - for(var/obj/singularity/O in world) + for(var/obj/singularity/O in singularities) if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 4c0a4d195db..09390df300c 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -216,20 +216,20 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(istype(O, /obj/item/weapon/wrench) && !isinspace()) + if(iswrench(O) && !isinspace()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(istype(O, /obj/item/weapon/wrench)) + if(iswrench(O)) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(istype(O, /obj/item/stack/cable_coil)) + else if(iscoil(O)) var/obj/item/stack/cable_coil/C = O if(C.use(1)) user.visible_message("[user.name] adds wires to the [src.name].", \ @@ -239,16 +239,16 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin user << "You need one length of cable to wire the [src.name]!" return if(2) - if(istype(O, /obj/item/weapon/wirecutters))//TODO:Shock user if its on? + if(iswirecutter(O))//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(istype(O, /obj/item/weapon/screwdriver)) + else if(isscrewdriver(O)) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(istype(O, /obj/item/weapon/screwdriver)) + if(isscrewdriver(O)) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- @@ -368,35 +368,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin var/temp_state = src.construction_state switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(istype(O, /obj/item/weapon/wrench)) + if(iswrench(O)) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(istype(O, /obj/item/weapon/wrench)) + if(iswrench(O)) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(istype(O, /obj/item/stack/cable_coil)) + else if(iscoil(O)) if(O:use(1)) user.visible_message("[user.name] adds wires to the [src.name].", \ "You add some wires.") temp_state++ if(2) - if(istype(O, /obj/item/weapon/wirecutters))//TODO:Shock user if its on? + if(iswirecutter(O))//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(istype(O, /obj/item/weapon/screwdriver)) + else if(isscrewdriver(O)) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(istype(O, /obj/item/weapon/screwdriver)) + if(isscrewdriver(O)) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index a1d86e5f6dd..fa8c14fe1b0 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -30,6 +30,7 @@ /obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0) //CARN: admin-alert for chuckle-fuckery. + singularities += src admin_investigate_setup() src.energy = starting_energy @@ -43,6 +44,7 @@ /obj/singularity/Destroy() processing_objects.Remove(src) + singularities -= src return ..() /obj/singularity/Move(atom/newloc, direct)