eh, was going somewhere with this

IPC gibspawner, looking into infinite footprints
This commit is contained in:
Poojawa
2019-05-26 05:36:33 -05:00
parent 4324d08f32
commit 9f80896280
14 changed files with 186 additions and 74 deletions
@@ -49,6 +49,7 @@
//Gets filled up in create_bodyparts()
var/list/hand_bodyparts = list() //a collection of arms (or actually whatever the fug /bodyparts you monsters use to wreck my systems)
var/list/leg_bodyparts = list()
var/icon_render_key = ""
var/static/list/limb_icon_cache = list()
@@ -12,7 +12,10 @@
new /obj/effect/gibspawner/human/slimeperson/bodypartless(drop_location(), dna, get_static_viruses())
if(isipcperson(src))
new /obj/effect/gibspawner/robot/ipc(drop_location(), dna, get_static_viruses())
if(with_bodyparts)
new /obj/effect/gibspawner/human/ipc(drop_location(), dna, get_static_viruses())
else
new /obj/effect/gibspawner/human/ipc/bodypartless(drop_location(), dna, get_static_viruses())
if(isxenoperson(src))
if(with_bodyparts)
@@ -698,7 +698,6 @@
if(H.bloody_feet)
H.bloody_feet = 0
H.update_inv_shoes()
bloodiness = 0
update_icons() //apply the now updated overlays to the mob
@@ -43,13 +43,10 @@
var/bleed_rate = 0 //how much are we bleeding
var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding
var/bloodiness = 0
var/bloodinessmax = 5
var/last_bloodtype = ""//used to track the last bloodtype to have graced this filthy spaceman; makes for better performing footprint shenanigans
var/last_blood_DNA = ""//same as last one
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
var/blood_color //For blood smearing stuff
var/name_override //For temporary visible name changes
@@ -46,23 +46,21 @@
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_move(src, NewLoc)
if(!buckled)
if(shoes)
if(!lying)
if(loc == NewLoc)
if(!has_gravity(loc))
if(shoes)
if(!lying && !buckled)
if(loc == NewLoc)
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
//Bloody footprints
var/turf/T = get_turf(src)
var/step_print = dna.species.get_move_trail(src)
if(S.blood_smear && S.blood_smear[S.blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(S.last_bloodtype)))
return
var/obj/item/clothing/shoes/S = shoes
//Bloody footprints
var/turf/T = get_turf(src)
if(S.blood_smear && S.blood_smear[S.blood_state])
var/obj/effect/decal/cleanable/blood/footprints/tracks/shoe/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints/tracks/shoe) in T
if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(S.last_bloodtype)))
return
S.blood_smear[S.blood_state] = max(0, S.blood_smear[S.blood_state]-BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/tracks/shoe/FP = new /obj/effect/decal/cleanable/blood/footprints/tracks/shoe(T)
FP.icon_state = FOOTPRINT_SHOE
FP.print_state = FOOTPRINT_SHOE
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.blood_smear[S.blood_state]
@@ -71,31 +69,24 @@
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
update_inv_shoes()
//End bloody footprints
//End bloody footprints
S.step_action()
else
S.step_action()
else if(!shoes)
if(!buckled)
if(loc == NewLoc)
if(!has_gravity(loc))
return
//Bloody footprints without shoes
var/turf/T = get_turf(src)
var/step_print = dna.species.get_move_trail(src)
if(bloodiness && blood_smear[blood_state])
var/obj/effect/decal/cleanable/blood/footprints/tracks/oldFP = locate(step_print) in T
if(blood_smear && blood_smear[blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(oldFP && (oldFP.blood_state == blood_state && oldFP.color == bloodtype_to_color(last_bloodtype)))
return
blood_smear[blood_state] = max(0, blood_smear[blood_state]-BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
if(("taur" in dna.species.mutant_bodyparts) && (dna.features["taur"] != "None") && !lying)
if(dna.features["taur"] in GLOB.noodle_taurs)
FP.icon_state = FOOTPRINT_SNAKE
FP.print_state = FOOTPRINT_SNAKE
else if(dna.features["taur"] in GLOB.paw_taurs)
FP.icon_state = FOOTPRINT_PAW
FP.print_state = FOOTPRINT_PAW
if(!dna.species.move_trail && !lying) //we're assuming people have their chosen snowflake on, so.
FP.icon_state = FOOTPRINT_SHOE
FP.print_state = FOOTPRINT_SHOE
FP.blood_state = blood_state
FP.entered_dirs |= dir
FP.bloodiness = blood_smear[blood_state]
@@ -103,7 +94,9 @@
FP.blood_DNA += list(last_blood_DNA = last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
bloodiness--
update_inv_shoes()
//End bloody footprints
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
if(dna.species.space_move(src))
@@ -636,6 +636,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None" || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
bodyparts_to_add -= "taur"
if(H.dna.features["taur"] != "None")
if(H.dna.features["taur"] in GLOB.noodle_taurs)
move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/snake
else if(H.dna.features["taur"] in GLOB.paw_taurs)
move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/paw
//END EDIT
//Digitigrade legs are stuck in the phantom zone between true limbs and mutant bodyparts. Mainly it just needs more agressive updating than most limbs.
@@ -185,7 +185,7 @@ There are several things that need to be remembered:
inv.update_icon()
if(!gloves && bloody_hands)
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER, color = blood_color)
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER, color = blood_DNA_to_color())
if(get_num_arms() < 2)
if(has_left_hand())
bloody_overlay.icon_state = "bloodyhands_left"
@@ -276,6 +276,32 @@ There are several things that need to be remembered:
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES]
inv.update_icon()
if(!shoes && bloody_feet)
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
if(dna.features["taur"] != "None")
if(dna.features["taur"] in GLOB.noodle_taurs)
bloody_overlay = mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "snekbloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
if(get_num_legs() < 2)
if(has_left_leg())
bloody_overlay.icon_state = "snekbloodyfeet_left"
else if(has_right_leg())
bloody_overlay.icon_state = "snekbloodyfeet_right"
else if(dna.features["taur"] in GLOB.paw_taurs)
bloody_overlay = mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "pawbloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
if(get_num_legs() < 2)
if(has_left_leg())
bloody_overlay.icon_state = "pawbloodyfeet_left"
else if(has_right_leg())
bloody_overlay.icon_state = "pawbloodyfeet_right"
else
if(get_num_legs() < 2)
if(has_left_leg())
bloody_overlay.icon_state = "bloodyfeet_left"
else if(has_right_leg())
bloody_overlay.icon_state = "bloodyfeet_right"
overlays_standing[GLOVES_LAYER] = bloody_overlay
if(shoes)
var/obj/item/clothing/shoes/S = shoes
shoes.screen_loc = ui_shoes //move the item to the appropriate screen loc
+21
View File
@@ -49,6 +49,27 @@
/mob/proc/has_left_leg()
return TRUE
/mob/living/carbon/has_left_leg()
var/obj/item/bodypart/l_leg = get_bodypart(BODY_ZONE_L_LEG)
if(l_leg)
return TRUE
else
return FALSE
/mob/proc/has_right_leg()
return TRUE
/mob/living/carbon/has_right_leg()
var/obj/item/bodypart/r_leg = get_bodypart(BODY_ZONE_R_LEG)
if(r_leg)
return TRUE
else
return FALSE
//Limb numbers
/mob/proc/get_num_arms(check_disabled = TRUE)
return 2