mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
fixes huge roundstart bugs
This commit is contained in:
@@ -181,13 +181,17 @@ var/datum/subsystem/air/SSair
|
||||
|
||||
var/list/turfs_to_init = block(locate(1, 1, z_start), locate(world.maxx, world.maxy, z_finish))
|
||||
|
||||
for(var/turf/t in turfs_to_init)
|
||||
for(var/thing in turfs_to_init)
|
||||
var/turf/t = thing
|
||||
t.CalculateAdjacentTurfs()
|
||||
active_turfs -= t
|
||||
|
||||
if(t.blocks_air)
|
||||
continue
|
||||
|
||||
if(istype(t, /turf/open/space))
|
||||
continue //don't need to initialize these; just slows down roundstart without any real benefit
|
||||
|
||||
var/turf/open/T = t
|
||||
|
||||
T.excited = 0
|
||||
@@ -200,7 +204,7 @@ var/datum/subsystem/air/SSair
|
||||
var/is_active = T.air.compare(enemy_air)
|
||||
|
||||
if(is_active)
|
||||
testing("Active turf found. Return value of compare(): [is_active]")
|
||||
//testing("Active turf found. Return value of compare(): [is_active]")
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
break
|
||||
|
||||
@@ -21,12 +21,14 @@
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/turf/open/space/proc/update_starlight()
|
||||
if(config)
|
||||
if(config.starlight)
|
||||
for(var/turf/T in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
SetLuminosity(4,1)
|
||||
return
|
||||
SetLuminosity(0)
|
||||
if(config.starlight)
|
||||
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
if(istype(t, /turf/open/space))
|
||||
//let's NOT update this that much pls
|
||||
continue
|
||||
SetLuminosity(4,1)
|
||||
return
|
||||
SetLuminosity(0)
|
||||
|
||||
/turf/open/space/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -132,9 +132,6 @@
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
var/turf/W = new path(src)
|
||||
if(istype(W, /turf))
|
||||
W:Assimilate_Air()
|
||||
W.RemoveLattice()
|
||||
W.AfterChange()
|
||||
return W
|
||||
|
||||
|
||||
@@ -402,9 +402,9 @@ var/list/gaslist_cache = null
|
||||
var/global/regex/R_gas_id
|
||||
var/global/regex/R_gas_value
|
||||
if(!R_gas_id)
|
||||
R_gas_id = regex(".+?(?=\\=)") //matches all characters before equal sign
|
||||
R_gas_id = regex("(.+?)(?=\\=)") //matches all characters before equal sign
|
||||
if(!R_gas_value)
|
||||
R_gas_value = regex("(?<=\\=).*") //matches all characters after equal sign
|
||||
R_gas_value = regex("(?<=\\=)(.*)") //matches all characters after equal sign
|
||||
|
||||
var/list/values = splittext(gas_string, ";")
|
||||
var/list/gases = list()
|
||||
@@ -412,7 +412,9 @@ var/list/gaslist_cache = null
|
||||
while(values.len)
|
||||
var/value = values[1]
|
||||
values.Cut(1,2)
|
||||
gases[R_gas_id.Find(value)] = R_gas_value.Find(value)
|
||||
R_gas_id.Find(value)
|
||||
R_gas_value.Find(value)
|
||||
gases[R_gas_id.group[1]] = text2num(R_gas_value.group[1])
|
||||
|
||||
//deal with the specific case of temperature
|
||||
if("TEMP" in gases)
|
||||
@@ -420,8 +422,9 @@ var/list/gaslist_cache = null
|
||||
gases -= "TEMP"
|
||||
|
||||
var/list/cached_gases = src.gases
|
||||
assert_gases(arglist(gases))
|
||||
cached_gases &= gases
|
||||
for(var/id in gases-cached_gases)
|
||||
add_gas(id) //add_gases() causes a runtime due to the nature of arglist()
|
||||
for(var/id in gases)
|
||||
cached_gases[id][MOLES] = gases[id]
|
||||
|
||||
|
||||
@@ -312,9 +312,8 @@
|
||||
redraw_lighting(1)
|
||||
|
||||
/turf/open/space/init_lighting()
|
||||
. = ..()
|
||||
if(config.starlight)
|
||||
update_starlight()
|
||||
..()
|
||||
update_starlight()
|
||||
|
||||
/turf/proc/redraw_lighting(instantly = 0)
|
||||
if(lighting_object)
|
||||
|
||||
Reference in New Issue
Block a user