mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
VS: Refactor move code
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
touching.clear_reagents()
|
||||
..()
|
||||
|
||||
/* VOREStation Edit - Duplicated in our code
|
||||
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(src.nutrition && src.stat != 2)
|
||||
@@ -42,10 +43,10 @@
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
/* VOREStation Removal - Needless duplicate feature
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/living/user, direction)
|
||||
if((user in src.stomach_contents) && istype(user))
|
||||
if(user.last_special <= world.time)
|
||||
|
||||
@@ -58,22 +58,21 @@
|
||||
nif.life()
|
||||
|
||||
//Overriding carbon move proc that forces default hunger factor
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/M = src
|
||||
if(M.stat != 2 && M.nutrition > 0)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/M = src
|
||||
if(M.stat != 2 && M.nutrition > 0)
|
||||
M.nutrition -= M.species.hunger_factor/10
|
||||
if(M.m_intent == "run")
|
||||
M.nutrition -= M.species.hunger_factor/10
|
||||
if(M.m_intent == "run")
|
||||
M.nutrition -= M.species.hunger_factor/10
|
||||
if(M.nutrition < 0)
|
||||
M.nutrition = 0
|
||||
else
|
||||
if(M.nutrition < 0)
|
||||
M.nutrition = 0
|
||||
else
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
@@ -109,39 +109,35 @@
|
||||
icon_state = "[module_sprites[icontype]]-wreck"
|
||||
add_overlay("wreck-overlay")
|
||||
|
||||
/mob/living/silicon/robot/Move(a, b, flag)
|
||||
/mob/living/silicon/robot/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(scrubbing)
|
||||
var/datum/matter_synth/water = water_res
|
||||
if(water && water.energy >= 1)
|
||||
var/turf/tile = loc
|
||||
if(isturf(tile))
|
||||
water.use_charge(1)
|
||||
tile.clean_blood()
|
||||
if(istype(tile, /turf/simulated))
|
||||
var/turf/simulated/T = tile
|
||||
T.dirt = 0
|
||||
for(var/A in tile)
|
||||
if(istype(A,/obj/effect/rune) || istype(A,/obj/effect/decal/cleanable) || istype(A,/obj/effect/overlay))
|
||||
qdel(A)
|
||||
else if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head(0)
|
||||
if(cleaned_human.wear_suit)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit(0)
|
||||
else if(cleaned_human.w_uniform)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform(0)
|
||||
if(cleaned_human.shoes)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes(0)
|
||||
cleaned_human.clean_blood(1)
|
||||
to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>")
|
||||
return
|
||||
if(scrubbing && isturf(loc) && water_res?.energy >= 1)
|
||||
var/turf/tile = loc
|
||||
water_res.use_charge(1)
|
||||
tile.clean_blood()
|
||||
if(istype(tile, /turf/simulated))
|
||||
var/turf/simulated/T = tile
|
||||
T.dirt = 0
|
||||
for(var/A in tile)
|
||||
if(istype(A,/obj/effect/rune) || istype(A,/obj/effect/decal/cleanable) || istype(A,/obj/effect/overlay))
|
||||
qdel(A)
|
||||
else if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head(0)
|
||||
if(cleaned_human.wear_suit)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit(0)
|
||||
else if(cleaned_human.w_uniform)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform(0)
|
||||
if(cleaned_human.shoes)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes(0)
|
||||
cleaned_human.clean_blood(1)
|
||||
to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/vr_sprite_check()
|
||||
if(wideborg == TRUE)
|
||||
|
||||
@@ -48,7 +48,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
|
||||
return "off"
|
||||
|
||||
// You aren't allowed to move.
|
||||
/obj/machinery/gravity_generator/Move()
|
||||
/obj/machinery/gravity_generator/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user