Skip to content

Commit

Permalink
Synthetic Loadout Stuff (#19763)
Browse files Browse the repository at this point in the history
* AIs can now dress up their preview mob.
* Cyborgs now have the cardboard outfit in the loadout again. You can
toggle it by deselecting the job suit and hat options.
* Job suits are now hidden correctly when the job suit is deselected.
  • Loading branch information
Geevies authored Sep 21, 2024
1 parent 8ca6459 commit 75eed55
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
11 changes: 7 additions & 4 deletions code/controllers/subsystems/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,13 @@ SUBSYSTEM_DEF(jobs)
log_loadout("EC/([H]): Abort: invalid arguments.")
return FALSE

switch (job.title)
if ("AI", "Cyborg")
log_loadout("EC/([H]): Abort: synthetic.")
return FALSE
// if it's for their preview mob, let them wear it
// so they can customize their loadout for their hologram
if(!istype(H, /mob/living/carbon/human/dummy/mannequin))
switch (job.title)
if ("AI", "Cyborg")
log_loadout("EC/([H]): Abort: synthetic.")
return FALSE

for(var/thing in prefs.gear)
var/datum/gear/G = gear_datums[thing]
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
H.drop_from_inventory(H.w_uniform)
qdel(H.w_uniform)

if(!(equip_preview_mob & EQUIP_PREVIEW_JOB_UNIFORM) && H.wear_suit && REF(H.wear_suit) != pre_suit_ref)
if(!(equip_preview_mob & EQUIP_PREVIEW_JOB_SUIT) && H.wear_suit && REF(H.wear_suit) != pre_suit_ref)
H.drop_from_inventory(H.wear_suit)
qdel(H.wear_suit)

Expand Down
19 changes: 13 additions & 6 deletions code/game/jobs/job/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@
economic_modifier = 0

/datum/job/cyborg/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
return 1
if(!H)
return FALSE
return TRUE

/datum/job/cyborg/equip_preview(mob/living/carbon/human/H, datum/preferences/prefs, var/alt_title, var/faction_override)
var/equip_preview_mob = prefs.equip_preview_mob

if(equip_preview_mob & EQUIP_PREVIEW_JOB_HAT)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)

if(equip_preview_mob & EQUIP_PREVIEW_JOB_SUIT)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)

/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)
return 1
return TRUE
2 changes: 1 addition & 1 deletion code/modules/mob/abstract/new_player/preferences_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
var/list/leftovers = list()
var/list/used_slots = list()

if((equip_preview_mob & EQUIP_PREVIEW_LOADOUT) && !(previewJob && (equip_preview_mob & EQUIP_PREVIEW_JOB) && (previewJob.type == /datum/job/ai || previewJob.type == /datum/job/cyborg)))
if((equip_preview_mob & EQUIP_PREVIEW_LOADOUT))
SSjobs.EquipCustom(mannequin, previewJob, src, leftovers, null, used_slots)

if((equip_preview_mob & EQUIP_PREVIEW_JOB) && previewJob)
Expand Down
8 changes: 8 additions & 0 deletions html/changelogs/geeves-ai_loadout_fixes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
author: Geeves

delete-after: True

changes:
- rscadd: "AIs can now dress up their preview mob."
- rscadd: "Cyborgs now have the cardboard outfit in the loadout again. You can toggle it by deselecting the job suit and hat options."
- bugfix: "Job suits are now hidden correctly when the job suit is deselected."

0 comments on commit 75eed55

Please sign in to comment.