mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Adds new type of wounds - piercing.
Unlike cuts they do not merge, so many small-damage stabs will create many small stab wounds instead of one megahole. Also cleans up checks in wound code a bit with power of OOP
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
var/internal = 0
|
||||
// maximum stage at which bleeding should still happen. Beyond this stage bleeding is prevented.
|
||||
var/max_bleeding_stage = 0
|
||||
// one of CUT, BRUISE, BURN
|
||||
// one of CUT, PIERCE, BRUISE, BURN
|
||||
var/damage_type = CUT
|
||||
// whether this wound needs a bandage/salve to heal at all
|
||||
// the maximum amount of damage that this wound can have and still autoheal
|
||||
@@ -211,7 +211,7 @@
|
||||
if (wound_damage() <= 30 && bleed_timer <= 0)
|
||||
return 0 //Bleed timer has run out. Wounds with more than 30 damage don't stop bleeding on their own.
|
||||
|
||||
return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5)
|
||||
return 1
|
||||
|
||||
/** WOUND DEFINITIONS **/
|
||||
|
||||
@@ -235,6 +235,18 @@
|
||||
return /datum/wound/cut/deep
|
||||
if(0 to 15)
|
||||
return /datum/wound/cut/small
|
||||
if(PIERCE)
|
||||
switch(damage)
|
||||
if(60 to INFINITY)
|
||||
return /datum/wound/puncture/massive
|
||||
if(50 to 60)
|
||||
return /datum/wound/puncture/gaping_big
|
||||
if(30 to 50)
|
||||
return /datum/wound/puncture/gaping
|
||||
if(15 to 30)
|
||||
return /datum/wound/puncture/flesh
|
||||
if(0 to 15)
|
||||
return /datum/wound/puncture/small
|
||||
if(BRUISE)
|
||||
return /datum/wound/bruise
|
||||
if(BURN)
|
||||
@@ -252,6 +264,9 @@
|
||||
return null //no wound
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut/bleeding()
|
||||
return ..() && wound_damage() >= 5
|
||||
|
||||
/datum/wound/cut/small
|
||||
// link wound descriptions to amounts of damage
|
||||
// Minor cuts have max_bleeding_stage set to the stage that bears the wound type's name.
|
||||
@@ -285,7 +300,43 @@ datum/wound/cut/massive
|
||||
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
/** PUNCTURES **/
|
||||
/datum/wound/puncture/can_worsen(damage_type, damage)
|
||||
return 0
|
||||
/datum/wound/puncture/can_merge(var/datum/wound/other)
|
||||
return 0
|
||||
/datum/wound/puncture/bleeding()
|
||||
return ..() && wound_damage() >= 5
|
||||
|
||||
/datum/wound/puncture/small
|
||||
max_bleeding_stage = 2
|
||||
stages = list("puncture" = 5, "healing puncture" = 2, "small scab" = 0)
|
||||
damage_type = PIERCE
|
||||
|
||||
/datum/wound/puncture/flesh
|
||||
max_bleeding_stage = 2
|
||||
stages = list("puncture wound" = 15, "blood soaked clot" = 5, "large scab" = 2, "small round scar" = 0)
|
||||
damage_type = PIERCE
|
||||
|
||||
/datum/wound/puncture/gaping
|
||||
max_bleeding_stage = 3
|
||||
stages = list("gaping hole" = 30, "large blood soaked clot" = 15, "blood soaked clot" = 10, "small angry scar" = 5, "small round scar" = 0)
|
||||
damage_type = PIERCE
|
||||
|
||||
/datum/wound/puncture/gaping_big
|
||||
max_bleeding_stage = 3
|
||||
stages = list("big gaping hole" = 50, "healing gaping hole" = 20, "large blood soaked clot" = 15, "large angry scar" = 10, "large round scar" = 0)
|
||||
damage_type = PIERCE
|
||||
|
||||
datum/wound/puncture/massive
|
||||
max_bleeding_stage = 3
|
||||
stages = list("massive wound" = 60, "massive healing wound" = 30, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
damage_type = PIERCE
|
||||
|
||||
/** BRUISES **/
|
||||
/datum/wound/bruise/bleeding()
|
||||
return ..() && wound_damage() >= 20
|
||||
|
||||
/datum/wound/bruise
|
||||
stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,
|
||||
"moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5)
|
||||
@@ -294,6 +345,11 @@ datum/wound/cut/massive
|
||||
damage_type = BRUISE
|
||||
|
||||
/** BURNS **/
|
||||
/datum/wound/burn
|
||||
max_bleeding_stage = 0
|
||||
/datum/wound/burn/bleeding()
|
||||
return 0
|
||||
|
||||
/datum/wound/burn/moderate
|
||||
stages = list("ripped burn" = 10, "moderate burn" = 5, "healing moderate burn" = 2, "fresh skin" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
Reference in New Issue
Block a user