From bcc01045a46aceb8c86d9323c56db48169a3e2ba Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:32:09 +0200
Subject: [PATCH 01/31] mrrow meow meow
---
code/__DEFINES/status_effects.dm | 2 ++
code/datums/status_effects/debuffs.dm | 24 ++++++++++++++++++
code/modules/mob/living/carbon/_defines.dm | 11 ++++++++
code/modules/mob/living/carbon/carbon.dm | 8 +++++-
.../mob/living/carbon/human/damage_procs.dm | 25 +++++++++++++++++++
code/modules/mob/living/carbon/human/life.dm | 12 ---------
code/modules/mob/living/life.dm | 7 ------
code/modules/mob/mob_defines.dm | 1 -
8 files changed, 69 insertions(+), 21 deletions(-)
create mode 100644 code/modules/mob/living/carbon/human/damage_procs.dm
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 5664ee0d2d1..e12c41cf3ca 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -114,6 +114,8 @@
#define STATUS_EFFECT_DASH /datum/status_effect/dash // Grants the ability to dash, expiring after a few seconds
+#define STATUS_EFFECT_VOMIT /datum/status/effect/tox_vomit // When carbon got enough tox damage - he will vomit.
+
//#define STATUS_EFFECT_NECROPOLIS_CURSE /datum/status_effect/necropolis_curse
//#define CURSE_BLINDING 1 //makes the edges of the target's screen obscured
//#define CURSE_SPAWNING 2 //spawns creatures that attack the target only
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 2dbe20a4bb0..e4f04315214 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1227,3 +1227,27 @@
if(new_filter)
animate(get_filter("ray"), offset = 10, time = 10 SECONDS, loop = -1)
animate(offset = 0, time = 10 SECONDS)
+
+/datum/status_effect/tox_vomit
+ id = "vomitting_from_toxins"
+ tick_interval = 2 SECONDS
+ alert_type = null
+ /// Has a chance to count up every tick, until it reaches a threshold, which causes the mob to vomit and resets
+ var/puke_counter = 0
+
+/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
+ if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner))
+ qdel(src)
+ return
+
+ if(owner.stat == DEAD || HAS_TRAIT(owner, TRAIT_GODMODE))
+ return
+
+ puke_counter++
+ if(puke_counter < 25) // This is like 150 seconds apparently according to old comments
+ return
+
+ var/mob/living/carbon/carbon = owner
+ vomit(20, 0, VOMIT_STUN_TIME, 0, TRUE)
+ carbon.adjustToxLoss(-3)
+ puke_counter = initial(puke_counter)
diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm
index 871b140a503..a2403788b3e 100644
--- a/code/modules/mob/living/carbon/_defines.dm
+++ b/code/modules/mob/living/carbon/_defines.dm
@@ -17,3 +17,14 @@
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
+
+/// Used to calculate threshold to vomit
+#define REQUIRED_VOMIT_TOXLOSS 45
+#define REQUIRED_VOMIT_NUTRITION 20
+/// Vomit defines
+#define VOMIT_NUTRITION_LOSS 10
+#define VOMIT_STUN_TIME (8 SECONDS)
+#define VOMIT_BLOOD_LOSS 0
+#define VOMIT_DISTANCE 0
+/// When reached - we'll apply status effect which will force carbon to vomit
+#define VOMIT_THRESHOLD_REACHED(carbon) (carbon.getToxLoss() > REQUIRED_VOMIT_TOXLOSS && carbon.nutrition > REQUIRED_VOMIT_NUTRITION)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 6b6c7657e07..8a51af8ca79 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -74,7 +74,13 @@
return FALSE
-/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, stun = 8 SECONDS, distance = 0, message = 1)
+/mob/living/carbon/proc/vomit(
+ lost_nutrition = VOMIT_NUTRITION_LOSS,
+ blood = VOMIT_BLOOD_LOSS,
+ stun = VOMIT_STUN_TIME,
+ distance = 0,
+ message = TRUE
+)
if(ismachineperson(src)) //IPCs do not vomit particulates
return FALSE
if(is_muzzled())
diff --git a/code/modules/mob/living/carbon/human/damage_procs.dm b/code/modules/mob/living/carbon/human/damage_procs.dm
new file mode 100644
index 00000000000..05a8619b126
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/damage_procs.dm
@@ -0,0 +1,25 @@
+/mob/living/carbon/adjustToxLoss(
+ amount = 0,
+ updating_health = TRUE,
+ blocked = 0,
+ forced = FALSE,
+ used_weapon = null,
+)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
+
+/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 8eeaa55dfc0..9e46a3e3d99 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -863,18 +863,6 @@
throw_alert(ALERT_NUTRITION, text2path("/atom/movable/screen/alert/hunger/[new_hunger]"), icon_override = dna.species.hunger_icon)
med_hud_set_status()
-
-/mob/living/carbon/human/handle_random_events()
- // Puke if toxloss is too high
- if(!stat)
- if(getToxLoss() >= 45 && nutrition > 20)
- lastpuke ++
- if(lastpuke >= 25) // about 25 second delay I guess
- vomit(20, 0, 8 SECONDS, 0, 1)
- adjustToxLoss(-3)
- lastpuke = 0
-
-
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/obj/item/organ/external/bodypart as anything in bodyparts)
for(var/obj/item/thing in bodypart.embedded_objects)
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 998f6bc5f44..765ff34e0f8 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -37,10 +37,6 @@
//Breathing, if applicable
handle_breathing(times_fired)
- if(stat != DEAD)
- //Random events (vomiting etc)
- handle_random_events()
-
if(LAZYLEN(diseases))
handle_diseases()
@@ -116,9 +112,6 @@
var/datum/disease/D = thing
D.stage_act()
-/mob/living/proc/handle_random_events()
- return
-
/mob/living/proc/handle_environment(datum/gas_mixture/environment)
return
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 177e07f38c8..2d3c6b01503 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -89,7 +89,6 @@
var/sec_record = ""
var/gen_record = ""
var/exploit_record = ""
- var/lastpuke = 0
/// For speaking/listening.
var/list/languages
/// For reagents that grant language knowlege.
From 0d281c38bb56de27936c3c60b40b512d9057b2c3 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:35:19 +0200
Subject: [PATCH 02/31] del useless coms
---
code/datums/status_effects/debuffs.dm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index e4f04315214..4272804e0bb 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1232,7 +1232,6 @@
id = "vomitting_from_toxins"
tick_interval = 2 SECONDS
alert_type = null
- /// Has a chance to count up every tick, until it reaches a threshold, which causes the mob to vomit and resets
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
@@ -1244,7 +1243,7 @@
return
puke_counter++
- if(puke_counter < 25) // This is like 150 seconds apparently according to old comments
+ if(puke_counter < 25)
return
var/mob/living/carbon/carbon = owner
From bb0f806ae88fb41f411172493d3e6e1f35a80d90 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:43:24 +0200
Subject: [PATCH 03/31] dme
---
code/datums/status_effects/debuffs.dm | 2 +-
paradise.dme | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 4272804e0bb..79ffa7cf9f5 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1247,6 +1247,6 @@
return
var/mob/living/carbon/carbon = owner
- vomit(20, 0, VOMIT_STUN_TIME, 0, TRUE)
+ carbon.vomit(20, 0, 8 SECONDS, 0, TRUE)
carbon.adjustToxLoss(-3)
puke_counter = initial(puke_counter)
diff --git a/paradise.dme b/paradise.dme
index 01a9f271ec1..1c9b06c5374 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -2344,6 +2344,7 @@
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defense.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
+#include "code\modules\mob\living\carbon\damage_procs.dm"
#include "code\modules\mob\living\carbon\carbon_emote.dm"
#include "code\modules\mob\living\carbon\carbon_stripping.dm"
#include "code\modules\mob\living\carbon\death.dm"
From c987a7627f100641827b424f6c074ce7e4605ec7 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:45:18 +0200
Subject: [PATCH 04/31] wrong file again
---
.../living/carbon/{human => }/damage_procs.dm | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)
rename code/modules/mob/living/carbon/{human => }/damage_procs.dm (95%)
diff --git a/code/modules/mob/living/carbon/human/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
similarity index 95%
rename from code/modules/mob/living/carbon/human/damage_procs.dm
rename to code/modules/mob/living/carbon/damage_procs.dm
index 05a8619b126..41d8f8f96db 100644
--- a/code/modules/mob/living/carbon/human/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -1,25 +1,25 @@
-/mob/living/carbon/adjustToxLoss(
- amount = 0,
- updating_health = TRUE,
- blocked = 0,
- forced = FALSE,
- used_weapon = null,
-)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
-
-/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
+/mob/living/carbon/adjustToxLoss(
+ amount = 0,
+ updating_health = TRUE,
+ blocked = 0,
+ forced = FALSE,
+ used_weapon = null,
+)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
+
+/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
From 822386422ab23e2f3b58df9eb744cf38396a1da9 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:49:59 +0200
Subject: [PATCH 05/31] inconsistent
---
code/datums/status_effects/debuffs.dm | 2 +-
.../modules/mob/living/carbon/damage_procs.dm | 50 +++++++++----------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 79ffa7cf9f5..c54b7bd53ee 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1247,6 +1247,6 @@
return
var/mob/living/carbon/carbon = owner
- carbon.vomit(20, 0, 8 SECONDS, 0, TRUE)
+ carbon.vomit(20)
carbon.adjustToxLoss(-3)
puke_counter = initial(puke_counter)
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index 41d8f8f96db..ccb05a1975b 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -1,25 +1,25 @@
-/mob/living/carbon/adjustToxLoss(
- amount = 0,
- updating_health = TRUE,
- blocked = 0,
- forced = FALSE,
- used_weapon = null,
-)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
-
-/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
+/mob/living/carbon/adjustToxLoss(
+ amount = 0,
+ updating_health = TRUE,
+ blocked = 0,
+ forced = FALSE,
+ used_weapon = null,
+)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
+
+/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ return .
From 0aaaa264d174186183b0ff2ebe8b2ed850b505d4 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 08:51:32 +0200
Subject: [PATCH 06/31] again defines
---
code/__DEFINES/status_effects.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index e12c41cf3ca..29e33ed9265 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -114,7 +114,7 @@
#define STATUS_EFFECT_DASH /datum/status_effect/dash // Grants the ability to dash, expiring after a few seconds
-#define STATUS_EFFECT_VOMIT /datum/status/effect/tox_vomit // When carbon got enough tox damage - he will vomit.
+#define STATUS_EFFECT_VOMIT /datum/status_effect/tox_vomit // When carbon got enough tox damage - he will vomit.
//#define STATUS_EFFECT_NECROPOLIS_CURSE /datum/status_effect/necropolis_curse
//#define CURSE_BLINDING 1 //makes the edges of the target's screen obscured
From f9b77fb53e2c9c1cb49b0bc576fc0347a57e3b97 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 09:03:40 +0200
Subject: [PATCH 07/31] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA?=
=?UTF-8?q?=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=D0=B8=D1=81=D0=BB=D0=BE?=
=?UTF-8?q?=D0=BA=D0=B0=D1=86=D0=B8=D0=B8=20nr1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
code/__DEFINES/mobs.dm | 2 ++
code/modules/mob/living/carbon/_defines.dm | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index b1556aab337..3e9a8942101 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -440,3 +440,5 @@
/// Makes the weaken into a knockdown
#define SHOCK_KNOCKDOWN (1<<7)
+/// When reached - we'll apply status effect which will force carbon to vomit
+#define VOMIT_THRESHOLD_REACHED(carbon) (carbon.getToxLoss() > REQUIRED_VOMIT_TOXLOSS && carbon.nutrition > REQUIRED_VOMIT_NUTRITION)
diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm
index a2403788b3e..8ea9c8c62e0 100644
--- a/code/modules/mob/living/carbon/_defines.dm
+++ b/code/modules/mob/living/carbon/_defines.dm
@@ -26,5 +26,3 @@
#define VOMIT_STUN_TIME (8 SECONDS)
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
-/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(carbon) (carbon.getToxLoss() > REQUIRED_VOMIT_TOXLOSS && carbon.nutrition > REQUIRED_VOMIT_NUTRITION)
From eb0b6067ed3da8de77a6c3abccfae6223494fde1 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 09:06:34 +0200
Subject: [PATCH 08/31] ok relocate all defines
---
code/__DEFINES/mobs.dm | 8 ++++++++
code/modules/mob/living/carbon/_defines.dm | 9 ---------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 3e9a8942101..3ee5b6ce014 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -440,5 +440,13 @@
/// Makes the weaken into a knockdown
#define SHOCK_KNOCKDOWN (1<<7)
+/// Used to calculate threshold to vomit
+#define REQUIRED_VOMIT_TOXLOSS 45
+#define REQUIRED_VOMIT_NUTRITION 20
+/// Vomit defines
+#define VOMIT_NUTRITION_LOSS 10
+#define VOMIT_STUN_TIME (8 SECONDS)
+#define VOMIT_BLOOD_LOSS 0
+#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
#define VOMIT_THRESHOLD_REACHED(carbon) (carbon.getToxLoss() > REQUIRED_VOMIT_TOXLOSS && carbon.nutrition > REQUIRED_VOMIT_NUTRITION)
diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm
index 8ea9c8c62e0..871b140a503 100644
--- a/code/modules/mob/living/carbon/_defines.dm
+++ b/code/modules/mob/living/carbon/_defines.dm
@@ -17,12 +17,3 @@
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
-
-/// Used to calculate threshold to vomit
-#define REQUIRED_VOMIT_TOXLOSS 45
-#define REQUIRED_VOMIT_NUTRITION 20
-/// Vomit defines
-#define VOMIT_NUTRITION_LOSS 10
-#define VOMIT_STUN_TIME (8 SECONDS)
-#define VOMIT_BLOOD_LOSS 0
-#define VOMIT_DISTANCE 0
From 086ca02e9e8c52f69e08dd1d130236952d3e9b68 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 09:12:40 +0200
Subject: [PATCH 09/31] that needs mor improve
---
code/datums/status_effects/debuffs.dm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index c54b7bd53ee..12f380e8127 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1230,16 +1230,15 @@
/datum/status_effect/tox_vomit
id = "vomitting_from_toxins"
- tick_interval = 2 SECONDS
alert_type = null
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner))
+ if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
- if(owner.stat == DEAD || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(owner.stat == DEAD)
return
puke_counter++
From 30315589c05a72fb13a3a521bfce761a8f2bbd75 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:32:11 +0200
Subject: [PATCH 10/31] logics
---
code/__DEFINES/mobs.dm | 2 +-
code/datums/status_effects/debuffs.dm | 5 +++-
code/modules/mob/living/carbon/carbon.dm | 22 ++++++++++++---
.../modules/mob/living/carbon/damage_procs.dm | 25 -----------------
.../mob/living/carbon/human/human_damage.dm | 27 ++++++++++++++++---
paradise.dme | 1 -
6 files changed, 47 insertions(+), 35 deletions(-)
delete mode 100644 code/modules/mob/living/carbon/damage_procs.dm
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 3ee5b6ce014..0a5533529de 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -449,4 +449,4 @@
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(carbon) (carbon.getToxLoss() > REQUIRED_VOMIT_TOXLOSS && carbon.nutrition > REQUIRED_VOMIT_NUTRITION)
+#define VOMIT_THRESHOLD_REACHED(mob) (mob.getToxLoss() >= REQUIRED_VOMIT_TOXLOSS && mob.nutrition > REQUIRED_VOMIT_NUTRITION)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 12f380e8127..b849d8479fa 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1246,6 +1246,9 @@
return
var/mob/living/carbon/carbon = owner
- carbon.vomit(20)
+
+ if(!carbon.vomit(20))
+ return
+
carbon.adjustToxLoss(-3)
puke_counter = initial(puke_counter)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 8a51af8ca79..a2e5a6745d8 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -81,42 +81,58 @@
distance = 0,
message = TRUE
)
+ . = FALSE
if(ismachineperson(src)) //IPCs do not vomit particulates
- return FALSE
+ return .
+
if(is_muzzled())
if(message)
to_chat(src, "Намордник препятствует рвоте!")
- return FALSE
+ return .
+
if(stun)
Stun(stun)
+
if(nutrition < 100 && !blood)
if(message)
visible_message("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!", \
"Вы пытаетесь проблеваться, но в вашем желудке пусто!")
+
if(stun)
Weaken(stun * 2.5)
+
else
+ . = TRUE
if(message)
visible_message("[src.name] блю[pluralize_ru(src.gender,"ет","ют")]!", \
"Вас вырвало!")
+
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
var/turf/T = get_turf(src)
+
for(var/i=0 to distance)
if(blood)
if(T)
add_splatter_floor(T)
+
if(stun)
adjustBruteLoss(3)
+
else
if(T)
T.add_vomit_floor()
+
adjust_nutrition(-lost_nutrition)
+
if(stun)
adjustToxLoss(-3)
+
T = get_step(T, dir)
+
if(T.is_blocked_turf())
break
- return TRUE
+
+ return .
/mob/living/carbon/gib()
. = death(TRUE)
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
deleted file mode 100644
index ccb05a1975b..00000000000
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ /dev/null
@@ -1,25 +0,0 @@
-/mob/living/carbon/adjustToxLoss(
- amount = 0,
- updating_health = TRUE,
- blocked = 0,
- forced = FALSE,
- used_weapon = null,
-)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
-
-/mob/living/carbon/setToxLoss(amount, updating_health = TRUE)
- . = ..()
- if(. == STATUS_UPDATE_NONE)
- return .
-
- if(VOMIT_THRESHOLD_REACHED(src))
- apply_status_effect(STATUS_EFFECT_VOMIT)
-
- return .
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 033b240fe72..3e948df2cd5 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -291,11 +291,30 @@
used_weapon = null,
)
. = ..()
- if(. && amount > 0 && mind)
- for(var/datum/objective/pain_hunter/objective in GLOB.all_objectives)
- if(mind == objective.target)
- objective.take_damage(amount, TOX)
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+
+ if(!mind)
+ return .
+
+ for(var/datum/objective/pain_hunter/objective in GLOB.all_objectives)
+ if(mind == objective.target)
+ objective.take_damage(amount, TOX)
+
+ return .
+
+/mob/living/carbon/human/setToxLoss(amount, updating_health = TRUE)
+ . = ..()
+ if(. == STATUS_UPDATE_NONE)
+ return .
+
+ if(VOMIT_THRESHOLD_REACHED(src))
+ apply_status_effect(STATUS_EFFECT_VOMIT)
+ return .
////////////////////////////////////////////
diff --git a/paradise.dme b/paradise.dme
index 1c9b06c5374..01a9f271ec1 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -2344,7 +2344,6 @@
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defense.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
-#include "code\modules\mob\living\carbon\damage_procs.dm"
#include "code\modules\mob\living\carbon\carbon_emote.dm"
#include "code\modules\mob\living\carbon\carbon_stripping.dm"
#include "code\modules\mob\living\carbon\death.dm"
From 13103894a3b8c6c17c773055245da27078f26876 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:32:30 +0200
Subject: [PATCH 11/31] smol upd
---
code/modules/mob/living/carbon/carbon.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index a2e5a6745d8..e964a6bcd37 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -82,6 +82,7 @@
message = TRUE
)
. = FALSE
+
if(ismachineperson(src)) //IPCs do not vomit particulates
return .
@@ -128,7 +129,7 @@
adjustToxLoss(-3)
T = get_step(T, dir)
-
+
if(T.is_blocked_turf())
break
From c6ffc32456d032faba70ced20ec1743f58b8b15b Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:36:52 +0200
Subject: [PATCH 12/31] op op fix fix fix
---
code/datums/status_effects/debuffs.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index b849d8479fa..347a11441fb 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1246,9 +1246,9 @@
return
var/mob/living/carbon/carbon = owner
-
+ puke_counter = initial(puke_counter)
+
if(!carbon.vomit(20))
return
carbon.adjustToxLoss(-3)
- puke_counter = initial(puke_counter)
From f454aa87f5eaf5607212af74177b51bba140a4b2 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:46:10 +0200
Subject: [PATCH 13/31] normal process
---
code/datums/status_effects/debuffs.dm | 1 +
1 file changed, 1 insertion(+)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 347a11441fb..cad4e07fa23 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1231,6 +1231,7 @@
/datum/status_effect/tox_vomit
id = "vomitting_from_toxins"
alert_type = null
+ processing_speed = STATUS_EFFECT_NORMAL_PROCESS
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
From caaf00d2c4e2600642e6dbd95c72bb79ac5270c8 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 18:34:37 +0200
Subject: [PATCH 14/31] =?UTF-8?q?=D1=80=D1=83=D0=B1=D1=80=D0=B8=D0=BA?=
=?UTF-8?q?=D0=B0=20=D1=8D=D0=BA=D1=81=D0=BF=D0=B5=D1=80=D0=B8=D0=BC=D0=B5?=
=?UTF-8?q?=D0=BD=D1=82=D1=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
code/__DEFINES/mobs.dm | 7 ++++---
code/datums/status_effects/debuffs.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 0a5533529de..ac3dbb49b58 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -441,12 +441,13 @@
#define SHOCK_KNOCKDOWN (1<<7)
/// Used to calculate threshold to vomit
-#define REQUIRED_VOMIT_TOXLOSS 45
-#define REQUIRED_VOMIT_NUTRITION 20
+#define REQUIRED_VOMIT_THRESHOLD_TOXLOSS 45
+#define REQUIRED_VOMIT_THRESHOLD_NUTRITION 100
/// Vomit defines
+#define VOMIT_REQUIRED_NUTRITION 100
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(mob) (mob.getToxLoss() >= REQUIRED_VOMIT_TOXLOSS && mob.nutrition > REQUIRED_VOMIT_NUTRITION)
+#define VOMIT_THRESHOLD_REACHED(mob, req_toxloss = REQUIRED_VOMIT_THRESHOLD_TOXLOSS, req_nutrients = REQUIRED_VOMIT_THRESHOLD_NUTRITION) (mob.getToxLoss() >= req_toxloss && mob.nutrition > req_nutrients)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index cad4e07fa23..d83e044a608 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1235,7 +1235,7 @@
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner) || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, req_nutrients = 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index e964a6bcd37..2603764ca1a 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -94,7 +94,7 @@
if(stun)
Stun(stun)
- if(nutrition < 100 && !blood)
+ if(nutrition < VOMIT_REQUIRED_NUTRITION && !blood)
if(message)
visible_message("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!", \
"Вы пытаетесь проблеваться, но в вашем желудке пусто!")
From 40128a3cffa6a0af5c14f95b26013360106c4320 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:03:34 +0200
Subject: [PATCH 15/31] =?UTF-8?q?=D1=80=D1=83=D0=B1=D1=80=D0=B8=D0=BA?=
=?UTF-8?q?=D0=B0=20=D1=8D=D0=BA=D1=81=D0=BF=D0=B5=D1=80=D0=B8=D0=BC=D0=B5?=
=?UTF-8?q?=D0=BD=D1=82=D1=8B=20=D0=BF=D0=BE=D0=B4=D1=85=D0=BE=D0=B4=D0=B8?=
=?UTF-8?q?=D1=82=20=D0=BA=20=D0=BA=D0=BE=D0=BD=D1=86=D1=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
code/__DEFINES/mobs.dm | 5 +----
code/datums/status_effects/debuffs.dm | 2 +-
code/modules/mob/living/carbon/human/human_damage.dm | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index ac3dbb49b58..4ffb24c5605 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -440,9 +440,6 @@
/// Makes the weaken into a knockdown
#define SHOCK_KNOCKDOWN (1<<7)
-/// Used to calculate threshold to vomit
-#define REQUIRED_VOMIT_THRESHOLD_TOXLOSS 45
-#define REQUIRED_VOMIT_THRESHOLD_NUTRITION 100
/// Vomit defines
#define VOMIT_REQUIRED_NUTRITION 100
#define VOMIT_NUTRITION_LOSS 10
@@ -450,4 +447,4 @@
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(mob, req_toxloss = REQUIRED_VOMIT_THRESHOLD_TOXLOSS, req_nutrients = REQUIRED_VOMIT_THRESHOLD_NUTRITION) (mob.getToxLoss() >= req_toxloss && mob.nutrition > req_nutrients)
+#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss) if(nutriments) { (mob.nutrition > req_nutrients); }
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index d83e044a608..8fb2967ffff 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1235,7 +1235,7 @@
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, req_nutrients = 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, 45, 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 3e948df2cd5..48ea468ab70 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -294,7 +294,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src))
+ if(VOMIT_THRESHOLD_REACHED(src, 45))
apply_status_effect(STATUS_EFFECT_VOMIT)
if(!mind)
@@ -311,7 +311,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src))
+ if(VOMIT_THRESHOLD_REACHED(src, 45))
apply_status_effect(STATUS_EFFECT_VOMIT)
return .
From 65a20ff39769cc799573a62d66c01389d990606a Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:10:18 +0200
Subject: [PATCH 16/31] ladno
---
code/__DEFINES/mobs.dm | 2 +-
code/modules/mob/living/carbon/human/human_damage.dm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 4ffb24c5605..0760b2b2f20 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -447,4 +447,4 @@
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss) if(nutriments) { (mob.nutrition > req_nutrients); }
+#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss && mob.nutrition > req_nutrients)
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 48ea468ab70..0bf20d9cbc1 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -294,7 +294,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, 45))
+ if(VOMIT_THRESHOLD_REACHED(src, 45, 100))
apply_status_effect(STATUS_EFFECT_VOMIT)
if(!mind)
@@ -311,7 +311,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, 45))
+ if(VOMIT_THRESHOLD_REACHED(src, 45, 100))
apply_status_effect(STATUS_EFFECT_VOMIT)
return .
From 35ec958fc81c8a31b953c86203eb16035f5bb947 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:13:30 +0200
Subject: [PATCH 17/31] fix it. Again
---
code/__DEFINES/mobs.dm | 3 ++-
code/datums/status_effects/debuffs.dm | 2 +-
code/modules/mob/living/carbon/human/human_damage.dm | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 0760b2b2f20..934c3c78be5 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -442,9 +442,10 @@
/// Vomit defines
#define VOMIT_REQUIRED_NUTRITION 100
+#define VOMIT_REQUIRED_TOXLOSS 45
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss && mob.nutrition > req_nutrients)
+#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss && mob.nutrition > nutriments)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 8fb2967ffff..8100ade0754 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1235,7 +1235,7 @@
var/puke_counter = 0
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, 45, 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, VOMIT_REQUIRED_TOXLOSS, 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 0bf20d9cbc1..49b73e55b72 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -294,7 +294,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, 45, 100))
+ if(VOMIT_THRESHOLD_REACHED(src, VOMIT_REQUIRED_TOXLOSS, VOMIT_REQUIRED_NUTRITION))
apply_status_effect(STATUS_EFFECT_VOMIT)
if(!mind)
@@ -311,7 +311,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, 45, 100))
+ if(VOMIT_THRESHOLD_REACHED(src, VOMIT_REQUIRED_TOXLOSS, VOMIT_REQUIRED_NUTRITION))
apply_status_effect(STATUS_EFFECT_VOMIT)
return .
From ed0ab1996a828794378491e68fc1b2d13aab70c7 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Fri, 27 Sep 2024 20:19:25 +0200
Subject: [PATCH 18/31] improve.
---
code/__DEFINES/mobs.dm | 4 ++--
code/datums/status_effects/debuffs.dm | 9 ++++++++-
code/modules/mob/living/carbon/human/human_damage.dm | 4 ++--
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 934c3c78be5..aea16c2c378 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -442,10 +442,10 @@
/// Vomit defines
#define VOMIT_REQUIRED_NUTRITION 100
-#define VOMIT_REQUIRED_TOXLOSS 45
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
/// When reached - we'll apply status effect which will force carbon to vomit
-#define VOMIT_THRESHOLD_REACHED(mob, toxloss, nutriments) (mob.getToxLoss() >= toxloss && mob.nutrition > nutriments)
+#define TOX_VOMIT_THRESHOLD_REACHED(mob, toxloss) (mob.getToxLoss() >= toxloss)
+#define TOX_VOMIT_REQUIRED_TOXLOSS 45
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 8100ade0754..473eebd75da 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1232,10 +1232,17 @@
id = "vomitting_from_toxins"
alert_type = null
processing_speed = STATUS_EFFECT_NORMAL_PROCESS
+ tick_interval = 2 SECONDS
var/puke_counter = 0
+/datum/status_effect/tox_vomit/on_apply()
+ if(!iscarbon(owner))
+ return FALSE
+
+ return TRUE
+
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!iscarbon(owner) || !VOMIT_THRESHOLD_REACHED(owner, VOMIT_REQUIRED_TOXLOSS, 20) || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(!TOX_VOMIT_THRESHOLD_REACHED(owner, TOX_VOMIT_REQUIRED_TOXLOSS) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 49b73e55b72..822a059766b 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -294,7 +294,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, VOMIT_REQUIRED_TOXLOSS, VOMIT_REQUIRED_NUTRITION))
+ if(TOX_VOMIT_THRESHOLD_REACHED(src, TOX_VOMIT_REQUIRED_TOXLOSS))
apply_status_effect(STATUS_EFFECT_VOMIT)
if(!mind)
@@ -311,7 +311,7 @@
if(. == STATUS_UPDATE_NONE)
return .
- if(VOMIT_THRESHOLD_REACHED(src, VOMIT_REQUIRED_TOXLOSS, VOMIT_REQUIRED_NUTRITION))
+ if(TOX_VOMIT_THRESHOLD_REACHED(src, TOX_VOMIT_REQUIRED_TOXLOSS))
apply_status_effect(STATUS_EFFECT_VOMIT)
return .
From 350cf8697dfb11c1855746899adc39adf7003d26 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 08:52:56 +0200
Subject: [PATCH 19/31] some improve
---
code/datums/status_effects/debuffs.dm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 473eebd75da..71c007981ef 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1242,13 +1242,10 @@
return TRUE
/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
- if(!TOX_VOMIT_THRESHOLD_REACHED(owner, TOX_VOMIT_REQUIRED_TOXLOSS) || HAS_TRAIT(owner, TRAIT_GODMODE))
+ if(owner.stat == DEAD || !TOX_VOMIT_THRESHOLD_REACHED(owner, TOX_VOMIT_REQUIRED_TOXLOSS) || HAS_TRAIT(owner, TRAIT_GODMODE))
qdel(src)
return
- if(owner.stat == DEAD)
- return
-
puke_counter++
if(puke_counter < 25)
return
From 975aa2e2a16c820eab610711f98e7ebaa5fabc6f Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:03:23 +0200
Subject: [PATCH 20/31] final
---
code/__DEFINES/mobs.dm | 6 +-
.../viruses/advance/symptoms/vomit.dm | 4 +-
code/datums/status_effects/debuffs.dm | 2 +-
.../shadowling/shadowling_abilities.dm | 2 +-
.../vampire/vampire_powers/bestia_powers.dm | 4 +-
.../mining/equipment/regenerative_core.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 70 ++++++++++---------
.../reagents/chemistry/reagents/medicine.dm | 8 +--
.../reagents/chemistry/reagents/water.dm | 8 +--
9 files changed, 56 insertions(+), 50 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index aea16c2c378..9b4a835acb3 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -444,8 +444,12 @@
#define VOMIT_REQUIRED_NUTRITION 100
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
-#define VOMIT_BLOOD_LOSS 0
#define VOMIT_DISTANCE 0
+/// Vomit modes
+#define VOMIT_TOXIN (1<<0)
+#define VOMIT_BLOOD (1<<1)
+#define VOMIT_BOTH (VOMIT_TOXIN|VOMIT_BLOOD)
+
/// When reached - we'll apply status effect which will force carbon to vomit
#define TOX_VOMIT_THRESHOLD_REACHED(mob, toxloss) (mob.getToxLoss() >= toxloss)
#define TOX_VOMIT_REQUIRED_TOXLOSS 45
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index d5fd75e73d2..c7f3b2ef661 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -77,7 +77,7 @@ Bonus
severity = 5
/datum/symptom/vomit/blood/Vomit(mob/living/carbon/M)
- M.vomit(0, 1)
+ M.vomit(0, VOMIT_TOXIN|VOMIT_BLOOD)
/*
@@ -106,4 +106,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
- M.vomit(6,0,8 SECONDS,5,1)
+ M.vomit(6, VOMIT_TOXIN, 8 SECONDS, 5, 1)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 71c007981ef..6696a4d0b54 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1013,7 +1013,7 @@
if(prob(pukeprob))
carbon.AdjustConfused(9 SECONDS)
carbon.AdjustStuttering(3 SECONDS)
- carbon.vomit(15, FALSE, 8 SECONDS, 0, FALSE)
+ carbon.vomit(15, VOMIT_TOXIN, 8 SECONDS, 0, FALSE)
carbon.Dizzy(15 SECONDS)
if(strength >= DISGUST_LEVEL_DISGUSTED)
if(prob(25))
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 89d8e224c56..1acfd50b60c 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -923,7 +923,7 @@
var/mob/living/carbon/human/target = targets[1]
- target.vomit(lost_nutrition = 0, blood = TRUE, stun = 8 SECONDS, distance = 1, message = FALSE)
+ target.vomit(lost_nutrition = 0, mode = VOMIT_BLOOD, stun = 8 SECONDS, distance = 1, message = FALSE)
playsound(user.loc, 'sound/hallucinations/veryfar_noise.ogg', 50, TRUE)
to_chat(user, "You instantly rearrange [target]'s memories, hyptonitizing [target.p_them()] into a thrall.")
to_chat(target, "An agonizing spike of pain drives into your mind, and--")
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 9fb1cb4af01..053fe09f7b4 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -409,7 +409,7 @@
var/obj/item/thing = organ_to_dissect.remove(target)
qdel(thing)
- target.vomit(50, TRUE, FALSE)
+ target.vomit(50, VOMIT_BLOOD, FALSE)
if(target.has_pain())
target.emote("scream")
@@ -688,7 +688,7 @@
if(iscarbon(victim))
var/mob/living/carbon/c_victim = victim
- c_victim.vomit(50, TRUE, FALSE)
+ c_victim.vomit(50, VOMIT_BLOOD, FALSE)
if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3))
new /obj/effect/temp_visual/cult/sparks(get_turf(victim))
diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm
index 782fd4920d2..f5e4e53df4b 100644
--- a/code/modules/mining/equipment/regenerative_core.dm
+++ b/code/modules/mining/equipment/regenerative_core.dm
@@ -241,7 +241,7 @@
if(prob(2))
SEND_SOUND(owner, sound(pick(spooky_sounds)))
if(prob(3))
- owner.vomit(0, 1)
+ owner.vomit(0, VOMIT_BLOOD)
if(prob(50))
var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/child = new(owner.loc)
child.faction = owner.faction.Copy()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 2603764ca1a..7f17f1f70de 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -76,64 +76,66 @@
/mob/living/carbon/proc/vomit(
lost_nutrition = VOMIT_NUTRITION_LOSS,
- blood = VOMIT_BLOOD_LOSS,
+ mode = VOMIT_TOXIN,
stun = VOMIT_STUN_TIME,
distance = 0,
message = TRUE
-)
- . = FALSE
-
+)
if(ismachineperson(src)) //IPCs do not vomit particulates
- return .
+ return FALSE
if(is_muzzled())
if(message)
- to_chat(src, "Намордник препятствует рвоте!")
- return .
+ to_chat(src, span_warning("Намордник препятствует рвоте!"))
+
+ return FALSE
if(stun)
Stun(stun)
- if(nutrition < VOMIT_REQUIRED_NUTRITION && !blood)
+ if(!nutrition)
+ return FALSE
+
+ if((nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
if(message)
- visible_message("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!", \
- "Вы пытаетесь проблеваться, но в вашем желудке пусто!")
+ visible_message(span_warning("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!"), \
+ span_userdanger("Вы пытаетесь проблеваться, но в вашем желудке пусто!"))
if(stun)
Weaken(stun * 2.5)
- else
- . = TRUE
- if(message)
- visible_message("[src.name] блю[pluralize_ru(src.gender,"ет","ют")]!", \
- "Вас вырвало!")
+ return FALSE
- playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
- var/turf/T = get_turf(src)
+ if(message)
+ visible_message(span_danger("[src.name] блю[pluralize_ru(src.gender,"ет","ют")]!"), \
+ span_userdanger("Вас вырвало!"))
- for(var/i=0 to distance)
- if(blood)
- if(T)
- add_splatter_floor(T)
+ playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
+ var/turf/turf = get_turf(src)
- if(stun)
- adjustBruteLoss(3)
+ if(!turf)
+ return FALSE
- else
- if(T)
- T.add_vomit_floor()
+ for(var/i = 0 to distance)
+ if(mode & VOMIT_TOXIN)
+ turf.add_vomit_floor()
+ adjust_nutrition(-lost_nutrition)
+
+ if(stun)
+ adjustToxLoss(-3)
+
+ if(mode & VOMIT_BLOOD)
+ add_splatter_floor(turf)
- adjust_nutrition(-lost_nutrition)
+ if(stun)
+ adjustBruteLoss(3)
- if(stun)
- adjustToxLoss(-3)
+ turf = get_step(turf, dir)
- T = get_step(T, dir)
+ if(turf.is_blocked_turf())
+ break
- if(T.is_blocked_turf())
- break
-
- return .
+ return FALSE
/mob/living/carbon/gib()
. = death(TRUE)
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 1c6a004752e..50a15e8f30c 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -1051,20 +1051,20 @@
var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS]
if(severity == 1)
if(effect <= 2)
- M.vomit(0, TRUE, FALSE)
+ M.vomit(0, VOMIT_BLOOD, FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 4)
- M.vomit(0, TRUE, FALSE)
+ M.vomit(0, VOMIT_BLOOD, FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
else if(severity == 2)
if(effect <= 2)
M.visible_message("[M] is bleeding from [M.p_their()] very pores!")
M.bleed(rand(10, 20))
else if(effect <= 4)
- M.vomit(0, TRUE, FALSE)
+ M.vomit(0, VOMIT_BLOOD, FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 8)
- M.vomit(0, TRUE, FALSE)
+ M.vomit(0, VOMIT_BLOOD, FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
return list(effect, update_flags)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 54d40c8f4b5..87af0f468a8 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -344,11 +344,11 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
vamp.adjust_nullification(20, 4)
vamp.bloodusable = max(vamp.bloodusable - 3,0)
if(vamp.bloodusable)
- V.vomit(0, TRUE, FALSE)
+ V.vomit(0, VOMIT_BLOOD, FALSE)
V.adjustBruteLoss(3)
else
holder.remove_reagent(id, volume)
- V.vomit(0, FALSE, FALSE)
+ V.vomit(0, VOMIT_TOXIN, FALSE)
return
else
if(!vamp.bloodtotal)
@@ -389,10 +389,10 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
g_vamp.nullified = max(5, g_vamp.nullified + 2)
g_vamp.bloodusable = max(g_vamp.bloodusable - 3,0)
if(g_vamp.bloodusable)
- V.vomit(0,1)
+ V.vomit(0, VOMIT_TOXIN|VOMIT_BLOD)
else
holder.remove_reagent(id, volume)
- V.vomit(0,0)
+ V.vomit(0, VOMIT_BLOOD)
return
else
switch(current_cycle)
From aa969c06ae84ea3ed74d0d813657d6bdcaef5304 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:04:55 +0200
Subject: [PATCH 21/31] oczepyatka
---
code/modules/reagents/chemistry/reagents/water.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 87af0f468a8..3154d472566 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -389,7 +389,7 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
g_vamp.nullified = max(5, g_vamp.nullified + 2)
g_vamp.bloodusable = max(g_vamp.bloodusable - 3,0)
if(g_vamp.bloodusable)
- V.vomit(0, VOMIT_TOXIN|VOMIT_BLOD)
+ V.vomit(0, VOMIT_TOXIN|VOMIT_BLOOD)
else
holder.remove_reagent(id, volume)
V.vomit(0, VOMIT_BLOOD)
From cd2eadf297507fc9b1b23cf0e0d0860021543440 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:09:16 +0200
Subject: [PATCH 22/31] now this is final
---
code/datums/diseases/viruses/advance/symptoms/vomit.dm | 2 +-
code/modules/surgery/organs/blood.dm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index c7f3b2ef661..717dc078974 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -77,7 +77,7 @@ Bonus
severity = 5
/datum/symptom/vomit/blood/Vomit(mob/living/carbon/M)
- M.vomit(0, VOMIT_TOXIN|VOMIT_BLOOD)
+ M.vomit(0, VOMIT_BLOOD)
/*
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index a931b9cf6c0..446edf78bba 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -119,7 +119,7 @@
// +2.5% chance per internal bleeding site that we'll cough up blood on a given tick.
// Must be bleeding internally in more than one place to have a chance at this.
if(amt >= 1 && prob(5 * amt))
- vomit(lost_nutrition = 10, blood = TRUE)
+ vomit(lost_nutrition = 10, VOMIT_BLOOD)
/mob/living/carbon/human/bleed_internal(amt)
From 1f6cdd5fb2d0d96f96a1ad9e207521046bc55392 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:30:23 +0200
Subject: [PATCH 23/31] improve
---
code/datums/diseases/viruses/advance/symptoms/vomit.dm | 4 ++--
code/game/gamemodes/shadowling/shadowling_abilities.dm | 2 +-
.../antagonists/vampire/vampire_powers/bestia_powers.dm | 4 ++--
code/modules/mining/equipment/regenerative_core.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 9 ++++++---
code/modules/reagents/chemistry/reagents/medicine.dm | 8 ++++----
code/modules/reagents/chemistry/reagents/water.dm | 8 ++++----
code/modules/surgery/organs/blood.dm | 2 +-
8 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index 717dc078974..80559a6ee05 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -77,7 +77,7 @@ Bonus
severity = 5
/datum/symptom/vomit/blood/Vomit(mob/living/carbon/M)
- M.vomit(0, VOMIT_BLOOD)
+ M.vomit(VOMIT_BLOOD)
/*
@@ -106,4 +106,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
- M.vomit(6, VOMIT_TOXIN, 8 SECONDS, 5, 1)
+ M.vomit(VOMIT_TOXIN, 6, 8 SECONDS, 5, 1)
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 1acfd50b60c..77479df2953 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -923,7 +923,7 @@
var/mob/living/carbon/human/target = targets[1]
- target.vomit(lost_nutrition = 0, mode = VOMIT_BLOOD, stun = 8 SECONDS, distance = 1, message = FALSE)
+ target.vomit(VOMIT_BLOOD, stun = 8 SECONDS, distance = 1, message = FALSE)
playsound(user.loc, 'sound/hallucinations/veryfar_noise.ogg', 50, TRUE)
to_chat(user, "You instantly rearrange [target]'s memories, hyptonitizing [target.p_them()] into a thrall.")
to_chat(target, "An agonizing spike of pain drives into your mind, and--")
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 053fe09f7b4..71ffd7d6b12 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -409,7 +409,7 @@
var/obj/item/thing = organ_to_dissect.remove(target)
qdel(thing)
- target.vomit(50, VOMIT_BLOOD, FALSE)
+ target.vomit(VOMIT_BLOOD, 50, FALSE)
if(target.has_pain())
target.emote("scream")
@@ -688,7 +688,7 @@
if(iscarbon(victim))
var/mob/living/carbon/c_victim = victim
- c_victim.vomit(50, VOMIT_BLOOD, FALSE)
+ c_victim.vomit(VOMIT_BLOOD, 50, FALSE)
if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3))
new /obj/effect/temp_visual/cult/sparks(get_turf(victim))
diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm
index f5e4e53df4b..3ba9b3a7f8a 100644
--- a/code/modules/mining/equipment/regenerative_core.dm
+++ b/code/modules/mining/equipment/regenerative_core.dm
@@ -241,7 +241,7 @@
if(prob(2))
SEND_SOUND(owner, sound(pick(spooky_sounds)))
if(prob(3))
- owner.vomit(0, VOMIT_BLOOD)
+ owner.vomit(VOMIT_BLOOD)
if(prob(50))
var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/child = new(owner.loc)
child.faction = owner.faction.Copy()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7f17f1f70de..7d64d076630 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -75,8 +75,8 @@
/mob/living/carbon/proc/vomit(
- lost_nutrition = VOMIT_NUTRITION_LOSS,
- mode = VOMIT_TOXIN,
+ mode = VOMIT_TOXIN,
+ lost_nutrition,
stun = VOMIT_STUN_TIME,
distance = 0,
message = TRUE
@@ -96,6 +96,9 @@
if(!nutrition)
return FALSE
+ if((mode & VOMIT_TOXIN) && (!lost_nutrition))
+ lost_nutrition = VOMIT_NUTRITION_LOSS
+
if((nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
if(message)
visible_message(span_warning("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!"), \
@@ -120,7 +123,7 @@
if(mode & VOMIT_TOXIN)
turf.add_vomit_floor()
adjust_nutrition(-lost_nutrition)
-
+
if(stun)
adjustToxLoss(-3)
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 50a15e8f30c..68beb9f0554 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -1051,20 +1051,20 @@
var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS]
if(severity == 1)
if(effect <= 2)
- M.vomit(0, VOMIT_BLOOD, FALSE)
+ M.vomit(VOMIT_BLOOD, stun = FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 4)
- M.vomit(0, VOMIT_BLOOD, FALSE)
+ M.vomit(VOMIT_BLOOD, stun = FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
else if(severity == 2)
if(effect <= 2)
M.visible_message("[M] is bleeding from [M.p_their()] very pores!")
M.bleed(rand(10, 20))
else if(effect <= 4)
- M.vomit(0, VOMIT_BLOOD, FALSE)
+ M.vomit(VOMIT_BLOOD, stun = FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 8)
- M.vomit(0, VOMIT_BLOOD, FALSE)
+ M.vomit(VOMIT_BLOOD, stun = FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
return list(effect, update_flags)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 3154d472566..bdeb5a3ba17 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -344,11 +344,11 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
vamp.adjust_nullification(20, 4)
vamp.bloodusable = max(vamp.bloodusable - 3,0)
if(vamp.bloodusable)
- V.vomit(0, VOMIT_BLOOD, FALSE)
+ V.vomit(VOMIT_BLOOD, stun = FALSE)
V.adjustBruteLoss(3)
else
holder.remove_reagent(id, volume)
- V.vomit(0, VOMIT_TOXIN, FALSE)
+ V.vomit(VOMIT_TOXIN, stun = FALSE)
return
else
if(!vamp.bloodtotal)
@@ -389,10 +389,10 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
g_vamp.nullified = max(5, g_vamp.nullified + 2)
g_vamp.bloodusable = max(g_vamp.bloodusable - 3,0)
if(g_vamp.bloodusable)
- V.vomit(0, VOMIT_TOXIN|VOMIT_BLOOD)
+ V.vomit(VOMIT_BLOOD)
else
holder.remove_reagent(id, volume)
- V.vomit(0, VOMIT_BLOOD)
+ V.vomit(VOMIT_BLOOD)
return
else
switch(current_cycle)
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index 446edf78bba..7bf75a18f9d 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -119,7 +119,7 @@
// +2.5% chance per internal bleeding site that we'll cough up blood on a given tick.
// Must be bleeding internally in more than one place to have a chance at this.
if(amt >= 1 && prob(5 * amt))
- vomit(lost_nutrition = 10, VOMIT_BLOOD)
+ vomit(VOMIT_BLOOD, 10)
/mob/living/carbon/human/bleed_internal(amt)
From 84f713f48a49ec2dccb87cc2dbcd7c29a3aae79a Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:46:08 +0200
Subject: [PATCH 24/31] final
---
code/__DEFINES/mobs.dm | 1 -
code/datums/components/eatable.dm | 2 +-
.../diseases/viruses/advance/symptoms/vomit.dm | 2 +-
code/datums/diseases/viruses/cadaver.dm | 4 ++--
code/datums/diseases/viruses/nuclefication.dm | 2 +-
code/datums/diseases/viruses/tuberculosis.dm | 2 +-
code/datums/status_effects/debuffs.dm | 4 ++--
code/game/gamemodes/clockwork/clockwork_items.dm | 12 ++++++------
code/game/gamemodes/miniantags/abduction/gland.dm | 4 ++--
code/game/objects/items/decorations.dm | 2 +-
.../modules/antagonists/changeling/powers/panacea.dm | 2 +-
code/modules/mining/equipment/regenerative_core.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 5 +----
code/modules/reagents/chemistry/reagents/drugs.dm | 2 +-
code/modules/reagents/chemistry/reagents/food.dm | 2 +-
code/modules/surgery/organs/vocal_cords.dm | 2 +-
16 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 9b4a835acb3..c4dd927c43b 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -441,7 +441,6 @@
#define SHOCK_KNOCKDOWN (1<<7)
/// Vomit defines
-#define VOMIT_REQUIRED_NUTRITION 100
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
#define VOMIT_DISTANCE 0
diff --git a/code/datums/components/eatable.dm b/code/datums/components/eatable.dm
index 48f833c312d..dada4f1bf93 100644
--- a/code/datums/components/eatable.dm
+++ b/code/datums/components/eatable.dm
@@ -114,7 +114,7 @@
if (target != user)
chat_message_to_target = "В ваш рот насильно запихивают [item.name]!"
if(target.nutrition >= NUTRITION_LEVEL_FULL)
- target.vomit(nutritional_value + 20)
+ target.vomit(VOMIT_TOXIN, nutritional_value + 20)
target.adjustStaminaLoss(15)
if(target != user)
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index 80559a6ee05..392f38f4585 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -43,7 +43,7 @@ Bonus
return
/datum/symptom/vomit/proc/Vomit(mob/living/carbon/M)
- M.vomit(20)
+ M.vomit(VOMIT_TOXIN, 20)
/*
//////////////////////////////////////
diff --git a/code/datums/diseases/viruses/cadaver.dm b/code/datums/diseases/viruses/cadaver.dm
index 3676a3c0566..a9e6ec8c8ea 100644
--- a/code/datums/diseases/viruses/cadaver.dm
+++ b/code/datums/diseases/viruses/cadaver.dm
@@ -22,13 +22,13 @@
switch(stage)
if(2)
if(prob(2))
- H.vomit(stun = 0.1 SECONDS)
+ H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS, 0.1 SECONDS)
if(prob(7))
H.adjust_bodytemperature(30, max_temp = H.dna.species.heat_level_1 + 10)
to_chat(H, span_warning("You feel hot!"))
if(3, 4)
if(prob(3))
- H.vomit(stun = 0.1 SECONDS)
+ H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS, 0.1 SECONDS)
if(prob(7))
H.adjust_bodytemperature(30, max_temp = H.dna.species.heat_level_1 + 30)
to_chat(H, span_warning("You feel very hot!"))
diff --git a/code/datums/diseases/viruses/nuclefication.dm b/code/datums/diseases/viruses/nuclefication.dm
index e72d2c06910..4ce4dc2f416 100644
--- a/code/datums/diseases/viruses/nuclefication.dm
+++ b/code/datums/diseases/viruses/nuclefication.dm
@@ -34,7 +34,7 @@
stage_message++
to_chat(H, span_notice("You feel sick."))
if(prob(2))
- H.vomit()
+ H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
radiate(H)
diff --git a/code/datums/diseases/viruses/tuberculosis.dm b/code/datums/diseases/viruses/tuberculosis.dm
index 29082113059..6ad85b49d93 100644
--- a/code/datums/diseases/viruses/tuberculosis.dm
+++ b/code/datums/diseases/viruses/tuberculosis.dm
@@ -48,7 +48,7 @@
to_chat(H, span_userdanger("You feel your mind relax and your thoughts drift!"))
H.AdjustConfused(16 SECONDS, bound_lower = 0, bound_upper = 200 SECONDS)
if(prob(10))
- H.vomit(20)
+ H.vomit(VOMIT_TOXIN, 20)
if(prob(3))
to_chat(H, span_warning("[pick("Your stomach silently rumbles...", "Your stomach seizes up and falls limp, muscles dead and lifeless.", "You could eat a crayon")]"))
H.overeatduration = max(H.overeatduration - 100, 0)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 6696a4d0b54..04baac541f5 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1013,7 +1013,7 @@
if(prob(pukeprob))
carbon.AdjustConfused(9 SECONDS)
carbon.AdjustStuttering(3 SECONDS)
- carbon.vomit(15, VOMIT_TOXIN, 8 SECONDS, 0, FALSE)
+ carbon.vomit(VOMIT_TOXIN, 15, 8 SECONDS, 0, FALSE)
carbon.Dizzy(15 SECONDS)
if(strength >= DISGUST_LEVEL_DISGUSTED)
if(prob(25))
@@ -1253,7 +1253,7 @@
var/mob/living/carbon/carbon = owner
puke_counter = initial(puke_counter)
- if(!carbon.vomit(20))
+ if(!carbon.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS))
return
carbon.adjustToxLoss(-3)
diff --git a/code/game/gamemodes/clockwork/clockwork_items.dm b/code/game/gamemodes/clockwork/clockwork_items.dm
index d4f8b5db9f3..6804b3818d3 100644
--- a/code/game/gamemodes/clockwork/clockwork_items.dm
+++ b/code/game/gamemodes/clockwork/clockwork_items.dm
@@ -642,7 +642,7 @@
user.visible_message("As [user] picks [src] up, it flickers off their arms!", "The buckler flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit()
+ C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Did you like having head?\"")
@@ -772,7 +772,7 @@
user.visible_message("As [user] picks [src] up, it flickers off their arms!", "The robe flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit()
+ C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"I think this armor is too hot for you to handle.\"")
@@ -899,7 +899,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their body!", "The curiass flickers off your body, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(20)
+ C.vomit(VOMIT_TOXIN, 20)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"I think this armor is too hot for you to handle.\"")
@@ -1026,7 +1026,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their arms!", "The gauntlets flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit()
+ C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Did you like having arms?\"")
@@ -1066,7 +1066,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their feet!", "The treads flicker off your feet, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit()
+ C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Let's see if you can dance with these.\"")
@@ -1113,7 +1113,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their head!", "The helmet flickers off your head, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(20)
+ C.vomit(VOMIT_TOXIN, 20)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Do you have a hole in your head? You're about to.\"")
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 445466bfc48..f10072cfa0c 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -134,7 +134,7 @@
/obj/item/organ/internal/heart/gland/slime/activate()
to_chat(owner, "You feel nauseous!")
- owner.vomit(20)
+ owner.vomit(VOMIT_TOXIN, 20)
var/mob/living/simple_animal/slime/Slime = new(get_turf(owner), "grey")
Slime.Friends = list(owner)
@@ -348,4 +348,4 @@
var/turf/simulated/T = get_turf(owner)
if(istype(T))
T.atmos_spawn_air(LINDA_SPAWN_TOXINS|LINDA_SPAWN_20C,50)
- owner.vomit()
+ owner.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
diff --git a/code/game/objects/items/decorations.dm b/code/game/objects/items/decorations.dm
index 6761d8b5a95..1061a04a736 100644
--- a/code/game/objects/items/decorations.dm
+++ b/code/game/objects/items/decorations.dm
@@ -385,7 +385,7 @@
if(!.)
return .
victim.drop_from_active_hand()
- victim.vomit()
+ victim.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
INVOKE_ASYNC(victim, TYPE_PROC_REF(/mob, emote), "cough")
diff --git a/code/modules/antagonists/changeling/powers/panacea.dm b/code/modules/antagonists/changeling/powers/panacea.dm
index 08a6c99dbd1..b150ae2f0f3 100644
--- a/code/modules/antagonists/changeling/powers/panacea.dm
+++ b/code/modules/antagonists/changeling/powers/panacea.dm
@@ -21,7 +21,7 @@
borer.leave_host()
if(iscarbon(user))
var/mob/living/carbon/c_user = user
- c_user.vomit(FALSE)
+ c_user.vomit()
if(iscarbon(user))
var/mob/living/carbon/c_user = user
diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm
index 3ba9b3a7f8a..2f846c49064 100644
--- a/code/modules/mining/equipment/regenerative_core.dm
+++ b/code/modules/mining/equipment/regenerative_core.dm
@@ -234,7 +234,7 @@
if(prob(1))
SEND_SOUND(owner, sound(pick(spooky_sounds)))
if(prob(2))
- owner.vomit()
+ owner.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
if(4, 5)
if(prob(2))
to_chat(owner, span_danger("Something flexes under your skin."))
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7d64d076630..762fb627819 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -76,7 +76,7 @@
/mob/living/carbon/proc/vomit(
mode = VOMIT_TOXIN,
- lost_nutrition,
+ lost_nutrition = 0,
stun = VOMIT_STUN_TIME,
distance = 0,
message = TRUE
@@ -96,9 +96,6 @@
if(!nutrition)
return FALSE
- if((mode & VOMIT_TOXIN) && (!lost_nutrition))
- lost_nutrition = VOMIT_NUTRITION_LOSS
-
if((nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
if(message)
visible_message(span_warning("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!"), \
diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm
index e5ef68bffb7..00d670a7ffe 100644
--- a/code/modules/reagents/chemistry/reagents/drugs.dm
+++ b/code/modules/reagents/chemistry/reagents/drugs.dm
@@ -790,7 +790,7 @@
M.emote(pick("laugh"))
if(60 to 69)
M.adjust_bodytemperature(rand(1, 5))
- M.vomit()
+ M.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
update_flags |= M.adjustBrainLoss(rand(1, 5))
if(70 to 74)
to_chat(M, "You are literally bursting with laughter")
diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm
index c37d3bd0217..d5c1bb3b0ae 100644
--- a/code/modules/reagents/chemistry/reagents/food.dm
+++ b/code/modules/reagents/chemistry/reagents/food.dm
@@ -138,7 +138,7 @@
if(prob(3))
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.vomit()
+ H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
return ..() | update_flags
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index e82c771914b..e04cba3c323 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -231,7 +231,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby"))
//VOMIT
else if((findtext(message, GLOB.vomit_words)))
for(var/mob/living/carbon/C in listeners)
- C.vomit(10 * power_multiplier)
+ C.vomit(VOMIT_TOXIN, 10 * power_multiplier)
next_command = world.time + cooldown_stun
//SILENCE
From f1a5c42aedc0fb0b402b0a39153f6e62c77b7d6e Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Mon, 30 Sep 2024 21:38:42 +0200
Subject: [PATCH 25/31] false to seconds
---
.../antagonists/vampire/vampire_powers/bestia_powers.dm | 4 ++--
code/modules/reagents/chemistry/reagents/medicine.dm | 8 ++++----
code/modules/reagents/chemistry/reagents/water.dm | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 71ffd7d6b12..062211a09f4 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -409,7 +409,7 @@
var/obj/item/thing = organ_to_dissect.remove(target)
qdel(thing)
- target.vomit(VOMIT_BLOOD, 50, FALSE)
+ target.vomit(VOMIT_BLOOD, 50, 0 SECONDS)
if(target.has_pain())
target.emote("scream")
@@ -688,7 +688,7 @@
if(iscarbon(victim))
var/mob/living/carbon/c_victim = victim
- c_victim.vomit(VOMIT_BLOOD, 50, FALSE)
+ c_victim.vomit(VOMIT_BLOOD, 50, 0 SECONDS)
if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3))
new /obj/effect/temp_visual/cult/sparks(get_turf(victim))
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 68beb9f0554..e3b9694cf56 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -1051,20 +1051,20 @@
var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS]
if(severity == 1)
if(effect <= 2)
- M.vomit(VOMIT_BLOOD, stun = FALSE)
+ M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 4)
- M.vomit(VOMIT_BLOOD, stun = FALSE)
+ M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
else if(severity == 2)
if(effect <= 2)
M.visible_message("[M] is bleeding from [M.p_their()] very pores!")
M.bleed(rand(10, 20))
else if(effect <= 4)
- M.vomit(VOMIT_BLOOD, stun = FALSE)
+ M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 8)
- M.vomit(VOMIT_BLOOD, stun = FALSE)
+ M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
return list(effect, update_flags)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index bdeb5a3ba17..014a1f888fd 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -344,11 +344,11 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
vamp.adjust_nullification(20, 4)
vamp.bloodusable = max(vamp.bloodusable - 3,0)
if(vamp.bloodusable)
- V.vomit(VOMIT_BLOOD, stun = FALSE)
+ V.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
V.adjustBruteLoss(3)
else
holder.remove_reagent(id, volume)
- V.vomit(VOMIT_TOXIN, stun = FALSE)
+ V.vomit(VOMIT_TOXIN, stun = 0 SECONDS)
return
else
if(!vamp.bloodtotal)
From 5b8c9a4eb0e59954dfac6f384bbdbcf531b91a1e Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Wed, 2 Oct 2024 08:58:44 +0200
Subject: [PATCH 26/31] merge conflict
---
.../antagonists/vampire/vampire_powers/bestia_powers.dm | 4 ++--
paradise.dme | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 062211a09f4..7854e5a845f 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -409,7 +409,7 @@
var/obj/item/thing = organ_to_dissect.remove(target)
qdel(thing)
- target.vomit(VOMIT_BLOOD, 50, 0 SECONDS)
+ target.vomit(VOMIT_BLOOD|VOMIT_TOXIN, 50, 0 SECONDS)
if(target.has_pain())
target.emote("scream")
@@ -688,7 +688,7 @@
if(iscarbon(victim))
var/mob/living/carbon/c_victim = victim
- c_victim.vomit(VOMIT_BLOOD, 50, 0 SECONDS)
+ c_victim.vomit(VOMIT_BLOOD|VOMIT_TOXIN, 50, 0 SECONDS)
if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3))
new /obj/effect/temp_visual/cult/sparks(get_turf(victim))
diff --git a/paradise.dme b/paradise.dme
index 01a9f271ec1..0be2b1bac9e 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1585,8 +1585,6 @@
#include "code\modules\antagonists\changeling\powers\swap_form.dm"
#include "code\modules\antagonists\changeling\powers\tiny_prick.dm"
#include "code\modules\antagonists\changeling\powers\transform.dm"
-#include "code\modules\antagonists\goon_vampire\goon_vampire_datum.dm"
-#include "code\modules\antagonists\goon_vampire\goon_vampire_powers.dm"
#include "code\modules\antagonists\malf_ai\malf_ai_datum.dm"
#include "code\modules\antagonists\space_dragon\action.dm"
#include "code\modules\antagonists\space_dragon\carp.dm"
From d37010962a2fa09621e1fbc7ee5907846a869cb1 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Wed, 2 Oct 2024 09:09:08 +0200
Subject: [PATCH 27/31] fix inconsistent after merge roflcat
---
code/modules/reagents/chemistry/reagents/water.dm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 26c51f884af..f862fd369bb 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -344,12 +344,12 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
vamp.bloodusable = max(vamp.bloodusable - 3,0)
var/vomit_stun = (vamp.nullification == OLD_NULLIFICATION)? 8 SECONDS : FALSE
if(vamp.bloodusable)
- V.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
- if(!vomit_stun)
- V.adjustBruteLoss(3)
+ V.vomit(VOMIT_BLOOD, stun = vomit_stun)
+ if(!vomit_stun)
+ V.adjustBruteLoss(3)
else
holder.remove_reagent(id, volume)
- V.vomit(VOMIT_TOXIN, stun = vomit_stun)
+ V.vomit(stun = vomit_stun)
return
else
if(!vamp.bloodtotal && vamp.nullification == NEW_NULLIFICATION)
@@ -377,7 +377,7 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
if(prob(40))
M.emote("scream")
vamp.base_nullification()
-
+
if(ishuman(M) && !M.mind?.isholy)
switch(current_cycle)
if(0 to 24)
From a76d76c159ead0828d78216c8c8026550e858330 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Sun, 6 Oct 2024 18:56:31 +0300
Subject: [PATCH 28/31] ladno
---
code/modules/mob/living/carbon/carbon.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7258107779e..7316584dd9e 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -96,7 +96,7 @@
if(!nutrition)
return FALSE
- if((nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
+ if((nutrition < 100 || nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
if(message)
visible_message(span_warning("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!"), \
span_userdanger("Вы пытаетесь проблеваться, но в вашем желудке пусто!"))
From 11dc47e81bdd620e83646e55ba6b91096ed7e366 Mon Sep 17 00:00:00 2001
From: Daeberdir <115735095+Daeberdir@users.noreply.github.com>
Date: Wed, 9 Oct 2024 01:19:20 +0300
Subject: [PATCH 29/31] Better logic + "unvomitable nutriment".
---
code/__DEFINES/mobs.dm | 15 ++++----
code/datums/components/eatable.dm | 14 ++++----
.../viruses/advance/symptoms/vomit.dm | 6 ++--
code/datums/diseases/viruses/cadaver.dm | 4 +--
code/datums/diseases/viruses/nuclefication.dm | 2 +-
code/datums/diseases/viruses/tuberculosis.dm | 2 +-
code/datums/status_effects/debuffs.dm | 4 +--
.../gamemodes/clockwork/clockwork_items.dm | 12 +++----
.../gamemodes/miniantags/abduction/gland.dm | 4 +--
.../shadowling/shadowling_abilities.dm | 2 +-
code/game/objects/items/decorations.dm | 2 +-
.../antagonists/changeling/powers/panacea.dm | 3 +-
.../vampire/vampire_powers/bestia_powers.dm | 4 +--
.../mining/equipment/regenerative_core.dm | 4 +--
code/modules/mob/living/carbon/carbon.dm | 34 ++++++++++---------
.../reagents/chemistry/reagents/drugs.dm | 2 +-
.../reagents/chemistry/reagents/food.dm | 2 +-
.../reagents/chemistry/reagents/medicine.dm | 8 ++---
.../reagents/chemistry/reagents/water.dm | 4 +--
code/modules/surgery/organs/blood.dm | 2 +-
code/modules/surgery/organs/vocal_cords.dm | 2 +-
21 files changed, 67 insertions(+), 65 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index c4dd927c43b..f0f73032436 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -441,14 +441,13 @@
#define SHOCK_KNOCKDOWN (1<<7)
/// Vomit defines
-#define VOMIT_NUTRITION_LOSS 10
-#define VOMIT_STUN_TIME (8 SECONDS)
-#define VOMIT_DISTANCE 0
+#define VOMIT_NUTRITION_LOSS 10
+#define VOMIT_STUN_TIME (8 SECONDS)
+#define VOMIT_DISTANCE 0
+#define VOMIT_SAFE_NUTRITION 90
/// Vomit modes
-#define VOMIT_TOXIN (1<<0)
-#define VOMIT_BLOOD (1<<1)
-#define VOMIT_BOTH (VOMIT_TOXIN|VOMIT_BLOOD)
+#define VOMIT_BLOOD (1<<0)
/// When reached - we'll apply status effect which will force carbon to vomit
-#define TOX_VOMIT_THRESHOLD_REACHED(mob, toxloss) (mob.getToxLoss() >= toxloss)
-#define TOX_VOMIT_REQUIRED_TOXLOSS 45
+#define TOX_VOMIT_THRESHOLD_REACHED(mob, toxloss) (mob.getToxLoss() >= toxloss)
+#define TOX_VOMIT_REQUIRED_TOXLOSS 45
diff --git a/code/datums/components/eatable.dm b/code/datums/components/eatable.dm
index 204f6280099..8db69214b43 100644
--- a/code/datums/components/eatable.dm
+++ b/code/datums/components/eatable.dm
@@ -9,7 +9,7 @@
/// integrity spend after bite
var/integrity_bite // integrity spend after bite
/// How much nutrition add
- var/nutritional_value
+ var/nutritional_value
/// Grab if help_intent was used
var/is_only_grab_intent
/// If true - your item can be eaten without special diet check.
@@ -29,7 +29,7 @@
)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
-
+
src.current_bites = current_bites
src.material_type = material_type
src.max_bites = max_bites
@@ -38,7 +38,7 @@
src.is_only_grab_intent = is_only_grab_intent
src.is_always_eatable = is_always_eatable
src.stack_use = stack_use
-
+
/datum/component/eatable/RegisterWithParent()
RegisterSignal(parent, COMSIG_ITEM_PRE_ATTACKBY, PROC_REF(pre_try_eat_item))
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
@@ -53,7 +53,7 @@
if(!istype(human))
return
-
+
if(material_type & human.dna.species.special_diet)
examine_list += "Вкуснятина! [is_only_grab_intent ? "\nНужно аккуратно есть." : ""]"
@@ -125,7 +125,7 @@
if (target != user)
chat_message_to_target = "В ваш рот насильно запихивают [item.name]!"
if(target.nutrition >= NUTRITION_LEVEL_FULL)
- target.vomit(VOMIT_TOXIN, nutritional_value + 20)
+ target.vomit(nutritional_value + 20)
target.adjustStaminaLoss(15)
if(target != user)
@@ -134,7 +134,7 @@
to_chat(target, span_notice("[chat_message_to_target]"))
add_attack_logs(user, item, "Force Fed [target], item [item]")
-
+
if(!isstack(item))
to_chat(user, span_notice("[chat_message_to_user]"))
@@ -170,7 +170,7 @@
item.visible_message(span_warning("[user] пытается накормить [target], запихивая в рот [item.name]."))
if(!do_after(user, target, 2 SECONDS, NONE))
return FALSE
-
+
return TRUE
/datum/component/eatable/proc/get_colour()
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index 392f38f4585..637f40301df 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -43,7 +43,7 @@ Bonus
return
/datum/symptom/vomit/proc/Vomit(mob/living/carbon/M)
- M.vomit(VOMIT_TOXIN, 20)
+ M.vomit(20)
/*
//////////////////////////////////////
@@ -77,7 +77,7 @@ Bonus
severity = 5
/datum/symptom/vomit/blood/Vomit(mob/living/carbon/M)
- M.vomit(VOMIT_BLOOD)
+ M.vomit(0, VOMIT_BLOOD)
/*
@@ -106,4 +106,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
- M.vomit(VOMIT_TOXIN, 6, 8 SECONDS, 5, 1)
+ M.vomit(6, stun = 8 SECONDS, distance = 5)
diff --git a/code/datums/diseases/viruses/cadaver.dm b/code/datums/diseases/viruses/cadaver.dm
index a9e6ec8c8ea..3676a3c0566 100644
--- a/code/datums/diseases/viruses/cadaver.dm
+++ b/code/datums/diseases/viruses/cadaver.dm
@@ -22,13 +22,13 @@
switch(stage)
if(2)
if(prob(2))
- H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS, 0.1 SECONDS)
+ H.vomit(stun = 0.1 SECONDS)
if(prob(7))
H.adjust_bodytemperature(30, max_temp = H.dna.species.heat_level_1 + 10)
to_chat(H, span_warning("You feel hot!"))
if(3, 4)
if(prob(3))
- H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS, 0.1 SECONDS)
+ H.vomit(stun = 0.1 SECONDS)
if(prob(7))
H.adjust_bodytemperature(30, max_temp = H.dna.species.heat_level_1 + 30)
to_chat(H, span_warning("You feel very hot!"))
diff --git a/code/datums/diseases/viruses/nuclefication.dm b/code/datums/diseases/viruses/nuclefication.dm
index 4ce4dc2f416..e72d2c06910 100644
--- a/code/datums/diseases/viruses/nuclefication.dm
+++ b/code/datums/diseases/viruses/nuclefication.dm
@@ -34,7 +34,7 @@
stage_message++
to_chat(H, span_notice("You feel sick."))
if(prob(2))
- H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ H.vomit()
radiate(H)
diff --git a/code/datums/diseases/viruses/tuberculosis.dm b/code/datums/diseases/viruses/tuberculosis.dm
index 6ad85b49d93..29082113059 100644
--- a/code/datums/diseases/viruses/tuberculosis.dm
+++ b/code/datums/diseases/viruses/tuberculosis.dm
@@ -48,7 +48,7 @@
to_chat(H, span_userdanger("You feel your mind relax and your thoughts drift!"))
H.AdjustConfused(16 SECONDS, bound_lower = 0, bound_upper = 200 SECONDS)
if(prob(10))
- H.vomit(VOMIT_TOXIN, 20)
+ H.vomit(20)
if(prob(3))
to_chat(H, span_warning("[pick("Your stomach silently rumbles...", "Your stomach seizes up and falls limp, muscles dead and lifeless.", "You could eat a crayon")]"))
H.overeatduration = max(H.overeatduration - 100, 0)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 04baac541f5..616c1ea91d0 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1013,7 +1013,7 @@
if(prob(pukeprob))
carbon.AdjustConfused(9 SECONDS)
carbon.AdjustStuttering(3 SECONDS)
- carbon.vomit(VOMIT_TOXIN, 15, 8 SECONDS, 0, FALSE)
+ carbon.vomit(15, stun = 8 SECONDS, message = FALSE)
carbon.Dizzy(15 SECONDS)
if(strength >= DISGUST_LEVEL_DISGUSTED)
if(prob(25))
@@ -1253,7 +1253,7 @@
var/mob/living/carbon/carbon = owner
puke_counter = initial(puke_counter)
- if(!carbon.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS))
+ if(!carbon.vomit())
return
carbon.adjustToxLoss(-3)
diff --git a/code/game/gamemodes/clockwork/clockwork_items.dm b/code/game/gamemodes/clockwork/clockwork_items.dm
index 6804b3818d3..d4f8b5db9f3 100644
--- a/code/game/gamemodes/clockwork/clockwork_items.dm
+++ b/code/game/gamemodes/clockwork/clockwork_items.dm
@@ -642,7 +642,7 @@
user.visible_message("As [user] picks [src] up, it flickers off their arms!", "The buckler flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ C.vomit()
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Did you like having head?\"")
@@ -772,7 +772,7 @@
user.visible_message("As [user] picks [src] up, it flickers off their arms!", "The robe flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ C.vomit()
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"I think this armor is too hot for you to handle.\"")
@@ -899,7 +899,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their body!", "The curiass flickers off your body, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, 20)
+ C.vomit(20)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"I think this armor is too hot for you to handle.\"")
@@ -1026,7 +1026,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their arms!", "The gauntlets flicker off your arms, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ C.vomit()
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Did you like having arms?\"")
@@ -1066,7 +1066,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their feet!", "The treads flicker off your feet, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ C.vomit()
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Let's see if you can dance with these.\"")
@@ -1113,7 +1113,7 @@
user.visible_message("As [user] puts [src] on, it flickers off their head!", "The helmet flickers off your head, leaving only nausea!")
if(iscarbon(user))
var/mob/living/carbon/C = user
- C.vomit(VOMIT_TOXIN, 20)
+ C.vomit(20)
C.Knockdown(10 SECONDS)
else
to_chat(user, "\"Do you have a hole in your head? You're about to.\"")
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index f10072cfa0c..445466bfc48 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -134,7 +134,7 @@
/obj/item/organ/internal/heart/gland/slime/activate()
to_chat(owner, "You feel nauseous!")
- owner.vomit(VOMIT_TOXIN, 20)
+ owner.vomit(20)
var/mob/living/simple_animal/slime/Slime = new(get_turf(owner), "grey")
Slime.Friends = list(owner)
@@ -348,4 +348,4 @@
var/turf/simulated/T = get_turf(owner)
if(istype(T))
T.atmos_spawn_air(LINDA_SPAWN_TOXINS|LINDA_SPAWN_20C,50)
- owner.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ owner.vomit()
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 77479df2953..6418d850862 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -923,7 +923,7 @@
var/mob/living/carbon/human/target = targets[1]
- target.vomit(VOMIT_BLOOD, stun = 8 SECONDS, distance = 1, message = FALSE)
+ target.vomit(0, VOMIT_BLOOD, distance = 2, message = FALSE)
playsound(user.loc, 'sound/hallucinations/veryfar_noise.ogg', 50, TRUE)
to_chat(user, "You instantly rearrange [target]'s memories, hyptonitizing [target.p_them()] into a thrall.")
to_chat(target, "An agonizing spike of pain drives into your mind, and--")
diff --git a/code/game/objects/items/decorations.dm b/code/game/objects/items/decorations.dm
index 1061a04a736..6761d8b5a95 100644
--- a/code/game/objects/items/decorations.dm
+++ b/code/game/objects/items/decorations.dm
@@ -385,7 +385,7 @@
if(!.)
return .
victim.drop_from_active_hand()
- victim.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ victim.vomit()
INVOKE_ASYNC(victim, TYPE_PROC_REF(/mob, emote), "cough")
diff --git a/code/modules/antagonists/changeling/powers/panacea.dm b/code/modules/antagonists/changeling/powers/panacea.dm
index b150ae2f0f3..3e77f3f6343 100644
--- a/code/modules/antagonists/changeling/powers/panacea.dm
+++ b/code/modules/antagonists/changeling/powers/panacea.dm
@@ -21,7 +21,8 @@
borer.leave_host()
if(iscarbon(user))
var/mob/living/carbon/c_user = user
- c_user.vomit()
+ c_user.fakevomit()
+ c_user.Stun(VOMIT_STUN_TIME)
if(iscarbon(user))
var/mob/living/carbon/c_user = user
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 0b5c3c1a5de..3136eb36eec 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -409,7 +409,7 @@
var/obj/item/thing = organ_to_dissect.remove(target)
qdel(thing)
- target.vomit(VOMIT_BLOOD|VOMIT_TOXIN, 50, 0 SECONDS)
+ target.vomit(50, VOMIT_BLOOD, 0 SECONDS)
if(target.has_pain())
target.emote("scream")
@@ -688,7 +688,7 @@
if(iscarbon(victim))
var/mob/living/carbon/c_victim = victim
- c_victim.vomit(VOMIT_BLOOD|VOMIT_TOXIN, 50, 0 SECONDS)
+ c_victim.vomit(50, VOMIT_BLOOD, 0 SECONDS)
if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3))
new /obj/effect/temp_visual/cult/sparks(get_turf(victim))
diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm
index 2f846c49064..f5e4e53df4b 100644
--- a/code/modules/mining/equipment/regenerative_core.dm
+++ b/code/modules/mining/equipment/regenerative_core.dm
@@ -234,14 +234,14 @@
if(prob(1))
SEND_SOUND(owner, sound(pick(spooky_sounds)))
if(prob(2))
- owner.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ owner.vomit()
if(4, 5)
if(prob(2))
to_chat(owner, span_danger("Something flexes under your skin."))
if(prob(2))
SEND_SOUND(owner, sound(pick(spooky_sounds)))
if(prob(3))
- owner.vomit(VOMIT_BLOOD)
+ owner.vomit(0, VOMIT_BLOOD)
if(prob(50))
var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/child = new(owner.loc)
child.faction = owner.faction.Copy()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7316584dd9e..56aebb2e238 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -75,13 +75,13 @@
/mob/living/carbon/proc/vomit(
- mode = VOMIT_TOXIN,
- lost_nutrition = 0,
- stun = VOMIT_STUN_TIME,
- distance = 0,
+ lost_nutrition = VOMIT_NUTRITION_LOSS,
+ mode = NONE,
+ stun = VOMIT_STUN_TIME,
+ distance = 1,
message = TRUE
-)
- if(ismachineperson(src)) //IPCs do not vomit particulates
+)
+ if(ismachineperson(src)) // IPCs do not vomit particulates.
return FALSE
if(is_muzzled())
@@ -93,12 +93,9 @@
if(stun)
Stun(stun)
- if(!nutrition)
- return FALSE
-
- if((nutrition < 100 || nutrition < lost_nutrition) && (!(mode & VOMIT_BLOOD)))
+ if((nutrition - VOMIT_SAFE_NUTRITION) < lost_nutrition && (!(mode & VOMIT_BLOOD)))
if(message)
- visible_message(span_warning("[src.name] сухо кашля[pluralize_ru(src.gender,"ет","ют")]!"), \
+ visible_message(span_warning("[name] сухо кашля[pluralize_ru(gender,"ет","ют")]!"), \
span_userdanger("Вы пытаетесь проблеваться, но в вашем желудке пусто!"))
if(stun)
@@ -107,23 +104,27 @@
return FALSE
if(message)
- visible_message(span_danger("[src.name] блю[pluralize_ru(src.gender,"ет","ют")]!"), \
+ visible_message(span_danger("[name] блю[pluralize_ru(gender,"ет","ют")]!"), \
span_userdanger("Вас вырвало!"))
- playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
+ playsound(get_turf(src), 'sound/effects/splat.ogg', 50, TRUE)
var/turf/turf = get_turf(src)
if(!turf)
return FALSE
- for(var/i = 0 to distance)
- if(mode & VOMIT_TOXIN)
+ var/max_nutriment_vomit_dist = 0
+ if(lost_nutrition)
+ max_nutriment_vomit_dist = floor((nutrition - VOMIT_SAFE_NUTRITION) / lost_nutrition)
+
+ for(var/i = 1 to distance)
+ if(max_nutriment_vomit_dist >= distance)
turf.add_vomit_floor()
adjust_nutrition(-lost_nutrition)
if(stun)
adjustToxLoss(-3)
-
+
if(mode & VOMIT_BLOOD)
add_splatter_floor(turf)
@@ -137,6 +138,7 @@
return FALSE
+
/mob/living/carbon/gib()
. = death(TRUE)
if(!.)
diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm
index 00d670a7ffe..e5ef68bffb7 100644
--- a/code/modules/reagents/chemistry/reagents/drugs.dm
+++ b/code/modules/reagents/chemistry/reagents/drugs.dm
@@ -790,7 +790,7 @@
M.emote(pick("laugh"))
if(60 to 69)
M.adjust_bodytemperature(rand(1, 5))
- M.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ M.vomit()
update_flags |= M.adjustBrainLoss(rand(1, 5))
if(70 to 74)
to_chat(M, "You are literally bursting with laughter")
diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm
index 929d2d362fe..5af02464a3a 100644
--- a/code/modules/reagents/chemistry/reagents/food.dm
+++ b/code/modules/reagents/chemistry/reagents/food.dm
@@ -138,7 +138,7 @@
if(prob(3))
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.vomit(VOMIT_TOXIN, VOMIT_NUTRITION_LOSS)
+ H.vomit()
return ..() | update_flags
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index e3b9694cf56..045a8053fcd 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -1051,20 +1051,20 @@
var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS]
if(severity == 1)
if(effect <= 2)
- M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
+ M.vomit(0, VOMIT_BLOOD, 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 4)
- M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
+ M.vomit(0, VOMIT_BLOOD, 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
else if(severity == 2)
if(effect <= 2)
M.visible_message("[M] is bleeding from [M.p_their()] very pores!")
M.bleed(rand(10, 20))
else if(effect <= 4)
- M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
+ M.vomit(0, VOMIT_BLOOD, 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 8)
- M.vomit(VOMIT_BLOOD, stun = 0 SECONDS)
+ M.vomit(0, VOMIT_BLOOD, 0 SECONDS)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
return list(effect, update_flags)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index f862fd369bb..37c54e46037 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -344,12 +344,12 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
vamp.bloodusable = max(vamp.bloodusable - 3,0)
var/vomit_stun = (vamp.nullification == OLD_NULLIFICATION)? 8 SECONDS : FALSE
if(vamp.bloodusable)
- V.vomit(VOMIT_BLOOD, stun = vomit_stun)
+ V.vomit(0, VOMIT_BLOOD, vomit_stun)
if(!vomit_stun)
V.adjustBruteLoss(3)
else
holder.remove_reagent(id, volume)
- V.vomit(stun = vomit_stun)
+ V.vomit(0, stun = vomit_stun)
return
else
if(!vamp.bloodtotal && vamp.nullification == NEW_NULLIFICATION)
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index 903e3430efa..bc7b2659c91 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -119,7 +119,7 @@
// +2.5% chance per internal bleeding site that we'll cough up blood on a given tick.
// Must be bleeding internally in more than one place to have a chance at this.
if(amt >= 1 && prob(5 * amt))
- vomit(VOMIT_BLOOD, 10)
+ vomit(mode = VOMIT_BLOOD)
/mob/living/carbon/human/bleed_internal(amt)
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index e04cba3c323..e82c771914b 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -231,7 +231,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby"))
//VOMIT
else if((findtext(message, GLOB.vomit_words)))
for(var/mob/living/carbon/C in listeners)
- C.vomit(VOMIT_TOXIN, 10 * power_multiplier)
+ C.vomit(10 * power_multiplier)
next_command = world.time + cooldown_stun
//SILENCE
From c1b870c2c75e44149ada26430adb437ebf0e7650 Mon Sep 17 00:00:00 2001
From: Daeberdir <115735095+Daeberdir@users.noreply.github.com>
Date: Wed, 9 Oct 2024 01:20:38 +0300
Subject: [PATCH 30/31] ahem
---
code/modules/mob/living/carbon/carbon.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 56aebb2e238..3aee80c7767 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -118,7 +118,7 @@
max_nutriment_vomit_dist = floor((nutrition - VOMIT_SAFE_NUTRITION) / lost_nutrition)
for(var/i = 1 to distance)
- if(max_nutriment_vomit_dist >= distance)
+ if(max_nutriment_vomit_dist >= i)
turf.add_vomit_floor()
adjust_nutrition(-lost_nutrition)
From 22da75eb44f2acd9ac91461caf8968d211acd321 Mon Sep 17 00:00:00 2001
From: Daeberdir <115735095+Daeberdir@users.noreply.github.com>
Date: Wed, 9 Oct 2024 01:49:27 +0300
Subject: [PATCH 31/31] A-a-a-a-a-and Done.
---
code/__DEFINES/mobs.dm | 2 +-
code/datums/diseases/viruses/advance/symptoms/vomit.dm | 2 +-
code/datums/status_effects/debuffs.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index f0f73032436..7661151eb5e 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -443,7 +443,7 @@
/// Vomit defines
#define VOMIT_NUTRITION_LOSS 10
#define VOMIT_STUN_TIME (8 SECONDS)
-#define VOMIT_DISTANCE 0
+#define VOMIT_DISTANCE 1
#define VOMIT_SAFE_NUTRITION 90
/// Vomit modes
#define VOMIT_BLOOD (1<<0)
diff --git a/code/datums/diseases/viruses/advance/symptoms/vomit.dm b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
index 637f40301df..6e4feaa08d3 100644
--- a/code/datums/diseases/viruses/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/viruses/advance/symptoms/vomit.dm
@@ -106,4 +106,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
- M.vomit(6, stun = 8 SECONDS, distance = 5)
+ M.vomit(6, distance = 5)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 616c1ea91d0..839a3cdf909 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1013,7 +1013,7 @@
if(prob(pukeprob))
carbon.AdjustConfused(9 SECONDS)
carbon.AdjustStuttering(3 SECONDS)
- carbon.vomit(15, stun = 8 SECONDS, message = FALSE)
+ carbon.vomit(15, message = FALSE)
carbon.Dizzy(15 SECONDS)
if(strength >= DISGUST_LEVEL_DISGUSTED)
if(prob(25))
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 3aee80c7767..114a4810a3a 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -78,7 +78,7 @@
lost_nutrition = VOMIT_NUTRITION_LOSS,
mode = NONE,
stun = VOMIT_STUN_TIME,
- distance = 1,
+ distance = VOMIT_DISTANCE,
message = TRUE
)
if(ismachineperson(src)) // IPCs do not vomit particulates.