Merge pull request #11828 from Citadel-Station-13/Ghommie-patch-2

Fixes toilet cistern loot spawning on the floor.
This commit is contained in:
kevinz000
2020-04-14 01:35:04 -07:00
committed by GitHub
2 changed files with 50 additions and 19 deletions
+7 -1
View File
@@ -64,7 +64,7 @@
else
I.forceMove(drop_location())
to_chat(user, "<span class='notice'>You find [I] in the cistern.</span>")
w_items -= I.w_class
w_items = max(w_items - I.w_class, 0)
else
open = !open
update_icon()
@@ -115,6 +115,12 @@
secret.desc += "" //In case you want to add something to the item that spawns
contents += secret
/obj/structure/toilet/secret/LateInitialize()
. = ..()
w_items = 0 //recalculate total weight thanks to the secret.
for(var/obj/item/I in contents)
w_items += I.w_class
/obj/structure/toilet/secret/low_loot
secret_type = /obj/effect/spawner/lootdrop/low_loot_toilet