Merge pull request #16016 from SandPoot/throwing-update

[TESTMERGE] Updates firemanning, throwing stuff
This commit is contained in:
deathride58
2023-12-28 22:44:59 -05:00
committed by GitHub
55 changed files with 468 additions and 276 deletions
+1
View File
@@ -108,6 +108,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = WEIGHT_CLASS_TINY
body_parts_covered = null
grind_results = list()
throw_verb = "flick"
var/lit = FALSE
var/starts_lit = FALSE
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
+3 -1
View File
@@ -168,7 +168,9 @@
diceroll(user)
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
diceroll(thrownby)
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
diceroll(thrown_by)
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
+5 -4
View File
@@ -289,10 +289,11 @@
"<span class='userdanger'>[M] has been splashed with something!</span>")
var/turf/TT = get_turf(hit_atom)
var/throwerstring
if(thrownby)
log_combat(thrownby, M, "splashed", R)
var/turf/AT = get_turf(thrownby)
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
log_combat(thrown_by, M, "splashed", R)
var/turf/AT = get_turf(thrown_by)
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
reagents.reaction(hit_atom, TOUCH)
reagents.clear_reagents()
+8 -5
View File
@@ -61,9 +61,10 @@
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
var/mob/thrown_by = thrownby?.resolve()
//Only mob/living types have stun handling
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
baton_stun(hit_atom, thrownby, shoving = TRUE)
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
baton_stun(hit_atom, thrown_by, shoving = TRUE)
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
preload_cell_type = /obj/item/stock_parts/cell/high/plus
@@ -387,8 +388,9 @@
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(turned_on)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrownby, shoving = TRUE)
var/mob/thrown_by = thrownby?.resolve()
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrown_by, shoving = TRUE)
if(thrownby && !caught)
throw_back()
else
@@ -397,8 +399,9 @@
/obj/item/melee/baton/boomerang/proc/throw_back()
set waitfor = FALSE
sleep(1)
var/mob/thrown_by = thrownby?.resolve()
if(!QDELETED(src))
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
/obj/item/melee/baton/boomerang/update_icon()
if(turned_on)