mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge pull request #6468 from tigercat2000/job_refactor_tg
Ported /tg/'s outfit datums, refactored job controller to support them
This commit is contained in:
@@ -132,7 +132,6 @@
|
||||
job = myjob.title
|
||||
mind.assigned_role = job
|
||||
myjob.equip(src)
|
||||
myjob.apply_fingerprints(T)
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/reset()
|
||||
walk(src, 0)
|
||||
@@ -193,7 +192,6 @@
|
||||
for(var/obj/item/W in T)
|
||||
qdel(W)
|
||||
T.myjob.equip(T)
|
||||
T.myjob.apply_fingerprints(T)
|
||||
T.doSetup(alt_title)
|
||||
|
||||
var/shouldDoppel = input("Do you want the SNPC to disguise themself as a crewmember?") as anything in list("Yes", "No")
|
||||
|
||||
@@ -615,3 +615,17 @@
|
||||
return 1
|
||||
|
||||
return 0 //Unsupported slot
|
||||
|
||||
/mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE)
|
||||
var/datum/outfit/O = null
|
||||
|
||||
if(ispath(outfit))
|
||||
O = new outfit
|
||||
else
|
||||
O = outfit
|
||||
if(!istype(O))
|
||||
return 0
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
return O.equip(src, visualsOnly)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
message = replacetext(message, "s", stutter("ss"))
|
||||
return message
|
||||
|
||||
/datum/species/plasmaman/equip(var/mob/living/carbon/human/H)
|
||||
/datum/species/plasmaman/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
// Unequip existing suits and hats.
|
||||
H.unEquip(H.wear_suit)
|
||||
H.unEquip(H.head)
|
||||
|
||||
@@ -439,7 +439,10 @@
|
||||
/datum/species/proc/say_filter(mob/M, message, datum/language/speaking)
|
||||
return message
|
||||
|
||||
/datum/species/proc/equip(var/mob/living/carbon/human/H)
|
||||
/datum/species/proc/before_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
return
|
||||
|
||||
/datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
return
|
||||
|
||||
/datum/species/proc/can_understand(var/mob/other)
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
newname += pick(vox_name_syllables)
|
||||
return capitalize(newname)
|
||||
|
||||
/datum/species/vox/equip(var/mob/living/carbon/human/H)
|
||||
/datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
if(H.mind.assigned_role != "Clown" && H.mind.assigned_role != "Mime")
|
||||
H.unEquip(H.wear_mask)
|
||||
H.unEquip(H.l_hand)
|
||||
@@ -740,7 +740,7 @@
|
||||
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
|
||||
..()
|
||||
|
||||
/datum/species/grey/equip(var/mob/living/carbon/human/H)
|
||||
/datum/species/grey/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
var/speech_pref = H.client.prefs.speciesprefs
|
||||
if(speech_pref)
|
||||
H.mind.speech_span = "wingdings"
|
||||
|
||||
+12
-16
@@ -231,22 +231,18 @@
|
||||
//Mob can equip. Equip it.
|
||||
equip_to_slot_or_del(W, slot)
|
||||
else
|
||||
//Mob can't equip it. Put it in a bag B.
|
||||
// Do I have a backpack?
|
||||
var/obj/item/weapon/storage/B
|
||||
if(istype(back,/obj/item/weapon/storage))
|
||||
//Mob is wearing backpack
|
||||
B = back
|
||||
else
|
||||
//not wearing backpack. Check if player holding plastic bag
|
||||
B=is_in_hands(/obj/item/weapon/storage/bag/plasticbag)
|
||||
if(!B) //If not holding plastic bag, give plastic bag
|
||||
B=new /obj/item/weapon/storage/bag/plasticbag(null) // Null in case of failed equip.
|
||||
if(!put_in_hands(B))
|
||||
return // Bag could not be placed in players hands. I don't know what to do here...
|
||||
//Now, B represents a container we can insert W into.
|
||||
B.handle_item_insertion(W,1)
|
||||
return B
|
||||
//Mob can't equip it. Put it their backpack or toss it on the floor
|
||||
if(istype(back, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = back
|
||||
//Now, B represents a container we can insert W into.
|
||||
S.handle_item_insertion(W,1)
|
||||
return S
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
W.forceMove(T)
|
||||
return T
|
||||
|
||||
|
||||
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
|
||||
var/list/slot_equipment_priority = list( \
|
||||
|
||||
Reference in New Issue
Block a user