Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -674,23 +674,25 @@

// Mob Overlays Indexes
/// Total number of layers for mob overlays
#define TOTAL_LAYERS 34 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
#define TOTAL_LAYERS 35 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
/// Mutations layer - Tk headglows, cold resistance glow, etc
#define MUTATIONS_LAYER 34
#define MUTATIONS_LAYER 35
/// Mutantrace features (tail when looking south) that must appear behind the body parts
#define BODY_BEHIND_LAYER 33
#define BODY_BEHIND_LAYER 34
/// Layer for bodyparts that should appear behind every other bodypart - Mostly, legs when facing WEST or EAST
#define BODYPARTS_LOW_LAYER 32
#define BODYPARTS_LOW_LAYER 33
/// Layer for most bodyparts, appears above BODYPARTS_LOW_LAYER and below BODYPARTS_HIGH_LAYER
#define BODYPARTS_LAYER 31
#define BODYPARTS_LAYER 32
/// Mutantrace features (snout, body markings) that must appear above the body parts
#define BODY_ADJ_LAYER 30
#define BODY_ADJ_LAYER 31
/// Eyes!
#define EYE_LAYER 29
#define EYE_LAYER 30
/// Underwear, undershirts, socks, eyes, lips(makeup)
#define BODY_LAYER 28
#define BODY_LAYER 29
/// Mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
#define FRONT_MUTATIONS_LAYER 27
#define FRONT_MUTATIONS_LAYER 28
/// Gauze specifically
#define GAUZE_LAYER 27
/// Damage indicators (cuts and burns)
#define DAMAGE_LAYER 26
/// Jumpsuit clothing layer
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ GLOBAL_LIST_INIT(announcer_keys, list(
#define SFX_BULLET_MISS "bullet_miss"
#define SFX_CAN_OPEN "can_open"
#define SFX_CLOWN_STEP "clown_step"
#define SFX_CLOTH_RIP "cloth_rip"
#define SFX_DESECRATION "desecration"
#define SFX_EXPLOSION "explosion"
#define SFX_EXPLOSION_CREAKING "explosion_creaking"
Expand Down
13 changes: 10 additions & 3 deletions code/datums/elements/tool_flash.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Tool flash bespoke element
*
* Flashes the user when using this tool
* Flashes the user (and nearby mobs) when using this tool
*/
/datum/element/tool_flash
element_flags = ELEMENT_BESPOKE
Expand Down Expand Up @@ -33,5 +33,12 @@
/datum/element/tool_flash/proc/flash(datum/source, mob/living/user)
SIGNAL_HANDLER

if(user && get_dist(get_turf(source), get_turf(user)) <= 1)
user.flash_act(flash_strength)
if(flash_strength <= 0)
return

var/turf/weld_location = get_turf(source)
for(var/mob/living/victim in viewers(1, weld_location))
var/relative_dir = get_dir(victim, weld_location)
if(relative_dir == 0 || (victim.dir & relative_dir)) // Same tile or victim is facing the tile.
var/flash_strength_for_victim = max(flash_strength - get_dist(victim, weld_location), 0)
victim.flash_act(flash_strength_for_victim)
12 changes: 11 additions & 1 deletion code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@
if(!affecting) //Missing limb?
to_chat(user, span_warning("[C] doesn't have \a [parse_zone(user.zone_selected)]!"))
return FALSE

if(!IS_ORGANIC_LIMB(affecting)) //Limb must be organic to be healed - RR
to_chat(user, span_warning("[src] won't work on a robotic limb!"))
return FALSE

if(affecting.brute_dam && brute || affecting.burn_dam && burn)
user.visible_message(
span_infoplain(span_green("[user] applies [src] on [C]'s [parse_zone(affecting.body_zone)].")),
Expand All @@ -112,7 +114,8 @@
affecting.heal_damage(brute, burn)
post_heal_effects(max(previous_damage - affecting.get_damage(), 0), C, user)
return TRUE
to_chat(user, span_warning("[C]'s [parse_zone(affecting.body_zone)] can not be healed with [src]!"))

to_chat(user, span_warning("[C]'s [parse_zone(affecting.body_zone)] can not be healed with [src]."))
return FALSE

///Override this proc for special post heal effects.
Expand Down Expand Up @@ -161,6 +164,13 @@
merge_type = /obj/item/stack/gauze
dynamically_set_name = TRUE

/obj/item/stack/gauze/try_bandage(mob/living/carbon/human/target, mob/living/user)
. = ..()
if(!(. & ITEM_INTERACT_SUCCESS))
return

playsound(user, SFX_CLOTH_RIP, 50, TRUE)

/obj/item/stack/gauze/twelve
amount = 12

Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@
if(splint_slowdown)
return try_splint(interacting_with, user)

if(!absorption_capacity || !ishuman(interacting_with))
return NONE
if(absorption_capacity && ishuman(interacting_with))
return try_bandage(interacting_with, user)

var/mob/living/carbon/human/target = interacting_with
/obj/item/stack/proc/try_bandage(mob/living/carbon/human/target, mob/living/user)
var/obj/item/bodypart/BP = target.get_bodypart(user.zone_selected, TRUE)
if(BP.bandage)
to_chat(user, span_warning("[target]'s [BP.plaintext_zone] is already bandaged."))
Expand Down
2 changes: 2 additions & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@
if(istext(soundin))
soundin = get_sfx_pariah(soundin) //PARIAH EDIT ADDITION - This overrides the default sound effects too, so use it to modularly change a sound effect output.
switch(soundin)
if(SFX_CLOTH_RIP)
soundin = pick('sound/items/handling/cloth_rip1.ogg', 'sound/items/handling/cloth_rip2.ogg', 'sound/items/handling/cloth_rip3.ogg', 'sound/items/handling/cloth_rip4.ogg')
if (SFX_SHATTER)
soundin = pick('sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg')
if (SFX_EXPLOSION)
Expand Down
11 changes: 3 additions & 8 deletions code/modules/mob/living/carbon/carbon_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,9 @@
var/list/overlays = list()

for(var/obj/item/bodypart/iter_part as anything in bodyparts)
if(iter_part.is_stump)
continue

if(iter_part.icon_dmg_overlay && !iter_part.is_husked)
if(iter_part.brutestate)
overlays += image(iter_part.icon_dmg_overlay, "[iter_part.body_zone]_[iter_part.brutestate]0", -DAMAGE_LAYER) //we're adding icon_states of the base image as overlays
if(iter_part.burnstate)
overlays += image(iter_part.icon_dmg_overlay, "[iter_part.body_zone]_0[iter_part.burnstate]", -DAMAGE_LAYER)
var/list/limb_overlays = iter_part.get_damage_overlays()
if(limb_overlays)
overlays += limb_overlays

overlays_standing[DAMAGE_LAYER] = overlays
if(length(overlays))
Expand Down
9 changes: 9 additions & 0 deletions code/modules/surgery/bodyparts/_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,10 @@
return

bandage = new_bandage.split_stack(null, 1, src)
bandage.worn_icon_state = "[body_zone][rand(1, 3)]"

owner?.update_damage_overlays()

RegisterSignal(bandage, COMSIG_PARENT_QDELETING, PROC_REF(bandage_gone))
if(bandage.absorption_capacity && owner.stat < UNCONSCIOUS)
for(var/datum/wound/iter_wound as anything in wounds)
Expand All @@ -1057,11 +1061,16 @@
if(!bandage)
return FALSE

bandage.worn_icon_state = "nothing"

. = bandage

UnregisterSignal(bandage, COMSIG_PARENT_QDELETING)
if(bandage.loc == src)
bandage.forceMove(drop_location())

bandage = null
owner?.update_damage_overlays()

/obj/item/bodypart/proc/bandage_gone(obj/item/stack/bandage)
SIGNAL_HANDLER
Expand Down
21 changes: 21 additions & 0 deletions code/modules/surgery/bodyparts/rendering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,24 @@ GLOBAL_LIST_EMPTY(masked_leg_icons_cache)

/obj/item/bodypart/proc/remove_color_override(color_priority)
LAZYREMOVE(color_overrides, "[color_priority]")

/// Return damage overlays, not rendered as apart of the bodypart, for some reason.
/obj/item/bodypart/proc/get_damage_overlays()
var/list/overlays
if(is_stump)
return overlays

if(icon_dmg_overlay && !is_husked)
if(brutestate)
LAZYADD(overlays, image(icon_dmg_overlay, "[body_zone]_[brutestate]0", -DAMAGE_LAYER))
if(burnstate)
LAZYADD(overlays, image(icon_dmg_overlay, "[body_zone]_[burnstate]0", -DAMAGE_LAYER))

if(bandage)
var/mutable_appearance/gauze_overlay = bandage.build_worn_icon(
default_layer = GAUZE_LAYER, // build_worn_icon inverts it for us
override_file = 'icons/mob/bandage.dmi',
override_state = bandage.worn_icon_state,
)
LAZYADD(overlays, gauze_overlay)
return overlays
Binary file added icons/mob/bandage.dmi
Binary file not shown.
8 changes: 8 additions & 0 deletions sound/items/handling/attribution.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
cloth_rip1.ogg
cloth_rip2.ogg
cloth_rip3.ogg
cloth_rip4.ogg
}
ported from https://github.com/Baystation12/Baystation12/commit/c9e54f011e83bb4d0330bf52babfb158b439f69c,
which in turn is from https://freesound.org/people/altfuture/sounds/174627/ -- License: Creative Commons 0
Binary file added sound/items/handling/cloth_rip1.ogg
Binary file not shown.
Binary file added sound/items/handling/cloth_rip2.ogg
Binary file not shown.
Binary file added sound/items/handling/cloth_rip3.ogg
Binary file not shown.
Binary file added sound/items/handling/cloth_rip4.ogg
Binary file not shown.
Loading