mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
@@ -300,8 +300,14 @@ This function restores all organs.
|
||||
//Embedded object code.
|
||||
if(!organ) return
|
||||
if(istype(used_weapon,/obj/item))
|
||||
var/obj/item/W = used_weapon //Sharp objects will always embed if they do enough damage.
|
||||
if((damage > (10*W.w_class)) || ((sharp && !ismob(W.loc)) || prob(damage/W.w_class)))
|
||||
organ.embed(W)
|
||||
var/obj/item/W = used_weapon
|
||||
if (!W.is_robot_module())
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/embed_chance = sharp? damage/W.w_class : damage/(W.w_class*3)
|
||||
var/embed_threshold = sharp? 5*W.w_class : 15*W.w_class
|
||||
|
||||
//Sharp objects will always embed if they do enough damage.
|
||||
if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
organ.embed(W)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -351,4 +351,13 @@
|
||||
var/obj/item/device/lightreplacer/LR = locate() in src.modules
|
||||
LR.Charge(R)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
//checks whether this item is a module of the robot it is located in.
|
||||
/obj/item/proc/is_robot_module()
|
||||
if (!istype(src.loc, /mob/living/silicon/robot))
|
||||
return 0
|
||||
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
|
||||
return (src in R.module.modules)
|
||||
Reference in New Issue
Block a user