mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
bugfixes
This commit is contained in:
@@ -214,21 +214,20 @@
|
||||
var/message_verb = "attacked"
|
||||
if(length(I.attack_verb))
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
if(current_force < I.force * FEEBLE_ATTACK_MSG_THRESHOLD)
|
||||
message_verb = "[pick("feebly", "limply", "saplessly")] [message_verb]"
|
||||
else if(!I.force)
|
||||
return
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
var/attack_message = "[src] is [message_verb][message_hit_area] with [I]!"
|
||||
var/attack_message_local = "You're [message_verb][message_hit_area] with [I]!"
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
attack_message = "[user] [message_verb] [src][message_hit_area] with [I]!"
|
||||
attack_message_local = "[user] [message_verb] you[message_hit_area] with [I]!"
|
||||
if(user == src)
|
||||
attack_message_local = "You [message_verb] yourself[message_hit_area] with [I]"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",\
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(hit_area == BODY_ZONE_HEAD)
|
||||
if(prob(2))
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
"<span class='userdanger'>[attack_message_local]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
|
||||
/// How much stamina this takes to swing this is not for realism purposes hecc off.
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
var/harmful
|
||||
var/mutable_appearance/overlay
|
||||
|
||||
var/damage = weapon.throwforce
|
||||
|
||||
/datum/component/embedded/Initialize(obj/item/I,
|
||||
datum/thrownthing/throwingdatum,
|
||||
obj/item/bodypart/part,
|
||||
@@ -142,39 +140,35 @@
|
||||
weapon.forceMove(victim)
|
||||
RegisterSignal(weapon, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), .proc/byeItemCarbon)
|
||||
|
||||
var/damage = weapon.throwforce
|
||||
if(harmful)
|
||||
victim.visible_message("<span class='danger'>[weapon] embeds itself in [victim]'s [limb.name]!</span>",ignored_mobs=victim)
|
||||
to_chat(victim, "<span class='userdanger'>[weapon] embeds itself in your [limb.name]!</span>")
|
||||
victim.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
|
||||
playsound(victim,'sound/weapons/bladeslice.ogg', 40)
|
||||
weapon.add_mob_blood(victim)//it embedded itself in you, of course it's bloody!
|
||||
var/damage += weapon.w_class * impact_pain_mult
|
||||
damage += weapon.w_class * impact_pain_mult
|
||||
SEND_SIGNAL(victim, COMSIG_ADD_MOOD_EVENT, "embedded", /datum/mood_event/embedded)
|
||||
else
|
||||
victim.visible_message("<span class='danger'>[weapon] sticks itself to [victim]'s [limb.name]!</span>",ignored_mobs=victim)
|
||||
to_chat(victim, "<span class='userdanger'>[weapon] sticks itself to your [limb.name]!</span>")
|
||||
|
||||
if(damage > 0)
|
||||
var/armor = victim.run_armor_check(limb.body_zone, "melee", "Your armor has protected your [limb.name].", "Your armor has softened a hit to your [limb.name].",I.armour_penetration)
|
||||
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, blocked=armor, sharpness = I.get_sharpness())
|
||||
var/armor = victim.run_armor_check(limb.body_zone, "melee", "Your armor has protected your [limb.name].", "Your armor has softened a hit to your [limb.name].",weapon.armour_penetration)
|
||||
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, blocked=armor, sharpness = weapon.get_sharpness())
|
||||
|
||||
/// Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.
|
||||
/datum/component/embedded/proc/jostleCheck()
|
||||
var/mob/living/carbon/victim = parent
|
||||
|
||||
var/pain_chance_current = jostle_chance
|
||||
var/chance = jostle_chance
|
||||
if(victim.m_intent == MOVE_INTENT_WALK || !(victim.mobility_flags & MOBILITY_STAND))
|
||||
pain_chance_current *= 0.5
|
||||
chance *= 0.5
|
||||
|
||||
if(pain_stam_pct && victim.stam_paralyzed) //if it's a less-lethal embed, give them a break if they're already stamcritted
|
||||
pain_chance_current *= 0.2
|
||||
damage *= 0.5
|
||||
if(harmful && prob(pain_chance_current))
|
||||
if(harmful && prob(chance))
|
||||
var/damage = weapon.w_class * jostle_pain_mult
|
||||
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
|
||||
to_chat(victim, "<span class='userdanger'>[weapon] embedded in your [limb.name] jostles and stings!</span>")
|
||||
|
||||
|
||||
/// Called when then item randomly falls out of a carbon. This handles the damage and descriptors, then calls safe_remove()
|
||||
/datum/component/embedded/proc/fallOutCarbon()
|
||||
var/mob/living/carbon/victim = parent
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
break
|
||||
|
||||
///One of our pellets hit something, record what it was and check if we're done (terminated == num_pellets)
|
||||
/datum/component/pellet_cloud/proc/pellet_hit(obj/projectile/P, atom/movable/firer, atom/target, Angle, hit_zone)
|
||||
/datum/component/pellet_cloud/proc/pellet_hit(obj/item/projectile/P, atom/movable/firer, atom/target, Angle, hit_zone)
|
||||
pellets -= P
|
||||
terminated++
|
||||
hits++
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
The presence of this element allows an item (or a projectile carrying an item) to embed itself in a human or turf when it is thrown into a target (whether by hand, gun, or explosive wave) with either
|
||||
at least 4 throwspeed (EMBED_THROWSPEED_THRESHOLD) or ignore_throwspeed_threshold set to TRUE. Items meant to be used as shrapnel for projectiles should have ignore_throwspeed_threshold set to true.
|
||||
|
||||
Whether we're dealing with a direct /obj/item (throwing a knife at someone) or an /obj/projectile with a shrapnel_type, how we handle things plays out the same, with one extra step separating them.
|
||||
Whether we're dealing with a direct /obj/item (throwing a knife at someone) or an /obj/item/projectile with a shrapnel_type, how we handle things plays out the same, with one extra step separating them.
|
||||
Items simply make their COMSIG_MOVABLE_IMPACT or COMSIG_MOVABLE_IMPACT_ZONE check (against a closed turf or a carbon, respectively), while projectiles check on COMSIG_PROJECTILE_SELF_ON_HIT.
|
||||
Upon a projectile hitting a valid target, it spawns whatever type of payload it has defined, then has that try to embed itself in the target on its own.
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
* it to call tryForceEmbed() on its own embed element (it's out of our hands here, our projectile is done), where it will run through all the checks it needs to.
|
||||
*/
|
||||
/datum/element/embed/proc/checkEmbedProjectile(obj/item/projectile/P, atom/movable/firer, atom/hit, angle, hit_zone)
|
||||
if(!iscarbon(hit) && !isclosedturf(hit))
|
||||
if(!iscarbon(hit))
|
||||
Detach(P)
|
||||
return // we don't care
|
||||
|
||||
@@ -178,16 +178,10 @@
|
||||
payload.name = P.name
|
||||
payload.embedding = P.embedding
|
||||
payload.updateEmbedding()
|
||||
var/did_embed
|
||||
if(iscarbon(hit))
|
||||
var/mob/living/carbon/C = hit
|
||||
var/obj/item/bodypart/limb
|
||||
limb = C.get_bodypart(hit_zone)
|
||||
if(!limb)
|
||||
limb = C.get_bodypart()
|
||||
did_embed = payload.tryEmbed(limb)
|
||||
else
|
||||
did_embed = payload.tryEmbed(hit)
|
||||
var/mob/living/carbon/C = hit
|
||||
var/obj/item/bodypart/limb = C.get_bodypart(hit_zone)
|
||||
if(!limb)
|
||||
limb = C.get_bodypart()
|
||||
|
||||
payload.tryEmbed(limb)
|
||||
Detach(P)
|
||||
@@ -213,5 +207,5 @@
|
||||
limb = target
|
||||
hit_zone = limb.body_zone
|
||||
C = limb.owner
|
||||
checkEmbed(I, C, hit_zone, forced=TRUE)
|
||||
checkEmbedMob(I, C, hit_zone, forced=TRUE)
|
||||
return TRUE
|
||||
|
||||
@@ -54,5 +54,5 @@
|
||||
var/obj/item/tank/T = W
|
||||
blow(T, user)
|
||||
return
|
||||
if (W.get_sharpness() || W.get_temperature() || is_pointed(W))
|
||||
if (W.get_sharpness() || W.get_temperature())
|
||||
burst()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
ricochets_max = 6
|
||||
ricochet_chance = 130
|
||||
ricochet_incidence_leeway = 0
|
||||
ricochet_delay_chance = 0.9
|
||||
ricochet_decay_chance = 0.9
|
||||
|
||||
/obj/item/projectile/bullet/pellet/stingball
|
||||
name = "stingball pellet"
|
||||
|
||||
@@ -1458,8 +1458,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
/proc/firing_squad(mob/living/carbon/target, turf/source_turf, body_zone, wound_bonus, damage)
|
||||
if(!target.get_bodypart(body_zone))
|
||||
return
|
||||
playsound(target, 'sound/weapons/gun/revolver/shot.ogg', 100)
|
||||
var/obj/projectile/bullet/smite/divine_wrath = new(source_turf)
|
||||
playsound(target, 'sound/weapons/shot.ogg', 100)
|
||||
var/obj/item/projectile/bullet/smite/divine_wrath = new(source_turf)
|
||||
divine_wrath.damage = damage
|
||||
divine_wrath.wound_bonus = wound_bonus
|
||||
divine_wrath.original = target
|
||||
|
||||
@@ -140,8 +140,8 @@
|
||||
"<span class='userdanger'>You're hit by [I]!</span>")
|
||||
if(!I.throwforce)
|
||||
return
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
|
||||
apply_damage(I.throwforce, dtype, zone, armor, sharpness=I.get_sharpness(), wound_bonus=(nosell_hit * CANT_WOUND))
|
||||
var/armor = run_armor_check(impacting_zone, "melee", "Your armor has protected your [parse_zone(impacting_zone)].", "Your armor has softened hit to your [parse_zone(impacting_zone)].",I.armour_penetration)
|
||||
apply_damage(I.throwforce, dtype, impacting_zone, armor, sharpness=I.get_sharpness(), wound_bonus=(nosell_hit * CANT_WOUND))
|
||||
else
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -162,9 +162,6 @@
|
||||
/// For telling whether we want to roll for bone breaking or lacerations if we're bothering with wounds
|
||||
sharpness = SHARP_NONE
|
||||
|
||||
///If we have a shrapnel_type defined, these embedding stats will be passed to the spawned shrapnel type, which will roll for embedding on the target
|
||||
var/list/embedding
|
||||
|
||||
/obj/item/projectile/Initialize()
|
||||
. = ..()
|
||||
permutated = list()
|
||||
@@ -829,26 +826,6 @@
|
||||
/obj/item/projectile/experience_pressure_difference()
|
||||
return
|
||||
|
||||
///Like [/obj/item/proc/updateEmbedding] but for projectiles instead, call this when you want to add embedding or update the stats on the embedding element
|
||||
/obj/projectile/proc/updateEmbedding()
|
||||
if(!shrapnel_type || !LAZYLEN(embedding))
|
||||
return
|
||||
|
||||
AddElement(/datum/element/embed,\
|
||||
embed_chance = (!isnull(embedding["embed_chance"]) ? embedding["embed_chance"] : EMBED_CHANCE),\
|
||||
fall_chance = (!isnull(embedding["fall_chance"]) ? embedding["fall_chance"] : EMBEDDED_ITEM_FALLOUT),\
|
||||
pain_chance = (!isnull(embedding["pain_chance"]) ? embedding["pain_chance"] : EMBEDDED_PAIN_CHANCE),\
|
||||
pain_mult = (!isnull(embedding["pain_mult"]) ? embedding["pain_mult"] : EMBEDDED_PAIN_MULTIPLIER),\
|
||||
remove_pain_mult = (!isnull(embedding["remove_pain_mult"]) ? embedding["remove_pain_mult"] : EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER),\
|
||||
rip_time = (!isnull(embedding["rip_time"]) ? embedding["rip_time"] : EMBEDDED_UNSAFE_REMOVAL_TIME),\
|
||||
ignore_throwspeed_threshold = (!isnull(embedding["ignore_throwspeed_threshold"]) ? embedding["ignore_throwspeed_threshold"] : FALSE),\
|
||||
impact_pain_mult = (!isnull(embedding["impact_pain_mult"]) ? embedding["impact_pain_mult"] : EMBEDDED_IMPACT_PAIN_MULTIPLIER),\
|
||||
jostle_chance = (!isnull(embedding["jostle_chance"]) ? embedding["jostle_chance"] : EMBEDDED_JOSTLE_CHANCE),\
|
||||
jostle_pain_mult = (!isnull(embedding["jostle_pain_mult"]) ? embedding["jostle_pain_mult"] : EMBEDDED_JOSTLE_PAIN_MULTIPLIER),\
|
||||
pain_stam_pct = (!isnull(embedding["pain_stam_pct"]) ? embedding["pain_stam_pct"] : EMBEDDED_PAIN_STAM_PCT),\
|
||||
projectile_payload = shrapnel_type)
|
||||
return TRUE
|
||||
|
||||
/////// MISC HELPERS ////////
|
||||
/// Is this atom reflectable with ""standardized"" reflection methods like you know eshields and deswords and similar
|
||||
/proc/is_energy_reflectable_projectile(atom/A)
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
wound_falloff_tile = -5
|
||||
embed_falloff_tile = -5
|
||||
|
||||
/obj/projectile/bullet/smite
|
||||
/obj/item/projectile/bullet/smite
|
||||
name = "divine retribution"
|
||||
damage = 10
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
else if(method in list(PATCH, TOUCH))
|
||||
M.adjustBruteLoss(-1 * reac_volume)
|
||||
M.adjustFireLoss(-1 * reac_volume)
|
||||
for(var/i in carbies.all_wounds)
|
||||
for(var/i in C.all_wounds)
|
||||
var/datum/wound/iter_wound = i
|
||||
iter_wound.on_synthflesh(reac_volume)
|
||||
if(show_message)
|
||||
@@ -1601,8 +1601,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#bb2424"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
|
||||
overdose_threshold = 20
|
||||
overdose_threshold = 20
|
||||
/// How much base clotting we do per bleeding wound, multiplied by the below number for each bleeding wound
|
||||
var/clot_rate = 0.25
|
||||
/// If we have multiple bleeding wounds, we count the number of bleeding wounds, then multiply the clot rate by this^(n) before applying it to each cut, so more cuts = less clotting per cut (though still more total clotting)
|
||||
|
||||
@@ -140,6 +140,13 @@
|
||||
amount_per_transfer_from_this = 15
|
||||
list_reagents = list(/datum/reagent/medicine/epinephrine = 12, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/medicine/spaceacillin = 0.5)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/blood_loss
|
||||
name = "hypovolemic-response autoinjector"
|
||||
desc = "A medipen designed to stabilize and rapidly reverse severe bloodloss."
|
||||
volume = 15
|
||||
amount_per_transfer_from_this = 15
|
||||
list_reagents = list(/datum/reagent/medicine/epinephrine = 5, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/iron = 3.5, /datum/reagent/medicine/salglu_solution = 4)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/stimulants
|
||||
name = "illegal stimpack medipen"
|
||||
desc = "A highly illegal medipen due to its load and small injections, allow for five uses before being drained"
|
||||
|
||||
BIN
sound/weapons/shot.ogg
Normal file
BIN
sound/weapons/shot.ogg
Normal file
Binary file not shown.
@@ -353,6 +353,7 @@
|
||||
#include "code\datums\ai_laws.dm"
|
||||
#include "code\datums\armor.dm"
|
||||
#include "code\datums\beam.dm"
|
||||
#include "code\datums\beepsky_fashion.dm"
|
||||
#include "code\datums\browser.dm"
|
||||
#include "code\datums\callback.dm"
|
||||
#include "code\datums\chatmessage.dm"
|
||||
|
||||
Reference in New Issue
Block a user