mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Alright probably final fix to new ling transform woop dee doo
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
#define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob
|
#define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob
|
||||||
|
|
||||||
var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
|
var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
|
||||||
|
var/list/slots = list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store")
|
||||||
|
var/list/slot2slot = list("head" = slot_head, "wear_mask" = slot_wear_mask, "back" = slot_back, "wear_suit" = slot_wear_suit, "w_uniform" = slot_w_uniform, "shoes" = slot_shoes, "belt" = slot_belt, "gloves" = slot_gloves, "glasses" = slot_glasses, "ears" = slot_ears, "wear_id" = slot_wear_id, "s_store" = slot_s_store)
|
||||||
|
var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mask" = /obj/item/clothing/mask/changeling, "back" = /obj/item/changeling, "wear_suit" = /obj/item/clothing/suit/changeling, "w_uniform" = /obj/item/clothing/under/changeling, "shoes" = /obj/item/clothing/shoes/changeling, "belt" = /obj/item/changeling, "gloves" = /obj/item/clothing/gloves/changeling, "glasses" = /obj/item/clothing/glasses/changeling, "ears" = /obj/item/changeling, "wear_id" = /obj/item/changeling, "s_store" = /obj/item/changeling)
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode
|
/datum/game_mode
|
||||||
var/list/datum/mind/changelings = list()
|
var/list/datum/mind/changelings = list()
|
||||||
@@ -359,106 +363,29 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
|||||||
/proc/changeling_transform(var/mob/living/carbon/human/user, var/datum/changelingprofile/chosen_prof)
|
/proc/changeling_transform(var/mob/living/carbon/human/user, var/datum/changelingprofile/chosen_prof)
|
||||||
var/datum/dna/chosen_dna = chosen_prof.dna
|
var/datum/dna/chosen_dna = chosen_prof.dna
|
||||||
user.real_name = chosen_prof.name
|
user.real_name = chosen_prof.name
|
||||||
user.dna = chosen_prof.dna
|
user.dna = chosen_dna
|
||||||
hardset_dna(user, null, null, null, null, chosen_dna.species.type, chosen_dna.features)
|
hardset_dna(user, null, null, null, null, chosen_dna.species.type, chosen_dna.features)
|
||||||
domutcheck(user)
|
domutcheck(user)
|
||||||
updateappearance(user)
|
updateappearance(user)
|
||||||
//var/list/slots = list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store") //just here as a reference.
|
|
||||||
|
|
||||||
//im so sorry
|
//vars hackery. not pretty, but better than the alternative.
|
||||||
if(!user.head && chosen_prof.exists_list["head"])
|
for(var/slot in slots)
|
||||||
var/obj/item/clothing/head/changeling/C = new(user)
|
if((user.vars[slot] && !istype(user.vars[slot], slot2type[slot])) || !chosen_prof.exists_list[slot])
|
||||||
C.appearance = chosen_prof.appearance_list["head"]
|
continue
|
||||||
C.name = chosen_prof.name_list["head"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["head"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["head"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_head)
|
|
||||||
|
|
||||||
if(!user.wear_mask && chosen_prof.exists_list["wear_mask"])
|
var/obj/item/C
|
||||||
var/obj/item/clothing/mask/changeling/C = new(user)
|
if(!user.vars[slot])
|
||||||
C.appearance = chosen_prof.appearance_list["wear_mask"]
|
var/thetype = slot2type[slot]
|
||||||
C.name = chosen_prof.name_list["wear_mask"]
|
C = new thetype(user)
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["wear_mask"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["wear_mask"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_wear_mask)
|
|
||||||
|
|
||||||
if(!user.back && chosen_prof.exists_list["back"])
|
else if(istype(user.vars[slot], slot2type[slot]))
|
||||||
var/obj/item/changeling/C = new(user)
|
C = user.vars[slot]
|
||||||
C.appearance = chosen_prof.appearance_list["back"]
|
|
||||||
C.name = chosen_prof.name_list["back"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["back"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_back)
|
|
||||||
|
|
||||||
if(!user.wear_suit && chosen_prof.exists_list["wear_suit"])
|
C.appearance = chosen_prof.appearance_list[slot]
|
||||||
var/obj/item/clothing/suit/changeling/C = new(user)
|
C.name = chosen_prof.name_list[slot]
|
||||||
C.appearance = chosen_prof.appearance_list["wear_suit"]
|
C.flags_cover = chosen_prof.flags_cover_list[slot]
|
||||||
C.name = chosen_prof.name_list["wear_suit"]
|
C.item_color = chosen_prof.item_color_list[slot]
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["wear_suit"]
|
user.equip_to_slot_or_del(C, slot2slot[slot])
|
||||||
C.item_color = chosen_prof.item_color_list["wear_suit"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_wear_suit)
|
|
||||||
|
|
||||||
if(!user.w_uniform && chosen_prof.exists_list["w_uniform"])
|
|
||||||
var/obj/item/clothing/under/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["w_uniform"]
|
|
||||||
C.name = chosen_prof.name_list["w_uniform"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["w_uniform"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["w_uniform"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_w_uniform)
|
|
||||||
|
|
||||||
if(!user.shoes && chosen_prof.exists_list["shoes"])
|
|
||||||
var/obj/item/clothing/shoes/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["shoes"]
|
|
||||||
C.name = chosen_prof.name_list["shoes"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["shoes"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["shoes"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_shoes)
|
|
||||||
|
|
||||||
if(!user.belt && chosen_prof.exists_list["belt"])
|
|
||||||
var/obj/item/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["belt"]
|
|
||||||
C.name = chosen_prof.name_list["belt"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["belt"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_belt)
|
|
||||||
|
|
||||||
if(!user.gloves && chosen_prof.exists_list["gloves"])
|
|
||||||
var/obj/item/clothing/gloves/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["gloves"]
|
|
||||||
C.name = chosen_prof.name_list["gloves"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["gloves"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["gloves"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_gloves)
|
|
||||||
|
|
||||||
if(!user.glasses && chosen_prof.exists_list["glasses"])
|
|
||||||
var/obj/item/clothing/glasses/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["glasses"]
|
|
||||||
C.name = chosen_prof.name_list["glasses"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["glasses"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["glasses"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_glasses)
|
|
||||||
|
|
||||||
if(!user.ears && chosen_prof.exists_list["ears"])
|
|
||||||
var/obj/item/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["ears"]
|
|
||||||
C.name = chosen_prof.name_list["ears"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["ears"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["ears"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_ears)
|
|
||||||
|
|
||||||
if(!user.wear_id && chosen_prof.exists_list["wear_id"])
|
|
||||||
var/obj/item/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["wear_id"]
|
|
||||||
C.name = chosen_prof.name_list["wear_id"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["wear_id"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["wear_id"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_wear_id)
|
|
||||||
|
|
||||||
if(!user.s_store && chosen_prof.exists_list["s_store"])
|
|
||||||
var/obj/item/changeling/C = new(user)
|
|
||||||
C.appearance = chosen_prof.appearance_list["s_store"]
|
|
||||||
C.name = chosen_prof.name_list["s_store"]
|
|
||||||
C.flags_cover = chosen_prof.flags_cover_list["s_store"]
|
|
||||||
C.item_color = chosen_prof.item_color_list["s_store"]
|
|
||||||
user.equip_to_slot_or_del(C, slot_s_store)
|
|
||||||
|
|
||||||
user.regenerate_icons()
|
user.regenerate_icons()
|
||||||
|
|
||||||
|
|||||||
@@ -7,28 +7,11 @@
|
|||||||
req_human = 1
|
req_human = 1
|
||||||
max_genetic_damage = 3
|
max_genetic_damage = 3
|
||||||
|
|
||||||
//changeling clothing items
|
|
||||||
/obj/item/clothing/head/changeling
|
|
||||||
name = "flesh"
|
|
||||||
flags = NODROP
|
|
||||||
|
|
||||||
/obj/item/clothing/gloves/changeling
|
|
||||||
name = "flesh"
|
|
||||||
flags = NODROP
|
|
||||||
|
|
||||||
/obj/item/clothing/glasses/changeling
|
/obj/item/clothing/glasses/changeling
|
||||||
name = "flesh"
|
name = "flesh"
|
||||||
flags = NODROP
|
flags = NODROP
|
||||||
|
|
||||||
/obj/item/clothing/head/changeling
|
/obj/item/clothing/under/changeling
|
||||||
name = "flesh"
|
|
||||||
flags = NODROP
|
|
||||||
|
|
||||||
/obj/item/clothing/mask/changeling
|
|
||||||
name = "flesh"
|
|
||||||
flags = NODROP
|
|
||||||
|
|
||||||
/obj/item/clothing/shoes/changeling
|
|
||||||
name = "flesh"
|
name = "flesh"
|
||||||
flags = NODROP
|
flags = NODROP
|
||||||
|
|
||||||
@@ -37,19 +20,31 @@
|
|||||||
flags = NODROP
|
flags = NODROP
|
||||||
allowed = list(/obj/item/changeling)
|
allowed = list(/obj/item/changeling)
|
||||||
|
|
||||||
/obj/item/clothing/under/changeling
|
/obj/item/clothing/head/changeling
|
||||||
|
name = "flesh"
|
||||||
|
flags = NODROP
|
||||||
|
/obj/item/clothing/shoes/changeling
|
||||||
|
name = "flesh"
|
||||||
|
flags = NODROP
|
||||||
|
|
||||||
|
/obj/item/clothing/gloves/changeling
|
||||||
|
name = "flesh"
|
||||||
|
flags = NODROP
|
||||||
|
|
||||||
|
/obj/item/clothing/mask/changeling
|
||||||
name = "flesh"
|
name = "flesh"
|
||||||
flags = NODROP
|
flags = NODROP
|
||||||
|
|
||||||
/obj/item/changeling
|
/obj/item/changeling
|
||||||
name = "flesh"
|
name = "flesh"
|
||||||
flags = NODROP
|
flags = NODROP
|
||||||
slot_flags = SLOT_BELT | SLOT_BACK
|
slot_flags = ALL
|
||||||
|
allowed = list(/obj/item/changeling)
|
||||||
|
|
||||||
//Change our DNA to that of somebody we've absorbed.
|
//Change our DNA to that of somebody we've absorbed.
|
||||||
/obj/effect/proc_holder/changeling/transform/sting_action(mob/living/carbon/human/user)
|
/obj/effect/proc_holder/changeling/transform/sting_action(mob/living/carbon/human/user)
|
||||||
var/datum/changeling/changeling = user.mind.changeling
|
var/datum/changeling/changeling = user.mind.changeling
|
||||||
var/datum/changelingprofile/chosen_prof = changeling.select_dna("Select the target DNA: ", "Target DNA")
|
var/datum/changelingprofile/chosen_prof = changeling.select_dna("Select the target DNA: ", "Target DNA", user)
|
||||||
|
|
||||||
if(!chosen_prof)
|
if(!chosen_prof)
|
||||||
return
|
return
|
||||||
@@ -59,13 +54,19 @@
|
|||||||
feedback_add_details("changeling_powers","TR")
|
feedback_add_details("changeling_powers","TR")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/changeling/proc/select_dna(var/prompt, var/title)
|
/datum/changeling/proc/select_dna(var/prompt, var/title, var/mob/living/carbon/user)
|
||||||
var/list/names = list()
|
var/list/names = list("Drop Flesh Disguise")
|
||||||
for(var/datum/changelingprofile/prof in stored_profiles)
|
for(var/datum/changelingprofile/prof in stored_profiles)
|
||||||
names += "[prof.name]"
|
names += "[prof.name]"
|
||||||
|
|
||||||
var/chosen_name = input(prompt, title, null) as null|anything in names
|
var/chosen_name = input(prompt, title, null) as null|anything in names
|
||||||
if(!chosen_name)
|
if(!chosen_name)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(chosen_name == "Drop Flesh Disguise")
|
||||||
|
for(var/slot in slots)
|
||||||
|
if(istype(user.vars[slot], slot2type[slot]))
|
||||||
|
qdel(user.vars[slot])
|
||||||
|
|
||||||
var/datum/changelingprofile/prof = get_dna(chosen_name)
|
var/datum/changelingprofile/prof = get_dna(chosen_name)
|
||||||
return prof
|
return prof
|
||||||
|
|||||||
Reference in New Issue
Block a user