Metabolism 3.0 (#5157)

* basic system + convert all plantmetabolism

* stragglers

* convert all old metabolisms over

* fix YAML errors + dumb serialization issue

* remove unused thingy

* reimplement

* add organ type condition

* organtype condition but real

* cleanups + test fix

* metabolismtype -> metabolizertype

* solution resilience

* fixes

* serializer + use entityuid + hashset

* this is apparently an entirely different thing

* turns out it just works

* oops
This commit is contained in:
mirrorcult
2021-11-08 15:33:45 -07:00
committed by GitHub
parent f5b11d6af8
commit 31d622f941
53 changed files with 969 additions and 912 deletions

View File

@@ -103,8 +103,6 @@
behaviors:
- !type:LungBehavior {}
# TODO DAMAGE UNITS. Some of these damage effects were scaled up to integers.
# Scale back down when damage units are in.
- type: entity
id: OrganHumanHeart
parent: BaseHumanOrgan
@@ -122,98 +120,11 @@
# This is done because these chemicals need to have some effect even if they aren't being filtered out of your body.
# You're technically 'immune to poison' without a heart, but.. uhh, you'll have bigger problems on your hands.
- type: Metabolizer
metabolisms:
Arithrazine:
effects:
- !type:HealthChange
damage:
groups:
Toxin: -2 # -1 Multiplying by 2. pls give damage units
Brute: 1 # 0.5
Bicaridine:
effects:
- !type:HealthChange
damage:
groups:
Brute: -2
Dermaline:
effects:
- !type:HealthChange
damage:
groups:
Burn: -3
Dexalin:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -1
DexalinPlus:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -3
Dylovene:
effects:
- !type:HealthChange
damage:
types:
Poison: -1
Ephedrine:
effects:
- !type:MovespeedModifier
walkSpeedModifier: 1.2
sprintSpeedModifier: 1.2
HeartbreakerToxin:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: 4
Kelotane:
effects:
- !type:HealthChange
damage:
groups:
Burn: -1
Lexorin:
effects:
- !type:HealthChange
damage:
groups:
Airloss: 7
Meth:
effects:
- !type:HealthChange
damage:
types:
Poison: 2 # 2.5
- !type:MovespeedModifier
walkSpeedModifier: 1.3
sprintSpeedModifier: 1.3
- !type:HealthChange
conditions:
- !type:ReagentThreshold
min: 10
damage:
types:
Poison: 4 # this is added to the base damage of the meth.
Omnizine:
effects:
- !type:HealthChange
damage:
groups:
Burn: -3 # -2. w/o damage units did not divide into 3 types
Toxin: -2
Airloss: -2
Brute: -3 # -2. w/o damage units did not divide into 3 types
Synaptizine:
effects:
- !type:HealthChange
damage:
types:
Poison: 1 # 0.5 pls damage units
metabolizerTypes: [Human]
groups:
- id: Medicine
- id: Poison
- id: Narcotic
- type: entity
id: OrganHumanStomach
@@ -237,92 +148,11 @@
# The stomach metabolizes stuff like foods and drinks.
# TODO: Have it work off of the ent's solution container, and move this
# to intestines instead.
- type: Metabolizer # Release me from this hell called 1 reagent for every drink
# TODO please make every drink their own base thing
metabolisms:
Flour:
effects:
- !type:SatiateHunger
JuiceApple:
effects:
- !type:SatiateThirst
JuiceBerry:
effects:
- !type:SatiateThirst
JuiceBanana:
effects:
- !type:SatiateThirst
JuiceCarrot:
effects:
- !type:SatiateThirst
JuiceLime:
effects:
- !type:SatiateThirst
JuiceLemon:
effects:
- !type:SatiateThirst
JuiceGrape:
effects:
- !type:SatiateThirst
JuiceOrange:
effects:
- !type:SatiateThirst
JuiceTomato:
effects:
- !type:SatiateThirst
JuiceBerryPoison:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
JuiceWatermelon:
effects:
- !type:SatiateThirst
JuicePineapple:
effects:
- !type:SatiateThirst
Nutriment:
effects:
- !type:SatiateHunger
Water:
effects:
- !type:SatiateThirst
hydrationFactor: 2
Coffee:
effects:
- !type:SatiateThirst
Tea:
effects:
- !type:SatiateThirst
Milk:
effects:
- !type:SatiateThirst
MilkSpoiled:
effects:
- !type:SatiateThirst
hydrationFactor: -2
MilkSoy:
effects:
- !type:SatiateThirst
hydrationFactor: 2 # soyboys stay winning
MilkOat:
effects:
- !type:SatiateThirst
hydrationFactor: 2 # oatboys stay winning
Cola:
effects:
- !type:SatiateThirst
hydrationFactor: 0.5 # sodaboys stay losing
FourteenLoko:
effects:
- !type:SatiateThirst
hydrationFactor: 2
- !type:HealthChange
damage:
types:
Poison: 1
- type: Metabolizer
metabolizerTypes: [Human]
groups:
- id: Food
- id: Drink
- type: entity
id: OrganHumanLiver
@@ -336,270 +166,10 @@
size: 1
compatibility: Biological
- type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol.
metabolisms: # TODO there needs to be a better way to do this than just add every damn drink
#Basic Alchohol
Ale:
effects:
- !type:SatiateThirst
Beer:
effects:
- !type:SatiateThirst
BlueCuracao:
effects:
- !type:SatiateThirst
Cognac:
effects:
- !type:SatiateThirst
DeadRum:
effects:
- !type:SatiateThirst
Gin:
effects:
- !type:SatiateThirst
Kahlua:
effects:
- !type:SatiateThirst
MelonLiquor:
effects:
- !type:SatiateThirst
NTCahors:
effects:
- !type:SatiateThirst
PoisonWine:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
Rum:
effects:
- !type:SatiateThirst
Sake:
effects:
- !type:SatiateThirst
Tequila:
effects:
- !type:SatiateThirst
Vermouth:
effects:
- !type:SatiateThirst
Vodka:
effects:
- !type:SatiateThirst
Whiskey:
effects:
- !type:SatiateThirst
Wine:
effects:
- !type:SatiateThirst
#Mixed Alcohol
AcidSpit:
effects:
- !type:SatiateThirst
AlliesCocktail:
effects:
- !type:SatiateThirst
Aloe:
effects:
- !type:SatiateThirst
Amasec:
effects:
- !type:SatiateThirst
Andalusia:
effects:
- !type:SatiateThirst
Antifreeze:
effects:
- !type:SatiateThirst
AtomicBomb:
effects:
- !type:SatiateThirst
B52:
effects:
- !type:SatiateThirst
BahamaMama:
effects:
- !type:SatiateThirst
BananaHonk:
effects:
- !type:SatiateThirst
Barefoot:
effects:
- !type:SatiateThirst
BeepskySmash:
effects:
- !type:SatiateThirst
Bilk:
effects:
- !type:SatiateThirst
BlackRussian:
effects:
- !type:SatiateThirst
BloodyMary:
effects:
- !type:SatiateThirst
Booger:
effects:
- !type:SatiateThirst
BraveBull:
effects:
- !type:SatiateThirst
CubaLibre:
effects:
- !type:SatiateThirst
DemonsBlood:
effects:
- !type:SatiateThirst
DevilsKiss:
effects:
- !type:SatiateThirst
DoctorsDelight:
effects:
- !type:SatiateThirst
DriestMartini:
effects:
- !type:SatiateThirst
ErikaSuprise:
effects:
- !type:SatiateThirst
GargleBlaster:
effects:
- !type:SatiateThirst
GinTonic:
effects:
- !type:SatiateThirst
Goldschlager:
effects:
- !type:SatiateThirst
Grog:
effects:
- !type:SatiateThirst
HippiesDelight:
effects:
- !type:SatiateThirst
Hooch:
effects:
- !type:SatiateThirst
IcedBeer:
effects:
- !type:SatiateThirst
IrishCarBomb:
effects:
- !type:SatiateThirst
IrishCream:
effects:
- !type:SatiateThirst
IrishCoffee:
effects:
- !type:SatiateThirst
KiraSpecial:
effects:
- !type:SatiateThirst
Lean:
effects:
- !type:SatiateThirst
LeanShine: # who added this?
effects:
- !type:SatiateThirst
LongIslandIcedTea:
effects:
- !type:SatiateThirst
Manhattan:
effects:
- !type:SatiateThirst
ManhattanProject:
effects:
- !type:SatiateThirst
ManlyDorf:
effects:
- !type:SatiateThirst
Margarita:
effects:
- !type:SatiateThirst
Martini:
effects:
- !type:SatiateThirst
Mead:
effects:
- !type:SatiateThirst
Mojito:
effects:
- !type:SatiateThirst
Moonshine:
effects:
- !type:SatiateThirst
Neurotoxin:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
Patron:
effects:
- !type:SatiateThirst
RedMead:
effects:
- !type:SatiateThirst
Rewriter:
effects:
- !type:SatiateThirst
Sbiten:
effects:
- !type:SatiateThirst
ScrewdriverCocktail:
effects:
- !type:SatiateThirst
Silencer:
effects:
- !type:SatiateThirst
Singulo:
effects:
- !type:SatiateThirst
SnowWhite:
effects:
- !type:SatiateThirst
Starkist:
effects:
- !type:SatiateThirst
SuiDream:
effects:
- !type:SatiateThirst
TequilaSunrise:
effects:
- !type:SatiateThirst
ThreeMileIsland:
effects:
- !type:SatiateThirst
ToxinsSpecial:
effects:
- !type:SatiateThirst
VodkaMartini:
effects:
- !type:SatiateThirst
VodkaTonic:
effects:
- !type:SatiateThirst
WhiskeyCola:
effects:
- !type:SatiateThirst
WhiskeySoda:
effects:
- !type:SatiateThirst
WhiteRussian:
effects:
- !type:SatiateThirst
FourteenLoko:
effects:
- !type:SatiateThirst
hydrationFactor: 2
- !type:HealthChange
damage:
types:
Poison: 1
metabolizerTypes: [Human]
groups:
- id: Alcohol
rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink
- type: entity
id: OrganHumanKidneys
@@ -614,5 +184,3 @@
- type: Mechanism
size: 1
compatibility: Biological