mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 10:57:19 +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:
@@ -81,15 +81,15 @@
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/desert/adapt_seed(var/datum/seed/S)
|
||||
..()
|
||||
if(prob(90))
|
||||
S.set_trait(TRAIT_REQUIRES_WATER,0)
|
||||
SET_SEED_TRAIT(S, TRAIT_REQUIRES_WATER, 0)
|
||||
else
|
||||
S.set_trait(TRAIT_REQUIRES_WATER,1)
|
||||
S.set_trait(TRAIT_WATER_CONSUMPTION,1)
|
||||
SET_SEED_TRAIT(S, TRAIT_REQUIRES_WATER, 1)
|
||||
SET_SEED_TRAIT(S, TRAIT_WATER_CONSUMPTION, 1)
|
||||
if(prob(75))
|
||||
S.set_trait(TRAIT_STINGS,1)
|
||||
SET_SEED_TRAIT(S, TRAIT_STINGS, 1)
|
||||
if(prob(75))
|
||||
S.set_trait(TRAIT_CARNIVOROUS,2)
|
||||
S.set_trait(TRAIT_SPREAD,0)
|
||||
SET_SEED_TRAIT(S, TRAIT_CARNIVOROUS, 2)
|
||||
SET_SEED_TRAIT(S, TRAIT_SPREAD, 0)
|
||||
|
||||
/obj/structure/quicksand
|
||||
name = "sand"
|
||||
|
||||
@@ -81,19 +81,19 @@
|
||||
..()
|
||||
var/carnivore_prob = rand(100)
|
||||
if(carnivore_prob < 30)
|
||||
S.set_trait(TRAIT_CARNIVOROUS,2)
|
||||
SET_SEED_TRAIT(S, TRAIT_CARNIVOROUS, 2)
|
||||
if(prob(75))
|
||||
S.get_trait(TRAIT_STINGS, 1)
|
||||
SET_SEED_TRAIT(S, TRAIT_STINGS, 1)
|
||||
else if(carnivore_prob < 60)
|
||||
S.set_trait(TRAIT_CARNIVOROUS,1)
|
||||
SET_SEED_TRAIT(S, TRAIT_CARNIVOROUS, 1)
|
||||
if(prob(50))
|
||||
S.get_trait(TRAIT_STINGS)
|
||||
if(prob(15) || (S.get_trait(TRAIT_CARNIVOROUS) && prob(40)))
|
||||
S.set_trait(TRAIT_BIOLUM,1)
|
||||
S.set_trait(TRAIT_BIOLUM_COLOUR,get_random_colour(0,75,190))
|
||||
SET_SEED_TRAIT(S, TRAIT_STINGS, 1)
|
||||
if(prob(15) || (GET_SEED_TRAIT(S, TRAIT_CARNIVOROUS) && prob(40)))
|
||||
SET_SEED_TRAIT(S, TRAIT_BIOLUM, 1)
|
||||
SET_SEED_TRAIT(S, TRAIT_BIOLUM_COLOUR, get_random_colour(0,75,190))
|
||||
|
||||
if(prob(30))
|
||||
S.set_trait(TRAIT_PARASITE,1)
|
||||
SET_SEED_TRAIT(S, TRAIT_PARASITE, 1)
|
||||
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/grass/marsh
|
||||
name = "marsh exoplanet"
|
||||
|
||||
Reference in New Issue
Block a user