diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 885754fe492..5751f369226 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -115,7 +115,7 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list( hide_actions_toggle = new hide_actions_toggle.InitialiseIcon(src) - if(mymob.client) + if(mymob.client?.prefs) hide_actions_toggle.locked = mymob.client.prefs.read_preference(/datum/preference/toggle/buttons_locked) hand_slots = list() diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index 134f81f338d..ab636557ba2 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -79,10 +79,9 @@ SUBSYSTEM_DEF(economy) if(fire_counter_for_paycheck >= PAYCHECK_CYCLE_WAIT) bank_account.payday(PAYCHECK_CYCLE_AMOUNT) //SKYRAT EDIT ADDITION END - if(bank_account?.account_job) + if(bank_account?.account_job && !ispath(bank_account.account_job)) temporary_total += (bank_account.account_job.paycheck * STARTING_PAYCHECKS) - if(!istype(bank_account, /datum/bank_account/department)) - station_total += bank_account.account_balance + station_total += bank_account.account_balance //SKYRAT EDIT ADDITION BEGIN if(fire_counter_for_paycheck >= PAYCHECK_CYCLE_WAIT) //30 minutes per each paycheck fire_counter_for_paycheck = 0 diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index 77b02c670eb..de366951121 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -173,7 +173,7 @@ heirloom_type = pick(holder_species.family_heirlooms) else // Our quirk holder's job - var/datum/job/holder_job = human_holder.mind?.assigned_role + var/datum/job/holder_job = human_holder.last_mind?.assigned_role if(holder_job && LAZYLEN(holder_job.family_heirlooms)) heirloom_type = pick(holder_job.family_heirlooms) @@ -203,7 +203,6 @@ if(!family_heirloom) to_chat(quirk_holder, "A wave of existential dread runs over you as you realise your precious family heirloom is missing. Perhaps the Gods will show mercy on your cursed soul?") return - family_heirloom.AddComponent(/datum/component/heirloom, quirk_holder.mind, family_name) return ..() @@ -635,7 +634,7 @@ reagent_instance = new reagent_type() for(var/addiction in reagent_instance.addiction_types) - human_holder.mind.add_addiction_points(addiction, 1000) + human_holder.last_mind?.add_addiction_points(addiction, 1000) var/current_turf = get_turf(quirk_holder) @@ -686,14 +685,14 @@ var/deleted = QDELETED(reagent_instance) var/missing_addiction = FALSE for(var/addiction_type in reagent_instance.addiction_types) - if(!LAZYACCESS(human_holder.mind.active_addictions, addiction_type)) + if(!LAZYACCESS(human_holder.last_mind?.active_addictions, addiction_type)) missing_addiction = TRUE if(deleted || missing_addiction) if(deleted) reagent_instance = new reagent_type() to_chat(quirk_holder, span_danger("You thought you kicked it, but you feel like you're falling back onto bad habits..")) for(var/addiction in reagent_instance.addiction_types) - human_holder.mind.add_addiction_points(addiction, 1000) ///Max that shit out + human_holder.last_mind?.add_addiction_points(addiction, 1000) ///Max that shit out /datum/quirk/item_quirk/junkie/smoker name = "Smoker" diff --git a/code/datums/quirks/neutral.dm b/code/datums/quirks/neutral.dm index d28584444c4..f3b3e9ec83f 100644 --- a/code/datums/quirks/neutral.dm +++ b/code/datums/quirks/neutral.dm @@ -332,7 +332,7 @@ /datum/quirk/item_quirk/photographer/add_unique() var/mob/living/carbon/human/human_holder = quirk_holder var/obj/item/storage/photo_album/personal/photo_album = new(get_turf(human_holder)) - photo_album.persistence_id = "personal_[human_holder.mind.key]" // this is a persistent album, the ID is tied to the account's key to avoid tampering + photo_album.persistence_id = "personal_[human_holder.last_mind?.key]" // this is a persistent album, the ID is tied to the account's key to avoid tampering photo_album.persistence_load() photo_album.name = "[human_holder.real_name]'s photo album" diff --git a/code/datums/saymode.dm b/code/datums/saymode.dm index 2b20aa1ced6..0c3c0785fc8 100644 --- a/code/datums/saymode.dm +++ b/code/datums/saymode.dm @@ -91,6 +91,8 @@ /datum/saymode/mafia/handle_message(mob/living/user, message, datum/language/language) var/datum/mafia_controller/MF = GLOB.mafia_game + if (!MF) + return TRUE var/datum/mafia_role/R = MF.player_role_lookup[user] if(!R || R.team != "mafia") return TRUE diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e82d32c7f58..35c0762ea38 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -275,21 +275,22 @@ return ..() /obj/machinery/autolathe/attackby_secondary(obj/item/weapon, mob/living/user, params) + . = SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN if(busy) balloon_alert(user, "it's busy!") - return TRUE + return if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", weapon)) - return FALSE //returning this as FALSE prevents the screwdriver from being immediately eaten by the autolathe after you screw the panel open/closed. why? don't ask me + return if(machine_stat) - return TRUE + return SECONDARY_ATTACK_CALL_NORMAL if(panel_open) balloon_alert(user, "close the panel first!") - return FALSE + return - return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + return SECONDARY_ATTACK_CALL_NORMAL /obj/machinery/autolathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted) if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal)) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index e700e4959f2..21b53078e0e 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -22,7 +22,8 @@ if(P.use_tool(src, user, 20, volume=50)) to_chat(user, span_notice("You deconstruct the frame.")) var/obj/item/stack/sheet/iron/M = new (drop_location(), 5) - M.add_fingerprint(user) + if (!QDELETED(M)) + M.add_fingerprint(user) qdel(src) return if(1) @@ -86,7 +87,8 @@ state = 2 icon_state = "2" var/obj/item/stack/cable_coil/A = new (drop_location(), 5) - A.add_fingerprint(user) + if (!QDELETED(A)) + A.add_fingerprint(user) return if(istype(P, /obj/item/stack/sheet/glass)) @@ -108,7 +110,8 @@ state = 3 icon_state = "3" var/obj/item/stack/sheet/glass/G = new(drop_location(), 2) - G.add_fingerprint(user) + if (!QDELETED(G)) + G.add_fingerprint(user) return if(P.tool_behaviour == TOOL_SCREWDRIVER) P.play_tool_sound(src) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 8172cf29068..27a80b8761d 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -98,7 +98,8 @@ if(state == 1) to_chat(user, span_notice("You disassemble the frame.")) var/obj/item/stack/sheet/iron/M = new (loc, 5) - M.add_fingerprint(user) + if (!QDELETED(M)) + M.add_fingerprint(user) qdel(src) return if(P.tool_behaviour == TOOL_WRENCH) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index d599c8ebb6c..8d9f30f363f 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -315,7 +315,8 @@ GLOBAL_LIST_EMPTY(cryopod_computers) for(var/obj/item/item_content as anything in mob_occupant) if(!istype(item_content) || HAS_TRAIT(item_content, TRAIT_NODROP)) continue - + if (issilicon(mob_occupant) && istype(item_content, /obj/item/mmi)) + continue // Skyrat Edit Addition - Cryostorage stores items. // Original is just the else statement. if(control_computer) diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index aa2bf8cc736..7c4a19f542a 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -172,7 +172,7 @@ // Add observers who have ghost radio enabled. for(var/mob/dead/observer/M in GLOB.player_list) - if(M.client.prefs.chat_toggles & CHAT_GHOSTRADIO) + if(M.client?.prefs.chat_toggles & CHAT_GHOSTRADIO) receive |= M // Render the message and have everybody hear it. diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm index c2251960838..ad2b829f884 100644 --- a/code/game/objects/effects/proximity.dm +++ b/code/game/objects/effects/proximity.dm @@ -53,6 +53,8 @@ return FALSE . = TRUE + LAZYINITLIST(checkers) + current_range = range var/list/checkers_local = checkers diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 4a0622ff25d..341d4ee94d7 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -286,7 +286,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(!reagents.total_volume) return reagents.expose_temperature(heat, 0.05) - + if(!reagents.total_volume) //may have reacted and gone to 0 after expose_temperature + return var/to_smoke = smoke_all ? (reagents.total_volume * (dragtime / smoketime)) : REAGENTS_METABOLISM var/mob/living/carbon/smoker = loc if(!istype(smoker) || src != smoker.wear_mask) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 6b028aa5745..975ed9fd52e 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -813,7 +813,7 @@ GLOBAL_LIST_EMPTY(PDAs) // Show it to ghosts var/ghost_message = span_name("[owner] PDA Message --> [span_name("[target_text]")]: [signal.format_message()]") for(var/mob/M in GLOB.player_list) - if(isobserver(M) && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA)) + if(isobserver(M) && (M.client?.prefs.chat_toggles & CHAT_GHOSTPDA)) to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]") // Log in the talk log user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]") diff --git a/code/game/objects/items/gift.dm b/code/game/objects/items/gift.dm index 9f944aa63d0..efb527225bd 100644 --- a/code/game/objects/items/gift.dm +++ b/code/game/objects/items/gift.dm @@ -45,10 +45,13 @@ GLOBAL_LIST_EMPTY(possible_gifts) qdel(src) var/obj/item/I = new contains_type(get_turf(M)) - M.visible_message(span_notice("[M] unwraps \the [src], finding \a [I] inside!")) - I.investigate_log("([I.type]) was found in a present by [key_name(M)].", INVESTIGATE_PRESENTS) - M.put_in_hands(I) - I.add_fingerprint(M) + if (!QDELETED(I)) //might contain something like metal rods that might merge with a stack on the ground + M.visible_message(span_notice("[M] unwraps \the [src], finding \a [I] inside!")) + I.investigate_log("([I.type]) was found in a present by [key_name(M)].", INVESTIGATE_PRESENTS) + M.put_in_hands(I) + I.add_fingerprint(M) + else + M.visible_message(span_danger("Oh no! The present that [M] opened had nothing inside it!")) /obj/item/a_gift/proc/get_gift_type() var/gift_type_list = list(/obj/item/sord, diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 17a470721a5..a046fcf4ad9 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -55,7 +55,8 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ use(1) to_chat(user, span_notice("You attach wire to the [name].")) var/obj/item/stack/light_w/new_tile = new(user.loc) - new_tile.add_fingerprint(user) + if (!QDELETED(new_tile)) + new_tile.add_fingerprint(user) return if(istype(W, /obj/item/stack/rods)) var/obj/item/stack/rods/V = W @@ -108,7 +109,8 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ var/obj/item/stack/rods/V = W if (V.get_amount() >= 1 && get_amount() >= 1) var/obj/item/stack/sheet/plasmarglass/RG = new (get_turf(user)) - RG.add_fingerprint(user) + if (!QDELETED(RG)) + RG.add_fingerprint(user) var/replace = user.get_inactive_held_item()==src V.use(1) use(1) diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index 049d26f6423..26c76c8bbbc 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -20,7 +20,8 @@ if (M.use(1)) var/obj/item/L = new /obj/item/stack/tile/light(user.drop_location()) to_chat(user, span_notice("You make a light tile.")) - L.add_fingerprint(user) + if (!QDELETED(L)) + L.add_fingerprint(user) use(1) else to_chat(user, span_warning("You need one iron sheet to finish the light tile!")) @@ -31,7 +32,9 @@ . = ..() var/atom/Tsec = user.drop_location() var/obj/item/stack/cable_coil/CC = new (Tsec, 5) - CC.add_fingerprint(user) + if (!QDELETED(CC)) + CC.add_fingerprint(user) var/obj/item/stack/sheet/glass/G = new (Tsec) - G.add_fingerprint(user) + if (!QDELETED(G)) + G.add_fingerprint(user) use(1) diff --git a/code/game/objects/structures/chess.dm b/code/game/objects/structures/chess.dm index 5dcd7e910de..bdebfa8f9cb 100644 --- a/code/game/objects/structures/chess.dm +++ b/code/game/objects/structures/chess.dm @@ -12,7 +12,8 @@ if(!do_after(user, 0.5 SECONDS, target = src)) return TRUE var/obj/item/stack/sheet/iron/metal_sheets = new (drop_location(), 2) - metal_sheets.add_fingerprint(user) + if (!QDELETED(metal_sheets)) + metal_sheets.add_fingerprint(user) tool.play_tool_sound(src) qdel(src) return TRUE diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index f7e2d64ed47..87275f4c8c7 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -41,7 +41,8 @@ if(W.use_tool(src, user, 40, volume=100)) to_chat(user, span_notice("You slice apart the girder.")) var/obj/item/stack/sheet/iron/M = new (loc, 2) - M.add_fingerprint(user) + if (!QDELETED(M)) + M.add_fingerprint(user) qdel(src) return @@ -240,7 +241,8 @@ state = GIRDER_DISASSEMBLED to_chat(user, span_notice("You disassemble the girder.")) var/obj/item/stack/sheet/iron/M = new (loc, 2) - M.add_fingerprint(user) + if (!QDELETED(M)) + M.add_fingerprint(user) qdel(src) return TRUE diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index e0207876e22..b18766958a4 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -52,7 +52,8 @@ return TRUE to_chat(user, span_notice("You cut apart [src].")) var/obj/item/stack/sheet/plastic/five/P = new(loc) - P.add_fingerprint(user) + if (!QDELETED(P)) + P.add_fingerprint(user) qdel(src) return TRUE diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index d0c28509a2e..55b1bfda727 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -105,10 +105,12 @@ if(W.use_tool(src, user, 40, volume=50)) to_chat(user, span_notice("You disassemble the windoor assembly.")) var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5) - RG.add_fingerprint(user) + if (!QDELETED(RG)) + RG.add_fingerprint(user) if(secure) var/obj/item/stack/rods/R = new (get_turf(src), 4) - R.add_fingerprint(user) + if (!QDELETED(R)) + R.add_fingerprint(user) qdel(src) return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a77cd4fc1a8..b834b086382 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -212,7 +212,8 @@ to_chat(user, span_notice("You begin to disassemble [src]...")) if(I.use_tool(src, user, decon_speed, volume = 75, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount) - G.add_fingerprint(user) + if (!QDELETED(G)) + G.add_fingerprint(user) playsound(src, 'sound/items/Deconstruct.ogg', 50, TRUE) to_chat(user, span_notice("You successfully disassemble [src].")) qdel(src) diff --git a/code/game/turfs/open/floor/catwalk_plating.dm b/code/game/turfs/open/floor/catwalk_plating.dm index b11b0e86181..c786937bc46 100644 --- a/code/game/turfs/open/floor/catwalk_plating.dm +++ b/code/game/turfs/open/floor/catwalk_plating.dm @@ -13,9 +13,6 @@ baseturfs = /turf/open/floor/plating floor_tile = /obj/item/stack/tile/catwalk_tile footstep = FOOTSTEP_CATWALK - barefootstep = FOOTSTEP_CATWALK - clawfootstep = FOOTSTEP_CATWALK - heavyfootstep = FOOTSTEP_CATWALK var/covered = TRUE /turf/open/floor/plating/catwalk_floor/Initialize(mapload) diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm index 2fb7a673631..9ef81e80cdc 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -99,7 +99,7 @@ /obj/machinery/atmospherics/components/binary/crystallizer/attackby_secondary(mob/user) if(!can_interact(user)) - return + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS) update_icon() diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index c01911f77a3..37185531761 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -26,6 +26,8 @@ /// Proc guarantees the account_id possesses a unique number. If it doesn't, it tries to find a unique alternative. It then adds it to the `SSeconomy.bank_accounts_by_id` global list. /datum/bank_account/proc/setup_unique_account_id() + if (!add_to_accounts) + return if(account_id && !SSeconomy.bank_accounts_by_id["[account_id]"]) SSeconomy.bank_accounts_by_id["[account_id]"] = src return //Already unique diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 8ae5943f066..a53cbfc49d1 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -93,7 +93,7 @@ /obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user) var/obj/item/stack/sheet/mineral/wood/WD = new (loc, 4) - if(user) + if(user && !QDELETED(WD)) WD.add_fingerprint(user) dump_box_contents() qdel(src) diff --git a/code/modules/mob/living/silicon/robot/robot_model.dm b/code/modules/mob/living/silicon/robot/robot_model.dm index 6f7d1976449..bcacb74c32c 100644 --- a/code/modules/mob/living/silicon/robot/robot_model.dm +++ b/code/modules/mob/living/silicon/robot/robot_model.dm @@ -124,6 +124,8 @@ /obj/item/robot_model/proc/rebuild_modules() //builds the usable module list from the modules we have var/mob/living/silicon/robot/cyborg = loc + if (!istype(cyborg)) + return var/list/held_modules = cyborg.held_items.Copy() var/active_module = cyborg.module_active cyborg.uneq_all() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 732b7f05906..f59d0592da4 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -655,10 +655,11 @@ if (togglestatus > 0 && togglestatus < 5) if (togglestatus == AI_Z_OFF || AIStatus == AI_Z_OFF) var/turf/T = get_turf(src) - if (AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src - else - SSidlenpcpool.idle_mobs_by_zlevel[T.z] += src + if (T) + if (AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src + else + SSidlenpcpool.idle_mobs_by_zlevel[T.z] += src GLOB.simple_animals[AIStatus] -= src GLOB.simple_animals[togglestatus] += src AIStatus = togglestatus @@ -671,8 +672,8 @@ /mob/living/simple_animal/on_changed_z_level(turf/old_turf, turf/new_turf) ..() - if (AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[old_turf?.z] -= src + if (old_turf && AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[old_turf.z] -= src toggle_ai(initial(AIStatus)) ///This proc is used for adding the swabbale element to mobs so that they are able to be biopsied and making sure holograpic and butter-based creatures don't yield viable cells samples. diff --git a/code/modules/modular_computers/file_system/programs/techweb.dm b/code/modules/modular_computers/file_system/programs/techweb.dm index c2943bd54da..5307dc152fc 100644 --- a/code/modules/modular_computers/file_system/programs/techweb.dm +++ b/code/modules/modular_computers/file_system/programs/techweb.dm @@ -81,7 +81,7 @@ var/obj/item/computer_hardware/card_slot/card_slot if(computer) card_slot = computer.all_components[MC_CARD] - var/obj/item/card/id/user_id_card = card_slot.stored_card + var/obj/item/card/id/user_id_card = card_slot?.stored_card // Check if the console is locked to block any actions occuring if (locked && action != "toggleLock") diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 9d51922b864..4c21c0a3735 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -50,7 +50,7 @@ update_icon() /obj/item/folder/attack_hand(mob/user, list/modifiers) - if(LAZYACCESS(modifiers, RIGHT_CLICK)) + if(length(contents) && LAZYACCESS(modifiers, RIGHT_CLICK)) remove_item(contents[1], user) return TRUE . = ..() diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 0120bd47dce..996c3c5c0fc 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -381,6 +381,7 @@ /obj/item/organ/eyes/robotic/glow/proc/start_visuals() if(!islist(eye_lighting)) + eye_lighting = list() regenerate_light_effects() if((eye_lighting.len < light_beam_distance) || !on_mob) regenerate_light_effects()