mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Merge pull request #4427 from Ccomp5950/handle_imbedded_fix
Code effeciency project: handle_embedded_objects
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
icon_state = "body_m_s"
|
||||
var/list/hud_list = list()
|
||||
var/datum/species/species //Contains icon generation and language information, set during New().
|
||||
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
|
||||
@@ -245,6 +245,7 @@ This function restores all organs.
|
||||
if( (damage > (10*W.w_class)) && ( (sharp && !ismob(W.loc)) || prob(damage/W.w_class) ) )
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
W.add_blood(src)
|
||||
if(ismob(W.loc))
|
||||
@@ -252,4 +253,4 @@ This function restores all organs.
|
||||
H.drop_item()
|
||||
W.loc = src
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -99,6 +99,7 @@ emp_act
|
||||
(SP.loc) = organ
|
||||
organ.implants += SP
|
||||
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
SP.add_blood(src)
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
if(embedded_flag)
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
|
||||
if(reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
handle_environment(environment)
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp
|
||||
update_canmove()
|
||||
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
@@ -1059,6 +1059,13 @@
|
||||
if(halloss > 0)
|
||||
adjustHalLoss(-1)
|
||||
|
||||
if(embedded_flag && !(life_tick % 10))
|
||||
var/list/E
|
||||
E = get_visible_implants(0)
|
||||
if(!E.len)
|
||||
embedded_flag = 0
|
||||
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
|
||||
Reference in New Issue
Block a user