diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml index 34b6abbf4b1..d16b1bd694b 100644 --- a/SpacemanDMM.toml +++ b/SpacemanDMM.toml @@ -20,6 +20,14 @@ invalid_lint_directive_value = "error" invalid_set_value = "error" unknown_linter_setting = "error" override_missing_keyword_arg = "error" +must_not_override = "error" +must_call_parent = "error" +final_var = "error" +private_var = "error" +protected_var = "error" +must_be_pure = "error" +must_not_sleep = "error" +redefined_proc = "error" ambiguous_in_lhs = "error" ambiguous_not_bitwise = "error" no_typehint_implicit_new = "error" diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index e55949a4f87..aaeac570f5c 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -167,17 +167,3 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') if(w_uniform) w_uniform.contaminate() if(shoes) shoes.contaminate() if(gloves) gloves.contaminate() - - -/turf/Entered(atom/movable/thing, turf/oldLoc) - . = ..(thing, oldLoc) - //Items that are in phoron, but not on a mob, can still be contaminated. - var/obj/item/I = thing - if(istype(I) && vsc.plc.CLOTH_CONTAMINATION && I.can_contaminate()) - var/datum/gas_mixture/env = return_air(1) - if(!env) - return - for(var/g in env.gas) - if(gas_data.flags[g] & XGM_GAS_CONTAMINANT && env.gas[g] > gas_data.overlay_limit[g] + 1) - I.contaminate() - break diff --git a/code/__DEFINES/profiler_tracy.dm b/code/__DEFINES/profiler_tracy.dm index 8559b39833c..84e4d68e213 100644 --- a/code/__DEFINES/profiler_tracy.dm +++ b/code/__DEFINES/profiler_tracy.dm @@ -7,11 +7,13 @@ var/byond_tracy_running = 0 // Whether byond-tracy is currently running or not var/byond_tracy_running_v = null // Which version of byond-tracy is currently running, so we call the right binary on destruction. /world/New() + CAN_BE_REDEFINED(TRUE) if(GLOB.config.enable_byond_tracy) prof_init("tracy_disk") // This start's Affectedarc07's version of Tracy. Writing a .utracy file to the disk. . = ..() /world/Del() + CAN_BE_REDEFINED(TRUE) if(byond_tracy_running) prof_destroy() . = ..() diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index e1f89bb1317..ef53d466e84 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -145,6 +145,7 @@ * * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED]. */ /world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE) + CAN_BE_REDEFINED(TRUE) return /** @@ -155,6 +156,7 @@ * This function should not be called before ..() in [/world/proc/New]. */ /world/proc/TgsInitializationComplete() + CAN_BE_REDEFINED(TRUE) return /// Put this at the start of [/world/proc/Topic]. @@ -164,6 +166,7 @@ * Call this as late as possible in [world/proc/Reboot] (BEFORE ..()). */ /world/proc/TgsReboot() + CAN_BE_REDEFINED(TRUE) return // DATUM DEFINITIONS @@ -201,6 +204,7 @@ * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. */ /datum/tgs_version/proc/Wildcard() + CAN_BE_REDEFINED(TRUE) return /** @@ -209,6 +213,7 @@ * other_version - The [/datum/tgs_version] to compare against. */ /datum/tgs_version/proc/Equals(datum/tgs_version/other_version) + CAN_BE_REDEFINED(TRUE) return /// Represents a merge of a GitHub pull request. @@ -395,16 +400,19 @@ /// Returns the maximum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMaximumApiVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the minimum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMinimumApiVersion() + CAN_BE_REDEFINED(TRUE) return /** * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. */ /world/proc/TgsAvailable() + CAN_BE_REDEFINED(TRUE) return // No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called. @@ -416,6 +424,7 @@ * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again. */ /world/proc/TgsEndProcess() + CAN_BE_REDEFINED(TRUE) return /** @@ -425,6 +434,7 @@ * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. */ /world/proc/TgsTargetedChatBroadcast(datum/tgs_message_content/message, admin_only = FALSE) + CAN_BE_REDEFINED(TRUE) return /** @@ -434,6 +444,7 @@ * user: The [/datum/tgs_chat_user] to PM. */ /world/proc/TgsChatPrivateMessage(datum/tgs_message_content/message, datum/tgs_chat_user/user) + CAN_BE_REDEFINED(TRUE) return /** @@ -443,38 +454,47 @@ * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. */ /world/proc/TgsChatBroadcast(datum/tgs_message_content/message, list/channels = null) + CAN_BE_REDEFINED(TRUE) return /// Returns the current [/datum/tgs_version] of TGS if it is running the server, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsApiVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the name of the TGS instance running the game if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsInstanceName() + CAN_BE_REDEFINED(TRUE) return /// Return the current [/datum/tgs_revision_information] of the running server if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsRevision() + CAN_BE_REDEFINED(TRUE) return /// Returns the current BYOND security level as a TGS_SECURITY_ define if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsSecurityLevel() + CAN_BE_REDEFINED(TRUE) return /// Returns the current BYOND visibility level as a TGS_VISIBILITY_ define if TGS is present, null otherwise. Requires TGS to be using interop API version 5 or higher otherwise the string "___unimplemented" wil be returned. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsVisibility() + CAN_BE_REDEFINED(TRUE) return /// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsTestMerges() + CAN_BE_REDEFINED(TRUE) return /// Returns a list of connected [/datum/tgs_chat_channel]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsChatChannelInfo() + CAN_BE_REDEFINED(TRUE) return /* diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index cdf93e8baa5..4d02ecc68f9 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -237,6 +237,7 @@ Proc for attack log creation, because really why not if((src in GLOB.living_mob_list) || (src in GLOB.dead_mob_list)) return FALSE GLOB.dead_mob_list += src + GLOB.death_event.raise_event(src) return TRUE // Returns true if the mob was removed form the dead list diff --git a/code/___linters/spaceman_dmm.dm b/code/___linters/spaceman_dmm.dm index fec95b9d822..563b55e521d 100644 --- a/code/___linters/spaceman_dmm.dm +++ b/code/___linters/spaceman_dmm.dm @@ -59,6 +59,9 @@ ///If wrapped in this, will not lint. #define UNLINT(X) SpacemanDMM_unlint(X) + ///The proc can be redefined in other parts of the codebase + #define CAN_BE_REDEFINED(X) set SpacemanDMM_can_be_redefined = X + ///If set, overriding their value isn't permitted by types that inherit it. #define VAR_FINAL var/SpacemanDMM_final @@ -77,6 +80,7 @@ #define SHOULD_BE_PURE(X) #define PRIVATE_PROC(X) #define PROTECTED_PROC(X) + #define CAN_BE_REDEFINED(X) #define VAR_FINAL var #define VAR_PRIVATE var #define VAR_PROTECTED var diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index a4849f10210..f1009056b30 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -24,6 +24,10 @@ var/datum/click_handler/click_handler = usr.GetClickHandler() click_handler.OnDblClick(src, params) + if(istype(usr.machine,/obj/machinery/computer/security)) + var/obj/machinery/computer/security/console = usr.machine + console.jump_on_click(usr,src) + /atom/proc/allow_click_through(var/atom/A, var/params, var/mob/user) return FALSE @@ -204,10 +208,13 @@ /mob/living/UnarmedAttack(var/atom/A, var/proximity_flag) if(!(GAME_STATE & RUNLEVELS_PLAYING)) to_chat(src, "You cannot attack people before the game has started.") - return 0 + return FALSE if(stat) - return 0 + return FALSE + + if(check_sting(src, A)) + return FALSE return 1 @@ -422,11 +429,6 @@ var/global/list/click_catchers /mob var/datum/stack/click_handlers -/mob/Destroy() - if(click_handlers) - click_handlers.QdelClear() - QDEL_NULL(click_handlers) - . = ..() var/const/CLICK_HANDLER_NONE = 0 var/const/CLICK_HANDLER_REMOVE_ON_MOB_LOGOUT = 1 diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index fd6192d25e4..b94e9666613 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -149,16 +149,6 @@ return O return -/mob/living/LateLogin() - . = ..() - if(ability_master) - ability_master.toggle_open(2) - client.screen -= ability_master - -/mob/living/Initialize() - . = ..() - ability_master = new /obj/screen/movable/ability_master(FALSE, src) - ///////////ACTUAL ABILITIES//////////// //This is what you click to do things// /////////////////////////////////////// diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm index e10be5e6015..fb556c18ee3 100644 --- a/code/_onclick/hud/skybox.dm +++ b/code/_onclick/hud/skybox.dm @@ -29,9 +29,3 @@ . = ..() if(. && client) client.update_skybox(old_z != GET_Z(src)) - -/mob/forceMove() - var/old_z = GET_Z(src) - . = ..() - if(. && client) - client.update_skybox(old_z != GET_Z(src)) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 1b56771b3e0..68041b7fd22 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -76,13 +76,6 @@ avoid code duplication. This includes items that may sometimes act as a standard return TRUE return ..() -/mob/living/simple_animal/attackby(obj/item/I, mob/living/user) - if(I.damtype == DAMAGE_PAIN) - playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1) - return TRUE - else - return ..() - // Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person. // Click parameters is the params string from byond Click() code, see that documentation. /obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 19a216c7f35..fe0ed44f5c8 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -39,9 +39,6 @@ /mob/proc/attack_empty_hand(var/bp_hand) return -/mob/living/carbon/human/RestrainedClickOn(var/atom/A) - return - /mob/living/carbon/human/RangedAttack(var/atom/A) var/obj/item/clothing/gloves/GV = gloves var/obj/item/clothing/glasses/GS = glasses @@ -174,5 +171,10 @@ /mob/living/CtrlClickOn(var/atom/A) . = ..() + + if(client && client.hardsuit_click_mode == 2) //HARDSUIT_MODE_CTRL_CLICK + if(HardsuitClickOn(A)) + return + if(!. && a_intent == I_GRAB && length(available_maneuvers)) . = perform_maneuver(prepared_maneuver || available_maneuvers[1], A) diff --git a/code/_onclick/rig.dm b/code/_onclick/rig.dm index 588079e33a1..a0eeeb8b375 100644 --- a/code/_onclick/rig.dm +++ b/code/_onclick/rig.dm @@ -41,12 +41,6 @@ return ..() -/mob/living/CtrlClickOn(atom/A) - if(client && client.hardsuit_click_mode == HARDSUIT_MODE_CTRL_CLICK) - if(HardsuitClickOn(A)) - return - ..() - /mob/living/proc/can_use_rig() return 0 diff --git a/code/controllers/subsystems/chemistry.dm b/code/controllers/subsystems/chemistry.dm index 3dbcb08ff52..fce5cff387e 100644 --- a/code/controllers/subsystems/chemistry.dm +++ b/code/controllers/subsystems/chemistry.dm @@ -70,7 +70,9 @@ SUBSYSTEM_DEF(chemistry) /datum/controller/subsystem/chemistry/proc/initialize_specific_heats() for(var/_R in subtypesof(/singleton/reagent/)) - check_specific_heat(_R) + var/singleton/reagent/reagent = _R + if(!is_abstract(reagent)) + check_specific_heat(_R) /datum/controller/subsystem/chemistry/stat_entry(msg) msg = "AH:[active_holders.len]" diff --git a/code/controllers/subsystems/icon_updates.dm b/code/controllers/subsystems/icon_updates.dm index dccb6012f9e..ef1d8e0d170 100644 --- a/code/controllers/subsystems/icon_updates.dm +++ b/code/controllers/subsystems/icon_updates.dm @@ -14,9 +14,6 @@ SUBSYSTEM_DEF(icon_update) ///Deferred list, contains atoms that were not ready to be processed in the previous run VAR_PRIVATE/list/deferred = list() -/datum/controller/subsystem/icon_update/New() - NEW_SS_GLOBAL(SSicon_update) - /datum/controller/subsystem/icon_update/stat_entry(msg) msg = "QU:[icon_update_queue.len]" return ..() diff --git a/code/controllers/subsystems/processing/airflow.dm b/code/controllers/subsystems/processing/airflow.dm index b0f3ccd57ba..bf873eb7282 100644 --- a/code/controllers/subsystems/processing/airflow.dm +++ b/code/controllers/subsystems/processing/airflow.dm @@ -15,6 +15,7 @@ PROCESSING_SUBSYSTEM_DEF(airflow) priority = SS_PRIORITY_AIRFLOW /datum/controller/subsystem/processing/airflow/fire(resumed = FALSE) + CAN_BE_REDEFINED(TRUE) if (!resumed) currentrun = processing.Copy() // Defined in parent. diff --git a/code/controllers/subsystems/processing/nanoui.dm b/code/controllers/subsystems/processing/nanoui.dm index d7a5ed71c0a..85881096c5b 100644 --- a/code/controllers/subsystems/processing/nanoui.dm +++ b/code/controllers/subsystems/processing/nanoui.dm @@ -8,9 +8,6 @@ PROCESSING_SUBSYSTEM_DEF(nanoui) // NanoUI stuff. var/list/open_uis = list() -/datum/controller/subsystem/processing/nanoui/New() - NEW_SS_GLOBAL(SSnanoui) - /** * Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data * diff --git a/code/controllers/subsystems/processing/ntsl2.dm b/code/controllers/subsystems/processing/ntsl2.dm index 7516c1d5e52..c248e8e7a83 100644 --- a/code/controllers/subsystems/processing/ntsl2.dm +++ b/code/controllers/subsystems/processing/ntsl2.dm @@ -140,6 +140,7 @@ PROCESSING_SUBSYSTEM_DEF(ntsl2) /datum/controller/subsystem/processing/ntsl2/fire(resumed) + CAN_BE_REDEFINED(TRUE) for(var/task_id in tasks) var/task = tasks[task_id] var/datum/http_request/req = task["request"] diff --git a/code/controllers/subsystems/processing/obj_tab_items.dm b/code/controllers/subsystems/processing/obj_tab_items.dm index 53786daf011..48a986a7cdb 100644 --- a/code/controllers/subsystems/processing/obj_tab_items.dm +++ b/code/controllers/subsystems/processing/obj_tab_items.dm @@ -7,6 +7,7 @@ PROCESSING_SUBSYSTEM_DEF(obj_tab_items) // I know this is mostly copypasta, but I want to change the processing logic // Sorry bestie :( /datum/controller/subsystem/processing/obj_tab_items/fire(resumed = FALSE) + CAN_BE_REDEFINED(TRUE) if (!resumed) currentrun = processing.Copy() //cache for sanic speed (lists are references anyways) diff --git a/code/controllers/subsystems/processing/psi.dm b/code/controllers/subsystems/processing/psi.dm index 5a70aedb4b3..6c3cb671f13 100644 --- a/code/controllers/subsystems/processing/psi.dm +++ b/code/controllers/subsystems/processing/psi.dm @@ -15,6 +15,7 @@ PROCESSING_SUBSYSTEM_DEF(psi) var/list/all_psi_complexes = list() /datum/controller/subsystem/processing/psi/fire(resumed) + CAN_BE_REDEFINED(TRUE) ..() if((world.time >= (last_nlom_awareness_check + 30 MINUTES)) && !checking_nlom && !completing_nlom) checking_nlom = TRUE diff --git a/code/controllers/subsystems/processing/tgui.dm b/code/controllers/subsystems/processing/tgui.dm index b437c03baf6..6d298f446c6 100644 --- a/code/controllers/subsystems/processing/tgui.dm +++ b/code/controllers/subsystems/processing/tgui.dm @@ -26,8 +26,7 @@ PROCESSING_SUBSYSTEM_DEF(tgui) /// The HTML base used for all UIs. var/basehtml -/datum/controller/subsystem/processing/tgui/New() - NEW_SS_GLOBAL(SStgui) +/datum/controller/subsystem/processing/tgui/PreInit() basehtml = file2text('tgui/public/tgui.html') // Inject inline polyfills var/polyfill = file2text('tgui/public/tgui-polyfill.min.js') @@ -43,6 +42,7 @@ PROCESSING_SUBSYSTEM_DEF(tgui) return ..() /datum/controller/subsystem/processing/tgui/fire(resumed = FALSE) + CAN_BE_REDEFINED(TRUE) if(!resumed) src.current_run = open_uis.Copy() // Cache for sanic speed (lists are references anyways) diff --git a/code/controllers/subsystems/runechat.dm b/code/controllers/subsystems/runechat.dm index 663bb8cf347..8b99a635326 100644 --- a/code/controllers/subsystems/runechat.dm +++ b/code/controllers/subsystems/runechat.dm @@ -5,6 +5,7 @@ TIMER_SUBSYSTEM_DEF(runechat) var/list/datum/callback/message_queue = list() /datum/controller/subsystem/timer/runechat/fire(resumed) + CAN_BE_REDEFINED(TRUE) . = ..() //poggers while(message_queue.len) var/datum/callback/queued_message = message_queue[message_queue.len] diff --git a/code/controllers/subsystems/zcopy.dm b/code/controllers/subsystems/zcopy.dm index 87c63336549..ba0081f6e05 100644 --- a/code/controllers/subsystems/zcopy.dm +++ b/code/controllers/subsystems/zcopy.dm @@ -29,9 +29,6 @@ SUBSYSTEM_DEF(zcopy) // zstm[zlev] = group_max var/list/zlev_maximums = list() -/datum/controller/subsystem/zcopy/New() - NEW_SS_GLOBAL(SSzcopy) - // for admin proc-call /datum/controller/subsystem/zcopy/proc/update_all() can_fire = FALSE diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 60e7cc76586..f99f8f7c7a3 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -54,9 +54,22 @@ // Create and destroy is weird and I wanna cover my bases var/harddel_deets_dumped = FALSE -// Default implementation of clean-up code. -// This should be overridden to remove all references pointing to the object being destroyed. -// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE. +/** + * Default implementation of clean-up code. + * + * This should be overridden to remove all references pointing to the object being destroyed, if + * you do override it, make sure to call the parent and return it's return value by default + * + * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion; + * in most cases this is [QDEL_HINT_QUEUE]. + * + * The base case is responsible for doing the following + * * Erasing timers pointing to this datum + * * Erasing compenents on this datum + * * Notifying datums listening to signals from this datum that we are going away + * + * Returns [QDEL_HINT_QUEUE] + */ /datum/proc/Destroy(force=FALSE) SHOULD_CALL_PARENT(TRUE) SHOULD_NOT_SLEEP(TRUE) diff --git a/code/datums/observation/death.dm b/code/datums/observation/death.dm index c60f1bcb209..f5d9fbedcef 100644 --- a/code/datums/observation/death.dm +++ b/code/datums/observation/death.dm @@ -11,12 +11,3 @@ GLOBAL_DATUM_INIT(death_event, /singleton/observ/death, new) /singleton/observ/death name = "Death" expected_type = /mob - -/***************** -* Death Handling * -*****************/ - -/mob/living/add_to_dead_mob_list() - . = ..() - if(.) - GLOB.death_event.raise_event(src) diff --git a/code/datums/observation/dir_set.dm b/code/datums/observation/dir_set.dm index 2a2f1ec32e4..5ca806c7272 100644 --- a/code/datums/observation/dir_set.dm +++ b/code/datums/observation/dir_set.dm @@ -20,16 +20,3 @@ GLOBAL_DATUM_INIT(dir_set_event, /singleton/observ/dir_set, new) // Listen to the parent if possible. if(. && istype(dir_changer.loc, /atom/movable)) // We don't care about registering to turfs. register(dir_changer.loc, dir_changer, TYPE_PROC_REF(/atom, recursive_dir_set)) - -/********************* -* Direction Handling * -*********************/ - -/atom/movable/Entered(var/atom/movable/am, atom/old_loc) - . = ..() - if(GLOB.dir_set_event.has_listeners(am)) - GLOB.dir_set_event.register(src, am, TYPE_PROC_REF(/atom, recursive_dir_set)) - -/atom/movable/Exited(var/atom/movable/am, atom/new_loc) - . = ..() - GLOB.dir_set_event.unregister(src, am, TYPE_PROC_REF(/atom, recursive_dir_set)) diff --git a/code/datums/observation/moved.dm b/code/datums/observation/moved.dm index 3c9586c95a1..fc549bdda6a 100644 --- a/code/datums/observation/moved.dm +++ b/code/datums/observation/moved.dm @@ -43,13 +43,3 @@ GLOBAL_DATUM_INIT(moved_event, /singleton/observ/moved, new) /atom/movable/proc/recursive_move(var/atom/movable/am, var/old_loc, var/new_loc) GLOB.moved_event.raise_event(src, old_loc, new_loc) - -/atom/movable/Entered(var/atom/movable/am, atom/old_loc) - ..() - if(GLOB.moved_event.has_listeners(am) && !GLOB.moved_event.is_listening(src, am)) - GLOB.moved_event.register(src, am, TYPE_PROC_REF(/atom/movable, recursive_move)) - -/atom/movable/Exited(var/atom/movable/am, atom/old_loc) - ..() - if(GLOB.moved_event.is_listening(src, am, TYPE_PROC_REF(/atom/movable, recursive_move))) - GLOB.moved_event.unregister(src, am) diff --git a/code/datums/observation/observation.dm b/code/datums/observation/observation.dm index aa510e9d963..7cb7b265b45 100644 --- a/code/datums/observation/observation.dm +++ b/code/datums/observation/observation.dm @@ -99,6 +99,7 @@ return is_listening(event_source) /singleton/observ/proc/register(datum/event_source, datum/listener, proc_call) + CAN_BE_REDEFINED(TRUE) // Sanity checking. if (!(event_source && listener && proc_call)) return FALSE @@ -130,6 +131,7 @@ return TRUE /singleton/observ/proc/unregister(event_source, datum/listener, proc_call) + CAN_BE_REDEFINED(TRUE) // Sanity. if (!event_source || !listener || !event_sources[event_source]) return FALSE @@ -164,6 +166,7 @@ return TRUE /singleton/observ/proc/register_global(datum/listener, proc_call) + CAN_BE_REDEFINED(TRUE) // Sanity. if (!(listener && proc_call)) return FALSE @@ -179,6 +182,7 @@ return TRUE /singleton/observ/proc/unregister_global(datum/listener, proc_call) + CAN_BE_REDEFINED(TRUE) // Return false unless the listener is set as a global listener. if (!(listener && global_listeners[listener])) return FALSE diff --git a/code/game/antagonist/outsider/commando.dm b/code/game/antagonist/outsider/commando.dm index 43c67e6f202..378ce500c39 100644 --- a/code/game/antagonist/outsider/commando.dm +++ b/code/game/antagonist/outsider/commando.dm @@ -14,7 +14,7 @@ var/datum/antagonist/deathsquad/mercenary/commandos bantype = "syndicate-commando" -/datum/antagonist/ert/create_default(var/mob/source) +/datum/antagonist/deathsquad/mercenary/create_default(var/mob/source) var/mob/living/carbon/human/M = ..() if(istype(M)) M.age = rand(25,45) diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm index 7ac83f5c2a0..f07e60ff688 100644 --- a/code/game/antagonist/outsider/deathsquad.dm +++ b/code/game/antagonist/outsider/deathsquad.dm @@ -17,7 +17,7 @@ var/datum/antagonist/deathsquad/deathsquad bantype = "deathsquad" -/datum/antagonist/ert/create_default(var/mob/source) +/datum/antagonist/deathsquad/create_default(var/mob/source) var/mob/living/carbon/human/M = ..() if(istype(M)) M.age = rand(25,45) diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index b8e65a45430..6de4936d315 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -79,6 +79,11 @@ var/datum/antagonist/cultist/cult player.current.remove_language(LANGUAGE_CULT) player.current.remove_language(LANGUAGE_OCCULT) + remove_verb(player.current, /datum/antagonist/cultist/proc/appraise_offering) + remove_verb(player.current, /datum/cultist/proc/memorize_rune) + remove_verb(player.current, /datum/cultist/proc/forget_rune) + remove_verb(player.current, /datum/cultist/proc/scribe_rune) + /datum/antagonist/cultist/add_antagonist(var/datum/mind/player) . = ..() if(.) @@ -92,15 +97,6 @@ var/datum/antagonist/cultist/cult add_verb(player.current, /datum/cultist/proc/scribe_rune) player.antag_datums[MODE_CULTIST] = new /datum/cultist() - -/datum/antagonist/cultist/remove_antagonist(var/datum/mind/player) - . = ..() - - remove_verb(player.current, /datum/antagonist/cultist/proc/appraise_offering) - remove_verb(player.current, /datum/cultist/proc/memorize_rune) - remove_verb(player.current, /datum/cultist/proc/forget_rune) - remove_verb(player.current, /datum/cultist/proc/scribe_rune) - /datum/antagonist/cultist/can_become_antag(var/datum/mind/player, ignore_role = 1) if(!..()) return FALSE diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index b9b0c82d232..1e6959ca1ef 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -119,6 +119,13 @@ var/global/list/area_blurb_stated_to = list() . = ..() + if(dynamic_lighting) + luminosity = FALSE + + if (mapload && turf_initializer) + for(var/turf/T in src) + turf_initializer.initialize(T) + /area/proc/is_prison() return area_flags & AREA_FLAG_PRISON diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 00dd6a53d9a..97b7c00aa46 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -53,7 +53,10 @@ /// We do it like this to prevent people trying to mutate them and to save memory on holding the lists ourselves var/spatial_grid_key -/atom/movable/Destroy() +/atom/movable/Destroy(force) + if (orbiting) + stop_orbit() + GLOB.moved_event.unregister_all_movement(loc, src) //Recalculate opacity @@ -394,6 +397,27 @@ loc = destination loc.Entered(src, old_loc) Moved(old_loc, TRUE) + + //Zmimic + if(bound_overlay) + // The overlay will handle cleaning itself up on non-openspace turfs. + if (isturf(destination)) + bound_overlay.forceMove(get_step(src, UP)) + if (dir != bound_overlay.dir) + bound_overlay.set_dir(dir) + else // Not a turf, so we need to destroy immediately instead of waiting for the destruction timer to proc. + qdel(bound_overlay) + + if(opacity) + updateVisibility(src) + + //Lighting recalculation + var/datum/light_source/L + var/thing + for (thing in light_sources) + L = thing + L.source_atom.update_light() + return TRUE /atom/movable/proc/Moved(atom/old_loc, forced) @@ -425,47 +449,56 @@ /atom/movable/Exited(atom/movable/gone, direction) . = ..() - if(!LAZYLEN(gone.important_recursive_contents)) - return - var/list/nested_locs = get_nested_locs(src) + src - for(var/channel in gone.important_recursive_contents) - for(var/atom/movable/location as anything in nested_locs) - LAZYINITLIST(location.important_recursive_contents) - var/list/recursive_contents = location.important_recursive_contents // blue hedgehog velocity - LAZYINITLIST(recursive_contents[channel]) - recursive_contents[channel] -= gone.important_recursive_contents[channel] - switch(channel) - if(RECURSIVE_CONTENTS_CLIENT_MOBS, RECURSIVE_CONTENTS_HEARING_SENSITIVE) - if(!length(recursive_contents[channel])) - // This relies on a nice property of the linked recursive and gridmap types - // They're defined in relation to each other, so they have the same value - SSspatial_grid.remove_grid_awareness(location, channel) - ASSOC_UNSETEMPTY(recursive_contents, channel) - UNSETEMPTY(location.important_recursive_contents) + if(LAZYLEN(gone.important_recursive_contents)) + var/list/nested_locs = get_nested_locs(src) + src + for(var/channel in gone.important_recursive_contents) + for(var/atom/movable/location as anything in nested_locs) + LAZYINITLIST(location.important_recursive_contents) + var/list/recursive_contents = location.important_recursive_contents // blue hedgehog velocity + LAZYINITLIST(recursive_contents[channel]) + recursive_contents[channel] -= gone.important_recursive_contents[channel] + switch(channel) + if(RECURSIVE_CONTENTS_CLIENT_MOBS, RECURSIVE_CONTENTS_HEARING_SENSITIVE) + if(!length(recursive_contents[channel])) + // This relies on a nice property of the linked recursive and gridmap types + // They're defined in relation to each other, so they have the same value + SSspatial_grid.remove_grid_awareness(location, channel) + ASSOC_UNSETEMPTY(recursive_contents, channel) + UNSETEMPTY(location.important_recursive_contents) if(LAZYLEN(gone.stored_chat_text)) return_floating_text(gone) + if(GLOB.moved_event.is_listening(src, gone, TYPE_PROC_REF(/atom/movable, recursive_move))) + GLOB.moved_event.unregister(src, gone) + + GLOB.dir_set_event.unregister(src, gone, TYPE_PROC_REF(/atom, recursive_dir_set)) + /atom/movable/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) . = ..() - if(!LAZYLEN(arrived.important_recursive_contents)) - return - var/list/nested_locs = get_nested_locs(src) + src - for(var/channel in arrived.important_recursive_contents) - for(var/atom/movable/location as anything in nested_locs) - LAZYINITLIST(location.important_recursive_contents) - var/list/recursive_contents = location.important_recursive_contents // blue hedgehog velocity - LAZYINITLIST(recursive_contents[channel]) - switch(channel) - if(RECURSIVE_CONTENTS_CLIENT_MOBS, RECURSIVE_CONTENTS_HEARING_SENSITIVE) - if(!length(recursive_contents[channel])) - SSspatial_grid.add_grid_awareness(location, channel) - recursive_contents[channel] |= arrived.important_recursive_contents[channel] + if(LAZYLEN(arrived.important_recursive_contents)) + var/list/nested_locs = get_nested_locs(src) + src + for(var/channel in arrived.important_recursive_contents) + for(var/atom/movable/location as anything in nested_locs) + LAZYINITLIST(location.important_recursive_contents) + var/list/recursive_contents = location.important_recursive_contents // blue hedgehog velocity + LAZYINITLIST(recursive_contents[channel]) + switch(channel) + if(RECURSIVE_CONTENTS_CLIENT_MOBS, RECURSIVE_CONTENTS_HEARING_SENSITIVE) + if(!length(recursive_contents[channel])) + SSspatial_grid.add_grid_awareness(location, channel) + recursive_contents[channel] |= arrived.important_recursive_contents[channel] if (LAZYLEN(arrived.stored_chat_text)) give_floating_text(arrived) + if(GLOB.moved_event.has_listeners(arrived) && !GLOB.moved_event.is_listening(src, arrived)) + GLOB.moved_event.register(src, arrived, TYPE_PROC_REF(/atom/movable, recursive_move)) + + if(GLOB.dir_set_event.has_listeners(arrived)) + GLOB.dir_set_event.register(src, arrived, TYPE_PROC_REF(/atom, recursive_dir_set)) + ///allows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in /atom/movable/proc/become_hearing_sensitive(trait_source = TRAIT_GENERIC) ADD_TRAIT(src, TRAIT_HEARING_SENSITIVE, trait_source) diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 997c3baed3c..c62c369a79f 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -15,9 +15,6 @@ activation_messages=list("Your mind expands.") mutation=mRemote -/datum/dna/gene/basic/nobreath/New() - block = REMOTEVIEWBLOCK - /datum/dna/gene/basic/nobreath/activate(var/mob/M, var/connected, var/flags) ..(M,connected,flags) add_verb(M, /mob/living/carbon/human/proc/remoteobserve) diff --git a/code/game/gamemodes/changeling/helpers/sting_click.dm b/code/game/gamemodes/changeling/helpers/sting_click.dm index ce37fbf04a0..17a5dc8a5ad 100644 --- a/code/game/gamemodes/changeling/helpers/sting_click.dm +++ b/code/game/gamemodes/changeling/helpers/sting_click.dm @@ -1,22 +1,13 @@ -#define CHECK_STING(holder, target) \ - if(isliving(target) && holder.a_intent == I_HURT && holder.mind) { \ - var/datum/changeling/changeling = holder.mind.antag_datums[MODE_CHANGELING]; \ - if(changeling && changeling.prepared_sting) { \ - if(changeling.prepared_sting.can_sting(A)) { \ - changeling.prepared_sting.do_sting(A); \ - QDEL_NULL(changeling.prepared_sting); \ - return; \ - } \ - } \ - } - -/mob/living/UnarmedAttack(var/atom/A, var/proximity) - CHECK_STING(src, A) - . = ..() +/mob/living/proc/check_sting(var/mob/living/holder, var/atom/target) + if(isliving(target) && holder.a_intent == I_HURT && holder.mind) + var/datum/changeling/changeling = holder.mind.antag_datums[MODE_CHANGELING] + if(changeling && changeling.prepared_sting) + if(changeling.prepared_sting.can_sting(holder)) + changeling.prepared_sting.do_sting(holder) + QDEL_NULL(changeling.prepared_sting) + return TRUE /mob/living/RangedAttack(var/atom/A, var/params) if(!get_active_hand()) - CHECK_STING(src, A) + check_sting(src, A) . = ..() - -#undef CHECK_STING diff --git a/code/game/gamemodes/changeling/implements/powers/body.dm b/code/game/gamemodes/changeling/implements/powers/body.dm index 3ea264b3a3c..8dc998611cf 100644 --- a/code/game/gamemodes/changeling/implements/powers/body.dm +++ b/code/game/gamemodes/changeling/implements/powers/body.dm @@ -690,13 +690,6 @@ H.stop_sight_update = TRUE to_chat(H, SPAN_NOTICE("We have turned on our heat receptors.")) -/mob/living/carbon/human/get_flash_protection(ignore_inherent = FALSE) - var/datum/changeling/changeling = changeling_power(0, 0, 0) - if(changeling && changeling.using_thermals) - return FLASH_PROTECTION_REDUCED - else - . = ..() - /mob/proc/changeling_electric_lockpick() set category = "Changeling" set name = "Electric Lockpick (5 + 10/use)" diff --git a/code/game/gamemodes/mixed/towerdefense.dm b/code/game/gamemodes/mixed/towerdefense.dm index 20cb63ec1c7..cb8a82c10e7 100644 --- a/code/game/gamemodes/mixed/towerdefense.dm +++ b/code/game/gamemodes/mixed/towerdefense.dm @@ -6,7 +6,7 @@ antag_tags = list(MODE_MERCENARY, MODE_RAIDER, MODE_NINJA) require_all_templates = TRUE -/datum/game_mode/incursion/pre_setup() +/datum/game_mode/towerdefense/pre_setup() round_description = "A group of mercenaries, a gaggle of raiders, and a set of operatives have their eyes set on the [SSatlas.current_map.station_name]." extended_round_description = "[SSatlas.current_map.company_short] has been playing with fire, maybe a big visit will teach them a lesson." . = ..() diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index aaecc1b9314..59aee146c8c 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -207,18 +207,6 @@ src.loc = loc src.core = loc -/mob/living/carbon/human/get_status_tab_items() - . = ..() - - var/obj/item/technomancer_core/core = get_technomancer_core() - if(core) - var/charge_status = "[core.energy]/[core.max_energy] ([round( (core.energy / core.max_energy) * 100)]%) \ - ([round(core.energy_delta)]/s)" - var/instability_delta = instability - last_instability - var/instability_status = "[src.instability] ([round(instability_delta, 0.1)]/s)" - . += "Core Charge: [charge_status]" - . += "User instability: [instability_status]" - /obj/item/technomancer_core/proc/add_spell(var/path, var/new_name, var/ability_icon_state) if(!path || !ispath(path)) message_admins("ERROR: /obj/item/technomancer_core/add_spell() was not given a proper path! \ diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 64a4434ea95..588719157bd 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -44,13 +44,6 @@ if(100 to 200) instability_display.icon_state = "instability3" -// Proc: Life() -// Parameters: 0 -// Description: Makes instability tick along with Life(). -/mob/living/Life() - . = ..() - handle_instability() - // Proc: handle_instability() // Parameters: 0 // Description: Makes instability decay. instability_effects() handles the bad effects for having instability. It will also hold back diff --git a/code/game/jobs/job/outsider/representative.dm b/code/game/jobs/job/outsider/representative.dm index c0714605a9d..0777eab88ab 100644 --- a/code/game/jobs/job/outsider/representative.dm +++ b/code/game/jobs/job/outsider/representative.dm @@ -93,10 +93,6 @@ outfit = /obj/outfit/job/representative blacklisted_species = list(SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_BREEDER) -/datum/job/consular/pre_spawn(mob/abstract/new_player/player) - var/datum/faction/faction = SSjobs.name_factions[player.client.prefs.faction] - LAZYREMOVE(faction.allowed_role_types, REPRESENTATIVE_ROLE) - /datum/job/representative/after_spawn(mob/living/carbon/human/H) var/datum/faction/faction = SSjobs.GetFaction(H) LAZYREMOVE(faction.allowed_role_types, REPRESENTATIVE_ROLE) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index ee0e39628f0..5dbc23f3466 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -168,11 +168,6 @@ return istype(mover) && mover.checkpass(PASSTABLE) -/obj/machinery/optable/MouseDrop_T(atom/dropping, mob/user) - if(istype(dropping, /obj/item)) - user.drop_from_inventory(dropping, get_turf(src)) - ..() - /** * Refreshes the icon state based on the table status */ @@ -271,6 +266,9 @@ return TRUE /obj/machinery/optable/MouseDrop_T(atom/dropping, mob/user) + if(istype(dropping, /obj/item)) + user.drop_from_inventory(dropping, get_turf(src)) + var/mob/living/carbon/patient = dropping //No point if it's not a possible patient if(!istype(patient)) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index c2cd69a3710..51160069b66 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -593,7 +593,3 @@ update_flag canister_color = "poisonous" desc = "A canister of Chlorine, with a warning label for poisonous gasses." can_label = 0 -/obj/machinery/portable_atmospherics/canister/chlorine/Initialize() - . = ..() - - src.air_contents.adjust_gas(GAS_CHLORINE, MolesForPressure()) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 7a3a855a0e8..14c9e2d1fcf 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -66,6 +66,11 @@ set_pixel_offsets() + var/list/open_networks = difflist(network, restricted_camera_networks) + on_open_network = open_networks.len + if(on_open_network) + GLOB.cameranet.add_source(src) + return ..() /obj/machinery/camera/Destroy() @@ -78,9 +83,11 @@ QDEL_NULL(wires) - GLOB.cameranet.remove_source(src) GLOB.cameranet.cameras -= src + if(on_open_network) + GLOB.cameranet.remove_source(src) + . = ..() GC_TEMPORARY_HARDDEL @@ -97,7 +104,25 @@ return internal_process() /obj/machinery/camera/proc/internal_process() - return + // motion camera event loop + if (stat & (EMPED|NOPOWER)) + return + if(!isMotion()) + . = PROCESS_KILL + return + if (detectTime > 0) + var/elapsed = world.time - detectTime + if (elapsed > alarm_delay) + triggerAlarm() + else if (detectTime == -1) + for (var/mob/target in motionTargets) + if (target.stat == 2 || QDELING(target)) lostTarget(target) + // If not detecting with motion camera... + if (!area_motion) + // See if the camera is still in range + if(!in_range(src, target)) + // If they aren't in range, lose the target. + lostTarget(target) /obj/machinery/camera/emp_act(severity) . = ..() @@ -267,6 +292,13 @@ icon_state = initial(icon_state) add_hiddenprint(user) + invalidateCameraCache() + + if(!can_use()) + set_light(0) + + GLOB.cameranet.update_visibility(src) + /obj/machinery/camera/proc/take_damage(var/force, var/message) //prob(25) gives an average of 3-4 hits if (force >= toughness && (force > toughness*4 || prob(25))) diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index d3542aae138..e90f57b90aa 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -5,27 +5,6 @@ var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm() movable_flags = MOVABLE_FLAG_PROXMOVE -/obj/machinery/camera/internal_process() - // motion camera event loop - if (stat & (EMPED|NOPOWER)) - return - if(!isMotion()) - . = PROCESS_KILL - return - if (detectTime > 0) - var/elapsed = world.time - detectTime - if (elapsed > alarm_delay) - triggerAlarm() - else if (detectTime == -1) - for (var/mob/target in motionTargets) - if (target.stat == 2 || QDELING(target)) lostTarget(target) - // If not detecting with motion camera... - if (!area_motion) - // See if the camera is still in range - if(!in_range(src, target)) - // If they aren't in range, lose the target. - lostTarget(target) - /obj/machinery/camera/proc/newTarget(var/mob/target) if(QDELETED(target)) return FALSE diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index e0c9a9dfb84..b0b9d72bf51 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -260,7 +260,7 @@ /mob/living/proc/tracking_cancelled() -/mob/living/silicon/robot/tracking_initiated() +/mob/living/silicon/robot/tracking_cancelled() tracking_entities-- if(!tracking_entities && has_zeroth_law()) to_chat(src, "Internal camera is no longer being accessed.") diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 14305a375e3..2e9bcdaea7d 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -235,13 +235,6 @@ current_camera = null update_use_power(POWER_USE_IDLE) -//Camera control: mouse. -/atom/DblClick() - ..() - if(istype(usr.machine,/obj/machinery/computer/security)) - var/obj/machinery/computer/security/console = usr.machine - console.jump_on_click(usr,src) - /obj/machinery/computer/security/telescreen name = "Telescreen" desc = "Used for watching an empty arena." diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index d6379796815..9d66d70d401 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -87,6 +87,9 @@ if(occupant) occupant.examine(arglist(args)) + if(panel_open) + . += "The maintenance hatch is open." + /obj/machinery/atmospherics/unary/cryo_cell/proc/generate_overlays(force = FALSE) if(LAZYLEN(screen_overlays) && !force) return @@ -274,6 +277,14 @@ if(put_mob(L)) user.visible_message("[user] puts [L] into [src].", "You put [L] into [src].", range = 3) qdel(attacking_item) + + else if(default_deconstruction_screwdriver(user, attacking_item)) + return TRUE + else if(default_deconstruction_crowbar(user, attacking_item)) + return TRUE + else if(default_part_replacement(user, attacking_item)) + return TRUE + return TRUE /obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/dropping, mob/user) @@ -465,21 +476,6 @@ if(loc) return loc.return_air() -/obj/machinery/atmospherics/unary/cryo_cell/attackby(obj/item/attacking_item, mob/user) - if(default_deconstruction_screwdriver(user, attacking_item)) - return TRUE - if(default_deconstruction_crowbar(user, attacking_item)) - return TRUE - if(default_part_replacement(user, attacking_item)) - return TRUE - - return ..() - -/obj/machinery/atmospherics/unary/cryo_cell/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) - . = ..() - if(panel_open) - . += "The maintenance hatch is open." - /obj/machinery/atmospherics/unary/cryo_cell/RefreshParts() ..() var/man_rating = 0 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d6405201e84..bd3817843fd 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -175,6 +175,18 @@ on_admin_z = TRUE hashatch = FALSE + if(frequency) + set_frequency(frequency) + + //wireless connection + if(_wifi_id) + wifi_receiver = new(_wifi_id, src) + + update_icon() + + if(SSradio) + set_frequency(frequency) + . = ..() //if assembly is given, create the new door from the assembly @@ -204,6 +216,9 @@ unres_dir = electronics.unres_dir + bound_height = assembly.bound_height + bound_width = assembly.bound_width + if (on_admin_z) secured_wires = TRUE @@ -225,6 +240,9 @@ update_icon() /obj/machinery/door/airlock/Destroy() + if(frequency && SSradio) + SSradio.remove_object(src,frequency) + QDEL_NULL(wires) QDEL_NULL(wifi_receiver) return ..() @@ -1856,6 +1874,10 @@ About the new airlock wires panel: if(src.close_other != null && istype(src.close_other, /obj/machinery/door/airlock/) && !src.close_other.density) src.close_other.close() + + if(!forced) + send_status() + return ..() /obj/machinery/door/airlock/can_open(var/forced=0) @@ -1975,6 +1997,9 @@ About the new airlock wires panel: else playsound(src.loc, close_sound_unpowered, 100, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) + if(!forced) + send_status() + ..() /obj/machinery/door/airlock/proc/lock(var/forced=0) @@ -2003,11 +2028,6 @@ About the new airlock wires panel: update_icon() return 1 -/obj/machinery/door/airlock/allowed(mob/M) - if(locked) - return 0 - return ..(M) - // Most doors will never be deconstructed over the course of a round, // so as an optimization defer the creation of electronics until // the airlock is deconstructed diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index d09be308bbb..9d1600fdf58 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -119,44 +119,12 @@ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) -/obj/machinery/door/airlock/open(surpress_send) - . = ..() - if(!surpress_send) send_status() - - -/obj/machinery/door/airlock/close(surpress_send) - . = ..() - if(!surpress_send) send_status() - /obj/machinery/door/airlock/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) if(new_frequency) frequency = new_frequency radio_connection = SSradio.add_object(src, frequency, RADIO_AIRLOCK) -/obj/machinery/door/airlock/Initialize(mapload, d = 0, populate_components = TRUE, var/obj/structure/door_assembly/DA) - . = ..() - if(frequency) - set_frequency(frequency) - - //wireless connection - if(_wifi_id) - wifi_receiver = new(_wifi_id, src) - - update_icon() - - if(SSradio) - set_frequency(frequency) - - if(DA) - bound_height = DA.bound_height - bound_width = DA.bound_width - -/obj/machinery/door/airlock/Destroy() - if(frequency && SSradio) - SSradio.remove_object(src,frequency) - return ..() - /obj/machinery/airlock_sensor name = "airlock sensor" icon = 'icons/obj/airlock_machines.dmi' diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 37c3f318c6b..0f48a1a539f 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -129,6 +129,9 @@ Class Procs: var/manufacturer = null /obj/machinery/Initialize(mapload, d = 0, populate_components = TRUE, is_internal = FALSE) + //Stupid macro used in power usage + CAN_BE_REDEFINED(TRUE) + . = ..() if(d) set_dir(d) @@ -156,6 +159,9 @@ Class Procs: RefreshParts() /obj/machinery/Destroy() + //Stupid macro used in power usage + CAN_BE_REDEFINED(TRUE) + STOP_PROCESSING_MACHINE(src, MACHINERY_PROCESS_ALL) SSmachinery.machinery -= src diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 26210cd8a9d..cd9c52a5a3e 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -34,9 +34,18 @@ var/custommessage = "This is a test, please ignore." /obj/machinery/computer/message_monitor/Initialize() - . = ..() + ..() spark_system = bind_spark(src, 5) + return INITIALIZE_HINT_LATELOAD + +/obj/machinery/computer/message_monitor/LateInitialize() + //If the server isn't linked to a server, and there's a server available, default it to the first one in the list. + if(!linkedServer) + for(var/obj/machinery/telecomms/message_server/S in SSmachinery.all_telecomms) + linkedServer = S + break + /obj/machinery/computer/message_monitor/Destroy() QDEL_NULL(spark_system) linkedServer = null @@ -80,17 +89,6 @@ icon_screen = initial(icon_screen) ..() -/obj/machinery/computer/message_monitor/Initialize() - ..() - return INITIALIZE_HINT_LATELOAD - -/obj/machinery/computer/message_monitor/LateInitialize() - //If the server isn't linked to a server, and there's a server available, default it to the first one in the list. - if(!linkedServer) - for(var/obj/machinery/telecomms/message_server/S in SSmachinery.all_telecomms) - linkedServer = S - break - /obj/machinery/computer/message_monitor/attack_hand(var/mob/living/user as mob) if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/tesla_beacon.dm b/code/game/machinery/tesla_beacon.dm index cb34f706fa6..62657d7adc8 100644 --- a/code/game/machinery/tesla_beacon.dm +++ b/code/game/machinery/tesla_beacon.dm @@ -39,7 +39,10 @@ to_chat(user, SPAN_NOTICE("You deactivate \the [src].")) /obj/machinery/power/tesla_beacon/attack_ai(mob/user) - return + if(Adjacent(user)) + return attack_hand(user) + else + to_chat(user, SPAN_WARNING("You need to be adjacent to \the [src] to activate it!")) /obj/machinery/power/tesla_beacon/attack_hand(mob/user) if(anchored) @@ -80,9 +83,3 @@ else if(draw_power(1500) < 1500) deactivate() - -/obj/machinery/power/tesla_beacon/attack_ai(mob/user) - if(Adjacent(user)) - return attack_hand(user) - else - to_chat(user, SPAN_WARNING("You need to be adjacent to \the [src] to activate it!")) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 326868611f5..8af26504299 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -17,13 +17,6 @@ if(is_type_in_list(dropping, can_buckle)) user_buckle(dropping, user) -//Cleanup - -/obj/Destroy() - unbuckle() - return ..() - - /** * Buckles an `/atom/movable` to this obj, performed by a `/mob` * diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 3573b9cf79b..a2452674162 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -806,12 +806,9 @@ var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu. /obj/item/device/radio/headset/heads/ai_integrated/Destroy() + myAi = null . = ..() GC_TEMPORARY_HARDDEL /obj/item/device/radio/headset/heads/ai_integrated/can_receive(input_frequency, level) return ..(input_frequency, level, !disabledAi) - -/obj/item/device/radio/headset/heads/ai_integrated/Destroy() - myAi = null - return ..() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 739227002ca..fa975c244c0 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -394,11 +394,6 @@ pixel_x = 8; /obj/item/device/radio/intercom/raider/east PRESET_EAST -/obj/item/device/radio/intercom/syndicate/Initialize() - . = ..() - set_frequency(RAID_FREQ) - internal_channels[num2text(RAID_FREQ)] = list(ACCESS_SYNDICATE) - /obj/item/device/radio/intercom/Destroy() QDEL_NULL(power_interface) return ..() diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index f9c7c5c4408..2157fa1dddc 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -11,8 +11,6 @@ var/toggle = 1 movable_flags = MOVABLE_FLAG_PROXMOVE -/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D) - /obj/item/device/transfer_valve/IsAssemblyHolder() return 1 @@ -111,7 +109,7 @@ if(action=="open") toggle_valve() -/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D) +/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D) if(toggle) toggle = 0 toggle_valve() diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm index b08bd5e55f5..e8ec9136074 100644 --- a/code/game/objects/items/devices/tvcamera.dm +++ b/code/game/objects/items/devices/tvcamera.dm @@ -84,21 +84,6 @@ H.update_inv_r_hand(0) H.update_inv_l_hand() -/* Assembly by a roboticist */ -/obj/item/robot_parts/head/attackby(obj/item/attacking_item, mob/user) - var/obj/item/device/assembly/S = attacking_item - if(!istype(S)) - return - - if(!istype(S, /obj/item/device/assembly/infra)) - ..() - return - var/obj/item/tv_assembly/A = new(user) - qdel(S) - user.put_in_hands(A) - to_chat(user, SPAN_NOTICE("You add the infrared sensor to the robot head.")) - qdel(src) - /* Using camcorder icon as I can't sprite. Using robohead because of restricting to roboticist */ /obj/item/tv_assembly diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm index ecdb9a28922..de741acfa15 100644 --- a/code/game/objects/items/paintkit.dm +++ b/code/game/objects/items/paintkit.dm @@ -47,22 +47,3 @@ kit.use(1,user) return TRUE return ..() - -/obj/item/clothing/suit/space/void/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/device/kit/suit)) - var/obj/item/device/kit/suit/kit = attacking_item - name = "[kit.new_name] voidsuit" - desc = kit.new_desc - icon_state = "[kit.new_icon]_suit" - item_state = "[kit.new_icon]_suit" - if(kit.new_icon_file) - icon = kit.new_icon_file - if(kit.new_mob_icon_file) - icon_override = kit.new_mob_icon_file - to_chat(user, "You set about modifying the suit into [src].") - var/mob/living/carbon/human/H = user - if(istype(H)) - species_restricted = list(H.species.get_bodytype()) - kit.use(1,user) - return TRUE - return ..() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 067de230af9..c99d20c4cc9 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -1125,21 +1125,3 @@ CIGARETTE PACKETS ARE IN FANCY.DM qdel(attacking_item) return ..() - -/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/paper)) - if(!dry) - to_chat(user, SPAN_WARNING("You need to dry \the [src] first!")) - return - if(user.unEquip(attacking_item)) - var/obj/item/clothing/mask/smokable/cigarette/rolled/R = new(get_turf(src)) - R.chem_volume = reagents.total_volume - reagents.trans_to_holder(R.reagents, R.chem_volume) - user.visible_message(SPAN_NOTICE("[user] rolls a cigarette in their hands with \the [attacking_item] and [src]."), - SPAN_NOTICE("You roll a cigarette in your hands with \the [attacking_item] and [src].")) - playsound(src, 'sound/bureaucracy/paperfold.ogg', 25, 1) - user.put_in_active_hand(R) - qdel(attacking_item) - qdel(src) - return - ..() diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index a0845c9c2c5..05623abe3a9 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -1244,10 +1244,6 @@ /obj/item/reagent_containers/glass/bottle/syrup/caramel = 1, ) -/obj/item/storage/box/produce/fill() - . = ..() - make_exact_fit() - /obj/item/storage/box/cleaner_tablets name = "\improper Idris cleaner tablets box" desc = "A box of advanced formula chemical tablets designed by Idris Incorporated." diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 05222a262a3..5771def358c 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -573,10 +573,6 @@ else STOP_PROCESSING(SSprocessing, src) -/obj/item/weldingtool/Destroy() - STOP_PROCESSING(SSprocessing, src) //Stop processing when destroyed regardless of conditions - return ..() - /obj/item/weldingtool/experimental/attackby(obj/item/attacking_item, mob/user) if(istype(attacking_item, /obj/item/eyeshield)) if(eyeshield) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 8159f5f1d76..130b6a1359e 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -44,6 +44,8 @@ /obj/Destroy() STOP_PROCESSING(SSprocessing, src) + unbuckle() + QDEL_NULL(talking_atom) return ..() /obj/Topic(href, href_list, var/datum/ui_state/state = GLOB.default_state) diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index 7c3acbd2226..da136629860 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -181,9 +181,9 @@ GLOBAL_LIST_EMPTY(total_active_bonfires) reagent_level = reagents.reagent_volumes[R.type] fuel = min(max_fuel, fuel + (reagent_level * 25)) - if(reagents.has_reagent(/singleton/reagent/alcohol)) - R = GET_SINGLETON(/singleton/reagent/alcohol) - var/singleton/reagent/alcohol/A = R + if(reagents.has_reagent(/singleton/reagent/alcohol/ethanol)) + R = GET_SINGLETON(/singleton/reagent/alcohol/ethanol) + var/singleton/reagent/alcohol/ethanol/A = R reagent_level = reagents.reagent_volumes[A.type] fuel = min(max_fuel, fuel + (reagent_level * (A.strength/20))) diff --git a/code/game/objects/structures/flags_banners.dm b/code/game/objects/structures/flags_banners.dm index dcd656317b6..430b6620860 100644 --- a/code/game/objects/structures/flags_banners.dm +++ b/code/game/objects/structures/flags_banners.dm @@ -2003,7 +2003,7 @@ /obj/structure/sign/flag/assunzione/large/east/Initialize(mapload) . = ..(mapload, EAST) -/obj/structure/sign/flag/himeo/large/west/Initialize(mapload) +/obj/structure/sign/flag/assunzione/large/west/Initialize(mapload) . = ..(mapload, WEST) // New Gibson diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 3830864ff0a..5148c83c256 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -80,9 +80,6 @@ /obj/structure/bed/stool/padded/violet/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH, COLOR_VIOLET) -/obj/structure/bed/stool/wood/New(var/newloc) - ..(newloc, MATERIAL_WOOD) - /obj/structure/bed/stool/bar name = "bar stool" desc = "It has some unsavory stains on it..." @@ -136,10 +133,6 @@ /obj/structure/bed/stool/bar/padded/violet/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH, COLOR_VIOLET) - -/obj/structure/bed/stool/bar/wood/New(var/newloc) - ..(newloc, MATERIAL_WOOD) - /obj/structure/bed/stool/hover name = "hoverstool" desc = "As comfortable as a cloud." @@ -228,20 +221,6 @@ use_material_shatter = FALSE shatter() -/obj/item/material/stool/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if (prob(50)) - qdel(src) - return - if(3.0) - if (prob(5)) - qdel(src) - return - /obj/item/material/stool/proc/deploy(mob/user) for(var/obj/A in get_turf(loc)) if(istype(A, /obj/structure/bed)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 4839f955994..e24f23a5267 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -376,18 +376,34 @@ update_nearby_tiles() var/turf/location = loc loc = null + for(var/obj/structure/window/W in orange(location, 1)) W.update_icon() + + for(var/obj/structure/table/T in view(location, 1)) + T.update_connections() + T.update_icon() + loc = location + return ..() /obj/structure/window/Move() var/ini_dir = dir + var/oldloc = loc + update_nearby_tiles(need_rebuild=1) + ..() + set_dir(ini_dir) update_nearby_tiles(need_rebuild=1) + if(loc != oldloc) + for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1)) + T.update_connections() + T.update_icon() + /obj/structure/window/proc/is_fulltile() // Checks if this window is a full-tile one. if(dir & (dir - 1)) return 1 diff --git a/code/game/turfs/initialization/init.dm b/code/game/turfs/initialization/init.dm index ef82fdb905e..9e3d5718319 100644 --- a/code/game/turfs/initialization/init.dm +++ b/code/game/turfs/initialization/init.dm @@ -3,9 +3,3 @@ /area var/datum/turf_initializer/turf_initializer = null - -/area/Initialize(mapload) - . = ..() - if (mapload && turf_initializer) - for(var/turf/T in src) - turf_initializer.initialize(T) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 34902352d51..ba1064d2ca3 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -127,10 +127,10 @@ plant.pixel_y = 0 INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/effect/plant, update_neighbors)) -/turf/simulated/wall/ChangeTurf(var/newtype) +/turf/simulated/wall/ChangeTurf(N, tell_universe = TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE) clear_plants() clear_bulletholes() - ..(newtype) + ..() //Appearance /turf/simulated/wall/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index cf6b0e6bd8e..e8486c96f14 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -101,7 +101,7 @@ qdel(L) playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) S.use(1) - ChangeTurf(/turf/simulated/floor/airless, keep_air = TRUE) + ChangeTurf(/turf/simulated/floor/airless) return else to_chat(user, "The plating is going to need some support.") @@ -211,7 +211,7 @@ A.loc.Entered(A) return -/turf/space/ChangeTurf(turf/N, tell_universe=TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE, keep_air = FALSE) +/turf/space/ChangeTurf(N, tell_universe = TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE) return ..() /turf/space/is_open() diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 9246ccefdc6..9fcb350c984 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -59,8 +59,8 @@ use_space_appearance = FALSE use_starlight = FALSE -/turf/space/transit/bluespace/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0, var/allow = 0, var/keep_air = FALSE) - return ..(N, tell_universe, 1, allow, keep_air) +/turf/space/transit/bluespace/ChangeTurf(N, tell_universe = TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE) + return ..(N, tell_universe, 1, ignore_override, mapload) /turf/space/transit/bluespace/east icon_state = "bluespace-e" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index f0a461bc898..51f87c940a9 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -249,15 +249,15 @@ var/const/enterloopsanity = 100 -/turf/Entered(atom/movable/AM, atom/old_loc) +/turf/Entered(atom/movable/arrived, atom/old_loc) if(movement_disabled) to_chat(usr, "Movement is admin-disabled.") //This is to identify lag problems) return - ASSERT(istype(AM)) + ASSERT(istype(arrived)) - if(ismob(AM)) - var/mob/M = AM + if(ismob(arrived)) + var/mob/M = arrived if(!M.lastarea) M.lastarea = get_area(M.loc) @@ -275,8 +275,8 @@ var/const/enterloopsanity = 100 else if(M.is_floating && !is_hole && has_gravity) M.update_floating() - if(does_footprint && footprint_color && ishuman(AM)) - var/mob/living/carbon/human/H = AM + if(does_footprint && footprint_color && ishuman(arrived)) + var/mob/living/carbon/human/H = arrived var/obj/item/organ/external/l_foot = H.get_organ(BP_L_FOOT) var/obj/item/organ/external/r_foot = H.get_organ(BP_R_FOOT) var/has_feet = TRUE @@ -302,21 +302,44 @@ var/const/enterloopsanity = 100 H.update_inv_shoes(TRUE) - if(tracks_footprint && ishuman(AM)) - var/mob/living/carbon/human/H = AM + if(tracks_footprint && ishuman(arrived)) + var/mob/living/carbon/human/H = arrived H.species.deploy_trail(H, src) - ..(AM, old_loc) + ..() var/objects = 0 - if(AM && (AM.movable_flags & MOVABLE_FLAG_PROXMOVE) && AM.simulated) + if(arrived && (arrived.movable_flags & MOVABLE_FLAG_PROXMOVE) && arrived.simulated) for(var/atom/movable/oAM in range(1)) if(objects > enterloopsanity) break objects++ if (oAM.simulated && (oAM.movable_flags & MOVABLE_FLAG_PROXMOVE)) - AM.proximity_callback(oAM) + arrived.proximity_callback(oAM) + + if (arrived && arrived.opacity && !has_opaque_atom) + has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. + reconsider_lights() + +#ifdef AO_USE_LIGHTING_OPACITY + // Hook for AO. + regenerate_ao() +#endif + + if(!(arrived.bound_overlay || (arrived.z_flags & ZMM_IGNORE) || !TURF_IS_MIMICING(above))) + above.update_mimic() + + //Items that are in phoron, but not on a mob, can still be contaminated. + var/obj/item/I = arrived + if(istype(I) && vsc.plc.CLOTH_CONTAMINATION && I.can_contaminate()) + var/datum/gas_mixture/env = return_air(1) + if(!env) + return + for(var/g in env.gas) + if(gas_data.flags[g] & XGM_GAS_CONTAMINANT && env.gas[g] > gas_data.overlay_limit[g] + 1) + I.contaminate() + break /turf/proc/add_tracks(var/typepath, var/footprint_DNA, var/comingdir, var/goingdir, var/footprint_color="#A10808") var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 7cdd4ca0650..9d07d99bde4 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -133,6 +133,8 @@ for(var/turf/T in RANGE_TURFS(1, src)) T.update_icon() + updateVisibility(src, FALSE) + /turf/proc/transport_properties_from(turf/other) if(!istype(other, src.type)) return 0 diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index 7f983928d73..8d9f2241799 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -28,7 +28,7 @@ icon = 'icons/turf/walls.dmi' icon_state = "rockvault" -/turf/unsimulated/mask/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0) +/turf/unsimulated/mask/ChangeTurf(N, tell_universe = TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE) if (!N) return diff --git a/code/modules/admin/verbs/bluespacetech.dm b/code/modules/admin/verbs/bluespacetech.dm index 7b430dd9b67..bdadc8ae2c8 100644 --- a/code/modules/admin/verbs/bluespacetech.dm +++ b/code/modules/admin/verbs/bluespacetech.dm @@ -347,15 +347,6 @@ storage_slots = 56 max_w_class = ITEMSIZE_IMMENSE -/obj/item/device/radio/headset/ert/bst/attack_hand() - if(!usr) - return - if(!istype(usr, /mob/living/carbon/human/bst)) - to_chat(usr, SPAN_ALERT("Your hand seems to go right through the [src]. It's like it doesn't exist.")) - return - else - ..() - //Headset /obj/item/device/radio/headset/ert/bst name = "bluespace technician's headset" diff --git a/code/modules/atmospherics/components/unary/vent_pump.dm b/code/modules/atmospherics/components/unary/vent_pump.dm index 19866569840..cdd957f0cec 100644 --- a/code/modules/atmospherics/components/unary/vent_pump.dm +++ b/code/modules/atmospherics/components/unary/vent_pump.dm @@ -120,6 +120,11 @@ /obj/machinery/atmospherics/unary/vent_pump/Destroy() unregister_radio(src, frequency) + + if(initial_loc) + initial_loc.air_vent_info -= id_tag + initial_loc.air_vent_names -= id_tag + return ..() /obj/machinery/atmospherics/unary/vent_pump/high_volume @@ -375,6 +380,7 @@ update_icon() /obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/attacking_item, mob/user) + if(attacking_item.iswelder()) var/obj/item/weldingtool/WT = attacking_item if (!WT.welding) @@ -395,6 +401,8 @@ else to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task.")) return TRUE + + else if(istype(attacking_item, /obj/item/melee/arm_blade)) if(!welded) to_chat(user, SPAN_WARNING("\The [attacking_item] can only be used to tear open welded air vents!")) @@ -414,7 +422,37 @@ spark(get_turf(src), 3, GLOB.alldirs) playsound(loc, 'sound/items/welder_pry.ogg', 50, TRUE) update_icon() - else + + else if(attacking_item.iswrench()) + + if(!(stat & NOPOWER) && use_power) + to_chat(user, SPAN_WARNING("You cannot unwrench \the [src], turn it off first.")) + + else + + var/turf/T = src.loc + + if(node && node.level==1 && isturf(T) && !T.is_plating()) + to_chat(user, SPAN_WARNING("You must remove the plating first.")) + + else if(loc) + var/datum/gas_mixture/int_air = return_air() + var/datum/gas_mixture/env_air = loc.return_air() + + if((int_air.return_pressure()-env_air.return_pressure()) > PRESSURE_EXERTED) + to_chat(user, SPAN_WARNING("You cannot unwrench \the [src], it is too exerted due to internal pressure.")) + add_fingerprint(user) + + else + to_chat(user, SPAN_NOTICE("You begin to unfasten \the [src]...")) + + if(attacking_item.use_tool(src, user, istype(attacking_item, /obj/item/pipewrench) ? 80 : 40, volume = 50)) + user.visible_message(SPAN_NOTICE("\The [user] unfastens \the [src]."), \ + SPAN_NOTICE("You have unfastened \the [src]."), \ + "You hear a ratchet.") + new /obj/item/pipe(loc, make_from=src) + qdel(src) + return ..() /obj/machinery/atmospherics/unary/vent_pump/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) @@ -432,39 +470,6 @@ if(old_stat != stat) update_icon() -/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/attacking_item, mob/user) - if (!attacking_item.iswrench()) - return ..() - if (!(stat & NOPOWER) && use_power) - to_chat(user, SPAN_WARNING("You cannot unwrench \the [src], turn it off first.")) - return TRUE - var/turf/T = src.loc - if (node && node.level==1 && isturf(T) && !T.is_plating()) - to_chat(user, SPAN_WARNING("You must remove the plating first.")) - return TRUE - var/datum/gas_mixture/int_air = return_air() - if(!loc) return FALSE - var/datum/gas_mixture/env_air = loc.return_air() - if ((int_air.return_pressure()-env_air.return_pressure()) > PRESSURE_EXERTED) - to_chat(user, SPAN_WARNING("You cannot unwrench \the [src], it is too exerted due to internal pressure.")) - add_fingerprint(user) - return TRUE - to_chat(user, SPAN_NOTICE("You begin to unfasten \the [src]...")) - if(attacking_item.use_tool(src, user, istype(attacking_item, /obj/item/pipewrench) ? 80 : 40, volume = 50)) - user.visible_message( \ - SPAN_NOTICE("\The [user] unfastens \the [src]."), \ - SPAN_NOTICE("You have unfastened \the [src]."), \ - "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) - return TRUE - -/obj/machinery/atmospherics/unary/vent_pump/Destroy() - if(initial_loc) - initial_loc.air_vent_info -= id_tag - initial_loc.air_vent_names -= id_tag - return ..() - #undef DEFAULT_PRESSURE_DELTA #undef EXTERNAL_PRESSURE_BOUND diff --git a/code/modules/cargo/bounties/weapon_prototype.dm b/code/modules/cargo/bounties/weapon_prototype.dm index 3cbc4feb605..40d21924c9a 100644 --- a/code/modules/cargo/bounties/weapon_prototype.dm +++ b/code/modules/cargo/bounties/weapon_prototype.dm @@ -64,11 +64,3 @@ /datum/bounty/weapon_prototype/reliability/accepts_weapon(var/obj/item/gun/energy/laser/prototype/P) return P.reliability > stat_value - -/datum/bounty/weapon_prototype/reliability - stat_name = "accuracy" - stat_value = 3 - stat_comparison = "greater than" - -/datum/bounty/weapon_prototype/reliability/accepts_weapon(var/obj/item/gun/energy/laser/prototype/P) - return P.accuracy > stat_value diff --git a/code/modules/cargo/random_stock/t2_uncommon.dm b/code/modules/cargo/random_stock/t2_uncommon.dm index abd2da67fc7..3fb495bc26e 100644 --- a/code/modules/cargo/random_stock/t2_uncommon.dm +++ b/code/modules/cargo/random_stock/t2_uncommon.dm @@ -99,7 +99,7 @@ STOCK_ITEM_UNCOMMON(chempack, 5) var/rname = pick(chems) //If we get a drink, reroll it once. //Should result in a higher chance of getting medicines and chemicals - if (ispath(rname, /singleton/reagent/drink) || ispath(rname, /singleton/reagent/alcohol)) + if (ispath(rname, /singleton/reagent/drink) || ispath(rname, /singleton/reagent/alcohol/ethanol)) rname = pick(chems) var/singleton/reagent/R = GET_SINGLETON(rname) C.reagents.add_reagent(rname, C.volume) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 805b329e170..73f914adac6 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -349,6 +349,8 @@ var/list/localhost_addresses = list( del(src) return + dir = NORTH + GLOB.clients += src GLOB.directory[ckey] = src connection_time = world.time diff --git a/code/modules/client/movement.dm b/code/modules/client/movement.dm index 5ba3a87e1e4..c86feebc640 100644 --- a/code/modules/client/movement.dm +++ b/code/modules/client/movement.dm @@ -1,8 +1,4 @@ -/client/New() - ..() - dir = NORTH - // These break the lighting system, comment out for now until // someone can be arsed to fix it. /* diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 35d1d029fbf..a85d95ad3cf 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -63,6 +63,12 @@ /obj/item/clothing/Destroy() STOP_PROCESSING(SSprocessing, src) + + if(IC) + IC.clothing = null + action_circuit = null // Will get deleted by qdel-ing the IC assembly. + qdel(IC) + QDEL_LIST(accessories) return ..() @@ -132,6 +138,9 @@ if(tint) user.handle_vision() + for(var/obj/item/clothing/accessory/bling in accessories) + bling.on_clothing_change(user) + // taking off /obj/item/clothing/dropped(mob/user) . = ..() @@ -515,27 +524,6 @@ /obj/item/clothing/gloves/proc/Touch(var/atom/A, mob/user, var/proximity) return 0 // return 1 to cancel attack_hand() -/obj/item/clothing/gloves/attackby(obj/item/attacking_item, mob/user) - ..() - if(is_sharp(attacking_item)) - if(clipped) - to_chat(user, SPAN_NOTICE("\The [src] have already been clipped!")) - update_icon() - return - - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - user.visible_message(SPAN_WARNING("[user] cuts the fingertips off of \the [src]."),SPAN_WARNING("You cut the fingertips off of \the [src].")) - - clipped = 1 - siemens_coefficient += 0.25 - name = "modified [name]" - desc = "[desc]
They have had the fingertips cut off of them." - if("exclude" in species_restricted) - species_restricted -= BODYTYPE_UNATHI - species_restricted -= BODYTYPE_TAJARA - species_restricted -= BODYTYPE_VAURCA - return - /obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE) var/mob/living/carbon/human/H = user if(slot && slot == slot_gloves) diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index fa8f07d8f1d..b2020c26cd2 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -9,7 +9,13 @@ return 0 /obj/item/clothing/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/clothing/accessory)) + if(IC && (istype(attacking_item, /obj/item/integrated_circuit) || attacking_item.iswrench() || attacking_item.iscrowbar() || \ + istype(attacking_item, /obj/item/device/integrated_electronics/wirer) || istype(attacking_item, /obj/item/device/integrated_electronics/debugger) || \ + attacking_item.ismultitool() || attacking_item.isscrewdriver() || istype(attacking_item, /obj/item/cell/device))) + + IC.attackby(attacking_item, user) + + else if(istype(attacking_item, /obj/item/clothing/accessory)) if(!valid_accessory_slots || !valid_accessory_slots.len) to_chat(usr, "You cannot attach accessories of any kind to \the [src].") @@ -97,16 +103,6 @@ for(var/obj/item/clothing/accessory/A in accessories) . += SPAN_NOTICE("\A [A] [A.gender == PLURAL ? "are" : "is"] attached to it.") -/obj/item/clothing/equipped(mob/user, slot, assisted_equip) - . = ..() - for(var/obj/item/clothing/accessory/bling in accessories) - bling.on_clothing_change(user) - -/obj/item/clothing/dropped(mob/user) - . = ..() - for(var/obj/item/clothing/accessory/bling in accessories) - bling.on_clothing_change(user) - /obj/item/clothing/proc/update_accessory_slowdown() slowdown_accessory = 0 for(var/obj/item/clothing/accessory/bling in accessories) @@ -166,6 +162,9 @@ /obj/item/clothing/emp_act(severity) . = ..() + if(IC) + IC.emp_act(severity) + if(LAZYLEN(accessories)) for(var/obj/item/clothing/accessory/A in accessories) A.emp_act(severity) diff --git a/code/modules/clothing/gloves/attackby.dm b/code/modules/clothing/gloves/attackby.dm index e75bb7f5ba7..1dd126cbb04 100644 --- a/code/modules/clothing/gloves/attackby.dm +++ b/code/modules/clothing/gloves/attackby.dm @@ -3,4 +3,85 @@ var/siemens_percentage = 100 * siemens_coefficient to_chat(user, SPAN_NOTICE("You probe \the [src] with \the [attacking_item]. The gloves will let [siemens_percentage]% of an electric shock through.")) return + + if(is_sharp(attacking_item)) + if(clipped) + to_chat(user, SPAN_NOTICE("\The [src] have already been clipped!")) + update_icon() + return + + playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + user.visible_message(SPAN_WARNING("[user] cuts the fingertips off of \the [src]."),SPAN_WARNING("You cut the fingertips off of \the [src].")) + + clipped = 1 + siemens_coefficient += 0.25 + name = "modified [name]" + desc = "[desc]
They have had the fingertips cut off of them." + if("exclude" in species_restricted) + species_restricted -= BODYTYPE_UNATHI + species_restricted -= BODYTYPE_TAJARA + species_restricted -= BODYTYPE_VAURCA + return + + if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves. + to_chat(user, "That won't work.") //i'm not putting my lips on that!) + ..() + return + else if(istype(src, /obj/item/clothing/gloves/force)) + to_chat(user, "That seems like a terrible idea.") + ..() + return + + //add wires + if(attacking_item.iscoil()) + var/obj/item/stack/cable_coil/C = attacking_item + if (clipped) + to_chat(user, "The [src] are too badly mangled for wiring.") + return + + if(wired) + to_chat(user, "The [src] are already wired.") + return + + if(C.amount < 2) + to_chat(user, "There is not enough wire to cover the [src].") + return + + C.use(2) + wired = 1 + siemens_coefficient = 3.0 + to_chat(user, "You wrap some wires around the [src].") + update_icon() + return + + //add cell + else if(wired && istype(attacking_item, /obj/item/cell)) + if(cell) + to_chat(user, "\A [cell] is already attached to the [src].") + return + user.drop_from_inventory(attacking_item, src) + cell = attacking_item + w_class = ITEMSIZE_NORMAL + to_chat(user, "You attach \the [cell] to the [src].") + update_icon() + return + + else if((cell || wired) && (attacking_item.iswirecutter() || istype(attacking_item, /obj/item/surgery/scalpel))) + + //stunglove stuff + if(cell) + cell.update_icon() + to_chat(user, "You cut \the [cell] away from the [src].") + cell.forceMove(get_turf(src.loc)) + cell = null + w_class = ITEMSIZE_SMALL + update_icon() + return + if(wired) //wires disappear into the void because fuck that shit + wired = 0 + siemens_coefficient = initial(siemens_coefficient) + to_chat(user, "You cut the wires away from the [src].") + update_icon() + return + return ..() diff --git a/code/modules/clothing/gloves/stungloves.dm b/code/modules/clothing/gloves/stungloves.dm index 795973c7ed9..7b52054dd1d 100644 --- a/code/modules/clothing/gloves/stungloves.dm +++ b/code/modules/clothing/gloves/stungloves.dm @@ -1,67 +1,3 @@ -/obj/item/clothing/gloves/attackby(obj/item/attacking_item, mob/user) - if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves. - to_chat(user, "That won't work.") //i'm not putting my lips on that!) - ..() - return - else if(istype(src, /obj/item/clothing/gloves/force)) - to_chat(user, "That seems like a terrible idea.") - ..() - return - - //add wires - if(attacking_item.iscoil()) - var/obj/item/stack/cable_coil/C = attacking_item - if (clipped) - to_chat(user, "The [src] are too badly mangled for wiring.") - return - - if(wired) - to_chat(user, "The [src] are already wired.") - return - - if(C.amount < 2) - to_chat(user, "There is not enough wire to cover the [src].") - return - - C.use(2) - wired = 1 - siemens_coefficient = 3.0 - to_chat(user, "You wrap some wires around the [src].") - update_icon() - return - - //add cell - else if(wired && istype(attacking_item, /obj/item/cell)) - if(cell) - to_chat(user, "\A [cell] is already attached to the [src].") - return - user.drop_from_inventory(attacking_item, src) - cell = attacking_item - w_class = ITEMSIZE_NORMAL - to_chat(user, "You attach \the [cell] to the [src].") - update_icon() - return - - else if((cell || wired) && (attacking_item.iswirecutter() || istype(attacking_item, /obj/item/surgery/scalpel))) - - //stunglove stuff - if(cell) - cell.update_icon() - to_chat(user, "You cut \the [cell] away from the [src].") - cell.forceMove(get_turf(src.loc)) - cell = null - w_class = ITEMSIZE_SMALL - update_icon() - return - if(wired) //wires disappear into the void because fuck that shit - wired = 0 - siemens_coefficient = initial(siemens_coefficient) - to_chat(user, "You cut the wires away from the [src].") - update_icon() - return - - ..() - /obj/item/clothing/gloves/update_icon() ..() cut_overlays() diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 38c09b0b45d..b1cc6c452aa 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -19,10 +19,6 @@ var/burn_damage = 0 // Specifically burn damage. var/base_name // Used to keep the original name safe while we apply modifiers. -/obj/item/clothing/suit/space/Initialize() - . = ..() - base_name = name - //Some simple descriptors for breaches. Global because lazy, TODO: work out a better way to do this. var/global/list/breach_brute_descriptors = list( diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index 80c2f17bad6..f2a775087a6 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -261,15 +261,6 @@ to_chat(holder.wearer, wearer_text) return -/mob/living/carbon/human/get_status_tab_items() - . = ..() - - if(. && istype(back,/obj/item/rig)) - var/obj/item/rig/R = back - if(R && !R.canremove && R.installed_modules.len) - var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR" - . += "Suit Charge: [cell_status]" - /mob/living/carbon/human/get_actions_for_statpanel() var/list/data = ..() if(istype(back,/obj/item/rig)) diff --git a/code/modules/clothing/spacesuits/rig/modules/storage.dm b/code/modules/clothing/spacesuits/rig/modules/storage.dm index a557ac549ad..663b4cb0c4f 100644 --- a/code/modules/clothing/spacesuits/rig/modules/storage.dm +++ b/code/modules/clothing/spacesuits/rig/modules/storage.dm @@ -24,13 +24,6 @@ . = ..() - -/obj/item/rig/attack_hand(mob/user as mob) - var/obj/item/rig_module/storage/storage = locate() in installed_modules - if(storage && !storage.pockets.handle_attack_hand(user)) - return - return ..() - /obj/item/rig/MouseDrop(obj/over_object as obj) var/obj/item/rig_module/storage/storage = locate() in installed_modules if(storage && !storage.pockets.handle_mousedrop(usr, over_object)) @@ -44,12 +37,6 @@ return TRUE return FALSE -/obj/item/rig/emp_act(severity) - var/obj/item/rig_module/storage/storage = locate() in installed_modules - if(storage) - storage.pockets.emp_act(severity) - return ..() - /obj/item/rig/hear_talk(mob/M, var/msg, verb, datum/language/speaking) var/obj/item/rig_module/storage/storage = locate() in installed_modules if(storage) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 40419e92da4..39da92359df 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -817,6 +817,10 @@ /obj/item/rig/emp_act(severity) . = ..() + var/obj/item/rig_module/storage/storage = locate() in installed_modules + if(storage) + storage.pockets.emp_act(severity) + //set malfunctioning if(emp_protection < 30) //for ninjas, really. malfunctioning += 10 diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index e910821f6ad..022b877a5cc 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -200,6 +200,10 @@ /obj/item/rig/attack_hand(var/mob/user) + var/obj/item/rig_module/storage/storage = locate() in installed_modules + if(storage && !storage.pockets.handle_attack_hand(user)) + return + if(electrified != 0) if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here. return diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 7d9bec085a4..626f4377b9d 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -71,6 +71,8 @@ /obj/item/clothing/suit/space/Initialize() . = ..() + base_name = name + if(icon_auto_adapt) build_and_apply_species_adaption() diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index 6b5f8e7c07f..213f0eb9b7f 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -146,8 +146,8 @@ for(var/_R in reagents.reagent_volumes) var/singleton/reagent/R = GET_SINGLETON(_R) var/strength = R.germ_adjust * reagents.reagent_volumes[_R]/4 - if(ispath(_R, /singleton/reagent/alcohol)) - var/singleton/reagent/alcohol/A = R + if(ispath(_R, /singleton/reagent/alcohol/ethanol)) + var/singleton/reagent/alcohol/ethanol/A = R strength = strength * (A.strength/100) W.germ_level -= min(strength, W.germ_level)//Clean the wound a bit. if (W.germ_level <= 0) diff --git a/code/modules/emotes/definitions/_mob.dm b/code/modules/emotes/definitions/_mob.dm index 66a703c25fd..93eba722985 100644 --- a/code/modules/emotes/definitions/_mob.dm +++ b/code/modules/emotes/definitions/_mob.dm @@ -11,10 +11,6 @@ if(!skip_sort) usable_emotes = sortAssoc(usable_emotes) -/mob/Initialize() - . = ..() - update_emotes() - // Specific defines follow. /mob/living/carbon/alien default_emotes = list( diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index 6fbc249e65f..130f2ae4f39 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -30,7 +30,7 @@ /singleton/reagent/stone_dust = 0.5, /singleton/reagent/crayon_dust = 1, /singleton/reagent/alcohol/butanol = 2, - /singleton/reagent/alcohol = 2, + /singleton/reagent/alcohol/ethanol = 2, /singleton/reagent/sugar = 2, /singleton/reagent/drink/coffee = 4, /singleton/reagent/wulumunusha = 0.25, diff --git a/code/modules/ghostroles/spawner/human/human.dm b/code/modules/ghostroles/spawner/human/human.dm index 654c1c6f3c4..81ddddc8e2d 100644 --- a/code/modules/ghostroles/spawner/human/human.dm +++ b/code/modules/ghostroles/spawner/human/human.dm @@ -181,7 +181,3 @@ /// Used for cryo to free up a slot when a ghost cryos. /mob/living/carbon/human var/datum/weakref/ghost_spawner - -/mob/living/carbon/human/Destroy() - ghost_spawner = null - . = ..() diff --git a/code/modules/heavy_vehicle/components/body.dm b/code/modules/heavy_vehicle/components/body.dm index a36dbcef513..086658c77a3 100644 --- a/code/modules/heavy_vehicle/components/body.dm +++ b/code/modules/heavy_vehicle/components/body.dm @@ -44,6 +44,11 @@ ) ) + cockpit = new + if(loc) + cockpit.copy_from(loc.return_air()) + air_supply = new /obj/machinery/portable_atmospherics/canister/air(src) + /obj/item/mech_component/chassis/update_components() diagnostics = locate() in src cell = locate() in src @@ -88,13 +93,6 @@ else to_chat(user, SPAN_WARNING(" - Armor Missing or Non-functional.")) -/obj/item/mech_component/chassis/Initialize() - . = ..() - cockpit = new - if(loc) - cockpit.copy_from(loc.return_air()) - air_supply = new /obj/machinery/portable_atmospherics/canister/air(src) - /obj/item/mech_component/chassis/proc/update_air(var/take_from_supply) var/changed diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index 8221afbd7be..7de648a2581 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -16,18 +16,6 @@ body.MouseDrop_T(dropping, user) else . = ..() -/mob/living/heavy_vehicle/MouseDrop_T(src_object, over_object, src_location, over_location, src_control, over_control, params, var/mob/user) - if(!user || incapacitated() || user.incapacitated() || lockdown) - return FALSE - - if(!(user in pilots) && user != src) - return FALSE - - //This is handled at active module level really, it is the one who has to know if it's supposed to act - if(selected_system) - return selected_system.MouseDragInteraction(src_object, over_object, src_location, over_location, src_control, over_control, params, user) - - /mob/living/heavy_vehicle/ClickOn(var/atom/A, params, var/mob/user) if(!user || incapacitated() || user.incapacitated() || lockdown) @@ -544,12 +532,6 @@ else return STATUS_CLOSE return ..() -/mob/living/heavy_vehicle/get_inventory_slot(obj/item/I) - for(var/h in hardpoints) - if(hardpoints[h] == I) - return h - return 0 - /mob/living/heavy_vehicle/proc/rename(var/mob/user) if(user != src && !(user in pilots)) return diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 0c4960c7115..335e91feef9 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -174,6 +174,22 @@ /obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/attacking_item, mob/user) + if(istype(attacking_item, /obj/item/paper)) + if(!dry) + to_chat(user, SPAN_WARNING("You need to dry \the [src] first!")) + return + if(user.unEquip(attacking_item)) + var/obj/item/clothing/mask/smokable/cigarette/rolled/R = new(get_turf(src)) + R.chem_volume = reagents.total_volume + reagents.trans_to_holder(R.reagents, R.chem_volume) + user.visible_message(SPAN_NOTICE("[user] rolls a cigarette in their hands with \the [attacking_item] and [src]."), + SPAN_NOTICE("You roll a cigarette in your hands with \the [attacking_item] and [src].")) + playsound(src, 'sound/bureaucracy/paperfold.ogg', 25, 1) + user.put_in_active_hand(R) + qdel(attacking_item) + qdel(src) + return + if(seed) if(seed.get_trait(TRAIT_PRODUCES_POWER) && attacking_item.iscoil()) var/obj/item/stack/cable_coil/C = attacking_item diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 2736ed14492..c8811c9c5ed 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -271,6 +271,9 @@ /obj/effect/plant/attack_hand(user) if(!ishuman(user)) return FALSE + + manual_unbuckle(user) + var/mob/living/carbon/human/H = user playsound(loc, /singleton/sound_category/wood_break_sound, 50, TRUE) var/damage = H.default_attack.get_unarmed_damage(H, src) ? H.default_attack.get_unarmed_damage(H, src) : 1 diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 1863987b753..3e47f51c2db 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -16,9 +16,6 @@ //so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines. addtimer(CALLBACK(src, PROC_REF(entangle), M), 1) -/obj/effect/plant/attack_hand(var/mob/user) - manual_unbuckle(user) - /obj/effect/plant/attack_generic(var/mob/user) manual_unbuckle(user) diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm index abd152aaac2..42d65b89ce8 100644 --- a/code/modules/integrated_electronics/core/assemblies/clothing.dm +++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm @@ -51,25 +51,11 @@ var/obj/item/device/electronic_assembly/clothing/IC = null var/obj/item/integrated_circuit/built_in/action_button/action_circuit = null // This gets pulsed when someone clicks the button on the hud, OR when certain interactions are performed (such as clicking on something with gloves worn) -/obj/item/clothing/emp_act(severity) - if(IC) - IC.emp_act(severity) - ..() - /obj/item/clothing/examine(mob/user) if(IC) examinate(user, IC) . = ..() -/obj/item/clothing/attackby(obj/item/attacking_item, mob/user) - if(IC && (istype(attacking_item, /obj/item/integrated_circuit) || attacking_item.iswrench() || attacking_item.iscrowbar() || \ - istype(attacking_item, /obj/item/device/integrated_electronics/wirer) || istype(attacking_item, /obj/item/device/integrated_electronics/debugger) || \ - attacking_item.ismultitool() || attacking_item.isscrewdriver() || istype(attacking_item, /obj/item/cell/device))) - - IC.attackby(attacking_item, user) - else - ..() - /obj/item/clothing/attack_self(mob/user) if(IC?.opened) IC.attack_self(user) @@ -92,13 +78,6 @@ icon = 'icons/obj/assemblies/wearable_electronic_setups.dmi' contained_sprite = TRUE -/obj/item/clothing/Destroy() - if(IC) - IC.clothing = null - action_circuit = null // Will get deleted by qdel-ing the IC assembly. - qdel(IC) - return ..() - // Specific subtypes. // Jumpsuit. diff --git a/code/modules/integrated_electronics/passive/power.dm b/code/modules/integrated_electronics/passive/power.dm index c044138e899..7f46631f7b6 100644 --- a/code/modules/integrated_electronics/passive/power.dm +++ b/code/modules/integrated_electronics/passive/power.dm @@ -131,7 +131,7 @@ spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) var/volume = 60 - var/list/fuel = list(/singleton/reagent/toxin/phoron = 50000, /singleton/reagent/slimejelly = 25000, /singleton/reagent/fuel = 15000, /singleton/reagent/carbon = 10000, /singleton/reagent/alcohol = 10000, /singleton/reagent/nutriment = 8000, /singleton/reagent/blood = 5000) + var/list/fuel = list(/singleton/reagent/toxin/phoron = 50000, /singleton/reagent/slimejelly = 25000, /singleton/reagent/fuel = 15000, /singleton/reagent/carbon = 10000, /singleton/reagent/alcohol/ethanol = 10000, /singleton/reagent/nutriment = 8000, /singleton/reagent/blood = 5000) /obj/item/integrated_circuit/passive/power/chemical_cell/New() ..() diff --git a/code/modules/item_worth/reagents.dm b/code/modules/item_worth/reagents.dm index b8580501ef4..2cb91bfa47f 100644 --- a/code/modules/item_worth/reagents.dm +++ b/code/modules/item_worth/reagents.dm @@ -27,7 +27,7 @@ /singleton/reagent/copper value = 0.02 -/singleton/reagent/alcohol +/singleton/reagent/alcohol/ethanol value = 0.01 /singleton/reagent/alcohol/butanol diff --git a/code/modules/lighting/lighting_area.dm b/code/modules/lighting/lighting_area.dm index 253acc23700..78328caf474 100644 --- a/code/modules/lighting/lighting_area.dm +++ b/code/modules/lighting/lighting_area.dm @@ -2,12 +2,6 @@ luminosity = TRUE var/dynamic_lighting = TRUE -/area/Initialize() - . = ..() - - if (dynamic_lighting) - luminosity = FALSE - /area/proc/set_dynamic_lighting(var/new_dynamic_lighting = TRUE) //L_PROF(src, "area_sdl") diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 3383456ba77..092a2534ad4 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -117,13 +117,7 @@ T.recalc_atom_opacity() if (old_has_opaque_atom != T.has_opaque_atom) T.reconsider_lights() - return TRUE -/atom/movable/forceMove() - . = ..() + updateVisibility(src, FALSE) - var/datum/light_source/L - var/thing - for (thing in light_sources) - L = thing - L.source_atom.update_light() + return TRUE diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index 6d997caf7e2..df108cbbf98 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -138,19 +138,6 @@ regenerate_ao() #endif -// If an opaque movable atom moves around we need to potentially update visibility. -/turf/Entered(atom/movable/Obj, atom/OldLoc) - . = ..(Obj, OldLoc) - - if (Obj && Obj.opacity && !has_opaque_atom) - has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. - reconsider_lights() - -#ifdef AO_USE_LIGHTING_OPACITY - // Hook for AO. - regenerate_ao() -#endif - /turf/Exited(atom/movable/Obj, atom/newloc) . = ..() diff --git a/code/modules/makeshift/makeshift_reagents.dm b/code/modules/makeshift/makeshift_reagents.dm index 6e8bdd49ec8..9338845e787 100644 --- a/code/modules/makeshift/makeshift_reagents.dm +++ b/code/modules/makeshift/makeshift_reagents.dm @@ -219,13 +219,13 @@ if(!reagents?.total_volume) // can't distill nothing return for(var/_R in reagents.reagent_volumes) - if(!ispath(_R, /singleton/reagent/alcohol)) + if(!ispath(_R, /singleton/reagent/alcohol/ethanol)) continue - var/singleton/reagent/alcohol/AR = GET_SINGLETON(_R) + var/singleton/reagent/alcohol/ethanol/AR = GET_SINGLETON(_R) var/ARvol = REAGENT_VOLUME(reagents, _R) var/alcohol_fraction = AR.strength/100 reagents.add_reagent(/singleton/reagent/water, (1-alcohol_fraction)*ARvol) - reagents.add_reagent(ispath(_R, /singleton/reagent/alcohol/butanol) ? /singleton/reagent/alcohol/butanol : /singleton/reagent/alcohol, alcohol_fraction*ARvol) + reagents.add_reagent(ispath(_R, /singleton/reagent/alcohol/butanol) ? /singleton/reagent/alcohol/butanol : /singleton/reagent/alcohol/ethanol, alcohol_fraction*ARvol) reagents.remove_reagent(_R, ARvol) icon_state = "distillery-off" diff --git a/code/modules/maps/dmm_suite.dm b/code/modules/maps/dmm_suite.dm index 536cfe08ff7..8ad0a7da193 100644 --- a/code/modules/maps/dmm_suite.dm +++ b/code/modules/maps/dmm_suite.dm @@ -60,3 +60,4 @@ */ /dmm_suite/verb/load_map(var/dmm_file as file, var/x_offset as num, var/y_offset as num, var/z_offset as num, var/cropMap as num, var/measureOnly as num, no_changeturf as num) + CAN_BE_REDEFINED(TRUE) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 79be556d763..7a39cea7314 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -209,16 +209,6 @@ amount = max_amount update_icon() -/obj/item/stack/material/osmium - name = "osmium" - icon_state = "sheet-silver" - default_type = MATERIAL_OSMIUM - -/obj/item/stack/material/osmium/full/Initialize() - . = ..() - amount = max_amount - update_icon() - /obj/item/stack/material/silver name = "silver" icon_state = "sheet-silver" diff --git a/code/modules/mining/ore_satchel.dm b/code/modules/mining/ore_satchel.dm index 4caaec3e4dd..fcda172e6f7 100644 --- a/code/modules/mining/ore_satchel.dm +++ b/code/modules/mining/ore_satchel.dm @@ -21,6 +21,7 @@ listeningTo = null linked_box = null + linked_beacon = FALSE . = ..() /obj/item/storage/bag/ore/equipped(mob/user, slot) @@ -59,11 +60,6 @@ /obj/item/storage/bag/ore/bluespace linked_beacon = TRUE -/obj/item/storage/bag/ore/Destroy() - linked_box = null - linked_beacon = FALSE - return ..() - /obj/item/storage/bag/ore/attackby(obj/item/attacking_item, mob/user) if(istype(attacking_item, /obj/item/extraction_pack)) var/obj/item/extraction_pack/E = attacking_item diff --git a/code/modules/mob/abstract/freelook/ai/eye.dm b/code/modules/mob/abstract/freelook/ai/eye.dm index dd03e8aac15..2087eaff9d6 100644 --- a/code/modules/mob/abstract/freelook/ai/eye.dm +++ b/code/modules/mob/abstract/freelook/ai/eye.dm @@ -56,11 +56,6 @@ eyeobj = new /mob/abstract/eye/aiEye(newloc) eyeobj.possess(src) -// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us. -/mob/living/silicon/ai/Initialize() - . = ..() - create_eyeobj() - /atom/proc/move_camera_by_click() if(istype(usr, /mob/living/silicon/ai)) var/mob/living/silicon/ai/AI = usr diff --git a/code/modules/mob/abstract/freelook/ai/update_triggers.dm b/code/modules/mob/abstract/freelook/ai/update_triggers.dm index 4519cb563c1..f0bc38d1b67 100644 --- a/code/modules/mob/abstract/freelook/ai/update_triggers.dm +++ b/code/modules/mob/abstract/freelook/ai/update_triggers.dm @@ -2,26 +2,6 @@ // An addition to deactivate which removes/adds the camera from the chunk list based on if it works or not. -/obj/machinery/camera/deactivate(user as mob, var/choice = 1) - ..(user, choice) - invalidateCameraCache() - if(!can_use()) - set_light(0) - GLOB.cameranet.update_visibility(src) - -/obj/machinery/camera/Initialize() - . = ..() - var/list/open_networks = difflist(network, restricted_camera_networks) - on_open_network = open_networks.len - if(on_open_network) - GLOB.cameranet.add_source(src) - -/obj/machinery/camera/Destroy() - if(on_open_network) - GLOB.cameranet.remove_source(src) - . = ..() - GC_TEMPORARY_HARDDEL - /obj/machinery/camera/proc/update_coverage(var/network_change = 0) if(network_change) var/list/open_networks = difflist(network, restricted_camera_networks) @@ -36,25 +16,3 @@ GLOB.cameranet.update_visibility(src) invalidateCameraCache() - -// Mobs -/mob/living/silicon/ai/Initialize() - . = ..() - GLOB.cameranet.add_source(src) - -/mob/living/silicon/ai/Destroy() - GLOB.cameranet.remove_source(src) - . = ..() - -/mob/living/silicon/ai/rejuvenate() - var/was_dead = stat == DEAD - ..() - if(was_dead && stat != DEAD) - // Arise! - GLOB.cameranet.update_visibility(src, FALSE) - -/mob/living/silicon/ai/death(gibbed) - . = ..() - if(.) - // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) - GLOB.cameranet.update_visibility(src, FALSE) diff --git a/code/modules/mob/abstract/freelook/update_triggers.dm b/code/modules/mob/abstract/freelook/update_triggers.dm index dc1cea4b439..3274cb2f04a 100644 --- a/code/modules/mob/abstract/freelook/update_triggers.dm +++ b/code/modules/mob/abstract/freelook/update_triggers.dm @@ -4,18 +4,3 @@ if(SSticker.current_state >= GAME_STATE_PLAYING) for(var/datum/visualnet/VN in GLOB.visual_nets) VN.update_visibility(A, opacity_check) - -/atom/set_opacity() - . = ..() - if(.) - updateVisibility(src, FALSE) - -/atom/movable/forceMove() - . = ..() - if(opacity && .) - updateVisibility(src) - -/turf/ChangeTurf(N, tell_universe = TRUE, force_lighting_update = FALSE, ignore_override = FALSE, mapload = FALSE) - . = ..() - if(.) - updateVisibility(src, FALSE) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 1cdba47f403..4b05928efb8 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -56,10 +56,6 @@ var/list/holder_mob_icon_cache = list() if(contained) return contained.examine(user) -/obj/item/holder/attack_self() - for(var/mob/M in contents) - M.show_inv(usr) - /obj/item/holder/process() if (!contained) qdel(src) @@ -148,6 +144,8 @@ var/list/holder_mob_icon_cache = list() report_onmob_location(1, slotnumber, contained) /obj/item/holder/attack_self(mob/M as mob) + for(var/mob/contained_mob in contents) + contained_mob.show_inv(usr) if (contained && !(contained.stat & DEAD)) if (istype(M,/mob/living/carbon/human)) diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 23347e735b9..1783c2cd1ab 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -171,11 +171,6 @@ else . = ..() -/mob/living/bot/cleanbot/think() - if(pAI) // no AI if we have a pAI installed - return - ..() - /mob/living/bot/emag_act() return FALSE diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index a0fc303b0c8..c117a64c43d 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -174,6 +174,9 @@ GLOBAL_LIST_INIT_TYPED(cleanbot_types, /obj/effect/decal/cleanable, typesof(/obj addtimer(CALLBACK(src, PROC_REF(remove_from_ignore), gib), 600) /mob/living/bot/cleanbot/think() + if(pAI) // no AI if we have a pAI installed + return + ..() if(!on) @@ -311,12 +314,6 @@ GLOBAL_LIST_INIT_TYPED(cleanbot_types, /obj/effect/decal/cleanable, typesof(/obj else icon_state = "cleanbot[on]" -/mob/living/bot/cleanbot/turn_off() - ..() - cleaning_target = null - path = list() - patrol_path = list() - /mob/living/bot/cleanbot/attack_hand(mob/user) ui_interact(user) diff --git a/code/modules/mob/living/carbon/human/devour.dm b/code/modules/mob/living/carbon/human/devour.dm index ee851e0fb90..11659502533 100644 --- a/code/modules/mob/living/carbon/human/devour.dm +++ b/code/modules/mob/living/carbon/human/devour.dm @@ -32,9 +32,6 @@ return TRUE -/mob/living/carbon/human/proc/move_to_stomach(atom/movable/victim) - return - // Snowflake procs for unathi. Because lore said so. /mob/living/carbon/human/proc/do_gradual_devour(var/mob/living/victim, var/eat_speed) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1893c1ce9b3..2183b5b93c7 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -101,7 +101,14 @@ if(length(species.unarmed_attacks)) set_default_attack(species.unarmed_attacks[1]) -/mob/living/carbon/human/Destroy() +/mob/living/carbon/human/Destroy(force) + ghost_spawner = null + + //Srom (Shared Dreaming) + srom_pulled_by = null + srom_pulling = null + bg = null //Just to be sure. + GLOB.human_mob_list -= src GLOB.intent_listener -= src QDEL_LIST(organs) @@ -228,6 +235,21 @@ . += "Chemical Storage: [changeling.chem_charges]" . += "Genetic Damage Time: [changeling.geneticdamage]" + if(. && istype(back,/obj/item/rig)) + var/obj/item/rig/R = back + if(R && !R.canremove && R.installed_modules.len) + var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR" + . += "Suit Charge: [cell_status]" + + var/obj/item/technomancer_core/core = get_technomancer_core() + if(core) + var/charge_status = "[core.energy]/[core.max_energy] ([round( (core.energy / core.max_energy) * 100)]%) \ + ([round(core.energy_delta)]/s)" + var/instability_delta = instability - last_instability + var/instability_status = "[src.instability] ([round(instability_delta, 0.1)]/s)" + . += "Core Charge: [charge_status]" + . += "User instability: [instability_status]" + /mob/living/carbon/human/ex_act(severity) if(!blinded) flash_act() @@ -816,12 +838,28 @@ + SPAN_WARNING("Remember, this is OOC information.") to_chat(usr, EXAMINE_BLOCK(message)) + if(href_list["default_attk"]) + if(href_list["default_attk"] == "reset_attk") + set_default_attack(null) + else + var/datum/unarmed_attack/u_attack = locate(href_list["default_attk"]) + if(u_attack && (u_attack in species.unarmed_attacks)) + set_default_attack(u_attack) + check_attacks() + return 1 + ..() return ///eyecheck() ///Returns a number between -1 to 2 /mob/living/carbon/human/get_flash_protection(ignore_inherent = FALSE) + + //Ling + var/datum/changeling/changeling = changeling_power(0, 0, 0) + if(changeling && changeling.using_thermals) + return FLASH_PROTECTION_REDUCED + if(!species.vision_organ || !species.has_organ[species.vision_organ]) //No eyes, can't hurt them. return FLASH_PROTECTION_MAJOR @@ -1958,7 +1996,7 @@ var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART] return heart ? heart.pulse : PULSE_NONE -/mob/living/carbon/human/move_to_stomach(atom/movable/victim) +/mob/living/carbon/human/proc/move_to_stomach(atom/movable/victim) var/obj/item/organ/internal/stomach/stomach = internal_organs_by_name[BP_STOMACH] if(istype(stomach)) victim.forceMove(stomach) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index a6965935e03..7ffcb72f9d1 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -657,12 +657,6 @@ for(var/datum/unarmed_attack/u_attack in species.unarmed_attacks) dat += "Primarily [u_attack.attack_name]


