Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegoflores31 committed Aug 17, 2023
1 parent eb2ef17 commit 5b14eb0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
13 changes: 7 additions & 6 deletions code/modules/reagents/chemistry_properties/chem_property.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var/updates_stats = FALSE //should the property change other variables in the reagent when added or removed?
/// Should reagent with this property explode/start fire when mixed more than overdose threshold at once?
var/volatile = FALSE
var/potency = 1

/datum/chem_property/Destroy()
holder = null
Expand All @@ -21,10 +22,10 @@
/datum/chem_property/proc/reagent_added(atom/A, datum/reagent/R, amount)
return

/datum/chem_property/proc/pre_process(mob/living/M) //used for properties that need special checks before processing starts, such as cryometabolization
/datum/chem_property/proc/pre_process(mob/living/M, potency) //used for properties that need special checks before processing starts, such as cryometabolization
return

/datum/chem_property/proc/on_delete(mob/living/M) //used for properties that do something on delete
/datum/chem_property/proc/on_delete(mob/living/M, potency) //used for properties that do something on delete
qdel(src)
return

Expand All @@ -49,13 +50,13 @@
/datum/chem_property/proc/process_dead(mob/living/M, potency = 1, delta_time)
return FALSE // By default, chemicals don't process in dead personnel.

/datum/chem_property/proc/trigger(A) //used for properties that needs something to trigger outside of where process is usually called
/datum/chem_property/proc/trigger(A, potency) //used for properties that needs something to trigger outside of where process is usually called
return

/datum/chem_property/proc/reset_reagent()
/datum/chem_property/proc/reset_reagent(potency)
return

/datum/chem_property/proc/update_reagent() //used for changing other variables in the reagent, set update to FALSE to remove the update
/datum/chem_property/proc/update_reagent(potency) //used for changing other variables in the reagent, set update to FALSE to remove the update
return

/datum/chem_property/proc/reaction_mob(mob/M, method=TOUCH, volume, potency)
Expand All @@ -67,7 +68,7 @@
/datum/chem_property/proc/reaction_turf(turf/T, volume, potency)
return

/datum/chem_property/proc/post_update_reagent()
/datum/chem_property/proc/post_update_reagent(potency)
return

/datum/chem_property/proc/categories_to_string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
..()

/datum/chem_property/negative/hypermetabolic/update_reagent()
holder.custom_metabolism = holder.custom_metabolism * (1 + POTENCY_MULTIPLIER_VLOW * level)
holder.custom_metabolism = holder.custom_metabolism * (1 + POTENCY_MULTIPLIER_LOW * potency)
..()

/datum/chem_property/negative/addictive
Expand Down
14 changes: 7 additions & 7 deletions code/modules/reagents/chemistry_properties/prop_neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/datum/chem_property/neutral/cryometabolizing/pre_process(mob/living/M)
if(M.bodytemperature > 170)
return list(REAGENT_CANCEL = TRUE)
return list(REAGENT_BOOST = POTENCY_MULTIPLIER_LOW * level)
return list(REAGENT_BOOST = potency)

/datum/chem_property/neutral/thanatometabolizing
name = PROPERTY_THANATOMETABOL
Expand All @@ -40,7 +40,7 @@
category = PROPERTY_TYPE_IRRITANT

/datum/chem_property/neutral/excreting/pre_process(mob/living/M)
return list(REAGENT_PURGE = level)
return list(REAGENT_PURGE = potency * POTENCY_MULTIPLIER_MEDIUM)

/datum/chem_property/neutral/nutritious
name = PROPERTY_NUTRITIOUS
Expand All @@ -54,18 +54,18 @@
if(M.stat == DEAD)
return

if(M.nutrition + (holder.nutriment_factor * level) >= NUTRITION_MAX)
if(M.nutrition + (holder.nutriment_factor * potency * POTENCY_MULTIPLIER_MEDIUM) >= NUTRITION_MAX)
M.nutrition = NUTRITION_MAX
return
else
M.nutrition += holder.nutriment_factor * level
M.nutrition += holder.nutriment_factor * potency * POTENCY_MULTIPLIER_MEDIUM

/datum/chem_property/neutral/nutritious/reset_reagent()
holder.nutriment_factor = initial(holder.nutriment_factor)
..()

/datum/chem_property/neutral/nutritious/update_reagent()
holder.nutriment_factor += level
holder.nutriment_factor += potency * POTENCY_MULTIPLIER_MEDIUM
..()

