diff --git a/code/__DEFINES/color/colour_priority.dm b/code/__DEFINES/color/colour_priority.dm
deleted file mode 100644
index 040ff5003a8..00000000000
--- a/code/__DEFINES/color/colour_priority.dm
+++ /dev/null
@@ -1,6 +0,0 @@
-//different types of atom colorations
-#define ADMIN_COLOUR_PRIORITY 1 //only used by rare effects like greentext coloring mobs and when admins varedit color
-#define TEMPORARY_COLOUR_PRIORITY 2 //e.g. purple effect of the revenant on a mob, black effect when mob electrocuted
-#define WASHABLE_COLOUR_PRIORITY 3 //color splashed onto an atom (e.g. paint on turf)
-#define FIXED_COLOUR_PRIORITY 4 //color inherent to the atom (e.g. blob color)
-#define COLOUR_PRIORITY_AMOUNT 4 //how many priority levels there are.
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 4e9b2b044fc..cc137cf0e40 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -364,6 +364,3 @@ GLOBAL_LIST_EMPTY(##LIST_NAME);\
#define MOUSE_OPACITY_TRANSPARENT 0
#define MOUSE_OPACITY_ICON 1
#define MOUSE_OPACITY_OPAQUE 2
-
-/// Embed chance unset for embed_chance var on /obj/item.
-#define EMBED_CHANCE_UNSET -1337
diff --git a/code/__DEFINES/tgs.config.dm b/code/__DEFINES/tgs.config.dm
index 0b1270ffb58..9f4f63a1fcc 100644
--- a/code/__DEFINES/tgs.config.dm
+++ b/code/__DEFINES/tgs.config.dm
@@ -3,7 +3,7 @@
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name)
#define TGS_READ_GLOBAL(Name) GLOB.##Name
#define TGS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value
-#define TGS_WORLD_ANNOUNCE(message) to_chat(world, "[html_encode(##message)]")
+#define TGS_WORLD_ANNOUNCE(message) to_chat(world, "[html_encode(##message)]")
#define TGS_INFO_LOG(message) log_world("TGS: Info: [##message]")
#define TGS_ERROR_LOG(message) log_world("TGS: Error: [##message]")
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 3637204a6b0..937cbdc54d4 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -18,6 +18,8 @@ var/global/list/side_effects = list() //list of all medical sideeffects types
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
+var/global/list/turfs = list() //list of all turfs
+
#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) //VOREStaton Edit
#define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") //VOREStation Edit
diff --git a/code/_global_vars/bitfields.dm b/code/_global_vars/bitfields.dm
index 202077878a4..986d01d9154 100644
--- a/code/_global_vars/bitfields.dm
+++ b/code/_global_vars/bitfields.dm
@@ -1,4 +1,3 @@
-#define FLAG(flag) "[#flag]" = flag
GLOBAL_LIST_INIT(bitfields, list(
"appearance_flags" = list(
"LONG_GLIDE" = LONG_GLIDE,
@@ -16,21 +15,7 @@ GLOBAL_LIST_INIT(bitfields, list(
"DF_USE_TAG" = DF_USE_TAG,
"DF_VAR_EDITED" = DF_VAR_EDITED,
"DF_ISPROCESSING" = DF_ISPROCESSING,
- ),
- "flags" = list(
- FLAG(NOBLUDGEON),
- FLAG(NOCONDUCT),
- FLAG(ON_BORDER),
- FLAG(NOBLOODY),
- FLAG(OPENCONTAINER),
- FLAG(PHORONGUARD),
- FLAG(NOREACT),
- FLAG(PROXMOVE),
- FLAG(OVERLAY_QUEUED),
- FLAG(INITIALIZED),
- FLAG(ADMIN_SPAWNED)
)
-
/*
"sight" = list(
"SEE_INFRA" = SEE_INFRA,
@@ -133,6 +118,24 @@ GLOBAL_LIST_INIT(bitfields, list(
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
"FREEZE_PROOF" = FREEZE_PROOF
),
+ "flags_1" = list(
+ "NOJAUNT_1" = NOJAUNT_1,
+ "UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
+ "CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1,
+ "HEAR_1" = HEAR_1,
+ "CHECK_RICOCHET_1" = CHECK_RICOCHET_1,
+ "CONDUCT_1" = CONDUCT_1,
+ "NO_LAVA_GEN_1" = NO_LAVA_GEN_1,
+ "NODECONSTRUCT_1" = NODECONSTRUCT_1,
+ "OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
+ "ON_BORDER_1" = ON_BORDER_1,
+ "NO_RUINS_1" = NO_RUINS_1,
+ "PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1,
+ "HOLOGRAM_1" = HOLOGRAM_1,
+ "TESLA_IGNORE_1" = TESLA_IGNORE_1,
+ "INITIALIZED_1" = INITIALIZED_1,
+ "ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1,
+ ),
"clothing_flags" = list(
"LAVAPROTECT" = LAVAPROTECT,
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
@@ -197,5 +200,3 @@ GLOBAL_LIST_INIT(bitfields, list(
*/
))
-
-#undef FLAG
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index 85f82dcc85e..f2ac1bf31de 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -161,7 +161,6 @@
var/time = (REALTIMEOFDAY - start_timeofday) / 10
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
to_chat(world, "[msg]")
- log_world(msg)
log_subsystem("INIT", msg)
return time
diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm
index f3c3bd796ea..044d56b2bee 100644
--- a/code/controllers/subsystems/air.dm
+++ b/code/controllers/subsystems/air.dm
@@ -38,7 +38,7 @@ SUBSYSTEM_DEF(air)
current_cycle = 0
var/simulated_turf_count = 0
- for(var/turf/simulated/S in world)
+ for(var/turf/simulated/S in turfs)
simulated_turf_count++
S.update_air_properties()
CHECK_TICK
diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm
index d5db445abb8..9111eb68b10 100644
--- a/code/controllers/subsystems/atoms.dm
+++ b/code/controllers/subsystems/atoms.dm
@@ -10,7 +10,7 @@ SUBSYSTEM_DEF(atoms)
var/old_subsystem_initialized
- var/list/late_loaders
+ var/list/late_loaders = list()
var/list/BadInitializeCalls = list()
@@ -19,6 +19,9 @@ SUBSYSTEM_DEF(atoms)
//setupGenetics() //to set the mutations' sequence
subsystem_initialized = INITIALIZATION_INNEW_MAPLOAD
InitializeAtoms()
+ /* compatibility/vorestation
+ setupgenetics() //to set the mutations' place in structural enzymes, so initializers know where to put mutations.
+ */
return ..()
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
@@ -27,8 +30,6 @@ SUBSYSTEM_DEF(atoms)
subsystem_initialized = INITIALIZATION_INNEW_MAPLOAD
- LAZYINITLIST(late_loaders)
-
var/count
var/list/mapload_arg = list(TRUE)
if(atoms)
@@ -88,7 +89,7 @@ SUBSYSTEM_DEF(atoms)
if(!A) //possible harddel
qdeleted = TRUE
- else if(!(A.flags & INITIALIZED))
+ else if(!(A.flags & subsystem_initialized))
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
return qdeleted || QDELING(A)
@@ -109,7 +110,91 @@ SUBSYSTEM_DEF(atoms)
/*
+//GENETIC CODE START
+
+// Randomize block, assign a reference name, and optionally define difficulty (by making activation zone smaller or bigger)
+// The name is used on /vg/ for species with predefined genetic traits,
+// and for the DNA panel in the player panel.
+/datum/controller/subsystem/atoms/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS)
+ if(blocksLeft.len==0)
+ warning("[name]: No more blocks left to assign!")
+ return 0
+ var/assigned = pick(blocksLeft)
+ blocksLeft.Remove(assigned)
+ assigned_blocks[assigned]=name
+ dna_activity_bounds[assigned]=activity_bounds
+ //testing("[name] assigned to block #[assigned].")
+ return assigned
+
/datum/controller/subsystem/atoms/proc/setupGenetics()
+ if (prob(50))
+ // Currently unused. Will revisit. - N3X
+ BLOCKADD = rand(-300,300)
+ if (prob(75))
+ DIFFMUT = rand(0,20)
+
+ var/list/numsToAssign=new()
+ for(var/i=1;i atom_colours.len)
- return
- atom_colours[colour_priority] = coloration
- update_atom_colour()
-
-/*
- Removes an instance of colour_type from the atom's atom_colours list
-*/
-/atom/proc/remove_atom_colour(colour_priority, coloration)
- if(!atom_colours)
- atom_colours = list()
- atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
- if(colour_priority > atom_colours.len)
- return
- if(coloration && atom_colours[colour_priority] != coloration)
- return //if we don't have the expected color (for a specific priority) to remove, do nothing
- atom_colours[colour_priority] = null
- update_atom_colour()
-
-/*
- Resets the atom's color to null, and then sets it to the highest priority
- colour available
-*/
-/atom/proc/update_atom_colour()
- if(!atom_colours)
- atom_colours = list()
- atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
- color = null
- for(var/C in atom_colours)
- if(islist(C))
- var/list/L = C
- if(L.len)
- color = L
- return
- else if(C)
- color = C
- return
diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm
index 99c4f138bc9..a4aee5e6742 100644
--- a/code/game/gamemodes/cult/hell_universe.dm
+++ b/code/game/gamemodes/cult/hell_universe.dm
@@ -65,11 +65,11 @@ In short:
for(var/datum/lighting_corner/L in world)
L.update_lumcount(1, 0, 0)
- for(var/turf/space/T in world)
+ for(var/turf/space/T in turfs)
OnTurfChange(T)
/datum/universal_state/hell/proc/MiscSet()
- for(var/turf/simulated/floor/T in world)
+ for(var/turf/simulated/floor/T in turfs)
if(!T.holy && prob(1))
new /obj/effect/gateway/active/cult(T)
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
index 1497cda6853..8fc42cad867 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
@@ -14,14 +14,14 @@
var/next_check=0
var/list/avail_dirs = list(NORTH,SOUTH,EAST,WEST)
-/turf/unsimulated/wall/supermatter/Initialize(mapload)
- . = ..()
+/turf/unsimulated/wall/supermatter/New()
+ ..()
START_PROCESSING(SSturfs, src)
next_check = world.time+5 SECONDS
/turf/unsimulated/wall/supermatter/Destroy()
STOP_PROCESSING(SSturfs, src)
- return ..()
+ ..()
/turf/unsimulated/wall/supermatter/process()
// Only check infrequently.
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
index d385630b0aa..21edfd5a6b4 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
@@ -98,7 +98,7 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
else
L.update_lumcount(0.0, 0.4, 1)
- for(var/turf/space/T in world)
+ for(var/turf/space/T in turfs)
OnTurfChange(T)
/datum/universal_state/supermatter_cascade/proc/MiscSet()
diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm
index 6bba1065b16..8584148d729 100644
--- a/code/game/gamemodes/events/wormholes.dm
+++ b/code/game/gamemodes/events/wormholes.dm
@@ -3,7 +3,7 @@
var/list/pick_turfs = list()
var/list/Z_choices = list()
Z_choices |= GLOB.using_map.get_map_levels(1, FALSE)
- for(var/turf/simulated/floor/T in world)
+ for(var/turf/simulated/floor/T in turfs)
if(T.z in Z_choices)
if(!T.block_tele)
pick_turfs += T
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 7b789c4d921..4ece1f1641a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -55,7 +55,7 @@
var/zoomdevicename = null //name used for message when binoculars/scope is used
var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars.
- var/embed_chance = EMBED_CHANCE_UNSET //0 won't embed, and 100 will always embed
+ var/embed_chance = -1 //0 won't embed, and 100 will always embed
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
@@ -91,10 +91,9 @@
var/icon/default_worn_icon //Default on-mob icon
var/worn_layer //Default on-mob layer
-/obj/item/Initialize(mapload)
- . = ..()
- //Potential memory optimization: Making embed chance a getter if unset.
- if(embed_chance == EMBED_CHANCE_UNSET)
+/obj/item/New()
+ ..()
+ if(embed_chance < 0)
if(sharp)
embed_chance = max(5, round(force/w_class))
else
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 670472307ff..d817c9507d9 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -1,4 +1,4 @@
-GLOBAL_LIST_EMPTY(GPS_list)
+var/list/GPS_list = list()
/obj/item/device/gps
name = "global positioning system"
@@ -17,14 +17,14 @@ GLOBAL_LIST_EMPTY(GPS_list)
var/hide_signal = FALSE // If true, signal is not visible to other GPS devices.
var/can_hide_signal = FALSE // If it can toggle the above var.
-/obj/item/device/gps/Initialize(mapload)
+/obj/item/device/gps/Initialize()
. = ..()
- GLOB.GPS_list += src
+ GPS_list += src
name = "global positioning system ([gps_tag])"
update_icon()
/obj/item/device/gps/Destroy()
- GLOB.GPS_list -= src
+ GPS_list -= src
return ..()
/obj/item/device/gps/AltClick(mob/user)
@@ -59,11 +59,11 @@ GLOBAL_LIST_EMPTY(GPS_list)
visible_message("\The [src] appears to be functional again.")
/obj/item/device/gps/update_icon()
- cut_overlays()
+ overlays.Cut()
if(emped)
- add_overlay("emp")
+ overlays += image(icon, src, "emp")
else if(tracking)
- add_overlay("working")
+ overlays += image(icon, src, "working")
/obj/item/device/gps/attack_self(mob/user)
display(user)
@@ -84,7 +84,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
dat["gps_list"] = list()
dat["z_level_detection"] = GLOB.using_map.get_map_levels(curr.z, long_range)
- for(var/obj/item/device/gps/G in GLOB.GPS_list - src)
+ for(var/obj/item/device/gps/G in GPS_list - src)
if(!G.tracking || G.emped || G.hide_signal)
continue
@@ -198,7 +198,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps/science/on
tracking = TRUE
-
+
/obj/item/device/gps/science/rd
icon_state = "gps-rd"
gps_tag = "RD0"
@@ -231,11 +231,11 @@ GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps/engineering/on
tracking = TRUE
-
+
/obj/item/device/gps/engineering/ce
icon_state = "gps-ce"
gps_tag = "CE0"
-
+
/obj/item/device/gps/engineering/atmos
icon_state = "gps-atm"
gps_tag = "ATM0"
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index a48ccfbbc8e..45d70a3b782 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -21,7 +21,7 @@
var/show_examine = TRUE // Does this pop up on a mob when the mob is examined?
var/register_as_dangerous_object = FALSE // Should this tell its turf that it is dangerous automatically?
-/obj/Initialize(mapload)
+/obj/Initialize()
if(register_as_dangerous_object)
register_dangerous_to_step()
return ..()
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index 975dab158f3..80b2ab472aa 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -17,12 +17,6 @@
var/dirty_prob = 2 // Chance of being dirty roundstart
var/dirt = 0
-/turf/simulated/Initialize(mapload)
- . = ..()
- levelupdate()
- // HOOK FOR MOB/FREELOOK SYSTEM
- updateVisibility(src)
-
// This is not great.
/turf/simulated/proc/wet_floor(var/wet_val = 1)
if(wet > 2) //Can't mop up ice
@@ -61,6 +55,12 @@
B.clean_blood()
..()
+/turf/simulated/New()
+ ..()
+ if(istype(loc, /area/chapel))
+ holy = 1
+ levelupdate()
+
/turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808")
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
if(!tracks)
diff --git a/code/game/turfs/simulated/dungeon/wall.dm b/code/game/turfs/simulated/dungeon/wall.dm
index e48710b81b7..6c39e017982 100644
--- a/code/game/turfs/simulated/dungeon/wall.dm
+++ b/code/game/turfs/simulated/dungeon/wall.dm
@@ -3,8 +3,8 @@
/turf/simulated/wall/dungeon
block_tele = TRUE // Anti-cheese.
-/turf/simulated/wall/dungeon/Initialize(mapload, materialtype, rmaterialtype, girder_material)
- return ..(mapload, "dungeonium")
+/turf/simulated/wall/dungeon/New(var/newloc)
+ ..(newloc,"dungeonium")
/turf/simulated/wall/dungeon/attackby()
return
@@ -32,10 +32,9 @@
mining_overlay_cache["rock_side_[place_dir]"] = image('icons/turf/walls.dmi', "rock_side", dir = place_dir)
T.add_overlay(mining_overlay_cache["rock_side_[place_dir]"])
-/turf/simulated/wall/solidrock/Initialize(mapload)
- . = ..()
+/turf/simulated/wall/solidrock/Initialize()
icon_state = base_state
- update_icon(1) // TODO: /tg/ icon smoothing
+ update_icon(1)
/turf/simulated/wall/solidrock/attackby()
return
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index eac80c49d4d..f6b30f26020 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -35,8 +35,8 @@
/turf/simulated/floor/is_plating()
return !flooring
-/turf/simulated/floor/Initialize(mapload, floortype)
- . = ..()
+/turf/simulated/floor/New(var/newloc, var/floortype)
+ ..(newloc)
if(!floortype && initial_flooring)
floortype = initial_flooring
if(floortype)
diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm
index 449d5cbec20..a378cc48daf 100644
--- a/code/game/turfs/simulated/outdoors/outdoors.dm
+++ b/code/game/turfs/simulated/outdoors/outdoors.dm
@@ -24,10 +24,10 @@ var/list/turf_edge_cache = list()
update_icon()
. = ..()
-/turf/simulated/floor/Initialize(mapload)
- . = ..()
+/turf/simulated/floor/New()
if(outdoors)
SSplanets.addTurf(src)
+ ..()
/turf/simulated/floor/Destroy()
if(outdoors)
diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm
index c0a3459761e..724219e48a9 100644
--- a/code/game/turfs/simulated/wall_types.dm
+++ b/code/game/turfs/simulated/wall_types.dm
@@ -1,89 +1,89 @@
/turf/simulated/wall/r_wall
icon_state = "rgeneric"
-/turf/simulated/wall/r_wall/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, "plasteel","plasteel") //3strong
+/turf/simulated/wall/r_wall/New(var/newloc)
+ ..(newloc, "plasteel","plasteel") //3strong
-/turf/simulated/wall/shull/Initialize(mapload, materialtype, rmaterialtype, girdertype) //Spaaaace ship.
- return ..(mapload, MAT_STEELHULL, null, MAT_STEELHULL)
-/turf/simulated/wall/rshull/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_STEELHULL, MAT_STEELHULL, MAT_STEELHULL)
-/turf/simulated/wall/pshull/Initialize(mapload, materialtype, rmaterialtype, girdertype) //Spaaaace-er ship.
- return ..(mapload, MAT_PLASTEELHULL, null, MAT_PLASTEELHULL)
-/turf/simulated/wall/rpshull/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_PLASTEELHULL, MAT_PLASTEELHULL, MAT_PLASTEELHULL)
-/turf/simulated/wall/dshull/Initialize(mapload, materialtype, rmaterialtype, girdertype) //Spaaaace-est ship.
- return ..(mapload, MAT_DURASTEELHULL, null, MAT_DURASTEELHULL)
-/turf/simulated/wall/rdshull/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_DURASTEELHULL, MAT_DURASTEELHULL, MAT_DURASTEELHULL)
-/turf/simulated/wall/thull/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_TITANIUMHULL, null, MAT_TITANIUMHULL)
-/turf/simulated/wall/rthull/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_TITANIUMHULL, MAT_TITANIUMHULL, MAT_TITANIUMHULL)
+/turf/simulated/wall/shull/New(var/newloc) //Spaaaace ship.
+ ..(newloc, MAT_STEELHULL, null, MAT_STEELHULL)
+/turf/simulated/wall/rshull/New(var/newloc)
+ ..(newloc, MAT_STEELHULL, MAT_STEELHULL, MAT_STEELHULL)
+/turf/simulated/wall/pshull/New(var/newloc) //Spaaaace-er ship.
+ ..(newloc, MAT_PLASTEELHULL, null, MAT_PLASTEELHULL)
+/turf/simulated/wall/rpshull/New(var/newloc)
+ ..(newloc, MAT_PLASTEELHULL, MAT_PLASTEELHULL, MAT_PLASTEELHULL)
+/turf/simulated/wall/dshull/New(var/newloc) //Spaaaace-est ship.
+ ..(newloc, MAT_DURASTEELHULL, null, MAT_DURASTEELHULL)
+/turf/simulated/wall/rdshull/New(var/newloc)
+ ..(newloc, MAT_DURASTEELHULL, MAT_DURASTEELHULL, MAT_DURASTEELHULL)
+/turf/simulated/wall/thull/New(var/newloc)
+ ..(newloc, MAT_TITANIUMHULL, null, MAT_TITANIUMHULL)
+/turf/simulated/wall/rthull/New(var/newloc)
+ ..(newloc, MAT_TITANIUMHULL, MAT_TITANIUMHULL, MAT_TITANIUMHULL)
/turf/simulated/wall/cult
icon_state = "cult"
-/turf/simulated/wall/cult/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"cult","cult2","cult")
+/turf/simulated/wall/cult/New(var/newloc)
+ ..(newloc,"cult","cult2","cult")
/turf/unsimulated/wall/cult
name = "cult wall"
desc = "Hideous images dance beneath the surface."
icon = 'icons/turf/wall_masks.dmi'
icon_state = "cult"
-/turf/simulated/wall/iron/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"iron")
-/turf/simulated/wall/uranium/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"uranium")
-/turf/simulated/wall/diamond/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"diamond")
-/turf/simulated/wall/gold/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"gold")
-/turf/simulated/wall/silver/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"silver")
-/turf/simulated/wall/lead/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"lead")
-/turf/simulated/wall/r_lead/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"lead", "lead")
-/turf/simulated/wall/phoron/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"phoron")
-/turf/simulated/wall/sandstone/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"sandstone")
-/turf/simulated/wall/ironphoron/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"iron","phoron")
-/turf/simulated/wall/golddiamond/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"gold","diamond")
-/turf/simulated/wall/silvergold/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"silver","gold")
-/turf/simulated/wall/sandstonediamond/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"sandstone","diamond")
-/turf/simulated/wall/snowbrick/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"packed snow")
+/turf/simulated/wall/iron/New(var/newloc)
+ ..(newloc,"iron")
+/turf/simulated/wall/uranium/New(var/newloc)
+ ..(newloc,"uranium")
+/turf/simulated/wall/diamond/New(var/newloc)
+ ..(newloc,"diamond")
+/turf/simulated/wall/gold/New(var/newloc)
+ ..(newloc,"gold")
+/turf/simulated/wall/silver/New(var/newloc)
+ ..(newloc,"silver")
+/turf/simulated/wall/lead/New(var/newloc)
+ ..(newloc,"lead")
+/turf/simulated/wall/r_lead/New(var/newloc)
+ ..(newloc,"lead", "lead")
+/turf/simulated/wall/phoron/New(var/newloc)
+ ..(newloc,"phoron")
+/turf/simulated/wall/sandstone/New(var/newloc)
+ ..(newloc,"sandstone")
+/turf/simulated/wall/ironphoron/New(var/newloc)
+ ..(newloc,"iron","phoron")
+/turf/simulated/wall/golddiamond/New(var/newloc)
+ ..(newloc,"gold","diamond")
+/turf/simulated/wall/silvergold/New(var/newloc)
+ ..(newloc,"silver","gold")
+/turf/simulated/wall/sandstonediamond/New(var/newloc)
+ ..(newloc,"sandstone","diamond")
+/turf/simulated/wall/snowbrick/New(var/newloc)
+ ..(newloc,"packed snow")
-/turf/simulated/wall/resin/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"resin",null,"resin")
+/turf/simulated/wall/resin/New(var/newloc)
+ ..(newloc,"resin",null,"resin")
// Kind of wondering if this is going to bite me in the butt.
-/turf/simulated/wall/skipjack/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"alienalloy")
+/turf/simulated/wall/skipjack/New(var/newloc)
+ ..(newloc,"alienalloy")
/turf/simulated/wall/skipjack/attackby()
return
-/turf/simulated/wall/titanium/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"titanium")
+/turf/simulated/wall/titanium/New(var/newloc)
+ ..(newloc,"titanium")
-/turf/simulated/wall/durasteel/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload,"durasteel", "durasteel")
+/turf/simulated/wall/durasteel/New(var/newloc)
+ ..(newloc,"durasteel", "durasteel")
-/turf/simulated/wall/wood/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_WOOD)
+/turf/simulated/wall/wood/New(var/newloc)
+ ..(newloc, MAT_WOOD)
-/turf/simulated/wall/sifwood/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_SIFWOOD)
+/turf/simulated/wall/sifwood/New(var/newloc)
+ ..(newloc, MAT_SIFWOOD)
-/turf/simulated/wall/log/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_LOG)
+/turf/simulated/wall/log/New(var/newloc)
+ ..(newloc, MAT_LOG)
-/turf/simulated/wall/log_sif/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- return ..(mapload, MAT_SIFLOG)
+/turf/simulated/wall/log_sif/New(var/newloc)
+ ..(newloc, MAT_SIFLOG)
// Shuttle Walls
/turf/simulated/shuttle/wall
@@ -152,8 +152,8 @@
icon_state = "alien-nj"
join_group = null
-/turf/simulated/shuttle/wall/Initialize(mapload)
- . = ..()
+/turf/simulated/shuttle/wall/New()
+ ..()
//To allow mappers to rename shuttle walls to like "redfloor interior" or whatever for ease of use.
name = true_name
diff --git a/code/game/turfs/simulated/wall_types_vr.dm b/code/game/turfs/simulated/wall_types_vr.dm
index 4d7fb5ddfdd..4d939c2004d 100644
--- a/code/game/turfs/simulated/wall_types_vr.dm
+++ b/code/game/turfs/simulated/wall_types_vr.dm
@@ -19,9 +19,9 @@
/turf/simulated/flesh/attackby()
return
-/turf/simulated/flesh/Initialize(mapload)
- . = ..()
- update_icon(1) //TODO: TG icon smoothing
+/turf/simulated/flesh/New()
+ ..()
+ update_icon(1)
var/list/flesh_overlay_cache = list()
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 770b78f55ea..1d8f62edf10 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -27,8 +27,8 @@
for(var/obj/O in src)
O.hide(1)
-/turf/simulated/wall/Initialize(mapload, materialtype, rmaterialtype, girdertype)
- . = ..()
+/turf/simulated/wall/New(var/newloc, var/materialtype, var/rmaterialtype, var/girdertype)
+ ..(newloc)
icon_state = "blank"
if(!materialtype)
materialtype = DEFAULT_WALL_MATERIAL
@@ -39,13 +39,12 @@
if(!isnull(rmaterialtype))
reinf_material = get_material_by_name(rmaterialtype)
update_material()
- if(material?.radioactivity || reinf_material?.radioactivity || girder_material?.radioactivity)
- START_PROCESSING(SSturfs, src)
+ START_PROCESSING(SSturfs, src)
/turf/simulated/wall/Destroy()
STOP_PROCESSING(SSturfs, src)
- dismantle_wall(null, null, TRUE)
- return ..()
+ dismantle_wall(null,null,1)
+ ..()
/turf/simulated/wall/process()
// Calling parent will kill processing
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 2d19691b406..beb086dd342 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -10,7 +10,7 @@
var/keep_sprite = FALSE
// heat_capacity = 700000 No.
-/turf/space/Initialize(mapload)
+/turf/space/Initialize()
. = ..()
if(!keep_sprite)
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm
index 3a489103537..e6d171204b2 100644
--- a/code/game/turfs/space/transit.dm
+++ b/code/game/turfs/space/transit.dm
@@ -28,8 +28,8 @@
pushdirection = SOUTH // south because the space tile is scrolling south
var/static/list/phase_shift_by_x
-/turf/space/transit/north/Initialize(mapload)
- . = ..()
+/turf/space/transit/north/New()
+ ..()
if(!phase_shift_by_x)
phase_shift_by_x = get_cross_shift_list(15)
@@ -44,8 +44,8 @@
pushdirection = SOUTH // south because the space tile is scrolling south
var/static/list/phase_shift_by_x
-/turf/space/transit/south/Initialize(mapload)
- . = ..()
+/turf/space/transit/south/New()
+ ..()
if(!phase_shift_by_x)
phase_shift_by_x = get_cross_shift_list(15)
@@ -62,8 +62,8 @@
pushdirection = WEST
var/static/list/phase_shift_by_y
-/turf/space/transit/east/Initialize(mapload)
- . = ..()
+/turf/space/transit/east/New()
+ ..()
if(!phase_shift_by_y)
phase_shift_by_y = get_cross_shift_list(15)
@@ -78,8 +78,8 @@
pushdirection = WEST
var/static/list/phase_shift_by_y
-/turf/space/transit/west/Initialize(mapload)
- . = ..()
+/turf/space/transit/west/New()
+ ..()
if(!phase_shift_by_y)
phase_shift_by_y = get_cross_shift_list(15)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index f221b6de21e..d028d15b807 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -34,107 +34,26 @@
var/can_build_into_floor = FALSE // Used for things like RCDs (and maybe lattices/floor tiles in the future), to see if a floor should replace it.
var/list/dangerous_objects // List of 'dangerous' objs that the turf holds that can cause something bad to happen when stepped on, used for AI mobs.
-/turf/Initialize(mapload)
- if(flags & INITIALIZED)
- stack_trace("Warning: [src]([type]) initialized multiple times!")
- flags |= INITIALIZED
+/turf/New()
+ ..()
+ for(var/atom/movable/AM as mob|obj in src)
+ spawn( 0 )
+ src.Entered(AM)
+ return
+ turfs |= src
- // by default, vis_contents is inherited from the turf that was here before
- vis_contents.Cut()
-
- if(color)
- add_atom_colour(color, FIXED_COLOUR_PRIORITY)
-
-/*
- assemble_baseturfs()
-*/
-
-/*
- if(smooth)
- queue_smooth(src)
- visibilityChanged()
-*/
-
- for(var/atom/movable/AM in src)
- Entered(AM)
-
-/*
- var/area/A = loc
- if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
- add_overlay(/obj/effect/fullbright)
-
- if (light_power && light_range)
- update_light()
-*/
-
- if (opacity)
- has_opaque_atom = TRUE
-
-/*
- if(requires_activation)
- CALCULATE_ADJACENT_TURFS(src)
- SSair.add_to_active(src)
-*/
-
-/*
- var/turf/T = SSmapping.get_turf_above(src)
- if(T)
- T.multiz_turf_new(src, DOWN)
- SEND_SIGNAL(T, COMSIG_TURF_MULTIZ_NEW, src, DOWN)
- T = SSmapping.get_turf_below(src)
- if(T)
- T.multiz_turf_new(src, UP)
- SEND_SIGNAL(T, COMSIG_TURF_MULTIZ_NEW, src, UP)
-*/
-
- ComponentInitialize()
-
- // VORESTATION EDIT
- if(movement_cost && pathweight == 1) // This updates pathweight automatically.
- pathweight = movement_cost
if(dynamic_lighting)
luminosity = 0
else
luminosity = 1
- // VORE/POLARIS EDIT END
- return INITIALIZE_HINT_NORMAL
+ if(movement_cost && pathweight == 1) // This updates pathweight automatically.
+ pathweight = movement_cost
-/turf/Destroy(force)
- . = QDEL_HINT_IWILLGC
-/*
- if(!changing_turf)
- stack_trace("Incorrect turf deletion")
- changing_turf = FALSE
-*/
-
-/*
- var/turf/T = SSmapping.get_turf_above(src)
- if(T)
- T.multiz_turf_del(src, DOWN)
- T = SSmapping.get_turf_below(src)
- if(T)
- T.multiz_turf_del(src, UP)
-*/
- if(force)
- ..()
- //this will completely wipe turf state
- var/turf/B = new world.turf(src)
- for(var/A in B.contents)
- qdel(A)
- for(var/I in B.vars)
- B.vars[I] = null
- return
-/*
- SSair.remove_from_active(src)
- visibilityChanged()
- QDEL_LIST(blueprint_data)
-*/
- flags &= ~INITIALIZED
-/*
- requires_activation = FALSE
-*/
+/turf/Destroy()
+ turfs -= src
..()
+ return QDEL_HINT_IWILLGC
/turf/ex_act(severity)
return 0
diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm
index 9c9795bad20..30a9bcc0252 100644
--- a/code/game/turfs/unsimulated.dm
+++ b/code/game/turfs/unsimulated.dm
@@ -3,7 +3,7 @@
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
-/turf/unsimulated/Initialize(mapload)
+/turf/unsimulated/Initialize()
flags |= INITIALIZED
return INITIALIZE_HINT_NORMAL
diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm
index 0e1196e1096..838de482e41 100644
--- a/code/game/turfs/unsimulated/beach.dm
+++ b/code/game/turfs/unsimulated/beach.dm
@@ -15,14 +15,9 @@
name = "Water"
icon_state = "water"
-/turf/unsimulated/beach/water/Initialize(mapload)
- . = ..()
- add_overlay(/obj/effect/turf_overlay/beach_water, TRUE)
-
-/obj/effect/turf_overlay/beach_water
- icon = 'icons/misc/beach.dmi'
- icon_state = "water2"
- layer = ABOVE_MOB_LAYER
+/turf/unsimulated/beach/water/New()
+ ..()
+ add_overlay(image("icon"='icons/misc/beach.dmi',"icon_state"="water2","layer"=MOB_LAYER+0.1))
/turf/simulated/floor/beach
name = "Beach"
@@ -59,11 +54,6 @@
/turf/simulated/floor/beach/water/ocean
icon_state = "seadeep"
-/turf/simulated/floor/beach/water/Initialize(mapload)
- . = ..()
- add_overlay(/obj/effect/turf_overlay/beach_ocean, TRUE)
-
-/obj/effect/turf_overlay/beach_ocean
- icon = 'icons/misc/beach.dmi'
- icon_state = "water5"
- layer = ABOVE_MOB_LAYER
+/turf/simulated/floor/beach/water/New()
+ ..()
+ add_overlay(image("icon"='icons/misc/beach.dmi',"icon_state"="water5","layer"=MOB_LAYER+0.1))
diff --git a/code/game/turfs/unsimulated/planetary.dm b/code/game/turfs/unsimulated/planetary.dm
index 217d20d3e61..35cd7aa4a80 100644
--- a/code/game/turfs/unsimulated/planetary.dm
+++ b/code/game/turfs/unsimulated/planetary.dm
@@ -17,13 +17,13 @@
phoron = 0
temperature = T20C
-/turf/unsimulated/wall/planetary/Initialize(mapload)
- . = ..()
+/turf/unsimulated/wall/planetary/New()
+ ..()
SSplanets.addTurf(src)
/turf/unsimulated/wall/planetary/Destroy()
SSplanets.removeTurf(src)
- return ..()
+ ..()
/turf/unsimulated/wall/planetary/proc/set_temperature(var/new_temperature)
if(new_temperature == temperature)
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 091321532f2..b368da29d9a 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -21,7 +21,7 @@
else
alert("Admin jumping disabled")
-/client/proc/jumptoturf(turf/T in world)
+/client/proc/jumptoturf(var/turf/T in turfs)
set name = "Jump to Turf"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
@@ -29,10 +29,12 @@
if(config_legacy.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
- usr.forceMove(T)
+ usr.on_mob_jump()
+ usr.loc = T
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
+ return
/client/proc/jumptomob(var/mob/M in mob_list)
set category = "Admin"
diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm
index 28d8eee47c9..c8643e975fd 100644
--- a/code/modules/admin/verbs/atmosdebug.dm
+++ b/code/modules/admin/verbs/atmosdebug.dm
@@ -28,7 +28,7 @@
usr << "Checking for overlapping pipes..."
next_turf:
- for(var/turf/T in world)
+ for(var/turf/T in turfs)
for(var/dir in cardinal)
var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0)
for(var/obj/machinery/atmospherics/pipe in T)
diff --git a/code/modules/admin/verbs/grief_fixers.dm b/code/modules/admin/verbs/grief_fixers.dm
index 7059fef907f..2d524b4c23a 100644
--- a/code/modules/admin/verbs/grief_fixers.dm
+++ b/code/modules/admin/verbs/grief_fixers.dm
@@ -38,7 +38,7 @@
unsorted_overlays |= gas_data.tile_overlay[id]
- for(var/turf/simulated/T in world)
+ for(var/turf/simulated/T in turfs)
T.air = null
T.overlays.Remove(unsorted_overlays)
T.zone = null
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 81b7921fc92..1f87401a601 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -86,7 +86,7 @@
to_chat(src, "Only administrators may use this command.")
return
- var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
+ var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
if (!msg)
return
@@ -109,13 +109,13 @@
to_chat(src, "Only administrators may use this command.")
return
- var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
+ var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text)
if (!msg)
return
world << "[msg]"
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
- message_admins(" GlobalNarrate: [key_name_admin(usr)] : [msg]", 1)
+ message_admins(" GlobalNarrate: [key_name_admin(usr)] : [msg]
", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
@@ -132,7 +132,7 @@
if(!M)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
+ var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to your target:")) as text)
if( !msg )
return
@@ -519,7 +519,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
to_chat(src, "Only administrators may use this command.")
return
- var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
+ var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
if(!input)
return
for(var/mob/living/silicon/ai/M in mob_list)
diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm
index c6aca6d98fe..c1c7ebedafa 100644
--- a/code/modules/holodeck/HolodeckObjects.dm
+++ b/code/modules/holodeck/HolodeckObjects.dm
@@ -67,8 +67,7 @@
name = "reinforced holofloor"
icon_state = "reinforced"
-/turf/simulated/floor/holofloor/space/Initialize(mapload)
- . = ..()
+/turf/simulated/floor/holofloor/space/New()
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
/turf/simulated/floor/holofloor/beach
diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm
index 1fe18dcbcdf..de3e5dc6ef3 100644
--- a/code/modules/lighting/lighting_turf.dm
+++ b/code/modules/lighting/lighting_turf.dm
@@ -9,6 +9,12 @@
var/tmp/list/datum/lighting_corner/corners
var/tmp/has_opaque_atom = FALSE // Not to be confused with opacity, this will be TRUE if there's any opaque atom on the tile.
+/turf/New()
+ . = ..()
+
+ if(opacity)
+ has_opaque_atom = TRUE
+
// Causes any affecting light sources to be queued for a visibility update, for example a door got opened.
/turf/proc/reconsider_lights()
for(var/datum/light_source/L in affecting_lights)
diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm
index 610b1ba4825..8f68eb83e9e 100644
--- a/code/modules/mob/freelook/update_triggers.dm
+++ b/code/modules/mob/freelook/update_triggers.dm
@@ -17,6 +17,11 @@
updateVisibility(src)
return ..()
+/turf/simulated/New()
+ ..()
+ updateVisibility(src)
+
+
// STRUCTURES
/obj/structure/Destroy()
diff --git a/code/modules/telesci/construction.dm b/code/modules/telesci/construction.dm
index e7e810cff51..9fc487f0580 100644
--- a/code/modules/telesci/construction.dm
+++ b/code/modules/telesci/construction.dm
@@ -47,7 +47,15 @@
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_PHORON = 4, TECH_BLUESPACE = 5)
build_path = /obj/item/weapon/circuitboard/telesci_pad
sort_string = "HAAEB"
-
+/* Normal GPS has all the fancy features now
+/datum/design/item/telesci_gps
+ name = "GPS device"
+ id = "telesci_gps"
+ req_tech = list(TECH_MATERIAL = 2, TECH_BLUESPACE = 2)
+ materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 1000)
+ build_path = /obj/item/device/gps/advanced
+ sort_string = "HAAEB"
+*/
/datum/design/circuit/quantum_pad
name = "Quantum Pad"
id = "quantum_pad"
diff --git a/code/modules/telesci/gps_advanced.dm b/code/modules/telesci/gps_advanced.dm
new file mode 100644
index 00000000000..59711deceda
--- /dev/null
+++ b/code/modules/telesci/gps_advanced.dm
@@ -0,0 +1,79 @@
+
+// DEPRECATED - The normal GPS has the advanced features, now. This is obsolete.
+
+// These are distinguished from the ordinary "Relay Position Devices" that just print your location
+// In that they are also all networked with each other to show each other's locations.
+/obj/item/device/gps/advanced
+ name = "global positioning system"
+ desc = "Helping lost spacemen find their way through the planets since 1995."
+ icon = 'icons/obj/telescience.dmi'
+ icon_state = "gps-c"
+ w_class = ITEMSIZE_SMALL
+ slot_flags = SLOT_BELT
+ origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
+ var/gpstag = "COM0"
+ emped = 0
+
+/obj/item/device/gps/advanced/New()
+ ..()
+ GPS_list.Add(src)
+ name = "global positioning system ([gpstag])"
+ overlays += "working"
+
+/obj/item/device/gps/advanced/Destroy()
+ GPS_list.Remove(src)
+ . = ..()
+
+/obj/item/device/gps/advanced/emp_act(severity)
+ emped = 1
+ overlays -= "working"
+ overlays += "emp"
+ spawn(300)
+ emped = 0
+ overlays -= "emp"
+ overlays += "working"
+
+/obj/item/device/gps/advanced/attack_self(mob/user as mob)
+
+ var/obj/item/device/gps/advanced/t = ""
+ if(emped)
+ t += "ERROR"
+ else
+ t += "
Set Tag "
+ t += "
Tag: [gpstag]"
+
+ for(var/obj/item/device/gps/advanced/G in GPS_list)
+ var/turf/pos = get_turf(G)
+ var/area/gps_area = get_area(G)
+ var/tracked_gpstag = G.gpstag
+ if(G.emped == 1)
+ t += "
[tracked_gpstag]: ERROR"
+ else
+ t += "
[tracked_gpstag]: [format_text(gps_area.name)] ([pos.x], [pos.y], [pos.z])"
+
+ var/datum/browser/popup = new(user, "GPS", name, 600, 450)
+ popup.set_content(t)
+ popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
+ popup.open()
+
+/obj/item/device/gps/advanced/Topic(href, href_list)
+ ..()
+ if(href_list["tag"] )
+ var/a = input("Please enter desired tag.", name, gpstag) as text
+ a = uppertext(copytext(sanitize(a), 1, 5))
+ if(src.loc == usr)
+ gpstag = a
+ name = "global positioning system ([gpstag])"
+ attack_self(usr)
+
+/obj/item/device/gps/advanced/science
+ icon_state = "gps-s"
+ gpstag = "SCI0"
+
+/obj/item/device/gps/advanced/engineering
+ icon_state = "gps-e"
+ gpstag = "ENG0"
+
+/obj/item/device/gps/advanced/security
+ icon_state = "gps-sec"
+ gpstag = "SEC0"
diff --git a/code/modules/turbolift/turbolift_turfs.dm b/code/modules/turbolift/turbolift_turfs.dm
index e2ddc4bd8da..632160efaa1 100644
--- a/code/modules/turbolift/turbolift_turfs.dm
+++ b/code/modules/turbolift/turbolift_turfs.dm
@@ -1,2 +1,2 @@
-/turf/simulated/wall/elevator/Initialize(mapload, material_type, rmaterial_type, girder_material)
- return ..(mapload, "elevatorium")
+/turf/simulated/wall/elevator/New(var/newloc)
+ ..(newloc,"elevatorium")
diff --git a/maps/tether/tether_turfs.dm b/maps/tether/tether_turfs.dm
index 99e7deec7b5..8f2172981aa 100644
--- a/maps/tether/tether_turfs.dm
+++ b/maps/tether/tether_turfs.dm
@@ -2,8 +2,8 @@
VIRGO3B_TURF_CREATE(/turf/simulated/open)
/turf/simulated/open/virgo3b
edge_blending_priority = 0.5 //Turfs which also have e_b_p and higher than this will plop decorative edges onto this turf
-/turf/simulated/open/virgo3b/Initialize(mapload)
- . = ..()
+/turf/simulated/open/virgo3b/New()
+ ..()
if(outdoors)
SSplanets.addTurf(src)
diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm
index ed13fb9fa7e..12dc58e379a 100644
--- a/maps/~map_system/maps.dm
+++ b/maps/~map_system/maps.dm
@@ -125,11 +125,14 @@ var/list/all_maps = list()
// Used to apply various post-compile procedural effects to the map.
/datum/map/proc/refresh_mining_turfs()
+
+ set background = 1
+ set waitfor = 0
+
// Update all turfs to ensure everything looks good post-generation. Yes,
// it's brute-forcey, but frankly the alternative is a mine turf rewrite.
- for(var/turf/simulated/mineral/M in world) // Ugh.
+ for(var/turf/simulated/mineral/M in turfs) // Ugh.
M.update_icon()
- CHECK_TICK
/datum/map/proc/get_network_access(var/network)
return 0
diff --git a/vorestation.dme b/vorestation.dme
index 058d5f8fd7e..7b042865169 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -91,7 +91,6 @@
#include "code\__DEFINES\vv.dm"
#include "code\__DEFINES\xenoarcheaology.dm"
#include "code\__DEFINES\ZAS.dm"
-#include "code\__DEFINES\color\colour_priority.dm"
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
@@ -3244,6 +3243,7 @@
#include "code\modules\tables\update_triggers.dm"
#include "code\modules\telesci\bscyrstal.dm"
#include "code\modules\telesci\construction.dm"
+#include "code\modules\telesci\gps_advanced.dm"
#include "code\modules\telesci\quantum_pad.dm"
#include "code\modules\telesci\telepad.dm"
#include "code\modules\telesci\telesci_computer.dm"