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

Commit 1461e09

Browse files
authored
Deletes synths, adds S.E.L.F. insurgents (#21431)
* work * Update IPC.dm * redisguise * ow * Update IPC.dm * Update IPC.dm * Update IPC.dm * Update IPC.dm * tweaks and tweaks and tweaks * no sparks
1 parent f4ad38c commit 1461e09

File tree

12 files changed

+154
-165
lines changed

12 files changed

+154
-165
lines changed

code/__DEFINES/is_helpers.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
9090
#define ispreternis(A) (is_species(A,/datum/species/preternis))
9191
#define isszlachta(A) (is_species(A, /datum/species/szlachta))
9292
#define isipc(A) (is_species(A, /datum/species/ipc))
93+
#define isinsurgent(A) (is_species(A, /datum/species/ipc/self/insurgent))
9394
#define issnail(A) (is_species(A, /datum/species/snail))
9495
#define isandroid(A) (is_species(A, /datum/species/android))
9596
#define isdummy(A) (istype(A, /mob/living/carbon/human/dummy))

code/controllers/subsystem/traumas.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ SUBSYSTEM_DEF(traumas)
156156

157157
phobia_species = list("lizards" = typecacheof(list(/datum/species/lizard)),
158158
"skeletons" = typecacheof(list(/datum/species/skeleton, /datum/species/plasmaman)),
159-
"conspiracies" = typecacheof(list(/datum/species/abductor, /datum/species/lizard, /datum/species/synth)),
159+
"conspiracies" = typecacheof(list(/datum/species/abductor, /datum/species/lizard)),
160160
"robots" = typecacheof(list(/datum/species/android)),
161161
"the supernatural" = typecacheof(list(/datum/species/golem/clockwork, /datum/species/golem/runic)),
162162
"aliens" = typecacheof(list(/datum/species/abductor, /datum/species/jelly, /datum/species/pod,

code/modules/awaymissions/capture_the_flag.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
/obj/machinery/capture_the_flag/proc/spawn_team_member(client/new_team_member)
267267
var/mob/living/carbon/human/M = new/mob/living/carbon/human(get_turf(src))
268268
new_team_member.prefs.apply_prefs_to(M)
269-
M.set_species(/datum/species/synth)
269+
M.set_species(/datum/species/ipc/self)
270270
M.key = new_team_member.key
271271
M.faction += team
272272
M.equipOutfit(ctf_gear)

code/modules/awaymissions/mission_code/snowdin.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@
225225
var/list/plasma_parts = list()//a list of the organic parts to be turned into plasma limbs
226226
var/list/robo_parts = list()//keep a reference of robotic parts so we know if we can turn them into a plasmaman
227227
var/mob/living/carbon/human/PP = L
228-
var/S = PP.dna.species
229-
if(istype(S, /datum/species/plasmaman) || istype(S, /datum/species/android) || istype(S, /datum/species/synth)) //ignore plasmamen/robotic species
228+
var/datum/species/S = PP.dna.species
229+
if(istype(S, /datum/species/plasmaman) || (S.inherent_biotypes & MOB_ROBOTIC)) //ignore plasmamen/robotic species
230230
continue
231231

232232
for(var/BP in PP.bodyparts)

code/modules/events/fugitive_spawning.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
S.equipOutfit(/datum/outfit/waldo)
8282
if("synth")
8383
S.equipOutfit(/datum/outfit/synthetic)
84-
S.set_species(/datum/species/synth)
84+
S.set_species(/datum/species/ipc/self)
8585
message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Fugitive by an event.")
8686
log_game("[key_name(S)] was spawned as a Fugitive by an event.")
8787
spawned_mobs += S

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,12 +1382,6 @@
13821382
/mob/living/carbon/human/species/skeleton/lowcalcium
13831383
race = /datum/species/skeleton/lowcalcium
13841384

1385-
/mob/living/carbon/human/species/synth
1386-
race = /datum/species/synth
1387-
1388-
/mob/living/carbon/human/species/synth/military
1389-
race = /datum/species/synth/military
1390-
13911385
/mob/living/carbon/human/species/vampire
13921386
race = /datum/species/vampire
13931387

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
var/target_area = parse_zone(check_zone(user.zone_selected)) //our intended target
204204
if(affecting)
205205
if(I.force && I.damtype != STAMINA && affecting.status == BODYPART_ROBOTIC) // Bodpart_robotic sparks when hit, but only when it does real damage
206-
if(I.force >= 5)
206+
if(I.force >= 5 && !isinsurgent(src)) //small change, insurgent ipcs don't give off sparks if hit
207207
do_sparks(1, FALSE, loc)
208208

209209
SEND_SIGNAL(I, COMSIG_ITEM_ATTACK_ZONE, src, user, affecting)

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

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
var/ipc_name = "[pick(GLOB.posibrain_names)]-[rand(100, 999)]"
6060
return ipc_name
6161

62-
/datum/species/ipc/on_species_gain(mob/living/carbon/C) // Let's make that IPC actually robotic.
62+
/datum/species/ipc/on_species_gain(mob/living/carbon/C, datum/species/old_species) // Let's make that IPC actually robotic.
6363
. = ..()
6464
C.particles = new /particles/smoke/ipc()
6565
var/obj/item/organ/appendix/A = C.getorganslot(ORGAN_SLOT_APPENDIX) // Easiest way to remove it.
@@ -363,4 +363,141 @@ ipc martial arts stuff
363363
return TRUE
364364
return FALSE
365365

366+
367+
/*
368+
* S.E.L.F. movement specific IPCs
369+
*/
370+
/datum/species/ipc/self
371+
id = "self ipc"
372+
limbs_id = "mcgipc"
373+
speedmod = -0.1
374+
armor = 10
375+
punchdamagelow = 5
376+
punchdamagehigh = 12
377+
punchstunthreshold = 12
378+
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)
379+
380+
//infiltrators
381+
/datum/species/ipc/self/insurgent
382+
id = "self insurgent"
383+
var/disguise_fail_health = 65 //When their health gets to this level their synthflesh partially falls off
384+
var/datum/species/fake_species //a species to do most of our work for us, unless we're damaged
385+
var/list/initial_species_traits //for getting these values back for assume_disguise()
386+
var/list/initial_inherent_traits
387+
var/list/initial_mutant_bodyparts
388+
var/list/initial_step_sounds
389+
var/list/initial_walk_sounds
390+
var/list/blacklisted_species = list(/datum/species/ethereal, /datum/species/moth)//species that really don't work with this system (lizards aren't quite right either, but whatever)
391+
var/list/old_features
392+
var/ipc_color
393+
var/disguised = FALSE
394+
395+
/datum/species/ipc/self/insurgent/New()
396+
initial_species_traits = LAZYCOPY(species_traits)
397+
initial_inherent_traits = LAZYCOPY(inherent_traits)
398+
initial_mutant_bodyparts = LAZYCOPY(mutant_bodyparts)
399+
initial_step_sounds = LAZYCOPY(special_step_sounds)
400+
initial_walk_sounds = LAZYCOPY(special_walk_sounds)
401+
ipc_color = sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]")
402+
403+
fake_species = new /datum/species/human() //default is human
404+
..()
405+
406+
/datum/species/ipc/self/insurgent/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
407+
old_features = LAZYCOPY(H.dna.features)
408+
if(old_species && !is_type_in_list(old_species, blacklisted_species))
409+
qdel(fake_species)
410+
fake_species = old_species
411+
if(old_species.use_skintones)
412+
old_features["mcolor"] = skintone2hex(H.skin_tone)
413+
else
414+
old_features["mcolor"] = skintone2hex(random_skin_tone())
415+
..()
416+
for(var/obj/item/bodypart/O in H.bodyparts)
417+
O.render_like_organic = TRUE // Makes limbs render like organic limbs instead of augmented limbs, check bodyparts.dm
418+
assume_disguise(H)
419+
420+
/datum/species/ipc/self/insurgent/spec_fully_heal(mob/living/carbon/human/H)
421+
assume_disguise(H)
422+
423+
/datum/species/ipc/self/insurgent/proc/assume_disguise(mob/living/carbon/human/H)
424+
if(disguised || !(fake_species && istype(fake_species)) || H.health < disguise_fail_health)
425+
return FALSE
426+
427+
disguised = TRUE
428+
name = fake_species.name
429+
say_mod = fake_species.say_mod
430+
sexes = fake_species.sexes
431+
species_traits = LAZYCOPY(initial_species_traits)
432+
inherent_traits = LAZYCOPY(initial_inherent_traits)
433+
mutant_bodyparts = LAZYCOPY(fake_species.mutant_bodyparts)
434+
H.dna.features = old_features
435+
special_step_sounds = null
436+
special_walk_sounds = null
437+
species_traits |= fake_species.species_traits
438+
inherent_traits |= fake_species.inherent_traits
439+
if(!(NO_UNDERWEAR in fake_species.species_traits))
440+
species_traits -= NO_UNDERWEAR
441+
damage_overlay_type = fake_species.damage_overlay_type
442+
attack_verb = fake_species.attack_verb
443+
attack_sound = fake_species.attack_sound
444+
miss_sound = fake_species.miss_sound
445+
nojumpsuit = fake_species.nojumpsuit
446+
limbs_id = fake_species.limbs_id
447+
use_skintones = fake_species.use_skintones
448+
fixed_mut_color = fake_species.fixed_mut_color
449+
bubble_icon = fake_species.bubble_icon
450+
yogs_draw_robot_hair = TRUE
451+
452+
H.regenerate_icons() //to update limb icon cache with the new damage overlays
453+
454+
/datum/species/ipc/self/insurgent/proc/break_disguise(mob/living/carbon/human/H)
455+
if(!disguised)
456+
return FALSE
457+
disguised = FALSE
458+
name = initial(name)
459+
say_mod = initial(say_mod)
460+
sexes = initial(sexes)
461+
species_traits = LAZYCOPY(initial_species_traits)
462+
inherent_traits = LAZYCOPY(initial_inherent_traits)
463+
mutant_bodyparts = LAZYCOPY(initial_mutant_bodyparts)
464+
special_step_sounds = LAZYCOPY(initial_step_sounds)
465+
special_walk_sounds = LAZYCOPY(initial_walk_sounds)
466+
damage_overlay_type = initial(damage_overlay_type)
467+
H.dna.features["mcolor"] = ipc_color
468+
attack_verb = initial(attack_verb)
469+
attack_sound = initial(attack_sound)
470+
miss_sound = initial(miss_sound)
471+
nojumpsuit = initial(nojumpsuit)
472+
limbs_id = initial(limbs_id)
473+
use_skintones = initial(use_skintones)
474+
bubble_icon = initial(bubble_icon)
475+
yogs_draw_robot_hair = FALSE
476+
477+
for(var/obj/item/bodypart/O in H.bodyparts)
478+
O.render_like_organic = TRUE // Makes limbs render like organic limbs instead of augmented limbs, check bodyparts.dm
479+
H.regenerate_icons()
480+
481+
/datum/species/ipc/self/insurgent/get_scream_sound(mob/living/carbon/human/H)
482+
if(fake_species && disguised)
483+
return fake_species.get_scream_sound(H)
484+
else
485+
return ..()
486+
487+
/datum/species/ipc/self/insurgent/apply_damage(damage, damagetype, def_zone, blocked, mob/living/carbon/human/H, wound_bonus, bare_wound_bonus, sharpness, attack_direction)
488+
. = ..()
489+
if(. && H.health < disguise_fail_health)
490+
break_disguise(H)
491+
492+
//admeme strong ipc
493+
/datum/species/ipc/self/insurgent/military
494+
id = "insurrectionist ipc"
495+
armor = 35
496+
speedmod = -0.2
497+
punchdamagelow = 10
498+
punchdamagehigh = 19
499+
punchstunthreshold = 14 //about 50% chance to stun
500+
disguise_fail_health = 35
501+
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN //admin only... sorta
502+
366503
#undef CONSCIOUSAY

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

Lines changed: 0 additions & 150 deletions
This file was deleted.

code/modules/reagents/chemistry/holder.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@
730730
//yogs start - snowflake synth check
731731
if(!istype(R, /datum/reagent/medicine/synthflesh) && ishuman(my_atom))
732732
var/mob/living/carbon/human/H = my_atom
733-
if(istype(H.dna.species, /datum/species/synth))
733+
if(H?.dna?.species && istype(H.dna.species, /datum/species/ipc/self/insurgent))
734734
return
735735
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
736736
//yogs end

0 commit comments

Comments
 (0)