diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm
index 6d77a1f6..391726e3 100644
--- a/code/controllers/subsystem/job.dm
+++ b/code/controllers/subsystem/job.dm
@@ -390,7 +390,6 @@ SUBSYSTEM_DEF(job)
var/datum/job/job = GetJob(rank)
H.job = rank
- equip_loadout(N, H)
//If we joined at roundstart we should be positioned at our workstation
if(!joined_late)
@@ -411,27 +410,17 @@ SUBSYSTEM_DEF(job)
if(!S) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper
log_world("Couldn't find a round start spawn point for [rank]")
SendToLateJoin(H)
-
-
+
if(H.mind)
H.mind.assigned_role = rank
-
- if(job)
- var/new_mob = job.equip(H, null, null, joined_late)
- if(ismob(new_mob))
- H = new_mob
- if(!joined_late)
- N.new_character = H
- else
- M = H
-
- SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()
-
- var/display_rank = rank
- if(M.client && M.client.prefs && M.client.prefs.alt_titles_preferences[rank])
- display_rank = M.client.prefs.alt_titles_preferences[rank]
- to_chat(M, "You are the [display_rank].")
+
if(job)
+ equip_loadout(N, H, job, joined_late) //Handles loadout and job equipping
+
+ var/display_rank = rank
+ if(M.client && M.client.prefs && M.client.prefs.alt_titles_preferences[rank])
+ display_rank = M.client.prefs.alt_titles_preferences[rank]
+ to_chat(M, "You are the [display_rank].")
to_chat(M, "As the [display_rank] you answer directly to [job.supervisors]. Special circumstances may change this.")
to_chat(M, "To speak on your departments radio, use the :h button. To see others, look closely at your headset.")
if(job.req_admin_notify)
@@ -441,16 +430,14 @@ SUBSYSTEM_DEF(job)
if(CONFIG_GET(number/minimal_access_threshold))
to_chat(M, "As this station was initially staffed with a [CONFIG_GET(flag/jobs_have_minimal_access) ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card.")
+ SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()
+
if(ishuman(H))
var/mob/living/carbon/human/wageslave = H
to_chat(M, "Your account ID is [wageslave.account_id]")
to_chat(M, "You do not have a pin, can set your pin at a ATM.")
H.add_memory("Your account ID is [wageslave.account_id].")
- if(job && H)
- job.after_spawn(H, M, joined_late) // note: this happens before the mob has a key! M will always have a client, H might not.
- equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works
-
return H
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 04314dd7..16b97924 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -36,7 +36,7 @@
var/buckle_message_cooldown = 0
var/fingerprintslast
- var/list/filter_data //For handling persistent filters
+ var/list/filter_data = list() //For handling persistent filters
var/datum/component/orbiter/orbiters
@@ -861,14 +861,15 @@ Proc for attack log creation, because really why not
filters += filter(arglist(arguments))
/atom/movable/proc/get_filter(name)
- if(filter_data && filter_data[name])
- return filters[filter_data.Find(name)]
+ if(filter_data)
+ if(filter_data[name]) return filters[filter_data.Find(name)]
/atom/movable/proc/remove_filter(name)
- if(filter_data[name])
- filter_data -= name
- update_filters()
- return TRUE
+ if(filter_data)
+ if(filter_data[name])
+ filter_data -= name
+ update_filters()
+ return TRUE
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
diff --git a/code/modules/hydroponics/grown/peas.dm b/code/modules/hydroponics/grown/peas.dm
index da5f57ce..bdbcd288 100644
--- a/code/modules/hydroponics/grown/peas.dm
+++ b/code/modules/hydroponics/grown/peas.dm
@@ -31,11 +31,11 @@
// Laughin' Peas
/obj/item/seeds/peas/laugh
- name = "pack of laughin' peas"
- desc = "These seeds give off a very soft purple glow.. they should grow into Laughin' Peas."
+ name = "pack of laughing peas"
+ desc = "These seeds give off a very soft purple glow.. they should grow into Laughing Peas."
icon_state = "seed-laughpeas"
species = "laughpeas"
- plantname = "Laughin' Peas"
+ plantname = "Laughing Peas"
product = /obj/item/reagent_containers/food/snacks/grown/laugh
maturation = 7
potency = 10
@@ -53,7 +53,7 @@
/obj/item/reagent_containers/food/snacks/grown/laugh
seed = /obj/item/seeds/peas/laugh
- name = "pod of laughin' peas"
+ name = "pod of laughing peas"
desc = "Ridens Cicer, guaranteed to improve your mood dramatically upon consumption!"
icon_state = "laughpeas"
filling_color = "#ee7bee"
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index 6073fcdf..72603970 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -167,7 +167,7 @@
for (var/obj/T in contents)//Now we find the seed we need to vend
var/obj/item/seeds/O = T
- if (O.plantname == href_list["name"] && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
+ if (sanitize(O.plantname) == sanitize(href_list["name"]) && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
O.forceMove(drop_location())
break
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index bca71db9..e0be7ace 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -260,7 +260,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such.
//Also bypasses equip delay checks, since the mob isn't actually putting it on.
/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
- return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
+ return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE, FALSE)
/mob/proc/equip_to_slot_or_store(obj/item/W, slot)
return equip_to_slot_if_possible(W, slot, FALSE, TRUE, FALSE, TRUE, TRUE)
diff --git a/hyperstation/code/controllers/subsystem/economy.dm b/hyperstation/code/controllers/subsystem/economy.dm
index b69e29c8..282af80e 100644
--- a/hyperstation/code/controllers/subsystem/economy.dm
+++ b/hyperstation/code/controllers/subsystem/economy.dm
@@ -2,8 +2,9 @@ SUBSYSTEM_DEF(economy)
name = "Economy"
wait = 5 MINUTES
init_order = INIT_ORDER_ECONOMY
+ flags = SS_NO_FIRE
runlevels = RUNLEVEL_GAME
var/roundstart_paychecks = 5
var/budget_pool = 35000
var/list/generated_accounts = list()
- var/list/bank_accounts = list() //List of normal accounts (not department accounts)
\ No newline at end of file
+ var/list/bank_accounts = list() //List of normal accounts (not department accounts)
diff --git a/modular_citadel/code/controllers/subsystem/job.dm b/modular_citadel/code/controllers/subsystem/job.dm
index f66cbe81..23dab6f8 100644
--- a/modular_citadel/code/controllers/subsystem/job.dm
+++ b/modular_citadel/code/controllers/subsystem/job.dm
@@ -1,39 +1,50 @@
-/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, backpackstuffs)
+/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, datum/job/job, joined_late)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
+
if(the_mob.client && the_mob.client.prefs && (the_mob.client.prefs.chosen_gear && the_mob.client.prefs.chosen_gear.len))
if(!ishuman(M))//no silicons allowed
return
- for(var/i in the_mob.client.prefs.chosen_gear)
+
+ var/list/queued_to_equip = list() //items the player will equip on their person
+ var/list/queued_for_storage = list() //items that will get stuffed into the player's backpack
+
+ for(var/i in the_mob.client.prefs.chosen_gear) //Prepare our loadouts for creation and equipping
var/datum/gear/G = i
G = GLOB.loadout_items[slot_to_string(initial(G.category))][initial(G.name)]
if(!G)
continue
if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
- continue
+ continue //If the player's not supposed to equip this because they lack the job
if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist))
- continue
+ continue //how the fuck
+ if(G.category == SLOT_IN_BACKPACK || G.blacklist_join_equip)
+ queued_for_storage += G
+ else
+ queued_to_equip += G
+
+ for(var/datum/gear/G in queued_to_equip) //Dress up the player like a doll
var/obj/item/I = new G.path
- if(iscarbon(M) && backpackstuffs && (G.category == SLOT_IN_BACKPACK || G.blacklist_join_equip))
- var/mob/living/carbon/C = M
- var/obj/item/storage/backpack/B = C.back
- if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE))
- I.forceMove(get_turf(C))
- continue
- else if(G.blacklist_join_equip) //Assume we're gonna be put in a backpack and not equipped
- continue
- else if(backpackstuffs && G.category != SLOT_IN_BACKPACK)
- continue
- if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
- if(iscarbon(M))
- var/mob/living/carbon/C = M
- 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.
- I.forceMove(get_turf(C))
- 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(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE))
+ queued_for_storage += G //If the player can't equip the item, queue it for storage
+
+ job.after_spawn(the_mob, M, joined_late)
+ job.equip(M, null, null, joined_late) //Equip the job outfit
+
+ if(iscarbon(M)) //Start storing the items into the player's backpack. They should have one from job.equip
+ var/mob/living/carbon/C = M
+ var/obj/item/storage/backpack/B = C.back
+ if(B)
+ for(var/datum/gear/G in queued_for_storage)
+ var/obj/item/I = new G.path
+ if(SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE))
+ queued_for_storage -= G
+
+ for(var/datum/gear/G in queued_for_storage) //If there isn't a backpack, or if the backpack became full, drop items beneath the player's feet
+ var/obj/item/I = new G.path
+ I.forceMove(M)
/datum/controller/subsystem/job/proc/FreeRole(rank)
if(!rank)