mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Adds thrown object sharp and edge flags
This commit is contained in:
@@ -1274,16 +1274,16 @@ proc/is_hot(obj/item/W as obj)
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
//Whether or not the given item counts as sharp in terms of dealing damage
|
//Whether or not the given item counts as sharp in terms of dealing damage
|
||||||
/proc/is_sharp(obj/item/W as obj)
|
/proc/is_sharp(obj/O as obj)
|
||||||
if (!W) return 0
|
if (!O) return 0
|
||||||
if (W.sharp) return 1
|
if (O.sharp) return 1
|
||||||
if (W.edge) return 1
|
if (O.edge) return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
//Whether or not the given item counts as cutting with an edge in terms of removing limbs
|
//Whether or not the given item counts as cutting with an edge in terms of removing limbs
|
||||||
/proc/has_edge(obj/item/W as obj)
|
/proc/has_edge(obj/O as obj)
|
||||||
if (!W) return 0
|
if (!O) return 0
|
||||||
if (W.edge) return 1
|
if (O.edge) return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
|
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
src.visible_message("\red [src] has been hit by [O].")
|
src.visible_message("\red [src] has been hit by [O].")
|
||||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
|
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
|
||||||
if(armor < 2)
|
if(armor < 2)
|
||||||
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O)
|
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O, sharp=is_sharp(O), edge=has_edge(O))
|
||||||
|
|
||||||
if(!O.fingerprintslast)
|
if(!O.fingerprintslast)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user