Makes closets Initialize() (#15137)

This commit is contained in:
AffectedArc07
2020-12-20 13:25:29 +00:00
committed by GitHub
parent c92785fea7
commit f3d903acf3
36 changed files with 185 additions and 334 deletions

View File

@@ -10,8 +10,8 @@
var/codelen = 4
integrity_failure = 0 //no breaking open the crate
/obj/structure/closet/crate/secure/loot/New()
..()
/obj/structure/closet/crate/secure/loot/Initialize(mapload)
. = ..()
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
code = ""
for(var/i = 0, i < codelen, i++)
@@ -19,6 +19,7 @@
code += dig
digits -= dig //Player can enter codes with matching digits, but there are never matching digits in the answer
/obj/structure/closet/crate/secure/loot/populate_contents()
var/loot = rand(1,100) //100 different crates with varying chances of spawning
switch(loot)
if(1 to 5) //5% chance

View File

@@ -1,8 +1,7 @@
/obj/structure/closet/crate/necropolis/dragon
name = "dragon chest"
/obj/structure/closet/crate/necropolis/dragon/New()
..()
/obj/structure/closet/crate/necropolis/dragon/populate_contents()
var/loot = rand(1,4)
switch(loot)
if(1)
@@ -19,8 +18,8 @@
/obj/structure/closet/crate/necropolis/dragon/crusher
name = "firey dragon chest"
/obj/structure/closet/crate/necropolis/dragon/crusher/New()
..()
/obj/structure/closet/crate/necropolis/dragon/crusher/populate_contents()
. = ..()
new /obj/item/crusher_trophy/tail_spike(src)

View File

@@ -1,8 +1,7 @@
/obj/structure/closet/crate/necropolis/bubblegum
name = "bubblegum chest"
/obj/structure/closet/crate/necropolis/bubblegum/New()
..()
/obj/structure/closet/crate/necropolis/bubblegum/populate_contents()
new /obj/item/clothing/suit/space/hostile_environment(src)
new /obj/item/clothing/head/helmet/space/hostile_environment(src)
new /obj/item/gun/magic/staff/spellblade(src)
@@ -10,8 +9,8 @@
/obj/structure/closet/crate/necropolis/bubblegum/crusher
name = "bloody bubblegum chest"
/obj/structure/closet/crate/necropolis/bubblegum/crusher/New()
..()
/obj/structure/closet/crate/necropolis/bubblegum/crusher/populate_contents()
. = ..()
new /obj/item/crusher_trophy/demon_claws(src)
// Mayhem

View File

@@ -2,8 +2,7 @@
/obj/structure/closet/crate/necropolis/colossus
name = "colossus chest"
/obj/structure/closet/crate/necropolis/colossus/New()
..()
/obj/structure/closet/crate/necropolis/colossus/populate_contents()
var/list/choices = subtypesof(/obj/machinery/anomalous_crystal)
var/random_crystal = pick(choices)
new random_crystal(src)
@@ -12,8 +11,8 @@
/obj/structure/closet/crate/necropolis/colossus/crusher
name = "angelic colossus chest"
/obj/structure/closet/crate/necropolis/colossus/crusher/New()
..()
/obj/structure/closet/crate/necropolis/colossus/crusher/populate_contents()
. = ..()
new /obj/item/crusher_trophy/blaster_tubes(src)
///Anomolous Crystal///
@@ -361,8 +360,8 @@
holder_animal.gib()
return
/obj/structure/closet/stasis/New()
..()
/obj/structure/closet/stasis/Initialize(mapload)
. = ..()
if(isanimal(loc))
holder_animal = loc
START_PROCESSING(SSobj, src)

View File

@@ -11,12 +11,7 @@
/obj/structure/closet/crate/necropolis/tendril
desc = "It's watching you suspiciously."
/obj/structure/closet/crate/necropolis/tendril/New(add_loot = TRUE)
..()
if(!add_loot)
return
/obj/structure/closet/crate/necropolis/tendril/populate_contents()
var/loot = rand(1, 27)
switch(loot)
if(1)
@@ -87,9 +82,7 @@
/obj/structure/closet/crate/necropolis/puzzle
name = "puzzling chest"
/obj/structure/closet/crate/necropolis/puzzle/New()
..(FALSE)
/obj/structure/closet/crate/necropolis/puzzle/populate_contents()
var/loot = rand(1,3)
switch(loot)
if(1)

View File

@@ -25,9 +25,7 @@
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/wardrobe/miner/New()
..()
contents = list()
/obj/structure/closet/wardrobe/miner/populate_contents()
new /obj/item/storage/backpack/duffel(src)
new /obj/item/storage/backpack/explorer(src)
new /obj/item/storage/backpack/satchel/explorer(src)
@@ -51,8 +49,7 @@
icon_off = "miningsecoff"
req_access = list(ACCESS_MINING)
/obj/structure/closet/secure_closet/miner/New()
..()
/obj/structure/closet/secure_closet/miner/populate_contents()
new /obj/item/stack/sheet/mineral/sandbags(src, 5)
new /obj/item/storage/box/emptysandbags(src)
new /obj/item/shovel(src)