Skip to content

Commit

Permalink
Кровь синтетиков, убираем жажду (BlueMoon-Labs#513)
Browse files Browse the repository at this point in the history
* Заказ гидравлической жидкости в карго

* Делаем так, чтобы гидравлическая жидкость ббыла несовместима с другими типами крови

* Меняем тип крови у синтетиков, даём пакеты с ней робототехникам

* Восполнение крови у синтетиков.

* A fix

* Документация
  • Loading branch information
Kush1Push1 authored Oct 27, 2023
1 parent a72658b commit 562b901
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 33 deletions.
4 changes: 2 additions & 2 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

/atom/movable/screen/synth/coolant_counter
icon = 'icons/mob/screen_synth.dmi'
name = "Coolant System Readout"
name = "Hydraulic Fluid System Readout" // BLUEMOON EDIT - написал "гидравлическая жидкость"
icon_state = "coolant-3-1"
screen_loc = ui_coolant_display
var/jammed = 0
Expand Down Expand Up @@ -198,7 +198,7 @@
total_efficiency = rand(1, 15) / 10
environ_efficiency = rand(1, 20) / 10
. += "<span class='notice'>Performing internal cooling system diagnostics:</span>"
. += "<span class='notice'>Coolant level: [coolant] units, [round((coolant / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 0.1)] percent</span>"
. += "<span class='notice'>Hydraulic fluid level: [coolant] units, [round((coolant / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 0.1)] percent</span>" // BLUEMOON EDIT - написал "гидравлическая жидкость"
. += "<span class='notice'>Current Cooling Efficiency: [round(total_efficiency * 100, 0.1)] percent, [suitlink_efficiency ? "<font color='green'>active suitlink detected</font>, guaranteeing <font color='green'>[suitlink_efficiency * 100]%</font> environmental cooling efficiency." : "environment viability: [round(environ_efficiency * 100, 0.1)] percent."]</span>"

/atom/movable/screen/synth/coolant_counter/proc/jam(amount, cap = 20)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/cargo/packs/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@
crate_name = "blood freezer"
crate_type = /obj/structure/closet/crate/freezer

// BLUEMOON ADD START - кровь для синтетиков
/datum/supply_pack/medical/oilblood
name = "Hydraulic Fluid Cans Crate"
desc = "Содержит три канистры с гидравлической жидкостью. Обычно, применяется в механике и для замены жидкостей внутри синтетиков."
cost = 1500
contains = list(/obj/item/reagent_containers/blood/oilblood,
/obj/item/reagent_containers/blood/oilblood,
/obj/item/reagent_containers/blood/oilblood)
crate_name = "hydraulic fluid crate"
crate_type = /obj/structure/closet/crate
// BLUEMOON ADD END

/datum/supply_pack/medical/chemical
name = "Chemical Starter Kit Crate"
desc = "Содержит двенадцать различных химических веществ для всех забавных экспериментов, которые вы можете провести."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
"O+" = list("O-", "O+","SY"),
"L" = list("L","SY"),
"U" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+", "L", "U","SY", "BUG"),
"HF" = list("HF", "SY"),
"HF" = list("HF"), // BLUEMOON EDIT - было "HF" = list("HF", "SY"),
"X*" = list("X*", "SY"),
"SY" = list("SY"),
"GEL" = list("GEL","SY"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
id = SPECIES_MAMMAL_SYNTHETIC

species_traits = list(MUTCOLORS,NOTRANSSTING,EYECOLOR,LIPS,HAIR,FACEHAIR,ROBOTIC_LIMBS,HAS_FLESH,HAS_BONE,WINGCOLOR,HORNCOLOR)
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE) // BLUEMOON CHANGES - добавлена защита от вирусов
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOMARROW, TRAIT_NOTHIRST) // BLUEMOON ADD - добавлены TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOTHIRST и TRAIT_NOMARROW
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID|MOB_BEAST

meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
gib_types = list(/obj/effect/gibspawner/ipc, /obj/effect/gibspawner/ipc/bodypartless)

Expand Down Expand Up @@ -61,7 +60,7 @@
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'

