Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 1377cdc

Browse files
authored
Fixes some more bugs with the SELF insurgent ipc (#22393)
* fixes * Update IPC.dm * Update IPC.dm * Update IPC.dm * Update examine.dm
1 parent bf49ac5 commit 1377cdc

File tree

3 files changed

+48
-14
lines changed

3 files changed

+48
-14
lines changed

code/modules/mob/living/carbon/human/examine.dm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
var/t_is = p_are()
1414
var/obscure_name
1515
var/robotic = FALSE //robotic mobs look different under certain circumstances
16-
if(mob_biotypes & MOB_ROBOTIC)//please someone tell me this is stupid and i can do it all in one line
16+
if(mob_biotypes & MOB_ROBOTIC && !HAS_TRAIT(src, TRAIT_DISGUISED)) //if someone's trying to disguise, always use the default text, it's less obvious because people are used to it
1717
robotic = TRUE
1818

1919
if(isliving(user))
@@ -489,14 +489,14 @@
489489
// What examine_tgui.dm uses to determine if flavor text appears as "Obscured".
490490
var/face_obscured = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
491491

492-
if(HAS_TRAIT(src, TRAIT_HUSK))
492+
if(HAS_TRAIT(src, TRAIT_HUSK)) //can't identify husk
493493
flavor_text_link = span_notice("This person has been husked, and is unrecognizable!")
494-
else if ((HAS_TRAIT(src, TRAIT_DISFIGURED)))
494+
else if (HAS_TRAIT(src, TRAIT_DISFIGURED)) //can't identify disfigured
495495
flavor_text_link = span_notice("This person has been horribly disfigured, and is unrecognizable!")
496-
else if (!(face_obscured))
497-
flavor_text_link = span_notice("[preview_text]... <a href='?src=[REF(src)];lookup_info=open_examine_panel'>\[Look closer?\]</a>")
498-
else
496+
else if (face_obscured || HAS_TRAIT(src, TRAIT_DISGUISED)) //won't print flavour text of hidden
499497
flavor_text_link = span_notice("<a href='?src=[REF(src)];lookup_info=open_examine_panel'>\[Examine closely...\]</a>")
498+
else //do it normally
499+
flavor_text_link = span_notice("[preview_text]... <a href='?src=[REF(src)];lookup_info=open_examine_panel'>\[Look closer?\]</a>")
500500
if (flavor_text_link)
501501
. += flavor_text_link
502502

code/modules/mob/living/carbon/human/examine_tgui.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
if(ishuman(holder))
5757
var/mob/living/carbon/human/holder_human = holder
58-
obscured = (holder_human.wear_mask && (holder_human.wear_mask.flags_inv & HIDEFACE)) || (holder_human.head && (holder_human.head.flags_inv & HIDEFACE))
58+
obscured = (holder_human.wear_mask && (holder_human.wear_mask.flags_inv & HIDEFACE)) || (holder_human.head && (holder_human.head.flags_inv & HIDEFACE)) || HAS_TRAIT(holder_human, TRAIT_DISGUISED)
5959
flavor_text = obscured ? "Obscured" : holder_human.dna.features["flavor_text"]
6060
if(!obscured)
6161
headshot += holder_human.dna.features["headshot"]

code/modules/mob/living/carbon/human/species_types/IPC.dm

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,23 @@ ipc martial arts stuff
410410
punchdamagelow = 5
411411
punchdamagehigh = 12
412412
punchstunthreshold = 12
413-
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOBREATH,TRAIT_LIMBATTACHMENT,TRAIT_NODISMEMBER,TRAIT_NOLIMBDISABLE,TRAIT_NOCRITDAMAGE,TRAIT_GENELESS,TRAIT_MEDICALIGNORE,TRAIT_NOCLONE,TRAIT_TOXIMMUNE,TRAIT_EASILY_WOUNDED,TRAIT_NODEFIB,TRAIT_POWERHUNGRY)
413+
mutant_organs = list()
414+
inherent_traits = list(
415+
TRAIT_RESISTCOLD,
416+
TRAIT_RADIMMUNE,
417+
TRAIT_NOBREATH,
418+
TRAIT_LIMBATTACHMENT,
419+
TRAIT_NODISMEMBER,
420+
TRAIT_NOLIMBDISABLE,
421+
TRAIT_NOCRITDAMAGE,
422+
TRAIT_GENELESS,
423+
TRAIT_MEDICALIGNORE,
424+
TRAIT_NOCLONE,
425+
TRAIT_TOXIMMUNE,
426+
TRAIT_EASILY_WOUNDED,
427+
TRAIT_NODEFIB,
428+
TRAIT_NOHUNGER //nuclear powered or some shit, idk
429+
)
414430

