diff --git a/code/game/turf.dm b/code/game/turf.dm index ca8444f4415..44e4eda9ddf 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -644,19 +644,21 @@ user << "\blue Prying outer sheath off." playsound(src.loc, 'Crowbar.ogg', 100, 1) sleep(100) - if ((user.loc == T && user.equipped() == W)) - user << "\blue You removed the outer sheath." - dismantle_wall() - return + if(src) + if ((user.loc == T && user.equipped() == W)) + user << "\blue You removed the outer sheath." + dismantle_wall() + return else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill)) var/turf/T = user.loc user << "\blue You begin to drill though, this will take some time." sleep(200) - if ((user.loc == T && user.equipped() == W)) - user << "\blue Your drill tears though the reinforced plating." - dismantle_wall() - return + if(src) + if ((user.loc == T && user.equipped() == W)) + user << "\blue Your drill tears though the reinforced plating." + dismantle_wall() + return else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state)) var/turf/T = user.loc diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 277d6e5ec30..01aaaa8f4f5 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -53,7 +53,6 @@ // Debug verbs += /client/proc/debug_variables verbs += /client/proc/cmd_modify_ticker_variables - verbs += /client/proc/toggleadminhelpsound // Admin helpers verbs += /client/proc/toggle_view_range // Admin game intrusion @@ -65,6 +64,7 @@ verbs += /client/proc/jumptomob verbs += /client/proc/jumptoturf verbs += /client/proc/jumptocoord + verbs += /client/proc/cmd_admin_delete verbs += /client/proc/cmd_admin_add_freeform_ai_law verbs += /client/proc/cmd_admin_rejuvenate verbs += /client/proc/cmd_admin_drop_everything @@ -121,6 +121,8 @@ //Moderator if (holder.level >= 0) + verbs += /obj/admins/proc/announce + verbs += /obj/admins/proc/startnow verbs += /obj/admins/proc/toggleAI //Toggle the AI verbs += /obj/admins/proc/toggleenter //Toggle enterting // verbs += /obj/admins/proc/toggleguests //Toggle guests entering @@ -136,8 +138,6 @@ verbs += /client/proc/cmd_admin_pm_panel verbs += /client/proc/cmd_admin_subtle_message verbs += /client/proc/warn - verbs += /obj/admins/proc/announce - verbs += /obj/admins/proc/startnow verbs += /client/proc/dsay verbs += /client/proc/admin_play verbs += /client/proc/admin_observe @@ -196,6 +196,7 @@ verbs += /client/proc/toggleprayers verbs += /client/proc/deadmin_self verbs += /client/proc/tension_report + verbs += /client/proc/toggleadminhelpsound verbs += /proc/possess verbs += /proc/release verbs += /client/proc/admin_deny_shuttle diff --git a/code/modules/food/food.dm b/code/modules/food/food.dm index d778b8f40f5..33322a3121a 100644 --- a/code/modules/food/food.dm +++ b/code/modules/food/food.dm @@ -840,12 +840,13 @@ if(!reagents.total_volume) var/mob/M = usr var/obj/item/weapon/paper/paper = locate() in src - M.visible_message( \ - "\blue [M] takes a piece of paper from the cookie!", \ - "\blue You take a piece of paper from the cookie! Read it!" \ - ) - M.put_in_hand(paper) - paper.add_fingerprint(M) + if(paper) + M.visible_message( \ + "\blue [M] takes a piece of paper from the cookie!", \ + "\blue You take a piece of paper from the cookie! Read it!" \ + ) + M.put_in_hand(paper) + paper.add_fingerprint(M) /obj/item/weapon/reagent_containers/food/snacks/badrecipe name = "Burned mess" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9f88a62a75c..f899f596b0b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2425,7 +2425,7 @@ It can still be worn/put on as normal. var/obj/item/device/pda/pda = wear_id var/obj/item/weapon/card/id/id = wear_id if (istype(pda)) - if (pda.id) + if (pda.id && istype(pda.id, /obj/item/weapon/card/id)) . = pda.id.assignment else . = pda.ownjob diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index b68d9f07619..7f887d4215b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -89,6 +89,8 @@ /obj/item/weapon/grab/proc/s_click(obj/screen/S as obj) + if (!affecting) + return if (assailant.next_move > world.time) return if ((!( assailant.canmove ) || assailant.lying)) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 54ac7295b6d..9575db4a923 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -545,6 +545,8 @@ datum/preferences proc/process_link(mob/user, list/link_tags) + if(!usr) + return if(link_tags["occ"]) if(link_tags["cancel"]) user << browse(null, "window=\ref[user]occupation") diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 4c186fa7b0b..2ec671495d5 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -876,18 +876,19 @@ malfai.malfhack = src malfai.malfhacking = 1 sleep(600) - if (!src.aidisabled) - malfai.malfhack = null - malfai.malfhacking = 0 - if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) - ticker.mode:apcs++ - if(usr:parent) - src.malfai = usr:parent - else - src.malfai = usr - malfai << "Hack complete. The APC is now under your exclusive control." - updateicon() + if(src) + if (!src.aidisabled) + malfai.malfhack = null + malfai.malfhacking = 0 + if (ticker.mode.config_tag == "malfunction") + if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + ticker.mode:apcs++ + if(usr:parent) + src.malfai = usr:parent + else + src.malfai = usr + malfai << "Hack complete. The APC is now under your exclusive control." + updateicon() else if (href_list["occupyapc"]) malfoccupy(usr)