diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm index 6ec505d9f9a..30c56f93cc8 100644 --- a/code/LINDA/LINDA_fire.dm +++ b/code/LINDA/LINDA_fire.dm @@ -176,7 +176,7 @@ if(istype(loc, /turf/simulated)) var/turf/simulated/T = loc - if(T.to_be_destroyed) + if(T.to_be_destroyed && !T.changing_turf) var/chance_of_deletion if(T.heat_capacity) //beware of division by zero chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0 diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index c39226f37e6..acfa1983f72 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -74,8 +74,8 @@ air.temperature = temperature /turf/simulated/Destroy() - visibilityChanged() QDEL_NULL(active_hotspot) + QDEL_NULL(wet_overlay) return ..() /turf/simulated/assume_air(datum/gas_mixture/giver) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 6174f4a497d..9fda2cfe45c 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -322,16 +322,18 @@ apply_mode() -/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment, var/datum/tlv/cur_tlv, var/turf/simulated/location) +/obj/machinery/alarm/proc/handle_heating_cooling(datum/gas_mixture/environment, datum/tlv/cur_tlv, turf/simulated/location) cur_tlv = TLV["temperature"] //Handle temperature adjustment here. if(environment.temperature < target_temperature - 2 || environment.temperature > target_temperature + 2 || regulating_temperature) //If it goes too far, we should adjust ourselves back before stopping. if(!cur_tlv.get_danger_level(target_temperature)) + var/datum/gas_mixture/gas = location.remove_air(0.25 * environment.total_moles()) + if(!gas) + return if(!regulating_temperature) regulating_temperature = 1 - visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click and a faint electronic hum.") + visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click and a faint electronic hum.") if(target_temperature > MAX_TEMPERATURE) target_temperature = MAX_TEMPERATURE @@ -339,9 +341,8 @@ if(target_temperature < MIN_TEMPERATURE) target_temperature = MIN_TEMPERATURE - var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles()) var/heat_capacity = gas.heat_capacity() - var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) + var/energy_used = max(abs(heat_capacity * (gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) //Use power. Assuming that each power unit represents 1000 watts.... use_power(energy_used/1000, ENVIRON) @@ -349,16 +350,15 @@ //We need to cool ourselves. if(heat_capacity) if(environment.temperature > target_temperature) - gas.temperature -= energy_used/heat_capacity + gas.temperature -= energy_used / heat_capacity else - gas.temperature += energy_used/heat_capacity + gas.temperature += energy_used / heat_capacity environment.merge(gas) if(abs(environment.temperature - target_temperature) <= 0.5) regulating_temperature = 0 - visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click as a faint electronic humming stops.") + visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click as a faint electronic humming stops.") /obj/machinery/alarm/update_icon() if(wiresexposed) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 04322c63093..896ce886887 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -5,8 +5,8 @@ /turf/simulated/floor/mech_bay_recharge_floor/airless icon_state = "recharge_floor_asteroid" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /obj/machinery/mech_bay_recharge_port diff --git a/code/game/objects/effects/spawners/vaultspawner.dm b/code/game/objects/effects/spawners/vaultspawner.dm index 0d882cc9bd2..a78c6111eb7 100644 --- a/code/game/objects/effects/spawners/vaultspawner.dm +++ b/code/game/objects/effects/spawners/vaultspawner.dm @@ -21,6 +21,7 @@ if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY) new /turf/simulated/wall/vault(locate(i,j,z),type) else - new /turf/simulated/floor/vault(locate(i,j,z),type) + var/turf/T = new /turf/simulated/floor/vault(locate(i, j, z)) + T.icon_state = "[type]vault" qdel(src) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 19717991593..6bc1c4ba142 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -8,12 +8,6 @@ nitrogen = MOLES_N2STANDARD var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to - var/dirtoverlay = null - -/turf/simulated/New() - ..() - levelupdate() - visibilityChanged() /turf/simulated/proc/break_tile() return diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 55b4f336917..614b8232b0b 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -31,8 +31,8 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama var/list/burnt_states = list("floorscorched1", "floorscorched2") var/list/prying_tool_list = list(TOOL_CROWBAR) //What tool/s can we use to pry up the tile? -/turf/simulated/floor/New() - ..() +/turf/simulated/floor/Initialize(mapload) + . = ..() if(icon_state in GLOB.icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default icon_regular_floor = "floor" else diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index f8dc414ef85..bfbfa70331e 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -49,9 +49,9 @@ floor_tile = /obj/item/stack/tile/grass broken_states = list("sand") -/turf/simulated/floor/grass/Initialize() +/turf/simulated/floor/grass/Initialize(mapload) + . = ..() update_icon() - ..() /turf/simulated/floor/grass/update_icon() icon_state = "grass[pick("1","2","3","4")]" @@ -80,10 +80,9 @@ ) -/turf/simulated/floor/carpet/New() - ..() - if(broken || burnt) - make_plating() +/turf/simulated/floor/carpet/Initialize(mapload) + . = ..() + update_icon() /turf/simulated/floor/carpet/update_icon() if(!..()) @@ -119,18 +118,18 @@ broken_states = list("damaged") plane = PLANE_SPACE -/turf/simulated/floor/fakespace/New() - ..() - icon_state = "[rand(0,25)]" - -/turf/simulated/floor/carpet/arcade - icon = 'icons/goonstation/turf/floor.dmi' - icon_state = "arcade" - floor_tile = /obj/item/stack/tile/arcade_carpet - smooth = SMOOTH_FALSE +/turf/simulated/floor/fakespace/Initialize(mapload) + . = ..() + icon_state = SPACE_ICON_STATE /turf/simulated/floor/fakespace/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) underlay_appearance.icon = 'icons/turf/space.dmi' underlay_appearance.icon_state = SPACE_ICON_STATE underlay_appearance.plane = PLANE_SPACE return TRUE + +/turf/simulated/floor/carpet/arcade + icon = 'icons/goonstation/turf/floor.dmi' + icon_state = "arcade" + floor_tile = /obj/item/stack/tile/arcade_carpet + smooth = SMOOTH_FALSE diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index b32580b9bab..14a08639132 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -8,9 +8,6 @@ light_power = 0.75 light_color = LIGHT_COLOR_LAVA -/turf/simulated/floor/plating/lava/New() - ..() - /turf/simulated/floor/plating/lava/ex_act() return diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 2c24a422343..8276c0de33f 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -20,8 +20,8 @@ var/state = LIGHTFLOOR_ON var/can_modify_colour = TRUE -/turf/simulated/floor/light/New() - ..() +/turf/simulated/floor/light/Initialize(mapload) + . = ..() update_icon() /turf/simulated/floor/light/update_icon() diff --git a/code/game/turfs/simulated/floor/mineral.dm b/code/game/turfs/simulated/floor/mineral.dm index ffb1cce0b5c..dd975dc80d9 100644 --- a/code/game/turfs/simulated/floor/mineral.dm +++ b/code/game/turfs/simulated/floor/mineral.dm @@ -14,8 +14,8 @@ icon_state = "" var/list/icons = list() -/turf/simulated/floor/mineral/New() - ..() +/turf/simulated/floor/mineral/Initialize(mapload) + . = ..() broken_states = list("[initial(icon_state)]_dam") /turf/simulated/floor/mineral/update_icon() @@ -97,24 +97,24 @@ broken_states = list("titanium_dam1","titanium_dam2","titanium_dam3","titanium_dam4","titanium_dam5") /turf/simulated/floor/mineral/titanium/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/blue icon_state = "titanium_blue" /turf/simulated/floor/mineral/titanium/blue/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/yellow icon_state = "titanium_yellow" /turf/simulated/floor/mineral/titanium/yellow/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/purple @@ -122,8 +122,8 @@ floor_tile = /obj/item/stack/tile/mineral/titanium/purple /turf/simulated/floor/mineral/titanium/purple/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB //PLASTITANIUM (syndieshuttle) @@ -137,8 +137,8 @@ icon_state = "plastitanium_red" /turf/simulated/floor/mineral/plastitanium/red/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/plastitanium/red/brig @@ -179,8 +179,8 @@ spam_flag = world.time + 10 /turf/simulated/floor/mineral/bananium/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB @@ -254,8 +254,8 @@ floor_tile = /obj/item/stack/tile/mineral/abductor icons = list("alienpod1", "alienpod2", "alienpod3", "alienpod4", "alienpod5", "alienpod6", "alienpod7", "alienpod8", "alienpod9") -/turf/simulated/floor/mineral/abductor/New() - ..() +/turf/simulated/floor/mineral/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/simulated/floor/mineral/abductor/break_tile() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 95d5f816aa4..83835cd947f 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -3,19 +3,11 @@ icon_state = "rockvault" smooth = SMOOTH_FALSE -/turf/simulated/floor/vault/New(location, vtype) - ..() - icon_state = "[vtype]vault" - /turf/simulated/wall/vault icon = 'icons/turf/walls.dmi' icon_state = "rockvault" smooth = SMOOTH_FALSE -/turf/simulated/wall/vault/New(location, vtype) - ..() - icon_state = "[vtype]vault" - /turf/simulated/floor/bluegrid icon = 'icons/turf/floors.dmi' icon_state = "bcircuit" @@ -35,12 +27,12 @@ /turf/simulated/floor/greengrid/airless icon_state = "gcircuit" name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/greengrid/airless/New() - ..() +/turf/simulated/floor/greengrid/airless/Initialize(mapload) + . = ..() name = "floor" /turf/simulated/floor/redgrid @@ -78,8 +70,8 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/obj/machinery/poolcontroller/linkedcontroller = null -/turf/simulated/floor/beach/water/New() - ..() +/turf/simulated/floor/beach/water/Initialize(mapload) + . = ..() var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = "water5", layer = ABOVE_MOB_LAYER) overlay_image.plane = GAME_PLANE overlays += overlay_image diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index ee19b4eeeb5..116d57dc1ef 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -12,12 +12,12 @@ /turf/simulated/floor/plasteel/airless name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/plasteel/airless/New() - ..() +/turf/simulated/floor/plasteel/airless/Initialize(mapload) + . = ..() name = "floor" /turf/simulated/floor/plasteel/airless/indestructible // For bomb testing range diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index c692135dc44..a6dbe0de281 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -14,17 +14,17 @@ "xeno" = list('sound/effects/footstep/plating_xeno.ogg') ) -/turf/simulated/floor/plating/New() - ..() +/turf/simulated/floor/plating/Initialize(mapload) + . = ..() icon_plating = icon_state update_icon() -/turf/simulated/floor/plating/damaged/New() - ..() +/turf/simulated/floor/plating/damaged/Initialize(mapload) + . = ..() break_tile() -/turf/simulated/floor/plating/burnt/New() - ..() +/turf/simulated/floor/plating/burnt/Initialize(mapload) + . = ..() burn_tile() /turf/simulated/floor/plating/update_icon() @@ -113,12 +113,12 @@ /turf/simulated/floor/plating/airless icon_state = "plating" name = "airless plating" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/plating/airless/New() - ..() +/turf/simulated/floor/plating/airless/Initialize(mapload) + . = ..() name = "plating" /turf/simulated/floor/engine @@ -190,8 +190,8 @@ name = "engraved floor" icon_state = "cult" -/turf/simulated/floor/engine/cult/New() - ..() +/turf/simulated/floor/engine/cult/Initialize(mapload) + . = ..() if(SSticker.mode)//only do this if the round is going..otherwise..fucking asteroid.. icon_state = SSticker.cultdat.cult_floor_icon_state @@ -275,8 +275,8 @@ icon = 'icons/turf/floors/ironsand.dmi' icon_state = "ironsand1" -/turf/simulated/floor/plating/ironsand/New() - ..() +/turf/simulated/floor/plating/ironsand/Initialize(mapload) + . = ..() icon_state = "ironsand[rand(1,15)]" /turf/simulated/floor/plating/ironsand/remove_plating() @@ -359,8 +359,8 @@ name = "alien floor" icon_state = "alienpod1" -/turf/simulated/floor/plating/abductor/New() - ..() +/turf/simulated/floor/plating/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/simulated/floor/plating/ice diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index f34465fd60f..56908a7ecae 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -9,8 +9,8 @@ sheet_amount = 1 girder_type = /obj/structure/girder/cult -/turf/simulated/wall/cult/New() - ..() +/turf/simulated/wall/cult/Initialize(mapload) + . = ..() if(SSticker.mode)//game hasn't started offically don't do shit.. new /obj/effect/temp_visual/cult/turf(src) icon_state = SSticker.cultdat.cult_wall_icon_state @@ -72,10 +72,7 @@ realappearance.linked = src /turf/simulated/wall/clockwork/Destroy() - if(realappearance) - qdel(realappearance) - realappearance = null - + QDEL_NULL(realappearance) return ..() /turf/simulated/wall/clockwork/ReplaceWithLattice() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index f78f520cfd3..1a8ccdae550 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -21,6 +21,11 @@ /turf/space/Initialize(mapload) if(!istype(src, /turf/space/transit)) icon_state = SPACE_ICON_STATE + vis_contents.Cut() //removes inherited overlays + + if(initialized) + stack_trace("Warning: [src]([type]) initialized multiple times!") + initialized = TRUE var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) @@ -34,12 +39,6 @@ return INITIALIZE_HINT_NORMAL -/turf/space/Destroy(force) - if(force) - . = ..() - else - return QDEL_HINT_LETMELIVE - /turf/space/BeforeChange() ..() var/datum/space_level/S = GLOB.space_manager.get_zlev(z) diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 2a14230d467..a96cbae1269 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -125,9 +125,9 @@ /turf/space/transit/attackby() return -/turf/space/transit/New() +/turf/space/transit/Initialize(mapload) + . = ..() update_icon() - ..() /turf/space/transit/proc/update_icon() var/p = 9 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d1541dcc4fa..e174634123d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -31,21 +31,29 @@ var/image/obscured //camerachunks + var/changing_turf = FALSE + var/list/blueprint_data //for the station blueprints, images of objects eg: pipes var/list/footstep_sounds var/shoe_running_volume = 50 var/shoe_walking_volume = 20 -/turf/New() - ..() +/turf/Initialize(mapload) + if(initialized) + stack_trace("Warning: [src]([type]) initialized multiple times!") + initialized = TRUE + + // by default, vis_contents is inherited from the turf that was here before + vis_contents.Cut() + + levelupdate() + if(smooth) + queue_smooth(src) + visibilityChanged() + for(var/atom/movable/AM in src) Entered(AM) - if(smooth && SSticker && SSticker.current_state == GAME_STATE_PLAYING) - queue_smooth(src) - -/turf/Initialize(mapload) - . = ..() var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) @@ -54,9 +62,11 @@ if(light_power && light_range) update_light() - if (opacity) + if(opacity) has_opaque_atom = TRUE + return INITIALIZE_HINT_NORMAL + /hook/startup/proc/smooth_world() var/watch = start_watch() log_startup_progress("Smoothing atoms...") @@ -70,16 +80,29 @@ log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.") return TRUE -/turf/Destroy() -// Adds the adjacent turfs to the current atmos processing - if(SSair) - for(var/direction in GLOB.cardinal) - if(atmos_adjacent_turfs & direction) - var/turf/simulated/T = get_step(src, direction) - if(istype(T)) - SSair.add_to_active(T) +/turf/Destroy(force) + . = QDEL_HINT_IWILLGC + if(!changing_turf) + stack_trace("Incorrect turf deletion") + changing_turf = FALSE + if(force) + ..() + //this will completely wipe turf state + var/turf/B = new world.turf(src) + for(var/A in B.contents) + qdel(A) + return + // Adds the adjacent turfs to the current atmos processing + for(var/direction in GLOB.cardinal) + if(atmos_adjacent_turfs & direction) + var/turf/simulated/T = get_step(src, direction) + if(istype(T)) + SSair.add_to_active(T) + SSair.remove_from_active(src) + visibilityChanged() + QDEL_LIST(blueprint_data) + initialized = FALSE ..() - return QDEL_HINT_HARDDEL_NOW /turf/attack_hand(mob/user as mob) user.Move_Pulled(src) @@ -209,10 +232,10 @@ var/old_corners = corners BeforeChange() - if(SSair) - SSair.remove_from_active(src) var/old_baseturf = baseturf + changing_turf = TRUE + qdel(src) //Just get the side effects and call Destroy var/turf/W = new path(src) W.baseturf = old_baseturf @@ -225,7 +248,6 @@ if(SSlighting.initialized) recalc_atom_opacity() lighting_object = old_lighting_object - affecting_lights = old_affecting_lights corners = old_corners if(old_opacity != opacity || dynamic_lighting != old_dynamic_lighting) @@ -524,12 +546,9 @@ I.appearance = AM.appearance I.appearance_flags = RESET_COLOR|RESET_ALPHA|RESET_TRANSFORM I.loc = src - I.dir = AM.dir + I.setDir(AM.dir) I.alpha = 128 - - if(!blueprint_data) - blueprint_data = list() - blueprint_data += I + LAZYADD(blueprint_data, I) /turf/proc/add_blueprints_preround(atom/movable/AM) if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING) diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm index 688dc778ce3..02af9173e2b 100644 --- a/code/game/turfs/unsimulated.dm +++ b/code/game/turfs/unsimulated.dm @@ -40,6 +40,6 @@ nitrogen = 0 temperature = TCMB -/turf/unsimulated/floor/plating/airless/New() - ..() +/turf/unsimulated/floor/plating/airless/Initialize(mapload) + . = ..() name = "plating" diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm index f6a3a62c324..a7c73971e99 100644 --- a/code/game/turfs/unsimulated/beach.dm +++ b/code/game/turfs/unsimulated/beach.dm @@ -3,9 +3,9 @@ icon = 'icons/misc/beach.dmi' var/water_overlay_image = null mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -/turf/unsimulated/beach/New() - ..() + +/turf/unsimulated/beach/Initialize(mapload) + . = ..() if(water_overlay_image) var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = water_overlay_image, layer = ABOVE_MOB_LAYER) overlay_image.plane = GAME_PLANE @@ -15,10 +15,10 @@ name = "Sand" icon_state = "desert" mouse_opacity = MOUSE_OPACITY_ICON - -/turf/unsimulated/beach/sand/New() //adds some aesthetic randomness to the beach sand + +/turf/unsimulated/beach/sand/Initialize(mapload) + . = ..() //adds some aesthetic randomness to the beach sand icon_state = pick("desert", "desert0", "desert1", "desert2", "desert3", "desert4") - ..() /turf/unsimulated/beach/sand/dense //for boundary "walls" density = 1 @@ -42,7 +42,7 @@ /turf/unsimulated/beach/water/Entered(atom/movable/AM, atom/OldLoc) . = ..() if(!linkedcontroller) - return + return if(ismob(AM)) linkedcontroller.mobinpool += AM @@ -79,8 +79,8 @@ /turf/unsimulated/beach/water/edge_drop) var/obj/effect/beach_drop_overlay/water_overlay -/turf/unsimulated/beach/water/drop/New() - ..() +/turf/unsimulated/beach/water/drop/Initialize(mapload) + . = ..() water_overlay = new(src) /turf/unsimulated/beach/water/drop/Destroy() diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index 28f4e359223..750ebe015ae 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -7,8 +7,8 @@ name = "grass patch" icon_state = "grass1" -/turf/unsimulated/floor/grass/New() - ..() +/turf/unsimulated/floor/grass/Initialize(mapload) + . = ..() icon_state = "grass[rand(1,4)]" /turf/unsimulated/floor/snow @@ -20,8 +20,8 @@ name = "alien floor" icon_state = "alienpod1" -/turf/unsimulated/floor/abductor/New() - ..() +/turf/unsimulated/floor/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/unsimulated/floor/vox