415431
//infiltrators
416432
/datum/species/ipc/self/insurgent
@@ -423,7 +439,13 @@ ipc martial arts stuff
423439
var/list/initial_step_sounds
424440
var/list/initial_walk_sounds
425441
var/list/initial_genders
426-
var/list/blacklisted_species = list(/datum/species/ethereal, /datum/species/moth, /datum/species/gorilla)//species that really don't work with this system (lizards aren't quite right either, but whatever)
442+
var/list/blacklisted_species = list(
443+
/datum/species/ethereal, //glow
444+
/datum/species/moth, //wings
445+
/datum/species/gorilla, //breaks human shapes
446+
/datum/species/vox, //has weird clothing
447+
/datum/species/abductor //not exactly sneaky
448+
)//species that really don't work with this system (lizards aren't quite right either, but whatever)
427449
var/list/old_features
428450
var/old_gender
429451
var/ipc_color
@@ -451,8 +473,6 @@ ipc martial arts stuff
451473
else
452474
old_features["mcolor"] = skintone2hex(random_skin_tone())
453475
..()
454-
for(var/obj/item/bodypart/O in H.bodyparts)
455-
O.render_like_organic = TRUE // Makes limbs render like organic limbs instead of augmented limbs, check bodyparts.dm
456476
assume_disguise(H)
457477

458478
/datum/species/ipc/self/insurgent/spec_fully_heal(mob/living/carbon/human/H)
@@ -476,6 +496,8 @@ ipc martial arts stuff
476496
special_step_sounds = null
477497
special_walk_sounds = null
478498
species_traits |= fake_species.species_traits
499+
if(!(MUTCOLORS in fake_species.species_traits)) //some species don't have mutcolors
500+
species_traits -= MUTCOLORS
479501
inherent_traits |= fake_species.inherent_traits
480502
if(!(NO_UNDERWEAR in fake_species.species_traits))
481503
species_traits -= NO_UNDERWEAR
@@ -485,12 +507,19 @@ ipc martial arts stuff
485507
attack_sound = fake_species.attack_sound
486508
miss_sound = fake_species.miss_sound
487509
nojumpsuit = fake_species.nojumpsuit
488-
limbs_id = fake_species.limbs_id
510+
limbs_id = fake_species.limbs_id || fake_species.id
511+
limb_icon_file = fake_species.limb_icon_file
512+
is_dimorphic = fake_species.is_dimorphic
489513
use_skintones = fake_species.use_skintones
490514
fixed_mut_color = fake_species.fixed_mut_color
491-
bubble_icon = fake_species.bubble_icon
515+
H.bubble_icon = fake_species.bubble_icon
492516
yogs_draw_robot_hair = TRUE
517+
var/robotic = (fake_species.inherent_biotypes & MOB_ROBOTIC)
518+
for(var/obj/item/bodypart/O in H.bodyparts)
519+
O.render_like_organic = robotic //make sure to copy limbs as normal
493520

521+
ADD_TRAIT(H, TRAIT_DISGUISED, type)
522+
H.update_body_parts()
494523
H.regenerate_icons() //to update limb icon cache with the new damage overlays
495524

496525
/datum/species/ipc/self/insurgent/proc/break_disguise(mob/living/carbon/human/H)
@@ -514,12 +543,17 @@ ipc martial arts stuff
514543
miss_sound = initial(miss_sound)
515544
nojumpsuit = initial(nojumpsuit)
516545
limbs_id = initial(limbs_id)
546+
is_dimorphic = initial(is_dimorphic)
547+
limb_icon_file = initial(limb_icon_file)
517548
use_skintones = initial(use_skintones)
518-
bubble_icon = initial(bubble_icon)
549+
H.bubble_icon = initial(bubble_icon)
519550
yogs_draw_robot_hair = FALSE
520551

521552
for(var/obj/item/bodypart/O in H.bodyparts)
522553
O.render_like_organic = TRUE // Makes limbs render like organic limbs instead of augmented limbs, check bodyparts.dm
554+
555+
REMOVE_TRAIT(H, TRAIT_DISGUISED, type)
556+
H.update_body_parts()
523557
H.regenerate_icons()
524558

525559
/datum/species/ipc/self/insurgent/get_scream_sound(mob/living/carbon/human/H)

0 commit comments

Comments
 (0)