mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Merge pull request #13252 from timothyteakettle/loadout-loading
qol: looking at loadout equips your loadout items on you instead of job items
This commit is contained in:
@@ -665,7 +665,7 @@ SUBSYSTEM_DEF(job)
|
|||||||
message_admins(msg)
|
message_admins(msg)
|
||||||
CRASH(msg)
|
CRASH(msg)
|
||||||
|
|
||||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE)
|
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE, can_drop = TRUE)
|
||||||
var/mob/the_mob = N
|
var/mob/the_mob = N
|
||||||
if(!the_mob)
|
if(!the_mob)
|
||||||
the_mob = M // cause this doesn't get assigned if player is a latejoiner
|
the_mob = M // cause this doesn't get assigned if player is a latejoiner
|
||||||
@@ -694,9 +694,15 @@ SUBSYSTEM_DEF(job)
|
|||||||
var/mob/living/carbon/C = M
|
var/mob/living/carbon/C = M
|
||||||
var/obj/item/storage/backpack/B = C.back
|
var/obj/item/storage/backpack/B = C.back
|
||||||
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
|
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
|
||||||
I.forceMove(get_turf(C))
|
if(can_drop)
|
||||||
|
I.forceMove(get_turf(C))
|
||||||
|
else
|
||||||
|
qdel(I)
|
||||||
else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
|
else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
|
||||||
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
|
if(can_drop)
|
||||||
|
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
|
||||||
|
else
|
||||||
|
qdel(I)
|
||||||
|
|
||||||
/datum/controller/subsystem/job/proc/FreeRole(rank)
|
/datum/controller/subsystem/job/proc/FreeRole(rank)
|
||||||
if(!rank)
|
if(!rank)
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
/datum/preferences/proc/ShowChoices(mob/user)
|
/datum/preferences/proc/ShowChoices(mob/user)
|
||||||
if(!user || !user.client)
|
if(!user || !user.client)
|
||||||
return
|
return
|
||||||
update_preview_icon(current_tab != 2)
|
update_preview_icon(current_tab)
|
||||||
var/list/dat = list("<center>")
|
var/list/dat = list("<center>")
|
||||||
|
|
||||||
dat += "<a href='?_src_=prefs;preference=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Character Settings</a>"
|
dat += "<a href='?_src_=prefs;preference=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Character Settings</a>"
|
||||||
|
|||||||
@@ -26,7 +26,8 @@
|
|||||||
features = random_features(pref_species?.id, gender)
|
features = random_features(pref_species?.id, gender)
|
||||||
age = rand(AGE_MIN,AGE_MAX)
|
age = rand(AGE_MIN,AGE_MAX)
|
||||||
|
|
||||||
/datum/preferences/proc/update_preview_icon(equip_job = TRUE)
|
/datum/preferences/proc/update_preview_icon(current_tab)
|
||||||
|
var/equip_job = (current_tab != 2)
|
||||||
// Determine what job is marked as 'High' priority, and dress them up as such.
|
// Determine what job is marked as 'High' priority, and dress them up as such.
|
||||||
var/datum/job/previewJob = get_highest_job()
|
var/datum/job/previewJob = get_highest_job()
|
||||||
|
|
||||||
@@ -45,9 +46,13 @@
|
|||||||
mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER))
|
mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER))
|
||||||
copy_to(mannequin, initial_spawn = TRUE)
|
copy_to(mannequin, initial_spawn = TRUE)
|
||||||
|
|
||||||
if(previewJob && equip_job)
|
if(current_tab == 3)
|
||||||
mannequin.job = previewJob.title
|
//give it its loadout if not on the appearance tab
|
||||||
previewJob.equip(mannequin, TRUE, preference_source = parent)
|
SSjob.equip_loadout(parent.mob, mannequin, FALSE, bypass_prereqs = TRUE, can_drop = FALSE)
|
||||||
|
else
|
||||||
|
if(previewJob && equip_job)
|
||||||
|
mannequin.job = previewJob.title
|
||||||
|
previewJob.equip(mannequin, TRUE, preference_source = parent)
|
||||||
|
|
||||||
COMPILE_OVERLAYS(mannequin)
|
COMPILE_OVERLAYS(mannequin)
|
||||||
parent.show_character_previews(new /mutable_appearance(mannequin))
|
parent.show_character_previews(new /mutable_appearance(mannequin))
|
||||||
|
|||||||
Reference in New Issue
Block a user