Revert "fixes various bugs and runtimes"

This reverts commit 9860480e91.
This commit is contained in:
DragonTrance
2021-03-18 11:19:37 -07:00
parent 9860480e91
commit 11a41d1bc1
7 changed files with 59 additions and 59 deletions
+23 -10
View File
@@ -390,6 +390,7 @@ 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)
@@ -410,17 +411,27 @@ 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, "<b>You are the [display_rank].</b>")
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, "<b>You are the [display_rank].</b>")
to_chat(M, "<b>As the [display_rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>")
to_chat(M, "<b>To speak on your departments radio, use the :h button. To see others, look closely at your headset.</b>")
if(job.req_admin_notify)
@@ -430,14 +441,16 @@ SUBSYSTEM_DEF(job)
if(CONFIG_GET(number/minimal_access_threshold))
to_chat(M, "<span class='notice'><B>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.</B></span>")
SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()
if(ishuman(H))
var/mob/living/carbon/human/wageslave = H
to_chat(M, "<b><span class = 'big'>Your account ID is [wageslave.account_id]</span></b>")
to_chat(M, "<b><span class = 'notice'>You do not have a pin, can set your pin at a ATM.</b>")
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
+7 -8
View File
@@ -36,7 +36,7 @@
var/buckle_message_cooldown = 0
var/fingerprintslast
var/list/filter_data = list() //For handling persistent filters
var/list/filter_data //For handling persistent filters
var/datum/component/orbiter/orbiters
@@ -861,15 +861,14 @@ Proc for attack log creation, because really why not
filters += filter(arglist(arguments))
/atom/movable/proc/get_filter(name)
if(filter_data)
if(filter_data[name]) return filters[filter_data.Find(name)]
if(filter_data && filter_data[name])
return filters[filter_data.Find(name)]
/atom/movable/proc/remove_filter(name)
if(filter_data)
if(filter_data[name])
filter_data -= name
update_filters()
return TRUE
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)
+4 -4
View File
@@ -31,11 +31,11 @@
// Laughin' Peas
/obj/item/seeds/peas/laugh
name = "pack of laughing peas"
desc = "These seeds give off a very soft purple glow.. they should grow into Laughing Peas."
name = "pack of laughin' peas"
desc = "These seeds give off a very soft purple glow.. they should grow into Laughin' Peas."
icon_state = "seed-laughpeas"
species = "laughpeas"
plantname = "Laughing Peas"
plantname = "Laughin' 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 laughing peas"
name = "pod of laughin' peas"
desc = "Ridens Cicer, guaranteed to improve your mood dramatically upon consumption!"
icon_state = "laughpeas"
filling_color = "#ee7bee"
+1 -1
View File
@@ -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 (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"])
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"])
O.forceMove(drop_location())
break
+1 -1
View File
@@ -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, FALSE)
return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
/mob/proc/equip_to_slot_or_store(obj/item/W, slot)
return equip_to_slot_if_possible(W, slot, FALSE, TRUE, FALSE, TRUE, TRUE)
@@ -2,9 +2,8 @@ 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)
var/list/bank_accounts = list() //List of normal accounts (not department accounts)
@@ -1,50 +1,39 @@
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, datum/job/job, joined_late)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, backpackstuffs)
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
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
for(var/i in the_mob.client.prefs.chosen_gear)
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 //If the player's not supposed to equip this because they lack the job
continue
if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist))
continue //how the fuck
continue
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(!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)
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.
/datum/controller/subsystem/job/proc/FreeRole(rank)
if(!rank)