Activated magboots will now, definitely, prevent airflow based grieving of your personage. (Included is a possible fix for airflow opening doors by throwing you at them)

Added in code to debug ZAS tile interactions, currently in the unchecked "Debug" file.
The blasted FloodFill proc now works properly, and zones are connecting right (Should finally fix that damn part of medbay not connecting to the hallway)
Plasma can contaminate again.
The master controller and world startup code has been reworked for faster server boots.
Fixed a runtime originating from a Away Mission map trying to create objects of type "null"
This commit is contained in:
SkyMarshal
2013-04-17 00:45:36 -07:00
parent 690d6bbf06
commit 76d561f003
9 changed files with 91 additions and 21 deletions

View File

@@ -248,8 +248,8 @@ atom/movable
if(src:buckled) if(src:buckled)
return return
if(src:shoes) if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots) if(istype(src:shoes, /obj/item/clothing/shoes/magboots))
if(src:shoes.flags & NOSLIP) if(src:shoes:magpulse)
return return
src << "\red You are sucked away by airflow!" src << "\red You are sucked away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.

View File

@@ -12,6 +12,50 @@ client/verb/Zone_Info(turf/T as null|turf)
T.overlays -= 'debug_group.dmi' T.overlays -= 'debug_group.dmi'
T.overlays -= 'debug_connect.dmi' T.overlays -= 'debug_connect.dmi'
client/verb/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
if(!istype(T))
return
var/direction_list = list(\
"North" = NORTH,\
"South" = SOUTH,\
"East" = EAST,\
"West" = WEST,\
"None" = null)
var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
if(!direction)
return
if(direction == "None")
if(T.CanPass(null, T, 0,0))
mob << "The turf can pass air! :D"
else
mob << "No air passage :x"
return
var/turf/simulated/other_turf = get_step(T, direction_list[direction])
if(!istype(other_turf))
return
var/pass_directions = T.CanPass(null, other_turf, 0, 0) + 2*other_turf.CanPass(null, T, 0, 0)
switch(pass_directions)
if(0)
mob << "Neither turf can connect. :("
if(1)
mob << "The initial turf only can connect. :\\"
if(2)
mob << "The other turf can connect, but not the initial turf. :/"
if(3)
mob << "Both turfs can connect! :)"
zone/proc zone/proc
DebugDisplay(mob/M) DebugDisplay(mob/M)
if(!dbg_output) if(!dbg_output)

View File

@@ -346,7 +346,7 @@ datum
if(current == NT) if(current == NT)
return //We made it, yaaay~ return //We made it, yaaay~
stepped_back = 0 stepped_back = 0
zone.rebuild = 1 zone.rebuild = 1
else if ( current.air_check_directions&test_dir ) else if ( current.air_check_directions&test_dir )
//Try to connect to the left hand side. //Try to connect to the left hand side.

View File

@@ -21,7 +21,24 @@ proc/FloodFill(turf/simulated/start)
if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T)) if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T))
if(!O.HasDoor()) if(T.HasDoor())
//If they both have doors, then they are nto able to connect period.
if(O.HasDoor())
continue
//connect first to north and west
if(d == NORTH || d == WEST)
open += O
else
var/turf/simulated/W = get_step(O, WEST)
var/turf/simulated/N = get_step(O, NORTH)
if( !O.ZCanPass(N) && !O.ZCanPass(W) )
//If it cannot connect either to the north or west, connect it!
open += O
else if(!O.HasDoor())
open += O open += O
else else
@@ -108,8 +125,10 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B)
//Make some preliminary checks to see if the connection is valid. //Make some preliminary checks to see if the connection is valid.
if(!A.zone || !B.zone) return if(!A.zone || !B.zone) return
if(A.zone == B.zone) return if(A.zone == B.zone) return
if(!A.CanPass(null,B,0,0)) return if(!A.CanPass(null,B,0,0)) return
if(A.CanPass(null,B,1.5,1))
if(A.CanPass(null,B,0,1))
return ZMerge(A.zone,B.zone) return ZMerge(A.zone,B.zone)
//Ensure the connection isn't already made. //Ensure the connection isn't already made.

View File

@@ -42,7 +42,6 @@ obj/var/contaminated = 0
obj/item/proc obj/item/proc
can_contaminate() can_contaminate()
return 0
//Clothing and backpacks can be contaminated. //Clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD) return 0 if(flags & PLASMAGUARD) return 0
else if(istype(src,/obj/item/clothing)) return 1 else if(istype(src,/obj/item/clothing)) return 1

View File

@@ -38,12 +38,6 @@ datum/controller/game_controller/New()
del(master_controller) del(master_controller)
master_controller = src master_controller = src
createRandomZlevel()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!job_master) if(!job_master)
job_master = new /datum/controller/occupations() job_master = new /datum/controller/occupations()
job_master.SetupOccupations() job_master.SetupOccupations()
@@ -55,10 +49,15 @@ datum/controller/game_controller/New()
if(!ticker) ticker = new /datum/controller/gameticker() if(!ticker) ticker = new /datum/controller/gameticker()
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle() if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
datum/controller/game_controller/proc/setup() datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag world.tick_lag = config.Ticklag
createRandomZlevel()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
setup_objects() setup_objects()
setupgenetics() setupgenetics()
setupfactions() setupfactions()

View File

@@ -47,7 +47,7 @@
var/mob/M = AM var/mob/M = AM
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam. if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time M.last_bumped = world.time
if(!M.restrained() && !M.small) if(!M.restrained() && !M.small && !M.airflow_speed)
bumpopen(M) bumpopen(M)
return return

View File

@@ -7,12 +7,18 @@
/obj/effect/spawner/lootdrop/initialize() /obj/effect/spawner/lootdrop/initialize()
var/list/things = params2list(loot) var/list/things = params2list(loot)
if(things && things.len) if(things && things.len)
for(var/i = lootcount, i > 0, i--) for(var/i = lootcount, i > 0, i--)
if(!things.len) return if(!things.len)
var/lootspawn = text2path(pick(things)) return
if(!lootdoubles)
things.Remove(lootspawn)
new lootspawn(get_turf(src)) var/loot_spawn = pick(things)
var/loot_path = text2path(loot_spawn)
if(!loot_path || !lootdoubles)
things.Remove(loot_spawn)
continue
new loot_path(get_turf(src))
del(src) del(src)

View File

@@ -78,14 +78,17 @@
src.update_status() src.update_status()
. = ..()
sleep_offline = 1
master_controller = new /datum/controller/game_controller() master_controller = new /datum/controller/game_controller()
spawn(-1) spawn(1)
master_controller.setup() master_controller.setup()
lighting_controller.Initialize() lighting_controller.Initialize()
process_teleport_locs() //Sets up the wizard teleport locations process_teleport_locs() //Sets up the wizard teleport locations
process_ghost_teleport_locs() //Sets up ghost teleport locations. process_ghost_teleport_locs() //Sets up ghost teleport locations.
sleep_offline = 1
spawn(3000) //so we aren't adding to the round-start lag spawn(3000) //so we aren't adding to the round-start lag
if(config.ToRban) if(config.ToRban)