exotic_bloodtype = "S"
exotic_bloodtype = "HF" // BLUEMOON EDIT - было "S"
exotic_blood_color = BLOOD_COLOR_OIL
allowed_limb_ids = list("mammal","aquatic","avian", "human")
species_category = SPECIES_CATEGORY_ROBOT
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species_types/ipc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
default_color = "00FF00"
blacklisted = 0
sexes = 0
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE) // BLUEMOON CHANGES - добавлена защита от вирусов
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOMARROW, TRAIT_NOTHIRST) // BLUEMOON ADD - добавлены TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOTHIRST и TRAIT_NOMARROW
species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING,HAS_FLESH,HAS_BONE,HAIR,ROBOTIC_LIMBS)
hair_alpha = 210
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
Expand Down Expand Up @@ -38,7 +38,7 @@
//special cybernetic organ for getting power from apcs
mutant_organs = list(/obj/item/organ/cyberimp/arm/power_cord)

exotic_bloodtype = "S"
exotic_bloodtype = "HF" // BLUEMOON EDIT - было "S"
exotic_blood_color = BLOOD_COLOR_OIL
species_category = SPECIES_CATEGORY_ROBOT
wings_icons = SPECIES_WINGS_ROBOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
say_mod = "beeps"
default_color = "00FF00"
species_traits = list(MUTCOLORS,NOTRANSSTING,EYECOLOR,LIPS,HAIR,ROBOTIC_LIMBS,HAS_FLESH,HAS_BONE)
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE) // BLUEMOON CHANGES - добавлена защита от вирусов
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOMARROW, TRAIT_NOTHIRST) // BLUEMOON ADD - добавлены TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOTHIRST и TRAIT_NOMARROW
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
mutant_bodyparts = list("ipc_antenna" = "Synthetic Lizard - Antennae","mam_tail" = "Synthetic Lizard", "mam_snouts" = "Synthetic Lizard - Snout", "legs" = "Digitigrade", "mam_body_markings" = "Synthetic Lizard - Plates", "taur" = "None")
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
Expand Down Expand Up @@ -36,7 +36,7 @@
//special cybernetic organ for getting power from apcs
mutant_organs = list(/obj/item/organ/cyberimp/arm/power_cord)

exotic_bloodtype = "S"
exotic_bloodtype = "HF" // BLUEMOON EDIT - было "S"
exotic_blood_color = BLOOD_COLOR_OIL

tail_type = "mam_tail"
Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/taste.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
if(from.has_reagent(/datum/reagent/consumable/semen) && (HAS_TRAIT(src, TRAIT_DUMB_CUM) || HAS_TRAIT(src, TRAIT_GFLUID_DETECT)))
to_chat(src, span_love("Вы узнаете хорошо знакомый вам вкус свежей спермы~"))
if ((from.pH > 12.5) || (from.pH < 1.5))
T.applyOrganDamage(5)
to_chat(src, "<span class='warning'>You taste chemical burns!</span>")
if(!(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))) // BLUEMOON ADD - синтетики в ином случае получают химические ожоги, если пьют гидравлическую жидкость
T.applyOrganDamage(5)
to_chat(src, "<span class='warning'>You taste chemical burns!</span>")
if(istype(T, /obj/item/organ/tongue/cybernetic))
to_chat(src, "<span class='notice'>Your tongue moves on it's own in response to the liquid.</span>")
say("The pH is appropriately [round(from.pH, 1)].")
Expand Down
10 changes: 9 additions & 1 deletion code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
if((blood_id in GLOB.blood_reagent_types) && !HAS_TRAIT(C, TRAIT_NOMARROW) && !HAS_TRAIT(C, TRAIT_BLOODFLEDGE))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
C.adjustToxLoss(rand(2,8)*REM, TRUE, TRUE) //forced to ensure people don't use it to gain beneficial toxin as slime person
// BLUEMOON ADD START - синтетики могут пить свою же "кровь" (гидравлическую жидкость), чтобы восполнять её запасы
if(HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM))
if(data && (data["blood_type"] in get_safe_blood(C.dna.blood_type)))
if(C.blood_volume > BLOOD_VOLUME_NORMAL) // если крови слишком много, она не восполняет запасы в организме
to_chat(C, span_warning("[C] leaks out with hydraulic fluid! It streams from holes in hull parts."))
else //восполнение крови в соотношении 1 к 1
C.blood_volume = max(C.blood_volume + round(metabolization_rate, 0.1), 0)
// BLUEMOON ADD END
..()

/datum/reagent/blood/reaction_obj(obj/O, volume)
Expand Down Expand Up @@ -101,7 +109,7 @@
pH = 2.5

