|
59 | 59 | var/ipc_name = "[pick(GLOB.posibrain_names)]-[rand(100, 999)]" |
60 | 60 | return ipc_name |
61 | 61 |
|
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. |
63 | 63 | . = ..() |
64 | 64 | C.particles = new /particles/smoke/ipc() |
65 | 65 | var/obj/item/organ/appendix/A = C.getorganslot(ORGAN_SLOT_APPENDIX) // Easiest way to remove it. |
@@ -363,4 +363,141 @@ ipc martial arts stuff |
363 | 363 | return TRUE |
364 | 364 | return FALSE |
365 | 365 |
|
| 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 | + |
366 | 503 | #undef CONSCIOUSAY |
0 commit comments