mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] Some more Init and Destroy issues (#10317)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e90dd067f
commit
5aad34f339
@@ -67,6 +67,7 @@
|
||||
#define MAT_DARKGLASS "darkglass"
|
||||
#define MAT_FLESH "flesh"
|
||||
#define MAT_FANCYBLACK "fancyblack"
|
||||
#define MAT_FOAM "foam"
|
||||
|
||||
// cloth materials
|
||||
#define MAT_WOOL "wool"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#define TURF_HAS_MINERALS 0x1
|
||||
#define TURF_HAS_ORE 0x2
|
||||
#define TURF_HAS_RARE_ORE 0x4
|
||||
|
||||
#define ORE_MARBLE "marble"
|
||||
#define ORE_QUARTZ "quartz"
|
||||
#define ORE_COPPER "copper"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/bhole/Initialize()
|
||||
/obj/effect/bhole/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, PROC_REF(controller)), 0.4 SECONDS, TIMER_DELETE_ME)
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
job_description = "An " + JOB_ENTERTAINER + " does just that, entertains! Put on plays, play music, sing songs, tell stories, or read your favorite fanfic."
|
||||
alt_titles = list(JOB_ALT_PERFORMER = /datum/alt_title/performer, JOB_ALT_MUSICIAN = /datum/alt_title/musician, JOB_ALT_STAGEHAND = /datum/alt_title/stagehand,
|
||||
JOB_ALT_ACTOR = /datum/alt_title/actor, JOB_ALT_DANCER = /datum/alt_title/dancer, JOB_ALT_SINGER = /datum/alt_title/singer,
|
||||
JOB_ALT_MAGICIAN = /datum/alt_title/magician, JOB_ALT_COMEDIAN = /datum/alt_title/comedian, JOB_ALT_ARTIST = /datum/alt_title/tragedian,
|
||||
JOB_ALT_MAGICIAN = /datum/alt_title/magician, JOB_ALT_COMEDIAN = /datum/alt_title/comedian, JOB_ALT_TRAGEDIAN = /datum/alt_title/tragedian,
|
||||
JOB_CLOWN = /datum/alt_title/clown, JOB_ALT_JESTER = /datum/alt_title/clown/jester,JOB_ALT_FOOL = /datum/alt_title/clown/fool,
|
||||
JOB_MIME= /datum/alt_title/mime,JOB_ALT_PASEUR= /datum/alt_title/mime/poseur, //CHOMPEDIT: Adding clown + mime and their alts as alts of entertainer
|
||||
JOB_ALT_ARTIST = /datum/alt_title/artist, JOB_ALT_FITNESS_INSTRUCTOR = /datum/alt_title/fitnessinstructor, JOB_ALT_GAME_MASTER = /datum/alt_title/game_master)
|
||||
|
||||
@@ -9,15 +9,17 @@
|
||||
generic_filth = TRUE
|
||||
persistent = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/liquid_fuel/New(turf/newLoc,amt=1,nologs=1)
|
||||
/obj/effect/decal/cleanable/liquid_fuel/Initialize(mapload, amt=1, nologs=1)
|
||||
if(!isturf(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
if(!nologs)
|
||||
message_admins("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z]) (<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[newLoc.x];Y=[newLoc.y];Z=[newLoc.z]'>JMP</a>)")
|
||||
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
|
||||
message_admins("Liquid fuel has spilled in [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
|
||||
log_game("Liquid fuel has spilled in [loc.loc.name] ([loc.x],[loc.y],[loc.z])")
|
||||
src.amount = amt
|
||||
|
||||
var/has_spread = 0
|
||||
//Be absorbed by any other liquid fuel in the tile.
|
||||
for(var/obj/effect/decal/cleanable/liquid_fuel/other in newLoc)
|
||||
for(var/obj/effect/decal/cleanable/liquid_fuel/other in loc)
|
||||
if(other != src)
|
||||
other.amount += src.amount
|
||||
other.Spread()
|
||||
@@ -27,8 +29,6 @@
|
||||
. = ..()
|
||||
if(!has_spread)
|
||||
Spread()
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/liquid_fuel/proc/Spread(exclude=list())
|
||||
//Allows liquid fuels to sometimes flow into other tiles.
|
||||
@@ -53,10 +53,10 @@
|
||||
icon_state = "mustard"
|
||||
anchored = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel/New(newLoc, amt = 1, d = 0)
|
||||
/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel/Initialize(mapload, amt = 1, d = 0)
|
||||
set_dir(d) //Setting this direction means you won't get torched by your own flamethrower.
|
||||
if(istype(newLoc, /turf/simulated))
|
||||
var/turf/simulated/T = newLoc
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
T.hotspot_expose((T20C*2) + 380,500) //Ignite the fuel.
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ var/global/list/image/splatter_cache=list()
|
||||
var/amount = 5
|
||||
generic_filth = TRUE
|
||||
persistent = FALSE
|
||||
var/delete_me = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/reveal_blood()
|
||||
if(!fluorescent)
|
||||
@@ -37,8 +38,10 @@ var/global/list/image/splatter_cache=list()
|
||||
amount = 0
|
||||
..(ignore=1)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
/obj/effect/decal/cleanable/blood/Initialize(mapload)
|
||||
. = ..()
|
||||
if(delete_me)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
update_icon()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
@@ -48,7 +51,10 @@ var/global/list/image/splatter_cache=list()
|
||||
if(B != src)
|
||||
if (B.blood_DNA)
|
||||
blood_DNA |= B.blood_DNA.Copy()
|
||||
qdel(B)
|
||||
if(!(B.flags & ATOM_INITIALIZED))
|
||||
B.delete_me = TRUE
|
||||
else
|
||||
qdel(B)
|
||||
|
||||
//VOREstation edit - Moved timer call to Init, and made it not call on mapload
|
||||
/obj/effect/decal/cleanable/blood/Initialize(mapload, var/_age)
|
||||
@@ -164,8 +170,8 @@ var/global/list/image/splatter_cache=list()
|
||||
amount = 0
|
||||
var/list/drips = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/New()
|
||||
..()
|
||||
/obj/effect/decal/cleanable/blood/drip/Initialize(mapload)
|
||||
. = ..()
|
||||
drips |= icon_state
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing
|
||||
@@ -176,8 +182,8 @@ var/global/list/image/splatter_cache=list()
|
||||
amount = 0
|
||||
var/message
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/New()
|
||||
..()
|
||||
/obj/effect/decal/cleanable/blood/writing/Initialize(mapload)
|
||||
. = ..()
|
||||
if(random_icon_states.len)
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dirt"
|
||||
mouse_opacity = 0
|
||||
var/delete_me = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Initialize(mapload, var/_age, var/dirt)
|
||||
.=..()
|
||||
if(delete_me)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
var/turf/simulated/our_turf = src.loc
|
||||
if(our_turf && istype(our_turf) && our_turf.can_dirty)
|
||||
our_turf.dirt = clamp(max(age ? (dirt ? dirt : 101) : our_turf.dirt, our_turf.dirt), 0, 101)
|
||||
@@ -49,7 +52,10 @@
|
||||
if (alreadythere == src)
|
||||
continue
|
||||
else if (alreadyfound)
|
||||
qdel(alreadythere)
|
||||
if(!(alreadythere.flags & ATOM_INITIALIZED))
|
||||
delete_me = TRUE
|
||||
else
|
||||
qdel(alreadythere)
|
||||
continue
|
||||
alreadyfound = TRUE
|
||||
alreadythere.alpha = calcalpha //don't need to constantly recalc for all of them in it because it'll just max if a non-persistent dirt overlay gets added, and then the new dirt overlay will be deleted
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
icon = 'icons/effects/map_effects.dmi'
|
||||
icon_state = "gibspawn"
|
||||
|
||||
/obj/effect/gibspawner/New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
|
||||
..()
|
||||
/obj/effect/gibspawner/Initialize(mapload, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
|
||||
. = ..()
|
||||
|
||||
if(fleshcolor) src.fleshcolor = fleshcolor
|
||||
if(bloodcolor) src.bloodcolor = bloodcolor
|
||||
Gib(loc,MobDNA)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/gibspawner/proc/Gib(atom/location, var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
@@ -54,5 +55,3 @@
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
unacidable = TRUE
|
||||
simulated = FALSE
|
||||
invisibility = 100
|
||||
var/delete_me = 0
|
||||
var/delete_me = FALSE
|
||||
|
||||
/obj/effect/landmark/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2,2,1)
|
||||
|
||||
/obj/effect/gibspawner/generic/New()
|
||||
/obj/effect/gibspawner/generic/Initialize(mapload)
|
||||
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/effect/gibspawner/human
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/human/New()
|
||||
/obj/effect/gibspawner/human/Initialize(mapload)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/effect/gibspawner/robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/robot/New()
|
||||
/obj/effect/gibspawner/robot/Initialize(mapload)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/taperecorder/New()
|
||||
..()
|
||||
/obj/item/taperecorder/Initialize(mapload)
|
||||
. = ..()
|
||||
if(ispath(mytape))
|
||||
mytape = new mytape(src)
|
||||
update_icon()
|
||||
@@ -445,5 +445,6 @@
|
||||
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/rectape/random/New()
|
||||
/obj/item/rectape/random/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
|
||||
@@ -112,3 +112,7 @@
|
||||
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
|
||||
if(istype(E))
|
||||
E.change_eye_color()
|
||||
|
||||
/obj/item/makeover/Destroy()
|
||||
qdel(M)
|
||||
. = ..()
|
||||
|
||||
@@ -11,16 +11,14 @@ var/global/list/ashtray_cache = list()
|
||||
var/image/base_image
|
||||
var/max_butts = 10
|
||||
|
||||
/obj/item/material/ashtray/New(var/newloc, var/material_name)
|
||||
..(newloc, material_name)
|
||||
/obj/item/material/ashtray/Initialize(mapload, material_key)
|
||||
. = ..()
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL
|
||||
icon_state = "blank"
|
||||
max_butts = round(material.hardness/5) //This is arbitrary but whatever.
|
||||
randpixel_xy()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/material/ashtray/update_icon()
|
||||
color = null
|
||||
@@ -100,11 +98,11 @@ var/global/list/ashtray_cache = list()
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/material/ashtray/plastic/New(var/newloc)
|
||||
..(newloc, MAT_PLASTIC)
|
||||
/obj/item/material/ashtray/plastic/Initialize(mapload)
|
||||
. = ..(mapload, MAT_PLASTIC)
|
||||
|
||||
/obj/item/material/ashtray/bronze/New(var/newloc)
|
||||
..(newloc, MAT_BRONZE)
|
||||
/obj/item/material/ashtray/bronze/Initialize(mapload)
|
||||
. = ..(mapload, MAT_BRONZE)
|
||||
|
||||
/obj/item/material/ashtray/glass/New(var/newloc)
|
||||
..(newloc,MAT_GLASS)
|
||||
/obj/item/material/ashtray/glass/Initialize(mapload)
|
||||
. = ..(mapload, MAT_GLASS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/material/twohanded/baseballbat/foam/New(var/newloc)
|
||||
..(newloc,"foam")
|
||||
/obj/item/material/twohanded/baseballbat/foam/Initialize(mapload)
|
||||
. = ..(mapload, MAT_FOAM)
|
||||
|
||||
/obj/item/material/sword/foam
|
||||
attack_verb = list("bonked","whacked")
|
||||
@@ -14,8 +14,8 @@
|
||||
unbreakable = 1
|
||||
damtype = HALLOSS
|
||||
|
||||
/obj/item/material/sword/foam/New(var/newloc)
|
||||
..(newloc,"foam")
|
||||
/obj/item/material/sword/foam/Initialize(mapload)
|
||||
. = ..(mapload, MAT_FOAM)
|
||||
|
||||
/obj/item/material/twohanded/spear/foam
|
||||
attack_verb = list("bonked","whacked")
|
||||
@@ -26,8 +26,9 @@
|
||||
base_icon = "spear_mask"
|
||||
icon_state = "spear_mask0"
|
||||
unbreakable = 1
|
||||
/obj/item/material/twohanded/spear/foam/New(var/newloc)
|
||||
..(newloc,"foam")
|
||||
|
||||
/obj/item/material/twohanded/spear/foam/Initialize(mapload)
|
||||
. = ..(mapload, MAT_FOAM)
|
||||
|
||||
/obj/item/material/twohanded/fireaxe/foam
|
||||
attack_verb = list("bonked","whacked")
|
||||
@@ -39,8 +40,8 @@
|
||||
icon_state = "fireaxe_mask0"
|
||||
unbreakable = 1
|
||||
|
||||
/obj/item/material/twohanded/fireaxe/foam/New(var/newloc)
|
||||
..(newloc,"foam")
|
||||
/obj/item/material/twohanded/fireaxe/foam/Initialize(mapload)
|
||||
. = ..(mapload, MAT_FOAM)
|
||||
|
||||
/obj/item/material/twohanded/fireaxe/foam/afterattack()
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/material/shard/titaniumglass/New(loc)
|
||||
..(loc, MAT_TITANIUMGLASS)
|
||||
/obj/item/material/shard/titaniumglass/Initialize(mapload)
|
||||
. = ..(mapload, MAT_TITANIUMGLASS)
|
||||
|
||||
/obj/item/material/shard/plastitaniumglass/New(loc)
|
||||
..(loc, MAT_PLASTITANIUMGLASS)
|
||||
/obj/item/material/shard/plastitaniumglass/Initialize(mapload)
|
||||
. = ..(mapload, MAT_PLASTITANIUMGLASS)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
throwforce = round(force*thrown_force_divisor)
|
||||
//to_world("[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]")
|
||||
|
||||
/obj/item/material/twohanded/Initialize(mapload)
|
||||
/obj/item/material/twohanded/Initialize(mapload, material_key)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
pickup_sound = 'sound/items/pickup/weldingtool.ogg'
|
||||
tool_qualities = list(TOOL_WELDER)
|
||||
|
||||
/obj/item/weldingtool/Initialize()
|
||||
/obj/item/weldingtool/Initialize(mapload)
|
||||
. = ..()
|
||||
// var/random_fuel = min(rand(10,20),max_fuel)
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
||||
@@ -493,13 +493,13 @@
|
||||
always_process = TRUE
|
||||
var/obj/item/weldpack/mounted_pack = null
|
||||
|
||||
/obj/item/weldingtool/tubefed/New(location)
|
||||
..()
|
||||
if(istype(location, /obj/item/weldpack))
|
||||
var/obj/item/weldpack/holder = location
|
||||
/obj/item/weldingtool/tubefed/Initialize(mapload)
|
||||
. = ..()
|
||||
if(istype(loc, /obj/item/weldpack))
|
||||
var/obj/item/weldpack/holder = loc
|
||||
mounted_pack = holder
|
||||
else
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/weldingtool/tubefed/Destroy()
|
||||
mounted_pack.nozzle = null
|
||||
@@ -556,11 +556,12 @@
|
||||
acti_sound = 'sound/effects/sparks4.ogg'
|
||||
deac_sound = 'sound/effects/sparks4.ogg'
|
||||
|
||||
/obj/item/weldingtool/electric/unloaded/New()
|
||||
/obj/item/weldingtool/electric/unloaded/Initialize(mapload)
|
||||
cell_type = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/weldingtool/electric/New()
|
||||
..()
|
||||
/obj/item/weldingtool/electric/Initialize(mapload)
|
||||
. = ..()
|
||||
if(cell_type == null)
|
||||
update_icon()
|
||||
else if(cell_type)
|
||||
|
||||
@@ -18,12 +18,18 @@
|
||||
/obj/item/stack/tile/floor/techgrey = "#363f43")
|
||||
var/health = 100
|
||||
var/maxhealth = 100
|
||||
var/delete_me = FALSE
|
||||
|
||||
/obj/structure/catwalk/Initialize()
|
||||
. = ..()
|
||||
if(delete_me)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
for(var/obj/structure/catwalk/C in get_turf(src))
|
||||
if(C != src)
|
||||
qdel(C)
|
||||
if(!(C.flags & ATOM_INITIALIZED))
|
||||
C.delete_me = TRUE
|
||||
else
|
||||
qdel(C)
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -579,6 +579,7 @@
|
||||
|
||||
var/contents_vis_flags = NONE
|
||||
var/contents_original_pixel_y = 0
|
||||
var/changing_state = FALSE
|
||||
|
||||
/obj/structure/prop/machine/nt_pod/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -641,33 +642,30 @@
|
||||
return
|
||||
if(!user.client?.holder)
|
||||
return
|
||||
if(changing_state)
|
||||
return
|
||||
|
||||
AM.forceMove(src)
|
||||
|
||||
/obj/structure/prop/machine/nt_pod/change_state(state)
|
||||
. = ..()
|
||||
if(changing_state)
|
||||
return
|
||||
switch(state)
|
||||
if("open")
|
||||
changing_state = TRUE
|
||||
cut_overlay("nt_pod_top_on")
|
||||
cut_overlay("nt_pod_under")
|
||||
|
||||
// Fluid drains
|
||||
fluid.icon_state = "nothing"
|
||||
flick("nt_pod_emptying", fluid) // 8ds
|
||||
sleep(8)
|
||||
|
||||
// Door opens
|
||||
door.icon_state = "nothing"
|
||||
flick("nt_pod_opening", door) // 9ds
|
||||
sleep(9)
|
||||
|
||||
// GET OUT
|
||||
outside.layer = BELOW_MOB_LAYER
|
||||
if(contents.len)
|
||||
for(var/atom/movable/AM as anything in contents)
|
||||
unduct(AM)
|
||||
addtimer(CALLBACK(src, PROC_REF(delayed_flick), door, "nothing", "nt_pod_opening", 0.9 SECONDS), 0.8 SECONDS) // 9ds
|
||||
|
||||
if("closed")
|
||||
changing_state = TRUE
|
||||
outside.layer = ABOVE_MOB_LAYER
|
||||
cut_overlay("nt_pod_top_on")
|
||||
add_overlay("nt_pod_top_on")
|
||||
@@ -676,10 +674,8 @@
|
||||
// Door closes
|
||||
door.icon_state = "nt_pod_glass"
|
||||
flick("nt_pod_closing", door) // 9ds
|
||||
sleep(9)
|
||||
// Fluid fills
|
||||
fluid.icon_state = "nt_pod_liquid"
|
||||
flick("nt_pod_filling", fluid) // 8ds
|
||||
addtimer(CALLBACK(src, PROC_REF(delayed_flick), fluid, "nt_pod_liquid", "nt_pod_filling"), 0.9 SECONDS) // 8ds
|
||||
|
||||
if("panel_open")
|
||||
cut_overlay("nt_pod_panel")
|
||||
@@ -689,6 +685,22 @@
|
||||
|
||||
// Old Virology stuff
|
||||
|
||||
/obj/structure/prop/machine/nt_pod/proc/delayed_flick(var/obj/effect/overlay/ovrl, var/icon_state, var/flicked, var/get_out_time)
|
||||
ovrl.icon_state = icon_state
|
||||
flick(flicked, ovrl)
|
||||
// GET OUT
|
||||
if(get_out_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(get_out)), get_out_time)
|
||||
return
|
||||
changing_state = FALSE
|
||||
|
||||
/obj/structure/prop/machine/nt_pod/proc/get_out()
|
||||
outside.layer = BELOW_MOB_LAYER
|
||||
if(contents.len)
|
||||
for(var/atom/movable/AM as anything in contents)
|
||||
unduct(AM)
|
||||
changing_state = FALSE
|
||||
|
||||
/obj/structure/prop/machine/centrifuge
|
||||
name = "centrifuge"
|
||||
desc = "Used to separate things with different weight. Spin 'em round, round, right round."
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/image/wet_overlay = null
|
||||
|
||||
//Mining resources (for the large drills).
|
||||
var/has_resources
|
||||
var/turf_resource_types
|
||||
var/list/resources
|
||||
|
||||
var/thermite = 0
|
||||
|
||||
@@ -242,8 +242,8 @@ BLIND // can't see anything
|
||||
vision_flags = SEE_OBJS
|
||||
enables_planes = list(VIS_FULLBRIGHT)
|
||||
|
||||
/obj/item/clothing/glasses/material/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/material/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.material
|
||||
|
||||
/obj/item/clothing/glasses/material/prescription
|
||||
|
||||
@@ -135,7 +135,9 @@
|
||||
stat_modules += new/stat_rig_module/select(src)
|
||||
stat_modules += new/stat_rig_module/charge(src)
|
||||
|
||||
/obj/item/rig_module/Destroy(force, ...)
|
||||
/obj/item/rig_module/Destroy()
|
||||
holder.installed_modules -= src
|
||||
holder = null
|
||||
QDEL_NULL_LIST(stat_modules)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
chest = null
|
||||
cell = null
|
||||
air_supply = null
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
qdel(module)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(wires)
|
||||
wires = null
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
var/turf/simulated/harvesting = pick(resource_field)
|
||||
|
||||
while(resource_field.len && !harvesting.resources)
|
||||
harvesting.has_resources = 0
|
||||
harvesting.turf_resource_types &= ~(TURF_HAS_MINERALS)
|
||||
harvesting.resources = null
|
||||
resource_field -= harvesting
|
||||
if(resource_field.len) // runtime protection
|
||||
@@ -209,7 +209,7 @@
|
||||
current_capacity++ // Adds the ore to the drill's capacity.
|
||||
|
||||
if(!found_resource) // If a drill can't see an advanced material, it will destroy it while going through.
|
||||
harvesting.has_resources = 0
|
||||
harvesting.turf_resource_types &= ~(TURF_HAS_MINERALS)
|
||||
harvesting.resources = null
|
||||
resource_field -= harvesting
|
||||
else
|
||||
@@ -381,7 +381,7 @@
|
||||
for(var/ix = 0, ix < drill_range, ix++)
|
||||
mine_turf = locate(tx + ix, ty + iy, T.z)
|
||||
if(!istype(mine_turf, /turf/space/))
|
||||
if(mine_turf && mine_turf.has_resources)
|
||||
if(mine_turf && mine_turf.turf_resource_types & TURF_HAS_MINERALS)
|
||||
resource_field += mine_turf
|
||||
|
||||
if(!resource_field.len)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
for(var/turf/simulated/T in range(range, Turf))
|
||||
|
||||
if(!T.has_resources)
|
||||
if(!(T.turf_resource_types & TURF_HAS_MINERALS))
|
||||
continue
|
||||
|
||||
for(var/metal in T.resources)
|
||||
|
||||
@@ -76,7 +76,7 @@ var/list/mining_overlay_cache = list()
|
||||
ORE_RUTILE = /obj/item/ore/rutile
|
||||
)
|
||||
|
||||
has_resources = 1
|
||||
turf_resource_types = TURF_HAS_MINERALS
|
||||
|
||||
/turf/simulated/mineral/ChangeTurf(turf/N, tell_universe, force_lighting_update, preserve_outdoors)
|
||||
clear_ore_effects()
|
||||
@@ -206,6 +206,10 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
/turf/simulated/mineral/Initialize()
|
||||
. = ..()
|
||||
if(turf_resource_types & TURF_HAS_RARE_ORE)
|
||||
make_ore(1)
|
||||
else if (turf_resource_types & TURF_HAS_ORE)
|
||||
make_ore()
|
||||
if(prob(20))
|
||||
overlay_detail = "asteroid[rand(0,9)]"
|
||||
update_icon(1)
|
||||
@@ -353,7 +357,7 @@ var/list/mining_overlay_cache = list()
|
||||
/turf/simulated/mineral/proc/UpdateMineral()
|
||||
clear_ore_effects()
|
||||
if(mineral)
|
||||
new /obj/effect/mineral(src, mineral)
|
||||
new /obj/effect/mineral(src)
|
||||
update_icon()
|
||||
|
||||
//Not even going to touch this pile of spaghetti
|
||||
@@ -597,6 +601,7 @@ var/list/mining_overlay_cache = list()
|
||||
update_icon()
|
||||
|
||||
/turf/simulated/mineral/proc/clear_ore_effects()
|
||||
turf_resource_types &= ~(TURF_HAS_ORE | TURF_HAS_RARE_ORE)
|
||||
for(var/obj/effect/mineral/M in contents)
|
||||
qdel(M)
|
||||
|
||||
|
||||
@@ -9,15 +9,18 @@
|
||||
var/image/scanner_image
|
||||
var/ore_reagent // Reagent from pumping water near this ore.
|
||||
|
||||
/obj/effect/mineral/New(var/newloc, var/ore/M)
|
||||
..(newloc)
|
||||
/obj/effect/mineral/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/simulated/mineral/min_turf = loc
|
||||
if(!istype(min_turf))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
var/ore/M = min_turf.mineral
|
||||
name = "[M.display_name] deposit"
|
||||
ore_key = M.name
|
||||
if(M.reagent)
|
||||
ore_reagent = M.reagent
|
||||
icon_state = "rock_[ore_key]"
|
||||
var/turf/T = get_turf(src)
|
||||
layer = T.layer+0.1
|
||||
layer = min_turf.layer+0.1
|
||||
|
||||
/obj/effect/mineral/proc/get_scan_overlay()
|
||||
if(!scanner_image)
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
|
||||
if(T.density && !T.ignore_oregen)
|
||||
if(map[current_cell] == DOOR_CHAR)
|
||||
T.make_ore()
|
||||
T.turf_resource_types |= TURF_HAS_ORE
|
||||
else if(map[current_cell] == EMPTY_CHAR)
|
||||
T.make_ore(1)
|
||||
T.turf_resource_types |= TURF_HAS_RARE_ORE
|
||||
get_additional_spawns(map[current_cell],T,get_spawn_dir(x, y))
|
||||
//VOREStation Edit End
|
||||
return T
|
||||
|
||||
@@ -25,15 +25,16 @@
|
||||
|
||||
/obj/structure/droppod_door/attack_hand(var/mob/user)
|
||||
if(deploying) return
|
||||
deploying = TRUE
|
||||
to_chat(user, span_danger("You prime the explosive bolts. Better get clear!"))
|
||||
sleep(30)
|
||||
deploy()
|
||||
addtimer(CALLBACK(src, PROC_REF(deploy)), 3 SECONDS, TIMER_DELETE_ME)
|
||||
|
||||
/obj/structure/droppod_door/proc/deploy()
|
||||
if(deployed)
|
||||
return
|
||||
|
||||
deployed = 1
|
||||
deploying = FALSE
|
||||
deployed = TRUE
|
||||
visible_message(span_danger("The explosive bolts on \the [src] detonate, throwing it open!"))
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1, 5)
|
||||
|
||||
@@ -72,7 +73,7 @@
|
||||
set_opacity(0)
|
||||
icon_state = "ramptop"
|
||||
var/obj/structure/droppod_door/door_bottom = new(T)
|
||||
door_bottom.deployed = 1
|
||||
door_bottom.deployed = TRUE
|
||||
door_bottom.density = FALSE
|
||||
door_bottom.set_opacity(0)
|
||||
door_bottom.dir = src.dir
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for(var/i=0,i<chunk_size,i++)
|
||||
for(var/j=0,j<chunk_size,j++)
|
||||
var/turf/simulated/T = locate(tx+j, ty+i, origin_z)
|
||||
if(!istype(T) || !T.has_resources)
|
||||
if(!istype(T) || !(T.turf_resource_types & TURF_HAS_MINERALS))
|
||||
continue
|
||||
if(!priority_process) sleep(-1)
|
||||
T.resources = list()
|
||||
|
||||
@@ -176,9 +176,12 @@
|
||||
|
||||
if(!M.mineral && prob(rm_controller.diffstep_chances[rm_controller.diffstep])) //Difficulty translates directly into ore chance
|
||||
rm_controller.dbg("ZM(par): Adding mineral to [M.x],[M.y].")
|
||||
M.make_ore(rm_controller.diffstep >= 3 ? 1 : 0)
|
||||
if(rm_controller.diffstep >= 3)
|
||||
M.turf_resource_types |= TURF_HAS_RARE_ORE
|
||||
else
|
||||
M.turf_resource_types |= TURF_HAS_ORE
|
||||
mineral_rocks += M
|
||||
//If above difficulty threshold make rare ore instead (M.make_ore(1))
|
||||
//If above difficulty threshold make rare ore instead (M.turf_resource_types |= TURF_HAS_RARE_ORE)
|
||||
//Increase with difficulty etc
|
||||
|
||||
if(!M.density)
|
||||
|
||||
@@ -695,12 +695,12 @@
|
||||
|
||||
|
||||
// Starts fully charged
|
||||
/obj/machinery/power/shield_generator/charged/Initialize()
|
||||
/obj/machinery/power/shield_generator/charged/Initialize(mapload)
|
||||
. = ..()
|
||||
current_energy = max_energy
|
||||
|
||||
// Starts with the best SMES coil and capacitor (and fully charged)
|
||||
/obj/machinery/power/shield_generator/upgraded/Initialize()
|
||||
/obj/machinery/power/shield_generator/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/item/smes_coil/sc in component_parts)
|
||||
component_parts -= sc
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for(var/i=0,i<chunk_size,i++)
|
||||
for(var/j=0,j<chunk_size,j++)
|
||||
var/turf/simulated/T = locate(tx+j, ty+i, origin_z)
|
||||
if(!istype(T) || !T.has_resources)
|
||||
if(!istype(T) || !(T.turf_resource_types & TURF_HAS_MINERALS))
|
||||
continue
|
||||
if(!priority_process) sleep(-1)
|
||||
T.resources = list()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/door_on_mode
|
||||
var/teleport_on_mode
|
||||
|
||||
/obj/away_mission_init/alienship/Initialize()
|
||||
/obj/away_mission_init/alienship/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(!mission_mode) //WE ARE NUMBER ONE
|
||||
|
||||
@@ -132,7 +132,8 @@
|
||||
desc = "A sort of liability device worn by security on luxury yachts. Records everything they say. Strange that the captain was wearing it."
|
||||
mytape = /obj/item/rectape/touristguard
|
||||
|
||||
/obj/item/rectape/touristguard/New()
|
||||
/obj/item/rectape/touristguard/Initialize(mapload)
|
||||
. = ..()
|
||||
storedinfo += "01:37 *sounds of metal creaking"
|
||||
storedinfo += "01:55 *sounds of distant screaming!"
|
||||
storedinfo += "01:37 *Sounds of hissing, both airlocks and spiders alike. Screaming continues."
|
||||
|
||||
Reference in New Issue
Block a user