mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +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:
@@ -33,7 +33,7 @@
|
||||
|
||||
// Fuck you asfaghewqWAFAWE
|
||||
// See /singleton/recipe/proc/check_fruit(...) in recipe.dm for why
|
||||
if(S.get_trait(TRAIT_FLESH_COLOUR))
|
||||
if(GET_SEED_TRAIT(S, TRAIT_FLESH_COLOUR))
|
||||
tags += "[ktag] slice"
|
||||
tags += "dried [ktag] slice"
|
||||
tags += "dried [ktag]"
|
||||
|
||||
@@ -15,10 +15,10 @@ while simultaneously growing faster from being within its preferences.
|
||||
for(var/seed_name in SSplants.seeds)
|
||||
var/datum/seed/S = SSplants.seeds[seed_name]
|
||||
|
||||
if(S.get_trait(TRAIT_LIGHT_TOLERANCE) < S.get_trait(TRAIT_LIGHT_PREFERENCE))
|
||||
if(GET_SEED_TRAIT(S, TRAIT_LIGHT_TOLERANCE) < GET_SEED_TRAIT(S, TRAIT_LIGHT_PREFERENCE))
|
||||
TEST_FAIL("Seed [S] has a light preference value set higher than its light tolerance.")
|
||||
|
||||
if(S.get_trait(TRAIT_HEAT_TOLERANCE) < S.get_trait(TRAIT_HEAT_PREFERENCE))
|
||||
if(GET_SEED_TRAIT(S, TRAIT_HEAT_TOLERANCE) < GET_SEED_TRAIT(S, TRAIT_HEAT_PREFERENCE))
|
||||
TEST_FAIL("Seed [S] has a heat preference value set higher than its heat tolerance.")
|
||||
|
||||
if(!reported)
|
||||
|
||||
Reference in New Issue
Block a user