if(data["blood_type"] == "HF")
name = "Hydraulic Blood"
name = "Hydraulic Fluid" // BLUEMOON EDIT - was "Hydraulic Blood"
taste_description = "burnt oil"
pH = 9.75

Expand Down
5 changes: 4 additions & 1 deletion code/modules/reagents/reagent_containers/blood_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

/obj/item/reagent_containers/blood/random/Initialize(mapload)
icon_state = "bloodpack"
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L", "SY", "HF", "GEL", "BUG")
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L", "SY", "GEL", "BUG") // BLUEMOON EDIT - убрано "HF"
return ..()

/obj/item/reagent_containers/blood/APlus
Expand Down Expand Up @@ -76,7 +76,10 @@
blood_type = "SY"

/obj/item/reagent_containers/blood/oilblood
name = "hydraulic fluid pack" // BLUEMOON ADD
desc = "Contains hydraulic fluid used in synthetics." // BLUEMOON ADD
blood_type = "HF"
labelled = TRUE // BLUEMOON ADD

/obj/item/reagent_containers/blood/jellyblood
blood_type = "GEL"
Expand Down
8 changes: 4 additions & 4 deletions code/modules/surgery/organs/lungs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,11 @@
to_chat(user, "<span class='notice'>Biotype incompatible with cooling system. Activation signal suppressed.</span>")
return
if(!is_cooling && owner.blood_volume < cooling_coolant_drain)
to_chat(user, "<span class='warning'>Coolant levels insufficient to enable active cooling - Replenish immediately.</span>")
to_chat(user, "<span class='warning'>Hydraulic fluid level is insufficient to enable active cooling - Replenish immediately.</span>") // BLUEMOON EDIT - написал "гидравлическая жидкость"
return

is_cooling = !is_cooling
to_chat(user, "<span class='notice'>Active cooling [is_cooling ? "enabled" : "disabled"] - current coolant level: [round(owner.blood_volume / BLOOD_VOLUME_NORMAL * 100, 0.1)] percent.</span>")
to_chat(user, "<span class='notice'>Active cooling [is_cooling ? "enabled" : "disabled"] - current hydraulic fluid level: [round(owner.blood_volume / BLOOD_VOLUME_NORMAL * 100, 0.1)] percent.</span>") // BLUEMOON EDIT - написал "гидравлическая жидкость"
var/possible_next_warn = owner.blood_volume - (BLOOD_VOLUME_NORMAL * 0.1)
if(possible_next_warn > next_warn)
next_warn = possible_next_warn //If we recovered blood inbetween activations, update warning
Expand All @@ -491,7 +491,7 @@
is_cooling = 0
return
if(owner.blood_volume < cooling_coolant_drain)
to_chat(owner, "<span class='warning'>Coolant levels insufficient to maintain active cooling - Replenish immediately.</span>")
to_chat(owner, "<span class='warning'>Hydraulic fluid levels insufficient to maintain active cooling - Replenish immediately.</span>") // BLUEMOON EDIT - написал "гидравлическая жидкость"
is_cooling = 0
return
if(abs(owner.bodytemperature - T20C) < SYNTH_ACTIVE_COOLING_TEMP_BOUNDARY)
Expand All @@ -508,7 +508,7 @@
actual_drain *= SYNTH_ACTIVE_COOLING_LOW_PRESSURE_PENALTY //Our cooling system can handle hot places okayish, but starts to cry at low pressures (reads: Effectively vents hot coolant thats been warmed up via internal heat-exchange as emergency measure and with very low efficiency)
owner.blood_volume = max(owner.blood_volume - actual_drain, 0)
if(owner.blood_volume <= next_warn)
to_chat(owner, "[owner.blood_volume > BLOOD_VOLUME_BAD ? "<span class='notice'>" : "<span class='warning'>"]Coolant level passed threshold - now [round(owner.blood_volume / BLOOD_VOLUME_NORMAL * 100, 0.1)] percent.</span>")
to_chat(owner, "[owner.blood_volume > BLOOD_VOLUME_BAD ? "<span class='notice'>" : "<span class='warning'>"]Hydraulic fluid level passed threshold - now [round(owner.blood_volume / BLOOD_VOLUME_NORMAL * 100, 0.1)] percent.</span>") // BLUEMOON EDIT - написал "гидравлическая жидкость"
next_warn -= (BLOOD_VOLUME_NORMAL * 0.1)

