mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
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:
@@ -351,11 +351,11 @@
|
||||
return
|
||||
var/temperature = src.get_temperature()
|
||||
if(temperature >= REAGENTS_BURNING_TEMP_HIGH)
|
||||
var/burn_damage = Clamp(total_volume*(temperature - REAGENTS_BURNING_TEMP_HIGH)*REAGENTS_BURNING_TEMP_HIGH_DAMAGE,0,min(total_volume*2,REAGENTS_BURNING_TEMP_HIGH_DAMAGE_CAP))
|
||||
var/burn_damage = clamp(total_volume*(temperature - REAGENTS_BURNING_TEMP_HIGH)*REAGENTS_BURNING_TEMP_HIGH_DAMAGE,0,min(total_volume*2,REAGENTS_BURNING_TEMP_HIGH_DAMAGE_CAP))
|
||||
target.adjustFireLoss(burn_damage)
|
||||
target.visible_message(SPAN_DANGER("The hot liquid burns [target]!"))
|
||||
else if(temperature <= REAGENTS_BURNING_TEMP_LOW)
|
||||
var/burn_damage = Clamp(total_volume*(REAGENTS_BURNING_TEMP_LOW - temperature)*REAGENTS_BURNING_TEMP_LOW_DAMAGE,0,min(total_volume*2,REAGENTS_BURNING_TEMP_LOW_DAMAGE_CAP))
|
||||
var/burn_damage = clamp(total_volume*(REAGENTS_BURNING_TEMP_LOW - temperature)*REAGENTS_BURNING_TEMP_LOW_DAMAGE,0,min(total_volume*2,REAGENTS_BURNING_TEMP_LOW_DAMAGE_CAP))
|
||||
target.adjustFireLoss(burn_damage)
|
||||
target.visible_message(SPAN_DANGER("The freezing liquid burns [target]!"))
|
||||
|
||||
|
||||
@@ -215,14 +215,14 @@
|
||||
else if(action == "add")
|
||||
if(params["amount"])
|
||||
var/rtype = text2path(params["add"])
|
||||
var/amount = Clamp((text2num(params["amount"])), 0, 200)
|
||||
var/amount = clamp((text2num(params["amount"])), 0, 200)
|
||||
beaker.reagents.trans_type_to(src, rtype, amount)
|
||||
return TRUE
|
||||
|
||||
else if (action == "remove")
|
||||
if(params["amount"])
|
||||
var/rtype = text2path(params["remove"])
|
||||
var/amount = Clamp((text2num(params["amount"])), 0, 200)
|
||||
var/amount = clamp((text2num(params["amount"])), 0, 200)
|
||||
if(mode)
|
||||
reagents.trans_type_to(beaker, rtype, amount)
|
||||
else
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
if (action == "createpill_multiple")
|
||||
count = tgui_input_number(usr, "Select the number of pills to make.", src.name, pillamount, max_pill_count, 1)
|
||||
count = Clamp(count, 1, max_pill_count)
|
||||
count = clamp(count, 1, max_pill_count)
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return TRUE
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
LAZYSET(M.chem_doses, type, LAZYACCESS(M.chem_doses, type) + removed)
|
||||
|
||||
var/bodytempchange = Clamp((holder.get_temperature() - M.bodytemperature) * removed * REAGENTS_BODYTEMP,-REAGENTS_BODYTEMP_MAX * removed, REAGENTS_BODYTEMP_MAX * removed)
|
||||
var/bodytempchange = clamp((holder.get_temperature() - M.bodytemperature) * removed * REAGENTS_BODYTEMP,-REAGENTS_BODYTEMP_MAX * removed, REAGENTS_BODYTEMP_MAX * removed)
|
||||
if(abs(bodytempchange) >= REAGENTS_BODYTEMP_MIN)
|
||||
M.bodytemperature += round(bodytempchange,REAGENTS_BODYTEMP_MIN)
|
||||
holder.set_temperature(holder.get_temperature() - round(bodytempchange,REAGENTS_BODYTEMP_MIN))
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
/singleton/reagent/nutriment/proc/digest(var/mob/living/carbon/M, var/removed, var/datum/reagents/holder)
|
||||
M.heal_organ_damage(regen_factor * removed, 0)
|
||||
M.adjustNutritionLoss(-nutriment_factor * removed)
|
||||
M.nutrition_attrition_rate = Clamp(M.nutrition_attrition_rate + attrition_factor, 1, 2)
|
||||
M.nutrition_attrition_rate = clamp(M.nutrition_attrition_rate + attrition_factor, 1, 2)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, blood_factor * removed)
|
||||
M.intoxication -= min(M.intoxication,nutriment_factor*removed*0.05) //Nutrients can absorb alcohol.
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
var/nut_fact = holder.reagent_data[type]["cooked"] ? nutriment_factor : nutriment_factor / 2 // it's the nut fact
|
||||
M.heal_organ_damage(regen_factor * removed, 0)
|
||||
M.adjustNutritionLoss(-nut_fact * removed)
|
||||
M.nutrition_attrition_rate = Clamp(M.nutrition_attrition_rate + attrition_factor, 1, 2)
|
||||
M.nutrition_attrition_rate = clamp(M.nutrition_attrition_rate + attrition_factor, 1, 2)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, blood_factor * removed)
|
||||
M.intoxication -= min(M.intoxication,nut_fact*removed*0.05) //Nutrients can absorb alcohol.
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
value = 6
|
||||
|
||||
/singleton/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
|
||||
var/power = 1 + Clamp((holder.get_temperature() - (T0C + 20))*0.1,-0.5,0.5)
|
||||
var/power = 1 + clamp((holder.get_temperature() - (T0C + 20))*0.1,-0.5,0.5)
|
||||
//Heals 10% more brute and less burn for every 1 celcius above 20 celcius, up 50% more/less.
|
||||
//Heals 10% more burn and less brute for every 1 celcius below 20 celcius, up to 50% more/less.
|
||||
M.heal_organ_damage(3 * removed * power,3 * removed * power)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
name = lowertext("[english_list(words)] [base_name]")
|
||||
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] [base_name]"
|
||||
w_class = n_ceil(Clamp((ingredients.len/2),2,4))
|
||||
w_class = n_ceil(clamp((ingredients.len/2),2,4))
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/csandwich/Destroy()
|
||||
QDEL_LIST(ingredients)
|
||||
|
||||
@@ -260,14 +260,14 @@
|
||||
attacking_item.reagents.trans_to(returningitem, attacking_item.reagents.total_volume) //Old chip to new chip
|
||||
if(attacking_item.icon_state == "chip_half")
|
||||
returningitem.icon_state = "[returningitem.icon_state]_half"
|
||||
returningitem.bitesize = Clamp(returningitem.reagents.total_volume,1,10)
|
||||
returningitem.bitesize = clamp(returningitem.reagents.total_volume,1,10)
|
||||
else if(prob(1))
|
||||
memed = 1
|
||||
to_chat(user, "You scoop up some dip with \the [returningitem], but mid-scoop, \the [returningitem] breaks off into the dreadful abyss of dip, never to be seen again...")
|
||||
returningitem.icon_state = "[returningitem.icon_state]_half"
|
||||
returningitem.bitesize = Clamp(returningitem.reagents.total_volume,1,10)
|
||||
returningitem.bitesize = clamp(returningitem.reagents.total_volume,1,10)
|
||||
else
|
||||
returningitem.bitesize = Clamp(returningitem.reagents.total_volume*0.5,1,10)
|
||||
returningitem.bitesize = clamp(returningitem.reagents.total_volume*0.5,1,10)
|
||||
qdel(attacking_item)
|
||||
reagents.trans_to(returningitem, bitesize) //Dip to new chip
|
||||
user.put_in_hands(returningitem)
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
AddOverlays("capped")
|
||||
|
||||
if(reagents && reagents.total_volume)
|
||||
worn_overlay = Clamp(round((reagents.total_volume / volume * 15),5), 1, 15) //rounded_vol
|
||||
worn_overlay = clamp(round((reagents.total_volume / volume * 15),5), 1, 15) //rounded_vol
|
||||
AddOverlays(overlay_image(icon, "[iconstring][worn_overlay]", color = reagents.get_color()))
|
||||
worn_overlay_color = reagents.get_color() // handles inhands
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user