mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Turn hydroponics get and set_trait into defines (#21404)
Hydroponics tray processing is a massive chunk of machinery processing for no good reason, I have a sneaking suspicion that this is due to proc overhead on get_trait, as process can call it upwards of 30 times per tick per tray. Realistically most of the things that are traits should instead be variables, but that's a refactor for someone with more time.
This commit is contained in:
@@ -232,7 +232,7 @@
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem/spores/start()
|
||||
..()
|
||||
if(seed && seed.get_trait(TRAIT_SPREAD))
|
||||
if(seed && GET_SEED_TRAIT(seed, TRAIT_SPREAD))
|
||||
var/sporecount = 0
|
||||
for(var/turf/T in targetTurfs)
|
||||
var/bad_turf = 0
|
||||
@@ -242,10 +242,10 @@
|
||||
break
|
||||
if(bad_turf)
|
||||
continue
|
||||
if(prob(min(seed.get_trait(TRAIT_POTENCY), 50)))
|
||||
if(prob(min(GET_SEED_TRAIT(seed, TRAIT_POTENCY), 50)))
|
||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(T,seed)
|
||||
sporecount++
|
||||
if(sporecount < max(1, round(seed.get_trait(TRAIT_POTENCY) / 20), 1))
|
||||
if(sporecount < max(1, round(GET_SEED_TRAIT(seed, TRAIT_POTENCY) / 20), 1))
|
||||
break
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user