Runtime map now loads in ~11 seconds instead of ~40, sped up various other things (#19957)

Runtime map now has a bunch of new areas / items with often-tested
stuffs, and some hard-to-put-at-runtime stuffs.
Runtime map jobs now are positioned to make it faster to reach the
aforementioned often-tested stuffs.
Runtime map doesn't generate an overmap anymore by default, which speeds
up the process.
Runtime map now loads in ~11 seconds instead of ~40 seconds as it was
before.
Updated the maploader to be faster in parsing maps.
Bapi is not engaged anymore if we're only measuring the map size, which
speeds up the process.
In fastboot we do not generate the codexes anymore, which speeds up the
process.
In fastboot and if exoplanets and away sites are not enabled, we do not
parse the map templates anymore, which speeds up the process.
Updated the icon smoothing to be faster.
Optimized cargo area code.
Other optimizations.
This commit is contained in:
Fluffy
2024-10-06 21:31:01 +00:00
committed by GitHub
parent 9636363e60
commit b8902e2e16
124 changed files with 1238 additions and 134598 deletions
@@ -180,10 +180,14 @@
amount = 0
var/list/drips
/obj/effect/decal/cleanable/blood/drip/Initialize()
. = ..()
/obj/effect/decal/cleanable/blood/drip/New()
..()
drips = list(icon_state)
/obj/effect/decal/cleanable/blood/drip/Destroy()
drips = null
. = ..()
/obj/effect/decal/cleanable/blood/writing
icon_state = "tracks"
desc = "It looks like a writing in blood."
-18
View File
@@ -31,21 +31,3 @@
d.epicenter = T
d.rec_pow = power
SSexplosives.queue(d)
/atom
var/explosion_resistance
/turf/space
explosion_resistance = 3
/turf/simulated/open
explosion_resistance = 3
/turf/simulated/floor
explosion_resistance = 1
/turf/simulated/mineral
explosion_resistance = 2
/turf/simulated/wall
explosion_resistance = 10
+2 -2
View File
@@ -443,9 +443,9 @@
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
if(throwforce && w_class)
return Clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
return clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
else if(w_class)
return Clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
return clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
else
return 0
+1 -1
View File
@@ -136,7 +136,7 @@
if(parts)
new parts(loc)
if (smoothing_flags)
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH_NEIGHBORS(src)
return ..()
/obj/structure/closet/airbubble/toggle(mob/user as mob)
+3 -3
View File
@@ -10,11 +10,11 @@
/obj/effect/decal/cleanable/draftingchalk/Initialize(mapload)
. = ..()
if (mapload)
SSicon_smooth.add_to_queue(src)
QUEUE_SMOOTH(src)
else
smooth_icon(src)
smooth_icon()
for (var/obj/effect/decal/cleanable/draftingchalk/C in orange(1, src))
smooth_icon(C)
C.smooth_icon()
/obj/item/pen/drafting
name = "white drafting chalk"
@@ -38,7 +38,7 @@
/obj/item/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 10, 60000)
newtime = clamp(newtime, 10, 60000)
timer = newtime
to_chat(user, SPAN_NOTICE("Timer set for [timer] seconds."))
@@ -147,7 +147,7 @@
/obj/item/plastique/dirty/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 300, 60000)
newtime = clamp(newtime, 300, 60000)
timer = newtime
to_chat(user, SPAN_NOTICE("Timer set for [timer] seconds."))
@@ -224,7 +224,7 @@
if(!pressure)
return
throw_amount += pressure
throw_amount = Clamp(50, throw_amount, 5000)
throw_amount = clamp(50, throw_amount, 5000)
if(ismob(user))
to_chat(user, SPAN_NOTICE("Pressure has been adjusted to [throw_amount] kPa."))
@@ -452,7 +452,7 @@
/obj/item/material/twohanded/chainsaw/proc/RemoveFuel(var/amount = 1)
if(reagents && istype(reagents))
amount *= fuel_cost
reagents.remove_reagent(fuel_type, Clamp(amount,0,REAGENT_VOLUME(reagents, fuel_type)))
reagents.remove_reagent(fuel_type, clamp(amount,0,REAGENT_VOLUME(reagents, fuel_type)))
if(REAGENT_VOLUME(reagents, fuel_type) <= 0)
PowerDown()
else
+1 -1
View File
@@ -31,7 +31,7 @@
if(do_mob(user, M, 3 SECONDS))
user.visible_message(SPAN_NOTICE("\The [user] dries \the [M] off with \the [src]."))
playsound(M, 'sound/weapons/towelwipe.ogg', 25, 1)
M.adjust_fire_stacks(-Clamp(M.fire_stacks,-1.5,1.5))
M.adjust_fire_stacks(-clamp(M.fire_stacks,-1.5,1.5))
return
. = ..()
+3 -3
View File
@@ -25,15 +25,15 @@
if(climbable)
verbs += /obj/structure/proc/climb_on
if (smoothing_flags)
SSicon_smooth.add_to_queue(src)
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/Destroy()
if(parts)
new parts(loc)
if (smoothing_flags)
SSicon_smooth.remove_from_queues(src)
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH_NEIGHBORS(src)
climbers = null
@@ -261,7 +261,7 @@
/obj/structure/barricade/proc/update_health(damage, nomessage)
health -= damage
health = Clamp(health, 0, maxhealth)
health = clamp(health, 0, maxhealth)
if(!health)
if(!nomessage)
@@ -138,8 +138,8 @@
F2.flag_item = flag_item
//Requeue the area for smoothing, just in case
SSicon_smooth.add_to_queue(src)
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/sign/flag/New(loc, var/newdir, var/linked_flag_path, var/deploy, var/icon_file, var/item_flag_path)
. = ..()
+2 -2
View File
@@ -105,8 +105,8 @@
if(attacking_item.use_tool(src, user, 5, volume = 50))
anchored = !anchored
to_chat(user, SPAN_NOTICE("You [anchored ? "" : "un"]anchor [src]."))
SSicon_smooth.add_to_queue(src)
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
else
..()
+4 -4
View File
@@ -57,7 +57,7 @@
. += SPAN_NOTICE("There is a thick layer of silicate covering it.")
/obj/structure/window/proc/update_nearby_icons()
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/window/update_icon()
if(!full)
@@ -65,7 +65,7 @@
layer = ABOVE_HUMAN_LAYER
else
layer = SIDE_WINDOW_LAYER
SSicon_smooth.add_to_queue(src)
QUEUE_SMOOTH(src)
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1, message = TRUE)
var/initialhealth = health
@@ -802,10 +802,10 @@
return ..(adjacencies, dir_mods)
/obj/structure/window_frame/proc/update_nearby_icons()
SSicon_smooth.add_to_queue_neighbors(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/window_frame/update_icon()
SSicon_smooth.add_to_queue(src)
QUEUE_SMOOTH(src)
// Indestructible Reinforced Window
/obj/structure/window/full/reinforced/indestructible/attack_hand()