diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/under/accessories/accessory_vr.dm
index 51c8c3279e1..4a975f6bf75 100644
--- a/code/modules/clothing/under/accessories/accessory_vr.dm
+++ b/code/modules/clothing/under/accessories/accessory_vr.dm
@@ -34,20 +34,25 @@
icon_state = "collar_shk0"
item_state = "collar_shk_overlay"
overlay_state = "collar_shk_overlay"
- // How about some copypasta?
- var/on = 0 // 0 for off, 1 for on, starts off to encourage people to set non-default frequencies and codes.
+ var/on = FALSE // 0 for off, 1 for on, starts off to encourage people to set non-default frequencies and codes.
var/frequency = 1449
var/code = 2
var/datum/radio_frequency/radio_connection
- var/list/datum/radio_frequency/secure_radio_connections = new
- proc/set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
-
+
/obj/item/clothing/accessory/collar/shock/New()
+ ..()
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT) // Makes it so you don't need to change the frequency off of default for it to work.
-
+
+/obj/item/clothing/accessory/collar/shock/Destroy() //Clean up your toys when you're done.
+ radio_controller.remove_object(src, frequency)
+ radio_connection = null //Don't delete this, this is a shared object.
+ return ..()
+
+/obj/item/clothing/accessory/collar/shock/proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
+
/obj/item/clothing/accessory/collar/shock/Topic(href, href_list)
if(usr.stat || usr.restrained())
return
@@ -107,24 +112,23 @@
return
user.set_machine(src)
var/dat = {"
-Turn [on ? "Off" : "On"]
-Frequency/Code for collar:
-Frequency:
--
-- [format_frequency(frequency)]
-+
-+
+ Turn [on ? "Off" : "On"]
+ Frequency/Code for collar:
+ Frequency:
+ -
+ - [format_frequency(frequency)]
+ +
+ +
-Code:
--
-- [code]
-+
-+
-"}
+ Code:
+ -
+ - [code]
+ +
+ +
+ "}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
-
/obj/item/clothing/accessory/collar/spike
name = "Spiked collar"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 449b2e9e1aa..dfade3414b9 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -63,7 +63,7 @@
list_body = null
LAZYCLEARLIST(list_huds)
list_huds = null
-
+ if(nif) qdel_null(nif) //VOREStation Add
return ..()
/mob/living/carbon/human/Stat()
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index 50059f47b26..4cf0be2dc5b 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -135,7 +135,7 @@
for(var/slot in slots)
var/obj/item/clothing/O = get_equipped_item(slot) //Change this type if you move the vision stuff to item or something.
- if(O && O.enables_planes && (slot in O.plane_slots))
+ if(istype(O) && O.enables_planes && (slot in O.plane_slots))
compiled_vis |= O.enables_planes
//Check to see if we have a rig (ugh, blame rigs, desnowflake this)
diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm
index 3da38e9c36e..437d70914b7 100644
--- a/code/modules/mob/mob_planes.dm
+++ b/code/modules/mob/mob_planes.dm
@@ -36,9 +36,7 @@
..()
/datum/plane_holder/Destroy()
- if(my_mob)
- my_mob.plane_holder = null
- my_mob = null
+ my_mob = null
plane_masters.Cut() //Goodbye my children, be free
return ..()
diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm
index 261b058aa94..2d77c62eb4a 100644
--- a/code/modules/nifsoft/nif.dm
+++ b/code/modules/nifsoft/nif.dm
@@ -95,9 +95,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
//Destructor cleans up references
/obj/item/device/nif/Destroy()
- if(human)
- human.nif = null
- human = null
+ human = null
qdel_null_list(nifsofts)
qdel_null(comm)
nifsofts_life.Cut()
diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm
index f7fed5fa762..cb7d5c193b9 100644
--- a/code/modules/reagents/Chemistry-Recipes.dm
+++ b/code/modules/reagents/Chemistry-Recipes.dm
@@ -703,8 +703,9 @@
var/mob/living/L = holder.my_atom
if(L.stat != DEAD)
e.amount *= 0.5
+ else
+ holder.clear_reagents() //No more powergaming by creating a tiny amount of this
e.start()
- holder.clear_reagents()
return
/datum/chemical_reaction/flash_powder
@@ -749,7 +750,8 @@
// 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes.
// 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades.
empulse(location, round(created_volume / 24), round(created_volume / 20), round(created_volume / 18), round(created_volume / 14), 1)
- holder.clear_reagents()
+ if(!isliving(holder.my_atom)) //No more powergaming by creating a tiny amount of this
+ holder.clear_reagents()
return
/datum/chemical_reaction/nitroglycerin
@@ -768,9 +770,10 @@
var/mob/living/L = holder.my_atom
if(L.stat!=DEAD)
e.amount *= 0.5
+ else
+ holder.clear_reagents() //No more powergaming by creating a tiny amount of this
e.start()
- holder.clear_reagents()
return
/datum/chemical_reaction/napalm
@@ -803,7 +806,8 @@
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
S.start()
- holder.clear_reagents()
+ if(!isliving(holder.my_atom)) //No more powergaming by creating a tiny amount of this
+ holder.clear_reagents()
return
/datum/chemical_reaction/foam
@@ -823,7 +827,8 @@
var/datum/effect/effect/system/foam_spread/s = new()
s.set_up(created_volume, location, holder, 0)
s.start()
- holder.clear_reagents()
+ if(!isliving(holder.my_atom)) //No more powergaming by creating a tiny amount of this
+ holder.clear_reagents()
return
/datum/chemical_reaction/metalfoam