/datum/chem_property/neutral/ketogenic
Expand Down Expand Up @@ -467,7 +467,7 @@
..()

/datum/chem_property/neutral/hypometabolic/update_reagent()
holder.custom_metabolism = max(holder.custom_metabolism / (1 + 0.35 * level), 0.005)
holder.custom_metabolism = max(holder.custom_metabolism / (1 + 0.35 * potency * POTENCY_MULTIPLIER_MEDIUM), 0.005)
..()

/datum/chem_property/neutral/sedative
Expand Down Expand Up @@ -533,7 +533,7 @@

/datum/chem_property/neutral/viscous/update_reagent()
holder.chemfiresupp = TRUE
holder.radiusmod -= 0.025 * level
holder.radiusmod -= 0.025 * potency * POTENCY_MULTIPLIER_MEDIUM
..()

//PROPERTY_DISABLED (in generation)
Expand Down
22 changes: 11 additions & 11 deletions code/modules/reagents/chemistry_properties/prop_positive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@
/datum/chem_property/positive/electrogenetic/trigger(A)
if(isliving(A))
var/mob/living/M = A
M.apply_damage(-POTENCY_MULTIPLIER_VHIGH * level, BRUTE)
M.apply_damage(-POTENCY_MULTIPLIER_VHIGH * level, BURN)
M.apply_damage(-POTENCY_MULTIPLIER_VHIGH * level, TOX)
M.apply_damage(-POTENCY_MULTIPLIER_EXTREME * potency, BRUTE)
M.apply_damage(-POTENCY_MULTIPLIER_EXTREME * potency, BURN)
M.apply_damage(-POTENCY_MULTIPLIER_EXTREME * potency, TOX)
M.updatehealth()

/datum/chem_property/positive/defibrillating
Expand Down Expand Up @@ -694,13 +694,13 @@
/datum/chem_property/positive/fire/update_reagent()
holder.chemfiresupp = TRUE

holder.radiusmod += radiusmod_per_level * level
holder.durationmod += durationmod_per_level * level
holder.intensitymod += intensitymod_per_level * level
holder.radiusmod += radiusmod_per_level * potency * POTENCY_MULTIPLIER_MEDIUM
holder.durationmod += durationmod_per_level * potency * POTENCY_MULTIPLIER_MEDIUM
holder.intensitymod += intensitymod_per_level * potency * POTENCY_MULTIPLIER_MEDIUM

holder.rangefire += range_per_level * level
holder.durationfire += duration_per_level * level
holder.intensityfire += intensity_per_level * level
holder.rangefire += range_per_level * potency * POTENCY_MULTIPLIER_MEDIUM
holder.durationfire += duration_per_level * potency * POTENCY_MULTIPLIER_MEDIUM
holder.intensityfire += intensity_per_level * potency * POTENCY_MULTIPLIER_MEDIUM

..()

Expand Down Expand Up @@ -786,8 +786,8 @@

/datum/chem_property/positive/explosive/update_reagent()
holder.explosive = TRUE
holder.power += level
holder.falloff_modifier += -3 / level
holder.power += potency * POTENCY_MULTIPLIER_MEDIUM
holder.falloff_modifier += -3 / potency * POTENCY_MULTIPLIER_MEDIUM
..()

//properties for CAS matrixes
Expand Down
6 changes: 3 additions & 3 deletions code/modules/reagents/chemistry_properties/prop_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
if(!istype(content, /obj/item/alien_embryo))
continue
// level is a number rather than a hivenumber, which are strings
var/hivenumber = GLOB.hive_datum[level]
var/hivenumber = GLOB.hive_datum[potency * POTENCY_MULTIPLIER_MEDIUM]
var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
var/obj/item/alien_embryo/A = content
A.hivenumber = hivenumber
Expand Down Expand Up @@ -148,8 +148,8 @@

playsound(E, 'sound/effects/attackblob.ogg', 25, TRUE)

E.hivenumber = GLOB.hive_datum[level]
set_hive_data(E, GLOB.hive_datum[level])
E.hivenumber = GLOB.hive_datum[potency * POTENCY_MULTIPLIER_MEDIUM]
set_hive_data(E, GLOB.hive_datum[potency * POTENCY_MULTIPLIER_MEDIUM])
E.flags_embryo |= FLAG_EMBRYO_PREDATOR

/datum/chem_property/special/crossmetabolizing
Expand Down

0 comments on commit 5b14eb0

Please sign in to comment.