/obj/item/organ/lungs/plasmaman
Expand Down
1 change: 1 addition & 0 deletions code/modules/vending/wardrobes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
vend_reply = "Спасибо за использование RoboDrobe!"
products = list(/obj/item/clothing/glasses/hud/diagnostic = 3,
/obj/item/stack/medical/nanogel = 5,
/obj/item/reagent_containers/blood/oilblood = 5, // BLUEMOON ADD - гидравлическая жидкость для синтетиков,
/obj/item/clothing/head/beret/robo = 3,
/obj/item/clothing/under/rank/rnd/roboticist = 3,
/obj/item/clothing/under/rank/rnd/roboticist/sleek = 3,
Expand Down
27 changes: 16 additions & 11 deletions modular_sand/code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@
if(0 to NUTRITION_LEVEL_STARVING)
hud_used.hunger.icon_state = "nutrition4"
if(hud_used.thirst)
switch(get_thirst(src))
if(THIRST_LEVEL_FULL to INFINITY)
hud_used.thirst.icon_state = "hydration0"
if(THIRST_LEVEL_QUENCHED to THIRST_LEVEL_FULL)
hud_used.thirst.icon_state = "hydration1"
if(THIRST_LEVEL_THIRSTY to THIRST_LEVEL_QUENCHED)
hud_used.thirst.icon_state = "hydration2"
if(THIRST_LEVEL_PARCHED to THIRST_LEVEL_THIRSTY)
hud_used.thirst.icon_state = "hydration3"
if(0 to THIRST_LEVEL_PARCHED)
hud_used.thirst.icon_state = "hydration4"
// BLUEMOON ADD START - персонажи, которые не имеют жажды, вечно полные
if(HAS_TRAIT(src, TRAIT_NOTHIRST))
hud_used.thirst.icon_state = "hydration0"
else
// BLUEMOON ADD END
switch(get_thirst(src))
if(THIRST_LEVEL_FULL to INFINITY)
hud_used.thirst.icon_state = "hydration0"
if(THIRST_LEVEL_QUENCHED to THIRST_LEVEL_FULL)
hud_used.thirst.icon_state = "hydration1"
if(THIRST_LEVEL_THIRSTY to THIRST_LEVEL_QUENCHED)
hud_used.thirst.icon_state = "hydration2"
if(THIRST_LEVEL_PARCHED to THIRST_LEVEL_THIRSTY)
hud_used.thirst.icon_state = "hydration3"
if(0 to THIRST_LEVEL_PARCHED)
hud_used.thirst.icon_state = "hydration4"

//It's here so it doesn't make a big mess on randomverbs.dm,
//also because of this you can proccall it, why would you if you have smite?
Expand Down
4 changes: 2 additions & 2 deletions modular_splurt/code/datums/traits/trait_actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -856,12 +856,12 @@
// Switch for target's blood type
switch(blood_type_target)
// Synth blood
if("S")
if("S", "HF")// BLUEMOON EDIT - было "S"
// Mark blood as invalid
blood_valid = FALSE

// Set blood type name
blood_name = "coolant"
blood_name = "hydraulic fluid" // BLUEMOON EDIT - was "coolant"

// Check if blood types match
if(blood_type_match)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
default_color = "00FF00"
blacklisted = 0
sexes = 0
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE) // BLUEMOON ADD - добавлена защита от вирусов
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH, TRAIT_AUXILIARY_LUNGS, TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOMARROW, TRAIT_NOTHIRST) // BLUEMOON ADD - добавлены TRAIT_VIRUSIMMUNE, TRAIT_RESISTCOLD, TRAIT_NOTHIRST и TRAIT_NOMARROW
species_traits = list(MUTCOLORS,EYECOLOR,NOTRANSSTING,HAS_FLESH,HAS_BONE,HAIR,ROBOTIC_LIMBS)
hair_alpha = 210
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
Expand Down Expand Up @@ -39,7 +39,7 @@
//special cybernetic organ for getting power from apcs
mutant_organs = list(/obj/item/organ/cyberimp/arm/power_cord)

exotic_bloodtype = "S"
exotic_bloodtype = "HF" // BLUEMOON EDIT - было "S"
exotic_blood_color = BLOOD_COLOR_OIL
species_category = SPECIES_CATEGORY_ROBOT
wings_icons = SPECIES_WINGS_ROBOT
Expand Down

0 comments on commit 562b901

Please sign in to comment.