mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
The road to Initialize() stability - Enforcing parent call on New(), Initialize() and Destroy() (#14719)
* The road to Initialize() stability * Fixes sanity, for now
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
var/obj/item/assembly/signaler/anomaly/aSignal = null
|
||||
|
||||
/obj/effect/anomaly/New()
|
||||
. = ..()
|
||||
set_light(initial(luminosity))
|
||||
aSignal = new(src)
|
||||
aSignal.code = rand(1,100)
|
||||
|
||||
@@ -123,26 +123,29 @@
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
|
||||
|
||||
var/list/options = typesof(/obj/effect/landmark/costume)
|
||||
/obj/effect/landmark/costume/random/New() //costume spawner, selects a random subclass and disappears
|
||||
. = ..()
|
||||
var/list/options = (typesof(/obj/effect/landmark/costume) - /obj/effect/landmark/costume/random)
|
||||
var/PICK= options[rand(1,options.len)]
|
||||
new PICK(src.loc)
|
||||
qdel(src)
|
||||
|
||||
//SUBCLASSES. Spawn a bunch of items and disappear likewise
|
||||
/obj/effect/landmark/costume/chicken/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/chickensuit(src.loc)
|
||||
new /obj/item/clothing/head/chicken(src.loc)
|
||||
new /obj/item/reagent_containers/food/snacks/egg(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/gladiator/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/gladiator(src.loc)
|
||||
new /obj/item/clothing/head/helmet/gladiator(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/madscientist/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
|
||||
@@ -150,6 +153,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/elpresidente/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
|
||||
@@ -157,11 +161,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/nyangirl/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/schoolgirl(src.loc)
|
||||
new /obj/item/clothing/head/kitty(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/maid/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/blackskirt(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
|
||||
new CHOICE(src.loc)
|
||||
@@ -169,12 +175,14 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/butler/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/wcoat(src.loc)
|
||||
new /obj/item/clothing/under/suit_jacket(src.loc)
|
||||
new /obj/item/clothing/head/that(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/scratch/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/gloves/color/white(src.loc)
|
||||
new /obj/item/clothing/shoes/white(src.loc)
|
||||
new /obj/item/clothing/under/scratch(src.loc)
|
||||
@@ -183,11 +191,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/highlander/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/kilt(src.loc)
|
||||
new /obj/item/clothing/head/beret(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/prig/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/wcoat(src.loc)
|
||||
new /obj/item/clothing/glasses/monocle(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/bowlerhat, /obj/item/clothing/head/that)
|
||||
@@ -199,16 +209,19 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/plaguedoctor/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
|
||||
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/nightowl/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/owl(src.loc)
|
||||
new /obj/item/clothing/mask/gas/owl_mask(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/waiter/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/waiter(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
|
||||
new CHOICE(src.loc)
|
||||
@@ -216,6 +229,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/pirate/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/pirate(src.loc)
|
||||
new /obj/item/clothing/suit/pirate_black(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
|
||||
@@ -224,44 +238,52 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/commie/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/soviet(src.loc)
|
||||
new /obj/item/clothing/head/ushanka(src.loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/landmark/costume/imperium_monk/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/imperium_monk(src.loc)
|
||||
if(prob(25))
|
||||
new /obj/item/clothing/mask/gas/cyborg(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/holiday_priest/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/holidaypriest(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/marisawizard/fake/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
|
||||
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/cutewitch/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/sundress(src.loc)
|
||||
new /obj/item/clothing/head/witchwig(src.loc)
|
||||
new /obj/item/twohanded/staff/broom(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/fakewizard/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
|
||||
new /obj/item/clothing/head/wizard/fake(src.loc)
|
||||
new /obj/item/twohanded/staff/(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexyclown/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/mask/gas/clown_hat/sexy(loc)
|
||||
new /obj/item/clothing/under/rank/clown/sexy(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexymime/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/mask/gas/sexymime(src.loc)
|
||||
new /obj/item/clothing/under/sexymime(src.loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/obj/effect/manifest
|
||||
name = "manifest"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
|
||||
/obj/effect/manifest/New()
|
||||
|
||||
src.invisibility = 101
|
||||
return
|
||||
|
||||
/obj/effect/manifest/proc/manifest()
|
||||
var/dat = "<B>Crew Manifest</B>:<BR>"
|
||||
for(var/thing in GLOB.human_list)
|
||||
var/mob/living/carbon/human/M = thing
|
||||
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
|
||||
var/obj/item/paper/P = new /obj/item/paper( src.loc )
|
||||
P.info = dat
|
||||
P.name = "paper- 'Crew Manifest'"
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
@@ -220,6 +220,7 @@
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/trade_sol/minerals/New()
|
||||
. = ..()
|
||||
if(loot && loot.len)
|
||||
for(var/i = lootcount, i > 0, i--)
|
||||
if(!loot.len)
|
||||
@@ -345,6 +346,7 @@
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/trade_sol/vehicle/New()
|
||||
. = ..()
|
||||
if(!loot.len)
|
||||
return
|
||||
var/lootspawn = pickweight(loot)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/minY = 2
|
||||
|
||||
/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
|
||||
. = ..()
|
||||
if(!type)
|
||||
type = pick("sandstone","rock","alien")
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
//The payload spawner effect
|
||||
/////////////////////////////////
|
||||
/obj/effect/payload_spawner/New(var/turf/newloc,var/type, var/numspawned as num)
|
||||
|
||||
. = ..()
|
||||
for(var/loop = numspawned ,loop > 0, loop--)
|
||||
var/obj/item/grenade/P = new type(loc)
|
||||
if(istype(P, /obj/item/grenade))
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
var/nanofrost_cooldown = 0
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/New(parent_tank)
|
||||
. = ..()
|
||||
if(check_tank_exists(parent_tank, src))
|
||||
tank = parent_tank
|
||||
reagents = tank.reagents
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/paramedic/New()
|
||||
. = ..()
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
qdel(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
. = ..()
|
||||
new /obj/item/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
|
||||
@@ -306,6 +306,7 @@
|
||||
var/stump = 0
|
||||
|
||||
/obj/structure/bush/New()
|
||||
. = ..()
|
||||
if(prob(20))
|
||||
opacity = 1
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
var/width = 3
|
||||
|
||||
/obj/structure/grille/fence/New()
|
||||
. = ..()
|
||||
if(width > 1)
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
|
||||
Reference in New Issue
Block a user