mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
IPC "painkiller" - OIL! (#28380)
* Number of changes, read desc. Added shock_reduction and view_true_health to Oil. Made it so Oil can only be processed by Synthetics to avoid silly stuff. Added a proc for the perceived health on the health doll, so that actual shock_reduction and the shock_reduction used for the health doll are separate. * Forgot to define view_true_health in the reagents_datum.dm * Added the view_true_health vars to the other painkillers. Realised I put the wrong value for oil. * Remove unneeded variables. Replace most shock_reduction with shock_reduction_doll. * Make the variables clearer. * Make the compiler happy. * Added comment * revert changes for merge * Proc for shock_reduction differently based on refactor, remove unneeded redefines. * Make CI happy, add a comment explaining the check, reduce oil's metab rate * Replace the bits of shock_reduction_doll I forgot about with shock_reduction. * Apply suggestions from code review Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> * Actually remove the shock_reduction_doll proc. --------- Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8401ced031
commit
7a24b9e58d
@@ -707,10 +707,12 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/shock_reduction()
|
||||
/mob/living/carbon/human/shock_reduction(allow_true_health_reagents = TRUE)
|
||||
var/shock_reduction = 0
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(allow_true_health_reagents && R.view_true_health) // Checks if the call is for movement speed and if the reagent shouldn't muddy up the player's health HUD
|
||||
continue
|
||||
if(R.shock_reduction && can_metabolize(R))
|
||||
shock_reduction += R.shock_reduction
|
||||
return shock_reduction
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
leftover -= .
|
||||
|
||||
var/health_deficiency = max(H.maxHealth - H.health, H.getStaminaLoss())
|
||||
health_deficiency -= H.shock_reduction()
|
||||
health_deficiency -= H.shock_reduction(FALSE)
|
||||
|
||||
if(HAS_TRAIT(H, TRAIT_IGNOREDAMAGESLOWDOWN))
|
||||
return
|
||||
|
||||
@@ -169,8 +169,11 @@
|
||||
description = "A decent lubricant for machines. High in benzene, naptha and other hydrocarbons."
|
||||
reagent_state = LIQUID
|
||||
color = "#3C3C3C"
|
||||
shock_reduction = 25
|
||||
view_true_health = TRUE
|
||||
metabolization_rate = 0.1
|
||||
taste_description = "motor oil"
|
||||
process_flags = ORGANIC | SYNTHETIC
|
||||
process_flags = SYNTHETIC
|
||||
/// What this becomes after burning.
|
||||
var/reagent_after_burning = "ash"
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
/// The color of the agent outside of containers.
|
||||
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
|
||||
var/shock_reduction = 0
|
||||
var/view_true_health = FALSE // Determines if a painkiller messes with someone seeing their actual health on the health doll or not
|
||||
var/heart_rate_increase = 0
|
||||
var/heart_rate_decrease = 0
|
||||
var/heart_rate_stop = 0
|
||||
|
||||
Reference in New Issue
Block a user