" - src << browse(dat, "window=checkattack") - return - -/mob/living/carbon/human/check_attacks() - var/dat = "" - if(default_attack) dat += "Current default attack: [default_attack.attack_name] - Reset

" @@ -686,18 +680,5 @@ attack_win.set_content(dat) attack_win.open() -/mob/living/carbon/human/Topic(href, href_list) - if(href_list["default_attk"]) - if(href_list["default_attk"] == "reset_attk") - set_default_attack(null) - else - var/datum/unarmed_attack/u_attack = locate(href_list["default_attk"]) - if(u_attack && (u_attack in species.unarmed_attacks)) - set_default_attack(u_attack) - check_attacks() - return 1 - else - return ..() - /mob/living/carbon/human/proc/set_default_attack(var/datum/unarmed_attack/u_attack) default_attack = u_attack diff --git a/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm b/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm index 017b9df3574..5aaae91b4e1 100644 --- a/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm +++ b/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm @@ -137,6 +137,3 @@ return var/obj/item/clothing/shoes/sandals/S = new /obj/item/clothing/shoes/sandals(H) H.equip_to_slot_or_del(S,slot_shoes) - -/datum/species/get_species_record_sex(var/mob/living/carbon/human/H) - return H.pronouns diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 759b99ac6ce..1fcb3dd59bb 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -43,6 +43,9 @@ if(languages.len == 1 && default_language != languages[1]) default_language = languages[1] + //Technonancer instability + handle_instability() + return 1 /mob/living/proc/handle_breathing() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e05662fe2da..99681349d72 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -911,14 +911,30 @@ default behaviour is: /mob/living/Initialize() . = ..() add_to_target_grid() + ability_master = new /obj/screen/movable/ability_master(FALSE, src) /mob/living/Destroy() + + //Aiming overlay + QDEL_NULL(aiming) + QDEL_LIST(aimed_at_by) + + //Psi complexus + QDEL_NULL(psi) + + if(vr_mob) + vr_mob = null + if(old_mob) + old_mob = null + + //Remove contained mobs if(loc) for(var/mob/M in contents) M.dropInto(loc) else for(var/mob/M in contents) qdel(M) + QDEL_NULL(reagents) clear_from_target_grid() diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 8c208a0818a..c2d94f57b54 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -16,4 +16,18 @@ weather.mob_shown_weather -= mob_ref weather.mob_shown_wind -= mob_ref GLOB.current_mob_ambience -= mob_ref + + //Psionic + if(psi) + psi.update(TRUE) + + //login during ventcrawl + if(is_ventcrawling && istype(loc, /obj/machinery/atmospherics)) //attach us back into the pipes + remove_ventcrawl() + add_ventcrawl(loc) + + if(ability_master) + ability_master.toggle_open(2) + client.screen -= ability_master + return . diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 6bdd624385b..c839b072207 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -197,9 +197,16 @@ var/list/ai_verbs_default = list( hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") ai_list += src + + GLOB.cameranet.add_source(src) + + create_eyeobj() + return ..() /mob/living/silicon/ai/Destroy() + GLOB.cameranet.remove_source(src) + QDEL_NULL(ai_multi) QDEL_NULL(ai_radio) QDEL_NULL(psupply) @@ -343,9 +350,6 @@ var/list/ai_verbs_default = list( if(powered_ai.anchored) update_use_power(POWER_USE_ACTIVE) -/mob/living/silicon/ai/rejuvenate() - return // TODO: Implement AI rejuvination - /mob/living/silicon/ai/proc/ai_help() set category = "OOC" set name = "AI Help" @@ -547,10 +551,15 @@ var/list/ai_verbs_default = list( return /mob/living/silicon/ai/ex_act(severity) + if(severity == 1.0) + qdel(src) + return if (health > 0) adjustBruteLoss(min(30/severity, health)) updatehealth() - return + + . = ..() + /mob/living/silicon/ai/reset_view(atom/A) if(camera) @@ -825,13 +834,6 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/proc/is_in_chassis() return istype(loc, /turf) - -/mob/living/silicon/ai/ex_act(var/severity) - if(severity == 1.0) - qdel(src) - return - ..() - /mob/living/silicon/ai/proc/multitool_mode() set name = "Toggle Multitool Mode" set category = "AI Commands" diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 77d569bfe06..7172ae5c0ba 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -16,5 +16,10 @@ card.update_icon() . = ..(gibbed,"gives one shrill beep before falling lifeless.") + + if(.) + // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) + GLOB.cameranet.update_visibility(src, FALSE) + density = TRUE ghostize(FALSE) diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 8724c2c3ce8..b98496961b1 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -140,7 +140,14 @@ return ((!A.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item) /mob/living/silicon/ai/rejuvenate() + var/was_dead = stat == DEAD + ..() + + if(was_dead && stat != DEAD) + // Arise! + GLOB.cameranet.update_visibility(src, FALSE) + add_ai_verbs(src) /mob/living/silicon/ai/update_sight() diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index 9775909785f..554ed7bf00f 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -35,15 +35,3 @@ set_stat(CONSCIOUS) else health = maxHealth - getBruteLoss() - getFireLoss() - -/mob/living/silicon/pai/get_status_tab_items() - . = ..() - - if(istype(card.loc, /mob/living/bot)) - var/mob/living/bot/B = card.loc - . += "Piloting: [B.name]" - . += "Bot Status: [B.on ? "Active" : "Inactive"]" - . += "Maintenance Hatch: [B.open ? "Open" : "Closed"]" - . += "Maintenance Lock: [B.locked ? "Locked" : "Unlocked"]" - if(B.emagged) - . += "Bot M#$FUN90: MALFUNC--" diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 3af90945960..24c8759ae22 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -211,6 +211,16 @@ /mob/living/silicon/pai/get_status_tab_items() . = ..() + + if(istype(card.loc, /mob/living/bot)) + var/mob/living/bot/B = card.loc + . += "Piloting: [B.name]" + . += "Bot Status: [B.on ? "Active" : "Inactive"]" + . += "Maintenance Hatch: [B.open ? "Open" : "Closed"]" + . += "Maintenance Lock: [B.locked ? "Locked" : "Unlocked"]" + if(B.emagged) + . += "Bot M#$FUN90: MALFUNC--" + if(silence_time) var/timeleft = round((silence_time - world.timeofday)/10 ,1) . += "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]" diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 09c00cc9fb1..25beab9dd5c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -93,6 +93,28 @@ . = ..() default_language = GLOB.all_languages[LANGUAGE_LOCAL_DRONE] + add_verb(src, /mob/living/proc/hide) + remove_language(LANGUAGE_ROBOT) + add_language(LANGUAGE_ROBOT, FALSE) + add_language(LANGUAGE_DRONE, TRUE) + + //They are unable to be upgraded, so let's give them a bit of a better battery. + cell.maxcharge = 10000 + cell.charge = 10000 + + // NO BRAIN. // me irl - geeves + mmi = null + + //We need to screw with their HP a bit. They have around one fifth as much HP as a full borg. + for(var/V in components) + if(V == "power cell") + continue + var/datum/robot_component/C = components[V] + C.max_damage = 10 + + remove_verb(src, /mob/living/silicon/robot/verb/Namepick) + density = FALSE + /mob/living/silicon/robot/drone/Destroy() if(master_matrix) master_matrix.remove_drone(WEAKREF(src)) @@ -100,8 +122,14 @@ return ..() /mob/living/silicon/robot/drone/death(gibbed) + if(hat) + hat.forceMove(get_turf(src)) + hat = null + QDEL_NULL(hat_overlay) + if(master_matrix) master_matrix.handle_death(src) + return ..() /mob/living/silicon/robot/drone/can_be_possessed_by(var/mob/abstract/observer/possessor) @@ -135,15 +163,6 @@ /mob/living/silicon/robot/drone/do_late_fire() request_player() -/mob/living/silicon/robot/drone/Destroy() - if(hat) - hat.forceMove(get_turf(src)) - hat = null - QDEL_NULL(hat_overlay) - master_matrix = null - master_fabricator = null - return ..() - /mob/living/silicon/robot/drone/get_default_language() if(default_language) return default_language @@ -251,31 +270,6 @@ /mob/living/silicon/robot/drone/construction/matriarch/request_player() SSghostroles.add_spawn_atom("matriarchmaintdrone", src) -/mob/living/silicon/robot/drone/Initialize() - . = ..() - - add_verb(src, /mob/living/proc/hide) - remove_language(LANGUAGE_ROBOT) - add_language(LANGUAGE_ROBOT, FALSE) - add_language(LANGUAGE_DRONE, TRUE) - - //They are unable to be upgraded, so let's give them a bit of a better battery. - cell.maxcharge = 10000 - cell.charge = 10000 - - // NO BRAIN. // me irl - geeves - mmi = null - - //We need to screw with their HP a bit. They have around one fifth as much HP as a full borg. - for(var/V in components) - if(V == "power cell") - continue - var/datum/robot_component/C = components[V] - C.max_damage = 10 - - remove_verb(src, /mob/living/silicon/robot/verb/Namepick) - density = FALSE - /mob/living/silicon/robot/drone/init() ai_camera = new /obj/item/device/camera/siliconcam/drone_camera(src) additional_law_channels["Drone"] = ":d" diff --git a/code/modules/mob/living/silicon/robot/items/robot_parts.dm b/code/modules/mob/living/silicon/robot/items/robot_parts.dm index 8fbb9980801..3ecc2f348c6 100644 --- a/code/modules/mob/living/silicon/robot/items/robot_parts.dm +++ b/code/modules/mob/living/silicon/robot/items/robot_parts.dm @@ -361,7 +361,16 @@ /obj/item/robot_parts/head/attackby(obj/item/attacking_item, mob/user) ..() - if(attacking_item.ismultitool()) + + if(istype(attacking_item, /obj/item/device/assembly/infra)) + var/obj/item/device/assembly/S = attacking_item + var/obj/item/tv_assembly/A = new(user) + qdel(S) + user.put_in_hands(A) + to_chat(user, SPAN_NOTICE("You add the infrared sensor to the robot head.")) + qdel(src) + + else if(attacking_item.ismultitool()) if(law_manager) to_chat(user, SPAN_NOTICE("You disable the lawing circuits on \the [src].")) law_manager = FALSE @@ -369,7 +378,7 @@ to_chat(user, SPAN_NOTICE("You enable the lawing circuits on \the [src].")) law_manager = TRUE - if(istype(attacking_item, /obj/item/device/flash)) + else if(istype(attacking_item, /obj/item/device/flash)) if(isrobot(user)) var/mob/living/silicon/robot/R = user if(istype(R.module_active, /obj/item/device/flash)) @@ -379,6 +388,7 @@ add_flashes(attacking_item,user) else add_flashes(attacking_item,user) + else if(istype(attacking_item, /obj/item/stock_parts/manipulator)) to_chat(user, SPAN_NOTICE("You install some manipulators and modify the head, creating a functional spider-bot!")) new /mob/living/simple_animal/spiderbot(get_turf(src)) @@ -386,7 +396,7 @@ qdel(attacking_item) qdel(src) return - return + /obj/item/robot_parts/head/proc/add_flashes(obj/item/W, mob/user) //Made into a seperate proc to avoid copypasta if(left_flash && right_flash) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0486f3dd8b4..c7c88fb7eb2 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -965,49 +965,6 @@ /mob/living/silicon/robot/proc/radio_menu() radio.interact(src) //Just use the radio's Topic() instead of bullshit special-snowflake code -/mob/living/silicon/robot/Move(a, b, flag) - . = ..() - - if(module) - if(module.type == /obj/item/robot_module/janitor) - var/obj/item/robot_module/janitor/J = module - var/turf/tile = get_turf(src) - if(isturf(tile) && J.mopping) - tile.clean_blood() - if(istype(tile, /turf/simulated)) - var/turf/simulated/S = tile - S.dirt = FALSE - S.color = null - for(var/A in tile) - if(istype(A, /obj/effect)) - if(istype(A, /obj/effect/decal/cleanable)) - qdel(A) - if(istype(A, /obj/effect/overlay)) - var/obj/effect/overlay/O = A - if(O.no_clean) - continue - qdel(O) - else if(istype(A, /obj/item)) - var/obj/item/cleaned_item = A - cleaned_item.clean_blood() - else if(istype(A, /mob/living/carbon/human)) - var/mob/living/carbon/human/cleaned_human = A - if(cleaned_human.lying) - if(cleaned_human.head) - cleaned_human.head.clean_blood() - cleaned_human.update_inv_head(0) - if(cleaned_human.wear_suit) - cleaned_human.wear_suit.clean_blood() - cleaned_human.update_inv_wear_suit(0) - else if(cleaned_human.w_uniform) - cleaned_human.w_uniform.clean_blood() - cleaned_human.update_inv_w_uniform(0) - if(cleaned_human.shoes) - cleaned_human.shoes.clean_blood() - cleaned_human.update_inv_shoes(0) - cleaned_human.clean_blood(1) - to_chat(cleaned_human, SPAN_WARNING("\The [src] runs its bottom mounted bristles all over you!")) - /mob/living/silicon/robot/proc/start_self_destruct(var/anti_theft = FALSE) if(self_destructing) return @@ -1040,12 +997,6 @@ fragem(src, 50, 100, 2, 1, 5, 1, FALSE) gib() -/mob/living/silicon/robot/update_canmove() // to fix lockdown issues w/ chairs - . = ..() - if(lock_charge) - canmove = FALSE - . = FALSE - /mob/living/silicon/robot/proc/UnlinkSelf() disconnect_from_ai() law_update = FALSE diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index fc5fd30d596..4ac39b72bfe 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -25,6 +25,46 @@ /mob/living/silicon/robot/Move() . = ..() + if(module) + if(module.type == /obj/item/robot_module/janitor) + var/obj/item/robot_module/janitor/J = module + var/turf/tile = get_turf(src) + if(isturf(tile) && J.mopping) + tile.clean_blood() + if(istype(tile, /turf/simulated)) + var/turf/simulated/S = tile + S.dirt = FALSE + S.color = null + for(var/A in tile) + if(istype(A, /obj/effect)) + if(istype(A, /obj/effect/decal/cleanable)) + qdel(A) + if(istype(A, /obj/effect/overlay)) + var/obj/effect/overlay/O = A + if(O.no_clean) + continue + qdel(O) + else if(istype(A, /obj/item)) + var/obj/item/cleaned_item = A + cleaned_item.clean_blood() + else if(istype(A, /mob/living/carbon/human)) + var/mob/living/carbon/human/cleaned_human = A + if(cleaned_human.lying) + if(cleaned_human.head) + cleaned_human.head.clean_blood() + cleaned_human.update_inv_head(0) + if(cleaned_human.wear_suit) + cleaned_human.wear_suit.clean_blood() + cleaned_human.update_inv_wear_suit(0) + else if(cleaned_human.w_uniform) + cleaned_human.w_uniform.clean_blood() + cleaned_human.update_inv_w_uniform(0) + if(cleaned_human.shoes) + cleaned_human.shoes.clean_blood() + cleaned_human.update_inv_shoes(0) + cleaned_human.clean_blood(1) + to_chat(cleaned_human, SPAN_WARNING("\The [src] runs its bottom mounted bristles all over you!")) + if(client) var/turf/B = GetAbove(get_turf(src)) if(up_hint) diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 00a7f580f72..e3ed8c0a3ed 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -160,13 +160,6 @@ return FALSE return TRUE -/mob/living/silicon/ai/emote(var/act, var/type, var/message) - var/obj/machinery/hologram/holopad/T = src.holo - if(T?.active_holograms[src]) //Is the AI using a holopad? - src.holopad_emote(message) - else //Emote normally, then. - ..() - #undef IS_AI #undef IS_ROBOT #undef IS_PAI diff --git a/code/modules/mob/living/simple_animal/borer/borer_captive.dm b/code/modules/mob/living/simple_animal/borer/borer_captive.dm index e88bf0e0953..d3fe6056364 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_captive.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_captive.dm @@ -28,9 +28,6 @@ QDEL_NULL(resist_bar) return ..() -/mob/living/captive_brain/emote(var/message) - return - /mob/living/captive_brain/Life() if(resist_bar) resist_bar.update(world.time - resist_start_time) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index d7e674b1eab..77fd20be018 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -62,6 +62,15 @@ add_verb(src, /mob/living/simple_animal/spiderbot/proc/control_integrated_radio) voice_name = name + radio = new radio_type(src) + camera = new /obj/machinery/camera(src, 0, TRUE, TRUE) + camera.c_tag = "spiderbot-[real_name]" + camera.replace_networks(list("SS13")) + +/mob/living/simple_animal/spiderbot/Destroy() + eject_brain() + return ..() + /mob/living/simple_animal/spiderbot/can_name(var/mob/living/M) return FALSE @@ -216,19 +225,6 @@ /mob/living/simple_animal/spiderbot/get_radio() return radio -/mob/living/simple_animal/spiderbot/Destroy() - eject_brain() - return ..() - -/mob/living/simple_animal/spiderbot/Initialize() - . = ..() - - radio = new radio_type(src) - camera = new /obj/machinery/camera(src, 0, TRUE, TRUE) - camera.c_tag = "spiderbot-[real_name]" - camera.replace_networks(list("SS13")) - - /mob/living/simple_animal/spiderbot/death() GLOB.living_mob_list -= src diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 131fb56744b..6d147654af7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -84,6 +84,12 @@ if(.) icon_state = initial(icon_state) + var/mob/living/L = . + if(istype(L)) + if(prob(15)) + L.Weaken(2) + L.visible_message("\the [src] knocks down \the [L]!") + /mob/living/simple_animal/hostile/mimic/crate/proc/trigger() if(!attempt_open) visible_message("[src] starts to move!") @@ -109,14 +115,6 @@ O.forceMove(C) ..() -/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget() - . =..() - var/mob/living/L = . - if(istype(L)) - if(prob(15)) - L.Weaken(2) - L.visible_message("\the [src] knocks down \the [L]!") - // // Copy Mimic // diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 1e1c6098b49..2c12a524f58 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -600,6 +600,12 @@ else attacked_with_item(attacking_item, user) + if(attacking_item.damtype == DAMAGE_PAIN) + playsound(loc, 'sound/weapons/tap.ogg', attacking_item.get_clamped_volume(), 1, -1) + return TRUE + else + return ..() + //TODO: refactor mob attackby(), attacked_by(), and friends. /mob/living/simple_animal/proc/attacked_with_item(obj/item/O, mob/user, var/proximity) if(istype(O, /obj/item/trap/animal) || istype(O, /obj/item/gun)) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 581fee27ca6..df60ffcf525 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -112,3 +112,8 @@ if(client && !istype(src, /mob/abstract/new_player)) //Do not update the skybox if it's a new player mob, they don't see it anyways and it can runtime client.update_skybox(TRUE) + + if(spell_masters) + for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + spell_master.toggle_open(1) + client.screen -= spell_master diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 8211f367aad..101c0480144 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -2,6 +2,9 @@ SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(src, COMSIG_MOB_LOGOUT) + //TGUI + remove_all_indicators() + SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs GLOB.player_list -= src disconnect_time = world.realtime diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5943832e000..e9f97f070f2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -50,6 +50,10 @@ QDEL_NULL(ability_master) + if(click_handlers) + click_handlers.QdelClear() + QDEL_NULL(click_handlers) + return ..() /mob/New() @@ -96,6 +100,8 @@ if (!ckey && mob_thinks) MOB_START_THINKING(src) + update_emotes() + become_hearing_sensitive() /** @@ -130,6 +136,7 @@ . = stat != new_stat if(.) stat = new_stat + remove_all_indicators() /mob/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2) @@ -273,7 +280,9 @@ . += P.slowdown /mob/proc/Life() - return + if(LAZYLEN(spell_masters)) + for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + spell_master.update_spells(0, src) /mob/proc/buckled_to() // Preliminary work for a future buckle rewrite, @@ -1212,6 +1221,8 @@ return ..(ndir) /mob/forceMove(atom/dest) + var/old_z = GET_Z(src) + var/atom/movable/AM if (dest != loc && istype(dest, /atom/movable)) AM = dest @@ -1226,6 +1237,9 @@ . = ..() + if(. && client) + client.update_skybox(old_z != GET_Z(src)) + /mob/verb/northfaceperm() set hidden = 1 set_face_dir(client.client_dir(NORTH)) @@ -1392,8 +1406,21 @@ /// Adds this list to the output to the stat browser /mob/proc/get_status_tab_items() . = list("") //we want to offset unique stuff from standard stuff + SEND_SIGNAL(src, COMSIG_MOB_GET_STATUS_TAB_ITEMS, .) + if(. && LAZYLEN(spell_list)) + for(var/spell/S in spell_list) + if((!S.connected_button) || !statpanel(S.panel)) + continue //Not showing the noclothes spell + switch(S.charge_type) + if(Sp_RECHARGE) + . += "[S.panel] [S.charge_counter/10.0]/[S.charge_max/10] [S.connected_button]" + if(Sp_CHARGES) + . +="[S.panel] [S.charge_counter]/[S.charge_max] [S.connected_button]" + if(Sp_HOLDVAR) + . += "[S.panel] [S.holder_var_type] [S.holder_var_amount] [S.connected_button]" + /// This proc differs slightly from normal TG usage with actions due to how it is repurposed here for hardsuit modules. /// Take a look at /mob/living/carbon/human/get_actions_for_statpanel(). /mob/proc/get_actions_for_statpanel() diff --git a/code/modules/modular_computers/file_system/programs/_program.dm b/code/modules/modular_computers/file_system/programs/_program.dm index bb565c9dfe8..9caaeee3e4d 100644 --- a/code/modules/modular_computers/file_system/programs/_program.dm +++ b/code/modules/modular_computers/file_system/programs/_program.dm @@ -10,20 +10,6 @@ /datum/computer_file/program/update_layout() return TRUE -/datum/computer_file/program/ui_interact(mob/user, datum/tgui/ui) - return computer.ui_interact(user, ui) - -// We want to pass along any update requests to the computer, since the computer handles UI interaction, not us -/datum/computer_file/program/update_static_data(mob/user, datum/tgui/ui) - . = ..() - if(computer) - computer.update_static_data(user, ui) - -/datum/computer_file/program/update_static_data_for_all_viewers() - . = ..() - if(computer) - computer.update_static_data_for_all_viewers() - /datum/nano_module/program available_to_ai = FALSE var/datum/computer_file/program/program // Program-Based computer program that runs this nano module. Defaults to null. diff --git a/code/modules/multiz/turfs/open_space.dm b/code/modules/multiz/turfs/open_space.dm index bd337b873f8..30313f9b585 100644 --- a/code/modules/multiz/turfs/open_space.dm +++ b/code/modules/multiz/turfs/open_space.dm @@ -280,6 +280,3 @@ if(!t) return null return t.roof_type - -/turf/simulated/open/is_open() - return TRUE diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 02082720924..01367850f6b 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -4,17 +4,6 @@ /// If TRUE, this atom is ignored by Z-Mimic. var/z_flags -/atom/movable/forceMove(atom/dest) - . = ..(dest) - if (. && bound_overlay) - // The overlay will handle cleaning itself up on non-openspace turfs. - if (isturf(dest)) - bound_overlay.forceMove(get_step(src, UP)) - if (dir != bound_overlay.dir) - bound_overlay.set_dir(dir) - else // Not a turf, so we need to destroy immediately instead of waiting for the destruction timer to proc. - qdel(bound_overlay) - /atom/movable/set_dir(ndir) . = ..() if (. && bound_overlay) diff --git a/code/modules/multiz/zmimic/mimic_turf.dm b/code/modules/multiz/zmimic/mimic_turf.dm index e7f043de54f..f3e9f933927 100644 --- a/code/modules/multiz/zmimic/mimic_turf.dm +++ b/code/modules/multiz/zmimic/mimic_turf.dm @@ -19,12 +19,6 @@ /turf/var/tmp/z_depth /turf/var/tmp/z_generation = 0 -/turf/Entered(atom/movable/thing, turf/oldLoc) - . = ..() - if (thing.bound_overlay || (thing.z_flags & ZMM_IGNORE) || !TURF_IS_MIMICING(above)) - return - above.update_mimic() - /turf/update_above() if (TURF_IS_MIMICING(above)) above.update_mimic() diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm index 531135af5b8..1399423c65f 100644 --- a/code/modules/orbit/orbit.dm +++ b/code/modules/orbit/orbit.dm @@ -93,8 +93,3 @@ /atom/movable/proc/stop_orbit() SpinAnimation(0,0) QDEL_NULL(orbiting) - -/atom/movable/Destroy(force = FALSE) - . = ..() - if (orbiting) - stop_orbit() diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index ef7f74431b3..d47121505a8 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -961,15 +961,6 @@ Note that amputating the affected organ does in fact remove the infection from t brute_ratio = brute_dam / (limb_loss_threshold * 2) burn_ratio = burn_dam / (limb_loss_threshold * 2) -// new damage icon system -// adjusted to set damage_state to brute/burn code only (without r_name0 as before) -/obj/item/organ/external/update_icon() - var/n_is = damage_state_text() - if (n_is != damage_state) - damage_state = n_is - return 1 - return 0 - // new damage icon system // returns just the brute/burn damage code /obj/item/organ/external/proc/damage_state_text() diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 9e9d3aecb2f..157cee7e5d2 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -48,10 +48,6 @@ if(eyes) eyes.update_colour() -/obj/item/organ/external/head/removed() - get_icon() - ..() - /obj/item/organ/external/head/get_icon() ..() cut_overlays() diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index a8b13f62a79..9fefa356897 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -417,10 +417,6 @@ vital = TRUE emp_coeff = 0.1 -/obj/item/organ/internal/cell/Initialize() - robotize() - . = ..() - /obj/item/organ/external/head/terminator dislocated = -1 can_intake_reagents = 0 diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 72c334ad204..42385c95628 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -240,6 +240,8 @@ return "[owner.get_pronoun("has")] [blood_type] running down [owner.get_pronoun("his")] neck!" /obj/item/organ/external/head/removed() + get_icon() + if(owner) name = "[owner.real_name]'s head" owner.drop_from_inventory(owner.glasses) @@ -247,8 +249,8 @@ owner.drop_from_inventory(owner.l_ear) owner.drop_from_inventory(owner.r_ear) owner.drop_from_inventory(owner.wear_mask) - spawn(1) - owner.update_hair() + owner.update_hair() + ..() /obj/item/organ/external/head/take_damage(brute, burn, damage_flags, used_weapon = null, list/forbidden_limbs = list(), var/silent) diff --git a/code/modules/overmap/contacts/contact_sensors.dm b/code/modules/overmap/contacts/contact_sensors.dm index 3e11a8bcced..e25ecd1ed77 100644 --- a/code/modules/overmap/contacts/contact_sensors.dm +++ b/code/modules/overmap/contacts/contact_sensors.dm @@ -6,23 +6,6 @@ var/list/datalink_contacts = list() // A list of the datalink contacts we're receiving from the datalinks var/tmp/muted = FALSE -/obj/machinery/computer/ship/sensors/Destroy() - objects_in_view.Cut() - trackers.Cut() - - for(var/key in contact_datums) - var/datum/overmap_contact/record = contact_datums[key] - qdel(record) - contact_datums.Cut() - . = ..() - -/obj/machinery/computer/ship/sensors/attempt_hook_up(obj/effect/overmap/visitable/ship/sector) - . = ..() - if(. && linked && !contact_datums[linked]) - var/datum/overmap_contact/record = new(src, linked) - contact_datums[linked] = record - record.marker.alpha = 255 - /obj/machinery/computer/ship/sensors/proc/reveal_contacts(var/mob/user) if(user && user.client) for(var/key in contact_datums) diff --git a/code/modules/overmap/exoplanets/decor/_turfs.dm b/code/modules/overmap/exoplanets/decor/_turfs.dm index 2792edd9798..f10acfde19f 100644 --- a/code/modules/overmap/exoplanets/decor/_turfs.dm +++ b/code/modules/overmap/exoplanets/decor/_turfs.dm @@ -97,103 +97,18 @@ else if(update_neighbors) turf_to_check.update_icon() -//Water -/turf/simulated/floor/exoplanet/water/update_icon() - return - /turf/simulated/floor/exoplanet/water/shallow name = "shallow water" icon = 'icons/misc/beach.dmi' icon_state = "seashallow" footstep_sound = /singleton/sound_category/water_footstep -/turf/simulated/floor/exoplanet/water/shallow/attackby(obj/item/attacking_item, mob/user) - var/obj/item/reagent_containers/RG = attacking_item - if (reagent_type && istype(RG) && RG.is_open_container() && RG.reagents) - RG.reagents.add_reagent(reagent_type, min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this)) - user.visible_message("[user] fills \the [RG] from \the [src].","You fill \the [RG] from \the [src].") - else - return ..() - -/turf/simulated/floor/exoplanet/water/update_dirt() - return // Water doesn't become dirty - -//Snow -/turf/simulated/floor/exoplanet/snow - name = "snow" - icon = 'icons/turf/smooth/snow40.dmi' - icon_state = "snow0" - dirt_color = "#e3e7e8" - footstep_sound = /singleton/sound_category/snow_footstep - smoothing_flags = SMOOTH_MORE | SMOOTH_BORDER | SMOOTH_NO_CLEAR_ICON - smoothing_hints = SMOOTHHINT_CUT_F | SMOOTHHINT_ONLY_MATCH_TURF | SMOOTHHINT_TARGETS_NOT_UNIQUE - canSmoothWith = list( - /turf/simulated/floor/exoplanet/snow, - /turf/simulated/wall, - /turf/unsimulated/wall - ) //Smooths with walls but not the inverse. This way to avoid layering over walls. - -/turf/simulated/floor/exoplanet/snow/Initialize() - . = ..() - pixel_x = -4 - pixel_y = -4 - icon_state = pick("snow[rand(1,2)]","snow0","snow0") - SSicon_smooth.add_to_queue_neighbors(src) - SSicon_smooth.add_to_queue(src) - -/turf/simulated/floor/exoplanet/snow/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - melt() - -/turf/simulated/floor/exoplanet/snow/melt() - ChangeTurf(/turf/simulated/floor/exoplanet/permafrost) - /turf/simulated/floor/exoplanet/permafrost name = "permafrost" icon = 'icons/turf/flooring/snow.dmi' icon_state = "permafrost" footstep_sound = /singleton/sound_category/asteroid_footstep -//Grass -/turf/simulated/floor/exoplanet/grass - name = "grass" - icon = 'icons/turf/jungle.dmi' - icon_state = "greygrass" - color = "#799c4b" - footstep_sound = /singleton/sound_category/grass_footstep - -/turf/simulated/floor/exoplanet/grass/Initialize() - . = ..() - if(SSatlas.current_map.use_overmap) - var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"] - if(istype(E) && E.grass_color) - color = E.grass_color - if(!resources) - resources = list() - if(prob(5)) - resources[ORE_URANIUM] = rand(1,3) - if(prob(2)) - resources[ORE_DIAMOND] = 1 - -/turf/simulated/floor/exoplanet/grass/grove - icon_state = "grove_grass1" - color = null - has_edge_icon = FALSE - -/turf/simulated/floor/exoplanet/grass/grove/Initialize() - . = ..() - icon_state = "grove_grass[rand(1,2)]" - -//Sand -/turf/simulated/floor/exoplanet/desert - name = "sand" - desc = "It's coarse and gets everywhere." - dirt_color = "#ae9e66" - footstep_sound = /singleton/sound_category/sand_footstep - -/turf/simulated/floor/exoplanet/desert/Initialize() - . = ..() - icon_state = "desert[rand(0,4)]" - /turf/simulated/floor/exoplanet/mineral name = "sand" desc = "It's coarse and gets everywhere." diff --git a/code/modules/overmap/exoplanets/decor/flora/grove.dm b/code/modules/overmap/exoplanets/decor/flora/grove.dm index 3ee606419fc..0eb26af49f2 100644 --- a/code/modules/overmap/exoplanets/decor/flora/grove.dm +++ b/code/modules/overmap/exoplanets/decor/flora/grove.dm @@ -47,6 +47,6 @@ icon_state = "grove_bamboo" anchored = 1 -/obj/structure/flora/stalks/New() +/obj/structure/flora/bamboo/New() ..() icon_state = "grove_bamboo[rand(1, 3)]" diff --git a/code/modules/overmap/exoplanets/exoplanet.dm b/code/modules/overmap/exoplanets/exoplanet.dm index 6cfaac9268d..edfdbd383f4 100644 --- a/code/modules/overmap/exoplanets/exoplanet.dm +++ b/code/modules/overmap/exoplanets/exoplanet.dm @@ -513,10 +513,6 @@ . += jointext(extra_data, "
") -/obj/effect/overmap/visitable/sector/exoplanet/get_skybox_representation() - return skybox_image - - /obj/effect/overmap/visitable/sector/exoplanet/proc/get_surface_color() return surface_color diff --git a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm index 82d44dd5c9e..27fff80feb6 100644 --- a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm +++ b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm @@ -43,7 +43,11 @@ return ..() /obj/item/ship_ammunition/attackby(obj/item/attacking_item, mob/user) - if(attacking_item.ispen()) + if(attacking_item.force > 10 && (ammunition_flags & SHIP_AMMO_FLAG_VERY_FRAGILE)) + log_and_message_admins("[user] has caused the cookoff of [src] by attacking it with [attacking_item]!", user) + cookoff(FALSE) + + else if(attacking_item.ispen()) var/obj/item/pen/P = attacking_item if(!use_check_and_message(user)) var/friendly_message = sanitizeSafe( tgui_input_text(user, "What do you want to write on \the [src]?", "Personal Message", "", 32), 32 ) @@ -97,12 +101,6 @@ if(prob(50) && ((ammunition_flags & SHIP_AMMO_FLAG_VERY_FRAGILE) || (ammunition_flags & SHIP_AMMO_FLAG_VULNERABLE))) cookoff(FALSE) -/obj/item/ship_ammunition/attackby(obj/item/attacking_item, mob/user) - . = ..() - if(attacking_item.force > 10 && (ammunition_flags & SHIP_AMMO_FLAG_VERY_FRAGILE)) - log_and_message_admins("[user] has caused the cookoff of [src] by attacking it with [attacking_item]!", user) - cookoff(FALSE) - /obj/item/ship_ammunition/ex_act(severity) if(ammunition_flags & SHIP_AMMO_FLAG_INFLAMMABLE) cookoff(TRUE) diff --git a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm index 8b564f27a44..243ddc0f352 100644 --- a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm +++ b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm @@ -153,8 +153,3 @@ if(ammunition) return ammunition.get_additional_info() return "N/A" - -/obj/effect/overmap/projectile/Bump(var/atom/A) - if(istype(A,/turf/unsimulated/map/edge)) - handle_wraparound() - ..() diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index e0ec89e06ee..a0214ef56ca 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -37,20 +37,17 @@ can_pass_under = FALSE light_power_on = 1 -/obj/machinery/computer/ship/sensors/Destroy() - QDEL_NULL(sound_token) - sensors = null - identification = null - return ..() - /obj/machinery/computer/ship/sensors/proc/get_sensors() return sensors /obj/machinery/computer/ship/sensors/attempt_hook_up(var/obj/effect/overmap/visitable/sector) . = ..() - if(!.) - return - find_sensors_and_iff() + if(.) + if(linked && !contact_datums[linked]) + var/datum/overmap_contact/record = new(src, linked) + contact_datums[linked] = record + record.marker.alpha = 255 + find_sensors_and_iff() /obj/machinery/computer/ship/sensors/proc/find_sensors_and_iff() if(!linked) diff --git a/code/modules/overmap/ships/computers/ship.dm b/code/modules/overmap/ships/computers/ship.dm index 81f282d973a..0ce4d286c5e 100644 --- a/code/modules/overmap/ships/computers/ship.dm +++ b/code/modules/overmap/ships/computers/ship.dm @@ -126,6 +126,7 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov . = ..() /obj/machinery/computer/ship/sensors/Destroy() + QDEL_NULL(sound_token) sensors = null identification = null if(LAZYLEN(viewers)) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 68577a4e831..d420552cd45 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -825,6 +825,12 @@ /obj/item/gun/dropped(mob/user) ..() + + //Removing the lock and the buttons. + if(istype(user, /mob/living)) + var/mob/living/living_user = user + living_user.stop_aiming(src) + queue_icon_update() //Unwields the item when dropped, deletes the offhand update_maptext() diff --git a/code/modules/projectiles/targeting/targeting_gun.dm b/code/modules/projectiles/targeting/targeting_gun.dm index c1ea59c2a37..08099477643 100644 --- a/code/modules/projectiles/targeting/targeting_gun.dm +++ b/code/modules/projectiles/targeting/targeting_gun.dm @@ -1,9 +1,3 @@ -//Removing the lock and the buttons. -/obj/item/gun/dropped(mob/living/user) - if(istype(user)) - user.stop_aiming(src) - return ..() - /obj/item/gun/equipped(mob/living/user, slot) if(istype(user) && (slot != slot_l_hand && slot != slot_r_hand)) user.stop_aiming(src) diff --git a/code/modules/projectiles/targeting/targeting_mob.dm b/code/modules/projectiles/targeting/targeting_mob.dm index a79d1b62422..564d9ecd876 100644 --- a/code/modules/projectiles/targeting/targeting_mob.dm +++ b/code/modules/projectiles/targeting/targeting_mob.dm @@ -42,17 +42,3 @@ /mob/living/Weaken(amount) stop_aiming(no_message=TRUE) ..() - -/mob/living/Destroy() - if(aiming) - qdel(aiming) - aiming = null - - QDEL_LIST(aimed_at_by) - - if(vr_mob) - vr_mob = null - if(old_mob) - old_mob = null - return ..() - diff --git a/code/modules/psionics/mob/mob.dm b/code/modules/psionics/mob/mob.dm index 0b95e90b064..dddb4da3b50 100644 --- a/code/modules/psionics/mob/mob.dm +++ b/code/modules/psionics/mob/mob.dm @@ -1,15 +1,6 @@ /mob/living var/datum/psi_complexus/psi -/mob/living/LateLogin() - ..() - if(psi) - psi.update(TRUE) - -/mob/living/Destroy() - QDEL_NULL(psi) - . = ..() - /mob/living/proc/set_psi_rank(var/rank, var/defer_update, var/temporary) if(HAS_TRAIT(src, TRAIT_PSIONICALLY_DEAF)) to_chat(src, SPAN_WARNING("Something tingles in your head.")) diff --git a/code/modules/random_map/drop/drop_types.dm b/code/modules/random_map/drop/drop_types.dm index 48001269726..dd8b63eb9e4 100644 --- a/code/modules/random_map/drop/drop_types.dm +++ b/code/modules/random_map/drop/drop_types.dm @@ -48,18 +48,6 @@ var/global/list/datum/supply_drop_loot/supply_drop /obj/item/gun/projectile/automatic/wt550, /obj/item/gun/projectile/automatic/rifle/z8) -/datum/supply_drop_loot/ballistics - name = "Ballistics" - container = /obj/structure/largecrate -/datum/supply_drop_loot/ballistics/New() - ..() - contents = list( - /obj/item/gun/projectile/sec, - /obj/item/gun/projectile/shotgun/doublebarrel, - /obj/item/gun/projectile/shotgun/pump/combat, - /obj/item/gun/projectile/automatic/wt550, - /obj/item/gun/projectile/automatic/rifle/z8) - /datum/supply_drop_loot/seeds name = SEED_NOUN_SEEDS container = /obj/structure/closet/crate @@ -170,6 +158,9 @@ var/global/list/datum/supply_drop_loot/supply_drop /obj/item/stack/material/glass/reinforced, /obj/item/stack/material/plasteel) +/datum/supply_drop_loot/power/contents() + return list(pick(contents)) + /datum/supply_drop_loot/hydroponics name = "Hydroponics" container = /obj/structure/largecrate @@ -179,16 +170,3 @@ var/global/list/datum/supply_drop_loot/supply_drop /obj/machinery/portable_atmospherics/hydroponics, /obj/machinery/portable_atmospherics/hydroponics, /obj/machinery/portable_atmospherics/hydroponics) - -/datum/supply_drop_loot/power - name = "Power" - container = /obj/structure/largecrate -/datum/supply_drop_loot/power/New() - ..() - contents = list( - /obj/machinery/power/portgen/basic, - /obj/machinery/power/portgen/basic/advanced, - /obj/machinery/power/portgen/basic/super) - -/datum/supply_drop_loot/power/contents() - return list(pick(contents)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index e458ceff06a..dae27a8556f 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -115,12 +115,28 @@ if (alien & IS_SKRELL) M.add_chemical_effect(CE_BLOODRESTORE, 3 * removed) -/singleton/reagent/alcohol //Parent class for all alcoholic reagents, though this one shouldn't be used anywhere. - name = null // This null name should prevent alcohol from being added to global lists. +/** + * #Alcoholic Reagents + * + * Parent class for all alcoholic reagents, though this one shouldn't be used anywhere + */ +/singleton/reagent/alcohol + abstract_type = /singleton/reagent/alcohol + name = null description = DESC_PARENT reagent_state = LIQUID color = "#404030" ingest_met = REM * 5 + fallback_specific_heat = 0.605 + germ_adjust = 20 // as good as sterilizine, but only if you have pure ethanol. or rubbing alcohol if we get that eventually + + unaffected_species = IS_MACHINE + + taste_description = "mistakes" + + glass_icon_state = "glass_clear" + glass_name = "glass of coder fuckups" + glass_desc = "A glass of distilled maintainer tears." var/hydration_factor = 1 //How much hydration to add per unit. var/nutriment_factor = 0.5 //How much nutrition to add per unit. @@ -135,15 +151,6 @@ var/flammability_divisor = 10 var/distillation_point = T0C + 100 - germ_adjust = 20 // as good as sterilizine, but only if you have pure ethanol. or rubbing alcohol if we get that eventually - - unaffected_species = IS_MACHINE - - taste_description = "mistakes" - - glass_icon_state = "glass_clear" - glass_name = "glass of coder fuckups" - glass_desc = "A glass of distilled maintainer tears." var/blood_to_ingest_scale = 2 @@ -179,41 +186,21 @@ if (adj_temp < 0 && M.bodytemperature > targ_temp) M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) -/singleton/reagent/alcohol - name = "Ethanol" - description = "A well-known alcohol with a variety of applications." - flammability_divisor = 10 - - taste_description = "pure alcohol" - - glass_icon_state = "glass_clear" - glass_name = "glass of ethanol" - glass_desc = "A well-known alcohol with a variety of applications." - - fallback_specific_heat = 0.605 - - distillation_point = T0C + 78.37 - -/singleton/reagent/alcohol/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed, var/datum/reagents/holder) - if(!istype(M)) - return - - var/has_valid_aug = FALSE - var/obj/item/organ/internal/augment/ethanol_burner/aug = M.internal_organs_by_name[BP_AUG_ETHANOL_BURNER] - if(aug && !aug.is_broken()) - has_valid_aug = TRUE - - var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] - if(!has_valid_aug && (alien == IS_VAURCA || (istype(P) && P.stage >= 3)))//Vaurca are damaged instead of getting nutrients, but they can still get drunk - M.adjustToxLoss(1.5 * removed * (strength / 100)) - else - M.adjustNutritionLoss(-nutriment_factor * removed) - M.adjustHydrationLoss(-hydration_factor * removed) + if(ishuman(M)) + var/has_valid_aug = FALSE + var/obj/item/organ/internal/augment/ethanol_burner/aug = M.internal_organs_by_name[BP_AUG_ETHANOL_BURNER] + if(aug && !aug.is_broken()) + has_valid_aug = TRUE + + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] + if(!has_valid_aug && (alien == IS_VAURCA || (istype(P) && P.stage >= 3)))//Vaurca are damaged instead of getting nutrients, but they can still get drunk + M.adjustToxLoss(1.5 * removed * (strength / 100)) + else + M.adjustNutritionLoss(-nutriment_factor * removed) + M.adjustHydrationLoss(-hydration_factor * removed) - if (!has_valid_aug && alien == IS_UNATHI)//unathi are poisoned by alcohol as well - M.adjustToxLoss(1.5 * removed * (strength / 100)) - - ..() + if (!has_valid_aug && alien == IS_UNATHI)//unathi are poisoned by alcohol as well + M.adjustToxLoss(1.5 * removed * (strength / 100)) /singleton/reagent/alcohol/touch_obj(var/obj/O, var/amount, var/datum/reagents/holder) if(istype(O, /obj/item/paper)) @@ -232,9 +219,25 @@ to_chat(usr, "The solution dissolves the ink on the book.") return +/** + * # Ethanol + */ +/singleton/reagent/alcohol/ethanol + name = "Ethanol" + description = "A well-known alcohol with a variety of applications." + taste_description = "pure alcohol" + + glass_name = "glass of ethanol" + glass_desc = "A well-known alcohol with a variety of applications." + + distillation_point = T0C + 78.37 -// Butanol is a common alcohol that is fairly ineffective for humans and most other species, but highly intoxicating to unathi. -// Most behavior is inherited from alcohol. +/** + * # Butanol + * + * Butanol is a common alcohol that is fairly ineffective for humans and most other species, but highly intoxicating to unathi + * + */ /singleton/reagent/alcohol/butanol name = "Butanol" description = "A fairly harmless alcohol that has intoxicating effects on certain species." diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 3ae859bbc35..ef866afcd7c 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -161,7 +161,7 @@ name = "Mortaphenyl" id = "mortaphenyl" result = /singleton/reagent/mortaphenyl - required_reagents = list(/singleton/reagent/inaprovaline = 1, /singleton/reagent/alcohol = 1, /singleton/reagent/acetone = 1) + required_reagents = list(/singleton/reagent/inaprovaline = 1, /singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/acetone = 1) result_amount = 3 /datum/chemical_reaction/perconol @@ -205,7 +205,7 @@ name = "Sterilizine" id = "sterilizine" result = /singleton/reagent/sterilizine - required_reagents = list(/singleton/reagent/alcohol = 1, /singleton/reagent/dylovene = 1, /singleton/reagent/acid/hydrochloric = 1) + required_reagents = list(/singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/dylovene = 1, /singleton/reagent/acid/hydrochloric = 1) result_amount = 3 /datum/chemical_reaction/silicate @@ -450,7 +450,7 @@ name = "Cytophenolate" id = "cytophenolate" result = /singleton/reagent/cytophenolate - required_reagents = list(/singleton/reagent/fluvectionem = 1, /singleton/reagent/alcohol = 1, /singleton/reagent/sugar = 1) + required_reagents = list(/singleton/reagent/fluvectionem = 1, /singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/sugar = 1) result_amount = 3 /datum/chemical_reaction/antiparasitic @@ -493,7 +493,7 @@ name = "Verunol Syrup" id = "verunol" result = /singleton/reagent/verunol - required_reagents = list(/singleton/reagent/hydrazine = 1, /singleton/reagent/dylovene = 1, /singleton/reagent/alcohol = 1) + required_reagents = list(/singleton/reagent/hydrazine = 1, /singleton/reagent/dylovene = 1, /singleton/reagent/alcohol/ethanol = 1) result_amount = 3 /datum/chemical_reaction/adipemcina @@ -515,7 +515,7 @@ name = "Polysomnine" id = "polysomnine" result = /singleton/reagent/polysomnine - required_reagents = list(/singleton/reagent/alcohol = 1, /singleton/reagent/acid/hydrochloric = 3, /singleton/reagent/water = 1) + required_reagents = list(/singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/acid/hydrochloric = 3, /singleton/reagent/water = 1) result_amount = 1 /datum/chemical_reaction/potassium_chloride @@ -557,7 +557,7 @@ name = "Lipozine" id = "Lipozine" result = /singleton/reagent/lipozine - required_reagents = list(/singleton/reagent/sodiumchloride = 1, /singleton/reagent/alcohol = 1, /singleton/reagent/radium = 1) + required_reagents = list(/singleton/reagent/sodiumchloride = 1, /singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/radium = 1) result_amount = 3 /datum/chemical_reaction/coagzolug @@ -578,7 +578,7 @@ name = "Diethylamine" id = "diethylamine" result = /singleton/reagent/diethylamine - required_reagents = list(/singleton/reagent/ammonia = 1, /singleton/reagent/alcohol = 1) + required_reagents = list(/singleton/reagent/ammonia = 1, /singleton/reagent/alcohol/ethanol = 1) result_amount = 2 /datum/chemical_reaction/space_cleaner @@ -613,7 +613,7 @@ name = "Glycerol" id = "glycerol" result = /singleton/reagent/glycerol - required_reagents = list(/singleton/reagent/nutriment/triglyceride = 1, /singleton/reagent/alcohol = 2) // transesterification of triglycerides into butanol and glycerol + required_reagents = list(/singleton/reagent/nutriment/triglyceride = 1, /singleton/reagent/alcohol/ethanol = 2) // transesterification of triglycerides into butanol and glycerol catalysts = list(/singleton/reagent/acid = 5) // using acid as a catalyst result_amount = 3 //each triglyceride has 3 glycerin chains. @@ -799,7 +799,7 @@ name = "Emoxanyl" id = "emoxanyl" result = /singleton/reagent/mental/emoxanyl - required_reagents = list(/singleton/reagent/drugs/mindbreaker = 1, /singleton/reagent/silicon = 1, /singleton/reagent/alcohol = 1) + required_reagents = list(/singleton/reagent/drugs/mindbreaker = 1, /singleton/reagent/silicon = 1, /singleton/reagent/alcohol/ethanol = 1) result_amount = 3 /datum/chemical_reaction/orastabin @@ -813,7 +813,7 @@ name = "Neurapan" id = "neurapan" result = /singleton/reagent/mental/neurapan - required_reagents = list(/singleton/reagent/drugs/mindbreaker = 1, /singleton/reagent/drugs/mms = 1, /singleton/reagent/alcohol = 1) + required_reagents = list(/singleton/reagent/drugs/mindbreaker = 1, /singleton/reagent/drugs/mms = 1, /singleton/reagent/alcohol/ethanol = 1) result_amount = 3 /datum/chemical_reaction/nerospectan @@ -910,7 +910,7 @@ name = "Colorspace" id = "colorspace" result = /singleton/reagent/drugs/colorspace - required_reagents = list(/singleton/reagent/hydrazine = 1, /singleton/reagent/alcohol = 1, /singleton/reagent/silicon = 1) + required_reagents = list(/singleton/reagent/hydrazine = 1, /singleton/reagent/alcohol/ethanol = 1, /singleton/reagent/silicon = 1) result_amount = 1 /* Solidification */ @@ -3274,7 +3274,7 @@ name = "Fringe Weaver" id = "fringeweaver" result = /singleton/reagent/alcohol/fringeweaver - required_reagents = list(/singleton/reagent/alcohol = 2, /singleton/reagent/sugar = 1) + required_reagents = list(/singleton/reagent/alcohol/ethanol = 2, /singleton/reagent/sugar = 1) result_amount = 3 /datum/chemical_reaction/drink/junglejuice diff --git a/code/modules/reagents/dispenser/cartridge_presets.dm b/code/modules/reagents/dispenser/cartridge_presets.dm index 1b62c27d894..6fa0d208c43 100644 --- a/code/modules/reagents/dispenser/cartridge_presets.dm +++ b/code/modules/reagents/dispenser/cartridge_presets.dm @@ -32,7 +32,7 @@ spawn_reagent = /singleton/reagent/copper /obj/item/reagent_containers/chem_disp_cartridge/ethanol - spawn_reagent = /singleton/reagent/alcohol + spawn_reagent = /singleton/reagent/alcohol/ethanol /obj/item/reagent_containers/chem_disp_cartridge/hclacid spawn_reagent = /singleton/reagent/acid/hydrochloric diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index f5219adf478..1226665f3c8 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -1034,30 +1034,6 @@ qdel(src) -// pipe is deleted -// ensure if holder is present, it is expelled -/obj/structure/disposalpipe/Destroy() - var/obj/disposalholder/H = locate() in src - if(H) - // holder was present - STOP_PROCESSING(SSdisposals, H) - var/turf/T = src.loc - if(T.density) - // deleting pipe is inside a dense turf (wall) - // this is unlikely, but just dump out everything into the turf in case - - for(var/atom/movable/AM in H) - AM.forceMove(T) - AM.pipe_eject(0) - qdel(H) - - return ..() - - // otherwise, do normal expel from turf - if(H) - expel(H, T, 0) - return ..() - /obj/structure/disposalpipe/hides_under_flooring() return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_atmospheric.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_atmospheric.dm index 0d83ed5972a..6db10c9e7e9 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_atmospheric.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_atmospheric.dm @@ -6,10 +6,6 @@ var/max_pressure var/target_percentage -/datum/artifact_effect/heat/New() - ..() - effect_type = pick(6,7) - /datum/artifact_effect/gasco2/New() ..() effect = pick(EFFECT_TOUCH, EFFECT_AURA) @@ -177,10 +173,6 @@ effecttype = "heat" var/target_temp -/datum/artifact_effect/heat/New() - ..() - effect_type = pick(5,6,7) - /datum/artifact_effect/heat/New() ..() target_temp = rand(300,600) diff --git a/code/modules/research/xenoarchaeology/finds/finds_special.dm b/code/modules/research/xenoarchaeology/finds/finds_special.dm index 87d9ed5e22f..e4f6069a8ff 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_special.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_special.dm @@ -8,7 +8,7 @@ /obj/item/reagent_containers/glass/replenishing/Initialize() . = ..() START_PROCESSING(SSprocessing, src) - spawning_id = pick(/singleton/reagent/blood,/singleton/reagent/water/holywater,/singleton/reagent/lube,/singleton/reagent/soporific,/singleton/reagent/alcohol,/singleton/reagent/drink/ice,/singleton/reagent/glycerol,/singleton/reagent/fuel,/singleton/reagent/spacecleaner) + spawning_id = pick(/singleton/reagent/blood,/singleton/reagent/water/holywater,/singleton/reagent/lube,/singleton/reagent/soporific,/singleton/reagent/alcohol/ethanol,/singleton/reagent/drink/ice,/singleton/reagent/glycerol,/singleton/reagent/fuel,/singleton/reagent/spacecleaner) /obj/item/reagent_containers/glass/replenishing/process() diff --git a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm b/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm index ba79ce9f52e..3db10e2642f 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm @@ -7,10 +7,6 @@ //for easy reference /obj/var/datum/talking_atom/talking_atom -/obj/Destroy() - QDEL_NULL(talking_atom) - return ..() - /datum/talking_atom var/list/heard_words = list() var/last_talk_time = 0 diff --git a/code/modules/research/xenoarchaeology/tools/tools.dm b/code/modules/research/xenoarchaeology/tools/tools.dm index 25bbb2d6468..a9a55567fe8 100644 --- a/code/modules/research/xenoarchaeology/tools/tools.dm +++ b/code/modules/research/xenoarchaeology/tools/tools.dm @@ -11,6 +11,9 @@ w_class = ITEMSIZE_SMALL /obj/item/device/gps/attack_self(var/mob/user as mob) + if(!emped) + ui_interact(user) + var/turf/T = get_turf(src) to_chat(user, "[icon2html(src, user)] [src] flashes [T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)].") diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 565a8cf9e31..72560258337 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -213,6 +213,9 @@ var/global/maint_all_access = 0 security_announcement.Announce("The maintenance access requirement has been readded on all maintenance airlocks.","Attention!") /obj/machinery/door/airlock/allowed(mob/M) + if(locked) + return 0 + var/obj/item/I = M.GetIdCard() if(!I) return ..(M) diff --git a/code/modules/shareddream/dream_entry.dm b/code/modules/shareddream/dream_entry.dm index 39f0e5d32bc..494c400d3da 100644 --- a/code/modules/shareddream/dream_entry.dm +++ b/code/modules/shareddream/dream_entry.dm @@ -7,12 +7,6 @@ var/list/dream_entries = list() var/datum/weakref/srom_pulled_by var/datum/weakref/srom_pulling -/mob/living/carbon/human/Destroy() - srom_pulled_by = null - srom_pulling = null - bg = null //Just to be sure. - . = ..() - /mob/living/carbon/human/proc/handle_shared_dreaming(var/force_wakeup = FALSE) // If they're an Unconsious person with the abillity to do Skrellepathy. // If either changes, they should be nocked back to the real world. diff --git a/code/modules/spell_system/spells/spells.dm b/code/modules/spell_system/spells/spells.dm index 8eb75e10e21..8a514ca32fe 100644 --- a/code/modules/spell_system/spells/spells.dm +++ b/code/modules/spell_system/spells/spells.dm @@ -1,33 +1,6 @@ /datum/mind var/list/learned_spells -/mob/Life() - ..() - if(LAZYLEN(spell_masters)) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) - spell_master.update_spells(0, src) - -/mob/LateLogin() - ..() - if(spell_masters) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) - spell_master.toggle_open(1) - client.screen -= spell_master - -/mob/get_status_tab_items() - . = ..() - if(. && LAZYLEN(spell_list)) - for(var/spell/S in spell_list) - if((!S.connected_button) || !statpanel(S.panel)) - continue //Not showing the noclothes spell - switch(S.charge_type) - if(Sp_RECHARGE) - . += "[S.panel] [S.charge_counter/10.0]/[S.charge_max/10] [S.connected_button]" - if(Sp_CHARGES) - . +="[S.panel] [S.charge_counter]/[S.charge_max] [S.connected_button]" - if(Sp_HOLDVAR) - . += "[S.panel] [S.holder_var_type] [S.holder_var_amount] [S.connected_button]" - /hook/clone/proc/restore_spells(var/mob/H) if(H.mind && H.mind.learned_spells) for(var/spell/spell_to_add in H.mind.learned_spells) diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index a10a39652ca..7cf8ee9659e 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -3,19 +3,6 @@ // FACE SURGERY // ////////////////////////////////////////////////////////////////// -/singleton/surgery_step/face - name = "Make Facial Incisions" - priority = 2 - can_infect = FALSE - -/singleton/surgery_step/face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if(!..()) - return FALSE - var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!affected || BP_IS_ROBOTIC(affected)) - return FALSE - return target_zone == BP_MOUTH - /singleton/surgery_step/generic/cut_face allowed_tools = list( /obj/item/surgery/scalpel = 100, @@ -46,15 +33,6 @@ target.apply_damage(20, DAMAGE_OXY) target.losebreath += 10 - -/singleton/surgery_step/robotics/face - name = "Make Facial Incisions" - priority = 2 - can_infect = FALSE - -/singleton/surgery_step/robotics/face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - return ..() && target_zone == BP_MOUTH - /singleton/surgery_step/robotics/face/synthskin allowed_tools = list( /obj/item/surgery/scalpel = 100, diff --git a/code/modules/synthesized_instruments/real_instruments/Violin/violin.dm b/code/modules/synthesized_instruments/real_instruments/Violin/violin.dm index bb34e8284a1..01cb71cf6b5 100644 --- a/code/modules/synthesized_instruments/real_instruments/Violin/violin.dm +++ b/code/modules/synthesized_instruments/real_instruments/Violin/violin.dm @@ -9,6 +9,3 @@ icon_state = "violin" sound_player = /datum/sound_player/violin path = /datum/instrument/obsolete/violin - -/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user) - return !(src && in_range(src, user)) diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 45828dbf764..5f8bf239d30 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -127,6 +127,11 @@ LAZYREMOVE(climbers, user) /obj/structure/table/MouseDrop_T(atom/dropping, mob/user, params) + var/obj/item/stack/material/what = dropping + if(can_reinforce && isliving(usr) && (!usr.stat) && istype(what) && usr.get_active_hand() == what && Adjacent(usr)) + reinforce_table(what, usr) + return + if(ismob(dropping.loc)) //If placing an item if(!isitem(dropping) || user.get_active_hand() != dropping) return ..() @@ -231,6 +236,74 @@ if(!attacking_item.dropsafety()) return + if(reinforced && attacking_item.isscrewdriver()) + remove_reinforced(attacking_item, user) + if(!reinforced) + update_desc() + queue_icon_update() + update_material() + return 1 + + if(carpeted && attacking_item.iscrowbar()) + user.visible_message("\The [user] removes the carpet from \the [src].", + "You remove the carpet from \the [src].") + new /obj/item/stack/tile/carpet(loc) + carpeted = 0 + queue_icon_update() + return 1 + + if(!carpeted && material && istype(attacking_item, /obj/item/stack/tile/carpet)) + var/obj/item/stack/tile/carpet/C = attacking_item + if(C.use(1)) + user.visible_message("\The [user] adds \the [C] to \the [src].", + "You add \the [C] to \the [src].") + carpeted = 1 + queue_icon_update() + return 1 + else + to_chat(user, "You don't have enough carpet!") + + if(!reinforced && !carpeted && material && (attacking_item.iswrench() || istype(attacking_item, /obj/item/gun/energy/plasmacutter))) + remove_material(attacking_item, user) + if(!material) + update_connections(1) + queue_icon_update() + for(var/obj/structure/table/T in oview(src, 1)) + T.queue_icon_update() + update_desc() + update_material() + return 1 + + if(!carpeted && !reinforced && !material && (attacking_item.iswrench() || istype(attacking_item, /obj/item/gun/energy/plasmacutter))) + dismantle(attacking_item, user) + return 1 + + if(health < maxhealth && attacking_item.iswelder()) + var/obj/item/weldingtool/F = attacking_item + if(F.welding) + to_chat(user, "You begin reparing damage to \the [src].") + if(!attacking_item.use_tool(src, user, 20, volume = 50) || !F.use(1, user)) + return + user.visible_message("\The [user] repairs some damage to \the [src].", + "You repair some damage to \the [src].") + health = max(health+(maxhealth/5), maxhealth) // 20% repair per application + return 1 + + if(!material && can_plate && istype(attacking_item, /obj/item/stack/material)) + material = common_material_add(attacking_item, user, "plat") + if(material) + update_connections(1) + queue_icon_update() + update_desc() + update_material() + return 1 + + if(!material && can_plate && istype(attacking_item, /obj/item/reagent_containers/cooking_container/board/bowl)) + new /obj/structure/chemkit(loc) + qdel(attacking_item) + qdel(src) + return 1 + if(istype(attacking_item, /obj/item/melee/energy/blade)) var/obj/item/melee/energy/blade/blade = attacking_item blade.spark_system.queue() diff --git a/code/modules/tables/presets.dm b/code/modules/tables/presets.dm index b3db86d4be5..ff67031adea 100644 --- a/code/modules/tables/presets.dm +++ b/code/modules/tables/presets.dm @@ -6,15 +6,6 @@ build_amt = 1 // note : material_alteration does not work here because it is constructed piece by piece and not spawned in one shot like chairs -/obj/structure/table/Initialize() - if(table_mat) - material = SSmaterials.get_material_by_name(table_mat) - if(table_reinf) - reinforced = SSmaterials.get_material_by_name(table_reinf) - if(reinforced) - breakable = FALSE - . = ..() - /obj/structure/table/standard icon_state = "solid_preview" table_mat = DEFAULT_TABLE_MATERIAL diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 9ad2cd9ca36..0f4494acd3c 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -72,6 +72,13 @@ /obj/structure/table/Initialize() + if(table_mat) + material = SSmaterials.get_material_by_name(table_mat) + if(table_reinf) + reinforced = SSmaterials.get_material_by_name(table_reinf) + if(reinforced) + breakable = FALSE + . = ..() // One table per turf. @@ -110,83 +117,6 @@ if(0.5 to 1.0) . += "It has a few scrapes and dents." -/obj/structure/table/attackby(obj/item/attacking_item, mob/user) - if(reinforced && attacking_item.isscrewdriver()) - remove_reinforced(attacking_item, user) - if(!reinforced) - update_desc() - queue_icon_update() - update_material() - return 1 - - if(carpeted && attacking_item.iscrowbar()) - user.visible_message("\The [user] removes the carpet from \the [src].", - "You remove the carpet from \the [src].") - new /obj/item/stack/tile/carpet(loc) - carpeted = 0 - queue_icon_update() - return 1 - - if(!carpeted && material && istype(attacking_item, /obj/item/stack/tile/carpet)) - var/obj/item/stack/tile/carpet/C = attacking_item - if(C.use(1)) - user.visible_message("\The [user] adds \the [C] to \the [src].", - "You add \the [C] to \the [src].") - carpeted = 1 - queue_icon_update() - return 1 - else - to_chat(user, "You don't have enough carpet!") - - if(!reinforced && !carpeted && material && (attacking_item.iswrench() || istype(attacking_item, /obj/item/gun/energy/plasmacutter))) - remove_material(attacking_item, user) - if(!material) - update_connections(1) - queue_icon_update() - for(var/obj/structure/table/T in oview(src, 1)) - T.queue_icon_update() - update_desc() - update_material() - return 1 - - if(!carpeted && !reinforced && !material && (attacking_item.iswrench() || istype(attacking_item, /obj/item/gun/energy/plasmacutter))) - dismantle(attacking_item, user) - return 1 - - if(health < maxhealth && attacking_item.iswelder()) - var/obj/item/weldingtool/F = attacking_item - if(F.welding) - to_chat(user, "You begin reparing damage to \the [src].") - if(!attacking_item.use_tool(src, user, 20, volume = 50) || !F.use(1, user)) - return - user.visible_message("\The [user] repairs some damage to \the [src].", - "You repair some damage to \the [src].") - health = max(health+(maxhealth/5), maxhealth) // 20% repair per application - return 1 - - if(!material && can_plate && istype(attacking_item, /obj/item/stack/material)) - material = common_material_add(attacking_item, user, "plat") - if(material) - update_connections(1) - queue_icon_update() - update_desc() - update_material() - return 1 - - if(!material && can_plate && istype(attacking_item, /obj/item/reagent_containers/cooking_container/board/bowl)) - new /obj/structure/chemkit(loc) - qdel(attacking_item) - qdel(src) - return 1 - - return ..() - -/obj/structure/table/MouseDrop_T(obj/item/stack/material/what) - if(can_reinforce && isliving(usr) && (!usr.stat) && istype(what) && usr.get_active_hand() == what && Adjacent(usr)) - reinforce_table(what, usr) - else - return ..() - /obj/structure/table/proc/reinforce_table(obj/item/stack/material/S, mob/user) if(reinforced) to_chat(user, "\The [src] is already reinforced!") diff --git a/code/modules/tables/update_triggers.dm b/code/modules/tables/update_triggers.dm index 02b70dc965a..00f3560a3e6 100644 --- a/code/modules/tables/update_triggers.dm +++ b/code/modules/tables/update_triggers.dm @@ -3,20 +3,3 @@ for(var/obj/structure/table/T in view(src, 1)) T.update_connections() T.update_icon() - -/obj/structure/window/Destroy() - var/oldloc = loc - loc=null - for(var/obj/structure/table/T in view(oldloc, 1)) - T.update_connections() - T.update_icon() - loc=oldloc - return ..() - -/obj/structure/window/Move() - var/oldloc = loc - . = ..() - if(loc != oldloc) - for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1)) - T.update_connections() - T.update_icon() diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index f7be4e7f71f..2405e933119 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -150,10 +150,6 @@ GLOBAL_LIST_EMPTY(gps_list) return data -/obj/item/device/gps/attack_self(mob/user) - if(!emped) - ui_interact(user) - /obj/item/device/gps/ui_interact(mob/user, var/datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) diff --git a/code/modules/tgui_input/say_modal/typing.dm b/code/modules/tgui_input/say_modal/typing.dm index e1ed5e194db..8229e2b1876 100644 --- a/code/modules/tgui_input/say_modal/typing.dm +++ b/code/modules/tgui_input/say_modal/typing.dm @@ -18,15 +18,6 @@ /mob/proc/remove_all_indicators() return -/mob/set_stat(new_stat) - . = ..() - if(.) - remove_all_indicators() - -/mob/Logout() - remove_all_indicators() - return ..() - /** Sets the mob as "thinking" - with indicator and variable thinking_IC */ /datum/tgui_say/proc/start_thinking() if(!window_open || (client.prefs.toggles & HIDE_TYPING_INDICATOR)) diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 2a505e92e21..5b13b70e802 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -60,6 +60,7 @@ /obj/vehicle/bike/Destroy() QDEL_NULL(key) + QDEL_NULL(ion) return ..() /obj/vehicle/bike/setup_vehicle() @@ -266,12 +267,6 @@ ..() - -/obj/vehicle/bike/Destroy() - QDEL_NULL(ion) - - return ..() - /obj/vehicle/bike/Collide(var/atom/movable/AM) . = ..() collide_act(AM) diff --git a/code/modules/vehicles/wasp_torpedo.dm b/code/modules/vehicles/wasp_torpedo.dm index ae68c4b60e7..508b953dcd5 100644 --- a/code/modules/vehicles/wasp_torpedo.dm +++ b/code/modules/vehicles/wasp_torpedo.dm @@ -33,10 +33,6 @@ var/primmed = FALSE -/obj/item/mesmetron/Destroy() - STOP_PROCESSING(SSfast_process, src) - . = ..() - /obj/vehicle/bike/wasp_torpedo/collide_act(var/atom/movable/AM) if(!AM.density) return diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 1289eced8d5..10a53a3bdc6 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -23,13 +23,6 @@ var/global/list/can_enter_vent_with = list( /mob/living/proc/can_ventcrawl() return 0 -/mob/living/LateLogin() - ..() - //login during ventcrawl - if(is_ventcrawling && istype(loc, /obj/machinery/atmospherics)) //attach us back into the pipes - remove_ventcrawl() - add_ventcrawl(loc) - /mob/living/carbon/slime/can_ventcrawl() if(victim) to_chat(src, SPAN_WARNING("You cannot ventcrawl while feeding.")) @@ -90,9 +83,6 @@ var/global/list/can_enter_vent_with = list( if(canmove && pipe) return pipe -/mob/living/carbon/slime/can_ventcrawl() - return 1 - /mob/living/simple_animal/borer/can_ventcrawl() return 1 diff --git a/code/modules/world_api/commands/server_management.dm b/code/modules/world_api/commands/server_management.dm index 5c4900e1ab3..1aed9b97f9a 100644 --- a/code/modules/world_api/commands/server_management.dm +++ b/code/modules/world_api/commands/server_management.dm @@ -126,7 +126,7 @@ name = "admins_reload" description = "Reloads all admins and pulls new data from the forumuser API if it's enabled." -/datum/topic_command/broadcast_text/run_command(queryparams) +/datum/topic_command/admins_reload/run_command(queryparams) log_and_message_admins("AdminRanks: remote reload of the admins list initiated.") if (GLOB.config.use_forumuser_api) diff --git a/code/modules/world_api/commands/server_query.dm b/code/modules/world_api/commands/server_query.dm index 0691c8dffdd..a3da9dec300 100644 --- a/code/modules/world_api/commands/server_query.dm +++ b/code/modules/world_api/commands/server_query.dm @@ -113,39 +113,6 @@ return TRUE -/datum/topic_command/get_staff_by_rank - name = "get_staff_by_rank" - description = "Gets the list of staff, selected by their rank." - params = list( - "rank" = list("name"="flags","desc"="The rank name to query based on.","req"=1,"type"="str"), - "show_fakekeys" = list("name"="strict","desc"="Set to 1 if you want to show fake key holders as well.","req"=0,"type"="int") - ) - -/datum/topic_command/get_staff_by_flag/run_command(queryparams) - var/rank = queryparams["rank"] - - var/show_fakes = !!(queryparams["show_fakekeys"] && (text2num(queryparams["show_fakekeys"]) == 1)) - - var/list/ckeys_found = list() - - for (var/client/client in GLOB.clients) - if (!client.holder) - continue - - if (!show_fakes && client.holder.fakekey) - continue - - if (client.holder.rank == rank) - ckeys_found += client.ckey - - statuscode = 200 - response = "Staff count and list fetched." - data = list( - "ckeys" = ckeys_found - ) - - return TRUE - //Player Count /datum/topic_command/get_count_player name = "get_count_player" diff --git a/code/unit_tests/ss_test.dm b/code/unit_tests/ss_test.dm index 2f7412b417b..d1d09c1b063 100644 --- a/code/unit_tests/ss_test.dm +++ b/code/unit_tests/ss_test.dm @@ -256,7 +256,7 @@ SUBSYSTEM_DEF(unit_tests) //This is only valid during unit tests /world/Error(var/exception/e) - + CAN_BE_REDEFINED(TRUE) var/datum/unit_test/UT //Try to use the SSunit_tests_config.UT, but if for some god forsaken reason it doesn't exist, make a new one diff --git a/html/changelogs/fluffyghost-functionunification.yml b/html/changelogs/fluffyghost-functionunification.yml new file mode 100644 index 00000000000..5dc980b06bf --- /dev/null +++ b/html/changelogs/fluffyghost-functionunification.yml @@ -0,0 +1,59 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FluffyGhost + +# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - refactor: "Unified most of the procs into one definition, so there are no duplicate around the codebase." + - refactor: "Marked some of the above as overridable if a good enough case can be made for them (eg. external dependency or unlikely to be used)." diff --git a/maps/away/away_site/idris_wreck/idris_wreck.dmm b/maps/away/away_site/idris_wreck/idris_wreck.dmm index 60e951b662a..e1f25ac84a8 100644 --- a/maps/away/away_site/idris_wreck/idris_wreck.dmm +++ b/maps/away/away_site/idris_wreck/idris_wreck.dmm @@ -3886,10 +3886,6 @@ /obj/effect/shuttle_landmark/idris_wreck/nav3, /turf/template_noop, /area/space) -"YQ" = ( -/obj/effect/floor_decal/industrial/outline/grey, -/turf/simulated/floor/exoplanet/tiled, -/area/idris_wreck/starbthrust) "Zg" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 5 @@ -14194,7 +14190,7 @@ aY aY aY vs -YQ +Ec xf cF HQ