mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 07:08:55 +01:00
adds the ability to turn into other people for proteans, and gives protean blobs their robot emotes back
This commit is contained in:
@@ -186,6 +186,7 @@
|
||||
body_descriptors[entry] = descriptor.default_value // Species datums have initial default value.
|
||||
else
|
||||
body_descriptors[entry] = CLAMP(last_descriptors[entry], 1, LAZYLEN(descriptor.standalone_value_descriptors))
|
||||
character.descriptors = body_descriptors
|
||||
|
||||
if (copy_flavour)
|
||||
character.flavor_texts["general"] = flavor_texts["general"]
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/mob/living/carbon/human/proc/transform_into_other_human(var/mob/living/carbon/human/character, var/copy_name, var/copy_flavour = TRUE, var/convert_to_prosthetics = FALSE)
|
||||
/*
|
||||
name, nickname, flavour, OOC notes
|
||||
gender, sex
|
||||
custom species name, custom bodytype, weight, scale, scaling center, sound type, sound freq
|
||||
custom say verbs
|
||||
ears, wings, tail, hair, facial hair
|
||||
ears colors, wings colors, tail colors
|
||||
body color, prosthetics (if they're a protean) (convert to DSI if protean and not prosthetic), eye color, hair color etc
|
||||
markings
|
||||
custom synth markings toggle, custom synth color toggle
|
||||
digitigrade
|
||||
blood color
|
||||
*/
|
||||
if (copy_name)
|
||||
name = character.name
|
||||
nickname = character.nickname
|
||||
gender = character.gender
|
||||
identifying_gender = character.identifying_gender
|
||||
|
||||
r_eyes = character.r_eyes
|
||||
g_eyes = character.g_eyes
|
||||
b_eyes = character.b_eyes
|
||||
h_style = character.h_style
|
||||
r_hair = character.r_hair
|
||||
g_hair = character.g_hair
|
||||
b_hair = character.b_hair
|
||||
r_grad = character.r_grad
|
||||
g_grad = character.g_grad
|
||||
b_grad = character.b_grad
|
||||
f_style = character.f_style
|
||||
r_facial = character.r_facial
|
||||
g_facial = character.g_facial
|
||||
b_facial = character.b_facial
|
||||
r_skin = character.r_skin
|
||||
g_skin = character.g_skin
|
||||
b_skin = character.b_skin
|
||||
s_tone = character.s_tone
|
||||
h_style = character.h_style
|
||||
grad_style = character.grad_style
|
||||
f_style = character.f_style
|
||||
grad_style = character.grad_style
|
||||
b_type = character.b_type
|
||||
synth_color = character.synth_color
|
||||
r_synth = character.r_synth
|
||||
g_synth = character.g_synth
|
||||
b_synth = character.b_synth
|
||||
synth_markings = character.synth_markings
|
||||
|
||||
ear_style = character.ear_style
|
||||
r_ears = character.r_ears
|
||||
b_ears = character.b_ears
|
||||
g_ears = character.g_ears
|
||||
r_ears2 = character.r_ears2
|
||||
b_ears2 = character.b_ears2
|
||||
g_ears2 = character.g_ears2
|
||||
r_ears3 = character.r_ears3
|
||||
b_ears3 = character.b_ears3
|
||||
g_ears3 = character.g_ears3
|
||||
|
||||
tail_style = character.tail_style
|
||||
r_tail = character.r_tail
|
||||
b_tail = character.b_tail
|
||||
g_tail = character.g_tail
|
||||
r_tail2 = character.r_tail2
|
||||
b_tail2 = character.b_tail2
|
||||
g_tail2 = character.g_tail2
|
||||
r_tail3 = character.r_tail3
|
||||
b_tail3 = character.b_tail3
|
||||
g_tail3 = character.g_tail3
|
||||
|
||||
wing_style = character.wing_style
|
||||
r_wing = character.r_wing
|
||||
b_wing = character.b_wing
|
||||
g_wing = character.g_wing
|
||||
r_wing2 = character.r_wing2
|
||||
b_wing2 = character.b_wing2
|
||||
g_wing2 = character.g_wing2
|
||||
r_wing3 = character.r_wing3
|
||||
b_wing3 = character.b_wing3
|
||||
g_wing3 = character.g_wing3
|
||||
|
||||
|
||||
var/bodytype = character.species?.get_bodytype()
|
||||
|
||||
if (convert_to_prosthetics) //should only really be run for proteans
|
||||
for(var/name in BP_ALL)
|
||||
var/obj/item/organ/external/I = character.organs_by_name[name]
|
||||
var/obj/item/organ/external/O = organs_by_name[name]
|
||||
if(O)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
O.robotize(I.model)
|
||||
else
|
||||
var/dsi_company = GLOB.dsi_to_species[bodytype]
|
||||
if (!dsi_company)
|
||||
dsi_company = "DSI - Synthetic"
|
||||
O.robotize(dsi_company)
|
||||
|
||||
for(var/N in character.organs_by_name)
|
||||
var/obj/item/organ/external/O = organs_by_name[N]
|
||||
var/obj/item/organ/external/I = character.organs_by_name[N]
|
||||
O.markings = I.markings.Copy()
|
||||
|
||||
markings_len = character.markings_len
|
||||
|
||||
descriptors = character.descriptors?.Copy()
|
||||
|
||||
if (copy_flavour)
|
||||
flavor_texts = character.flavor_texts?.Copy()
|
||||
|
||||
weight = character.weight
|
||||
weight_gain = character.weight_gain
|
||||
weight_loss = character.weight_loss
|
||||
fuzzy = character.fuzzy
|
||||
offset_override = character.offset_override //CHOMPEdit
|
||||
voice_freq = character.voice_freq
|
||||
character.resize(character.size_multiplier, animate = TRUE, ignore_prefs = TRUE)
|
||||
voice_sounds_list = character.voice_sounds_list
|
||||
|
||||
species?.blood_color = character.species?.blood_color
|
||||
|
||||
dna?.base_species = bodytype
|
||||
species?.base_species = bodytype
|
||||
species?.vanity_base_fit = bodytype
|
||||
if (istype(species, /datum/species/shapeshifter))
|
||||
wrapped_species_by_ref["\ref[src]"] = bodytype
|
||||
|
||||
custom_species = character.custom_species
|
||||
custom_say = character.custom_say
|
||||
custom_ask = character.custom_ask
|
||||
custom_whisper = character.custom_whisper
|
||||
custom_exclaim = character.custom_exclaim
|
||||
|
||||
digitigrade = character.digitigrade
|
||||
|
||||
dna?.ResetUIFrom(src)
|
||||
force_update_limbs()
|
||||
regenerate_icons()
|
||||
+5
@@ -180,6 +180,11 @@
|
||||
/mob/living/simple_mob/protean_blob/isSynthetic()
|
||||
return TRUE // yup
|
||||
|
||||
/mob/living/simple_mob/protean_blob/get_available_emotes()
|
||||
var/list/fulllist = global._robot_default_emotes.Copy()
|
||||
fulllist |= global._human_default_emotes //they're living nanites, they can make whatever sounds they want
|
||||
return fulllist
|
||||
|
||||
/mob/living/simple_mob/protean_blob/Stat()
|
||||
..()
|
||||
if(humanform)
|
||||
|
||||
+77
-2
@@ -130,12 +130,81 @@
|
||||
to_chat(caller, "<span class='notify'>You begin to reassemble. You will need to remain still.</span>")
|
||||
caller.visible_message("<span class='notify'>[caller] rapidly contorts and shifts!</span>", "<span class='danger'>You begin to reassemble.</span>")
|
||||
if(do_after(caller, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
if(client.prefs) //Make sure we didn't d/c
|
||||
if(caller.client.prefs) //Make sure we didn't d/c
|
||||
var/obj/item/weapon/rig/protean/Rig = species?:OurRig
|
||||
caller.client.prefs.vanity_copy_to(caller, FALSE, flavour, oocnotes, TRUE)
|
||||
caller.client.prefs.vanity_copy_to(src, FALSE, flavour, oocnotes, TRUE)
|
||||
species?:OurRig = Rig //Get a reference to our Rig and put it back after reassembling
|
||||
caller.visible_message("<span class='notify'>[caller] adopts a new form!</span>", "<span class='danger'>You have reassembled.</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/nano_copy_body()
|
||||
set name = "Copy Form"
|
||||
set desc = "If you are aggressively grabbing someone, with their consent, you can turn into a copy of them. (Without their name)."
|
||||
set category = "Abilities"
|
||||
set hidden = 1
|
||||
var/mob/living/caller = src
|
||||
if(temporary_form)
|
||||
caller = temporary_form
|
||||
|
||||
var/grabbing_but_not_enough
|
||||
var/mob/living/carbon/human/victim = null
|
||||
for(var/obj/item/weapon/grab/G in caller)
|
||||
if(G.state < GRAB_AGGRESSIVE)
|
||||
grabbing_but_not_enough = TRUE
|
||||
return
|
||||
else
|
||||
victim = G.affecting
|
||||
if (!victim)
|
||||
if (grabbing_but_not_enough)
|
||||
to_chat(caller, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
else
|
||||
to_chat(caller, "<span class='notice'>You need to be aggressively grabbing someone before you can copy their form.</span>")
|
||||
return
|
||||
if (!istype(victim))
|
||||
to_chat(caller, "<span class='warning'>You can only perform this on human mobs!</span>")
|
||||
return
|
||||
if (!victim.client)
|
||||
to_chat(caller, "<span class='notice'>The person you try this on must have a client!</span>")
|
||||
return
|
||||
|
||||
|
||||
to_chat(caller, "<span class='notice'>Waiting for other person's consent.</span>")
|
||||
var/consent = tgui_alert(victim, "Allow [src] to copy what you look like?", "Consent", list("Yes", "No"))
|
||||
if (consent != "Yes")
|
||||
to_chat(caller, "<span class='notice'>They declined your request.</span>")
|
||||
return
|
||||
|
||||
var/input = tgui_alert(caller,{"Copy [victim]'s flavourtext?"},"Copy Form",list("Yes","No","Cancel"))
|
||||
if(input == "Cancel" || !input)
|
||||
return
|
||||
var/flavour = 0
|
||||
if(input == "Yes")
|
||||
flavour = 1
|
||||
|
||||
var/checking = FALSE
|
||||
for(var/obj/item/weapon/grab/G in caller)
|
||||
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
|
||||
checking = TRUE
|
||||
if (!checking)
|
||||
to_chat(caller, "<span class='warning'>You lost your grip on [victim]!</span>")
|
||||
return
|
||||
|
||||
to_chat(caller, "<span class='notify'>You begin to reassemble into [victim]. You will need to remain still.</span>")
|
||||
caller.visible_message("<span class='notify'>[caller] rapidly contorts and shifts!</span>", "<span class='danger'>You begin to reassemble into [victim].</span>")
|
||||
if(do_after(caller, 40,exclusive = TASK_ALL_EXCLUSIVE))
|
||||
checking = FALSE
|
||||
for(var/obj/item/weapon/grab/G in caller)
|
||||
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
|
||||
checking = TRUE
|
||||
if (!checking)
|
||||
to_chat(caller, "<span class='warning'>You lost your grip on [victim]!</span>")
|
||||
return
|
||||
if(caller.client) //Make sure we didn't d/c
|
||||
var/obj/item/weapon/rig/protean/Rig = species?:OurRig
|
||||
transform_into_other_human(victim, FALSE, flavour, TRUE)
|
||||
species?:OurRig = Rig //Get a reference to our Rig and put it back after reassembling
|
||||
caller.visible_message("<span class='notify'>[caller] adopts the form of [victim]!</span>", "<span class='danger'>You have reassembled into [victim].</span>")
|
||||
|
||||
////
|
||||
// Storing metal
|
||||
////
|
||||
@@ -491,4 +560,10 @@
|
||||
icon_state = "latch"
|
||||
to_call = /mob/living/carbon/human/proc/nano_latch
|
||||
|
||||
/obj/effect/protean_ability/copy_form
|
||||
ability_name = "Copy Form"
|
||||
desc = "If you are aggressively grabbing someone, with their consent, you can turn into a copy of them. (Without their name)."
|
||||
icon_state = "copy_form"
|
||||
to_call = /mob/living/carbon/human/proc/nano_copy_body
|
||||
|
||||
#undef PER_LIMB_STEEL_COST
|
||||
|
||||
+1
@@ -95,6 +95,7 @@
|
||||
/mob/living/carbon/human/proc/nano_metalnom,
|
||||
/mob/living/carbon/human/proc/nano_blobform,
|
||||
/mob/living/carbon/human/proc/nano_rig_transform,
|
||||
/mob/living/carbon/human/proc/nano_copy_body,
|
||||
/mob/living/carbon/human/proc/appearance_switch,
|
||||
/mob/living/carbon/human/proc/nano_latch,
|
||||
/mob/living/proc/set_size,
|
||||
|
||||
Reference in New Issue
Block a user