Skip to content

Commit

Permalink
Merge pull request VoRe-ss13#74 from VoRe-ss13/upstream-merge-7623
Browse files Browse the repository at this point in the history
[MIRROR] fixes 2 runtimes in the liquid system
  • Loading branch information
cadyn authored Jan 26, 2024
2 parents 907a7a8 + 4696c91 commit 3950d4f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 6 additions & 2 deletions code/modules/reagents/holder/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,13 @@
//If for some reason touch effects are bypassed (e.g. injecting stuff directly into a reagent container or person),
//call the appropriate trans_to_*() proc.
/datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
if(ismob(target)) //CHOMPEdit
return splash_mob(target, amount * multiplier, copy) //Touch effects handled by splash_mob
//CHOMPEdit Start, we only can do the splashing first on carbon (Runtime reasons)
if(iscarbon(target))
return splash_mob(target, amount * multiplier, copy)
//CHOMPEdit End
touch(target, amount * multiplier) //First, handle mere touch effects
if(ismob(target))
return splash_mob(target, amount * multiplier, copy) //Touch effects handled by splash_mob
if(isturf(target))
return trans_to_turf(target, amount, multiplier, copy)
if(isobj(target) && target.is_open_container() && !isbelly(target.loc)) //CHOMPEdit
Expand Down
19 changes: 10 additions & 9 deletions code/modules/reagents/reagents/dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,17 @@
M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit

/datum/reagent/acid/touch_obj(var/obj/O, var/amount) //CHOMPEdit Start
if(isbelly(O.loc) || isbelly(O.loc.loc))
var/obj/belly/B = O.loc
if(B.item_digest_mode == IM_HOLD)
if(istype(O, /obj/item) && O.loc)
if(isbelly(O.loc) || isbelly(O.loc.loc))
var/obj/belly/B = O.loc
if(B.item_digest_mode == IM_HOLD)
return
var/obj/item/I = O
var/spent_amt = I.digest_act(I.loc, 1, amount / (meltdose / 3))
remove_self(spent_amt) //10u stomacid per w_class, less if stronger acid.
if(B.owner)
B.owner_adjust_nutrition((B.nutrition_percent / 100) * 5 * spent_amt)
return
var/obj/item/I = O
var/spent_amt = I.digest_act(I.loc, 1, amount / (meltdose / 3))
remove_self(spent_amt) //10u stomacid per w_class, less if stronger acid.
if(B.owner)
B.owner_adjust_nutrition((B.nutrition_percent / 100) * 5 * spent_amt)
return
..()
if(O.unacidable || is_type_in_list(O,item_digestion_blacklist)) //CHOMPEdit End
return
Expand Down

0 comments on commit 3950d4f

Please sign in to comment.