From 7169e5ac6776002f75327b456cc7e72ed9a756bc Mon Sep 17 00:00:00 2001 From: Werner Date: Sun, 14 Jul 2019 21:55:42 +0200 Subject: [PATCH] Various Bugfixes (#6720) Fixes #6520 Fixes #6114 Fixes #5349 --- code/game/jobs/job/job.dm | 6 ++- code/modules/client/client defines.dm | 2 + code/modules/client/client procs.dm | 16 ++++--- code/modules/mob/abstract/new_player/login.dm | 3 +- code/modules/mob/abstract/unauthed/login.dm | 4 +- code/modules/mob/login.dm | 4 +- code/modules/multiz/structures.dm | 3 ++ html/changelogs/arrow768-bugfixes.yml | 43 +++++++++++++++++++ 8 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 html/changelogs/arrow768-bugfixes.yml diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 7641ee79641..420a57e8010 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -200,6 +200,8 @@ if(allow_backbag_choice) var/use_job_specific = H.backbag_style == 1 switch(H.backbag) + if (1) + back = null if (2) back = use_job_specific ? backpack : /obj/item/weapon/storage/backpack if (3) @@ -212,13 +214,15 @@ back = use_job_specific ? messengerbag : /obj/item/weapon/storage/backpack/messenger else back = backpack //Department backpack - equip_item(H, back, slot_back) + if(back) + equip_item(H, back, slot_back) if(istype(H.back,/obj/item/weapon/storage/backpack)) var/obj/item/weapon/storage/backpack/B = H.back B.autodrobe_no_remove = TRUE /datum/outfit/job/equip(mob/living/carbon/human/H, visualsOnly = FALSE) + back = null //Nulling the backpack here, since we already equipped the backpack in pre_equip if(box) var/spawnbox = box backpack_contents.Insert(1, spawnbox) // Box always takes a first slot in backpack diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 58cf4196ace..c2cae0f6a74 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -72,4 +72,6 @@ var/obj/screen/plane_master/parallax_dustmaster/parallax_dustmaster = null var/obj/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null + var/initialized = FALSE + var/authed = TRUE \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 073c1045620..3b77181f8aa 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -337,7 +337,6 @@ clients += src directory[ckey] = src - if (LAZYLEN(config.client_blacklist_version)) var/client_version = "[byond_version].[byond_build]" if (client_version in config.client_blacklist_version) @@ -357,11 +356,10 @@ //Do auth shit else . = ..() - src.InitPerfs() src.InitClient() + src.InitPrefs() -/client/proc/InitPerfs() - +/client/proc/InitPrefs() //preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum) prefs = preferences_datums[ckey] if(!prefs) @@ -374,6 +372,8 @@ prefs.last_id = computer_id //these are gonna be used for banning /client/proc/InitClient() + if(initialized) + return to_chat(src, "If the title screen is black, resources are still downloading. Please be patient until the title screen appears.") //Admin Authorisation @@ -436,9 +436,11 @@ check_ip_intel() - ////////////// - //DISCONNECT// - ////////////// + initialized = TRUE + +////////////// +//DISCONNECT// +////////////// /client/Del() ticket_panels -= src if(holder) diff --git a/code/modules/mob/abstract/new_player/login.dm b/code/modules/mob/abstract/new_player/login.dm index dca0aa27fa4..a1ff033bd93 100644 --- a/code/modules/mob/abstract/new_player/login.dm +++ b/code/modules/mob/abstract/new_player/login.dm @@ -25,7 +25,8 @@ var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled /mob/abstract/new_player/Login() - client.InitPerfs() + client.InitClient() + client.InitPrefs() update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying to_chat(src, "
Game ID:
[game_id]
") diff --git a/code/modules/mob/abstract/unauthed/login.dm b/code/modules/mob/abstract/unauthed/login.dm index dfecec918fa..85f34770eea 100644 --- a/code/modules/mob/abstract/unauthed/login.dm +++ b/code/modules/mob/abstract/unauthed/login.dm @@ -44,8 +44,8 @@ // If mob exists for that ckey, then BYOND will transfer client to it. if(istype(c.mob, /mob/abstract/unauthed)) c.mob = new /mob/abstract/new_player() // Else we just treat them as new player - c.InitPerfs() // We init pers just in case mob transfer didn't - c.InitClient() // And now we shal continue client initilization (permissions and stuff) + c.InitClient() // And now we shall continue client initilization (permissions and stuff) + c.InitPrefs() // We init prefs just in case mob transfer didn't unauthed -= token /mob/abstract/unauthed/Topic(href, href_list) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index fb1d32934b7..0e907da449c 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -24,7 +24,8 @@ log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).",ckey=key_name(src)) /mob/Login() - client.InitPerfs() // Init perfs in case they wasn't initilized + client.InitClient() + client.InitPrefs() // Init perfs in case they wasn't initilized player_list |= src update_Login_details() SSfeedback.update_status() @@ -53,3 +54,4 @@ MOB_STOP_THINKING(src) update_client_color() + testing("mob_login - end") diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 9fbea3470aa..cb759b67a1f 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -136,6 +136,9 @@ if(istype(target_ladder, target_down)) direction = DOWN if(!LAD.CanZPass(M, direction)) + to_chat(M, "\The [LAD] is blocking \the [src].") + return FALSE + if(!T.CanZPass(M, direction)) to_chat(M, "\The [T] is blocking \the [src].") return FALSE for(var/atom/A in T) diff --git a/html/changelogs/arrow768-bugfixes.yml b/html/changelogs/arrow768-bugfixes.yml new file mode 100644 index 00000000000..d9ef3b4e70d --- /dev/null +++ b/html/changelogs/arrow768-bugfixes.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Arrow768 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "You can no longery defy the laws of physics by climbing up through solid floors with the use of a ladder" + - bugfix: "You will no longer spawn with a backpack if you have \"nothing\" selected in your loadout." + - bugfix: "You no longer have to reload your char slot if you spawn in with species restricted gear."