diff --git a/baystation12.dme b/baystation12.dme index e6457d346add3..1b6e27c25f736 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -98,6 +98,7 @@ #include "code\__defines\zmimic.dm" #include "code\__defines\dcs\flags.dm" #include "code\__defines\dcs\helpers.dm" +#include "code\__defines\dcs\signals\signals_area.dm" #include "code\__defines\dcs\signals\signals_atom.dm" #include "code\__defines\dcs\signals\signals_atom_movable.dm" #include "code\__defines\dcs\signals\signals_datum.dm" @@ -3416,10 +3417,12 @@ #include "maps\sierra\loadout\loadout_documents.dm" #include "mods\_modpack.dm" #include "mods\global_modpacks.dm" +#include "mods\_master_files\code\_onclick\click.dm" #include "mods\_master_files\code\game\world.dm" #include "mods\_master_files\code\game\gamemodes\ert.dm" #include "mods\_master_files\code\game\objects\effects\decals\contraband.dm" #include "mods\_master_files\code\game\objects\structures\crates_lockers\closets\_closet_appearance_definitions.dm" +#include "mods\_master_files\code\modules\clothing\voidsuits.dm" #include "mods\_master_files\code\modules\clothing\spacesuits\spacesuits.dm" #include "mods\_master_files\code\modules\culture_descriptor\_culture.dm" #include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_adherent.dm" @@ -3452,6 +3455,7 @@ #include "mods\_master_files\code\modules\mob\new_player\new_player.dm" #include "mods\_master_files\code\modules\power\gravitygenerator.dm" #include "mods\_master_files\code\modules\projectiles\projectile\bullets.dm" +#include "mods\_master_files\code\modules\species\station\adherent.dm" #include "mods\_master_files\code\modules\sounds\connector.dm" #include "mods\_master_files\code\modules\sounds\throw.dm" #include "mods\_master_files\code\modules\species\station\machine.dm" diff --git a/code/__defines/dcs/signals/signals_area.dm b/code/__defines/dcs/signals/signals_area.dm new file mode 100644 index 0000000000000..7e05ef6a0479f --- /dev/null +++ b/code/__defines/dcs/signals/signals_area.dm @@ -0,0 +1,10 @@ +// Main area signals. Format: +// When the signal is called: (signal arguments) +// All signals send the source datum of the signal as the first argument + +///from base of /area/proc/power_change(): (area/apc_area) +#define COMSIG_AREA_POWER_CHANGE "area_apc_power_change" +///from base of /area/proc/set_apc(): (area/apc_area) +#define COMSIG_AREA_APC_ADDED "area_apc_added" +///from base of /area/proc/remove_apc(): (area/apc_area) +#define COMSIG_AREA_APC_REMOVED "area_apc_removed" diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm index d7236a00638c9..cc550d2ede5e8 100644 --- a/code/controllers/subsystems/atoms.dm +++ b/code/controllers/subsystems/atoms.dm @@ -44,33 +44,32 @@ SUBSYSTEM_DEF(atoms) return atom_init_stage = INITIALIZATION_INNEW_MAPLOAD var/list/mapload_arg = list(TRUE) - var/atom/atom - var/list/params var/count = 0 var/time = Uptime() - if (!initialized) - for (atom in world) - if (!atom || atom.atom_flags & ATOM_FLAG_INITIALIZED) - continue - InitAtom(atom, mapload_arg) - if (++count % 1000) + if(!initialized) + for(var/atom/atom_to_initialize as anything in world) + if(!atom_to_initialize || atom_to_initialize.atom_flags & ATOM_FLAG_INITIALIZED) continue + InitAtom(atom_to_initialize, mapload_arg) + count++ CHECK_TICK + var/init_queue_length = length(init_queue) - if (init_queue_length) - for (var/i = 1 to init_queue_length) - atom = init_queue[i] - if (!atom || atom.atom_flags & ATOM_FLAG_INITIALIZED) + if(init_queue_length) + for(var/i = 1 to init_queue_length) + var/atom/atom_to_initialize = init_queue[i] + if (!atom_to_initialize || atom_to_initialize.atom_flags & ATOM_FLAG_INITIALIZED) continue - params = init_queue[atom] + + var/list/params = init_queue[atom_to_initialize] if (params) - InitAtom(atom, mapload_arg + params) + InitAtom(atom_to_initialize, mapload_arg + params) else - InitAtom(atom, mapload_arg) - if (++count % 500) - continue + InitAtom(atom_to_initialize, mapload_arg) + count++ CHECK_TICK init_queue.Cut(1, init_queue_length + 1) + time = max((Uptime() - time) * 0.1, 0.1) report_progress("Initialized [count] atom\s in [time]s ([floor(count/time)]/s)") atom_init_stage = INITIALIZATION_INNEW_REGULAR @@ -78,13 +77,13 @@ SUBSYSTEM_DEF(atoms) if (late_queue_length) count = 0 time = Uptime() - for (var/i = 1 to late_queue_length) - atom = late_init_queue[i] - if (!atom) - continue - atom.LateInitialize(arglist(late_init_queue[atom])) - if (++count % 250) + for(var/i = 1 to late_queue_length) + var/atom/atom_to_late_init = late_init_queue[i] + if (!atom_to_late_init) continue + + atom_to_late_init.LateInitialize(arglist(late_init_queue[atom_to_late_init])) + count++ CHECK_TICK late_init_queue.Cut(1, late_queue_length + 1) time = max((Uptime() - time) * 0.1, 0.1) diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index d8cfe79fe21ce..a0a1bbf954cb0 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -219,9 +219,13 @@ SUBSYSTEM_DEF(garbage) ++details.qdels switch (datum.gc_destroyed) if (null) + if(SEND_SIGNAL(datum, COMSIG_PREQDELETED)) // Gives any signal listener a chance to prevent atom qdel + return + datum.gc_destroyed = GC_CURRENTLY_BEING_QDELETED var/start_time = world.time var/start_tick = world.tick_usage + SEND_SIGNAL(datum, COMSIG_QDELETING) // Leting signal listeners know, that datum is being qdeleted var/hint = datum.Destroy() if (world.time != start_time) ++details.slept_destroy diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm index bbe5086a092c7..d73cf26ea2b47 100644 --- a/code/controllers/subsystems/mapping.dm +++ b/code/controllers/subsystems/mapping.dm @@ -9,6 +9,9 @@ SUBSYSTEM_DEF(mapping) var/list/away_sites_templates = list() var/list/submaps = list() var/list/submap_archetypes = list() + // [SIERRA-ADD] + var/list/patrol = list() + // [/SIERRA-ADD] /datum/controller/subsystem/mapping/UpdateStat(time) @@ -73,6 +76,10 @@ SUBSYSTEM_DEF(mapping) space_ruins_templates[MT.name] = MT else if(istype(MT, /datum/map_template/ruin/away_site)) away_sites_templates[MT.name] = MT + // [SIERRA-ADD] + if(MT.is_patrol == TRUE) + patrol[MT.name] = MT + // [/SIERRA-ADD] /proc/generateMapList(filename) RETURN_TYPE(/list) diff --git a/code/controllers/subsystems/overlays.dm b/code/controllers/subsystems/overlays.dm index 6090afe02c78e..baf3141f9a0b2 100644 --- a/code/controllers/subsystems/overlays.dm +++ b/code/controllers/subsystems/overlays.dm @@ -11,21 +11,17 @@ var/global/const/ATOM_ICON_CACHE_ALL = (ATOM_ICON_CACHE_NORMAL | ATOM_ICON_CACHE SUBSYSTEM_DEF(overlays) name = "Overlays" flags = SS_TICKER - wait = 1 // ticks + wait = 1 priority = FIRE_PRIORITY_OVERLAYS init_order = SS_INIT_OVERLAYS - /// The queue of atoms that need under/overlay updates. - var/static/list/atom/queue = list() - + VAR_PRIVATE/static/list/atom/queue = list() /// A list([icon] = list([state] = [appearance], ...), ...) cache of appearances. - var/static/list/state_cache = list() - + VAR_PRIVATE/static/list/state_cache = list() /// A list([icon] = [appearance], ...) cache of appearances. - var/static/list/icon_cache = list() - + VAR_PRIVATE/static/list/icon_cache = list() /// The number of appearances currently cached. - var/static/cache_size = 0 + VAR_PRIVATE/static/cache_size = 0 /datum/controller/subsystem/overlays/Recover() @@ -33,16 +29,15 @@ SUBSYSTEM_DEF(overlays) LIST_RESIZE(state_cache, 0) LIST_RESIZE(icon_cache, 0) cache_size = 0 - var/count = 0 - for (var/atom/atom) - atom.atom_flags &= ~ATOM_AWAITING_OVERLAY_UPDATE - if (++count % 500) - continue + for(var/atom/atom as anything in world) + if(atom.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) + SSoverlays.queue += atom + CHECK_TICK /datum/controller/subsystem/overlays/Initialize(start_uptime) - fire(FALSE, TRUE) + flush_queue() /datum/controller/subsystem/overlays/UpdateStat(time) @@ -51,73 +46,100 @@ SUBSYSTEM_DEF(overlays) ..({"Queued Atoms: [length(queue)], Cache Size: [cache_size]"}) -/datum/controller/subsystem/overlays/fire(resumed, no_mc_tick) - var/queue_length = length(queue) - if (queue_length) - var/atom/atom - for (var/i = 1 to queue_length) - atom = queue[i] - if (QDELETED(atom)) - continue - if (atom.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) - atom.UpdateOverlays() - if (no_mc_tick) - if (i % 1000) - continue - CHECK_TICK - else if (MC_TICK_CHECK) - queue.Cut(1, i + 1) - return - queue.Cut(1, queue_length + 1) +/datum/controller/subsystem/overlays/fire(resumed) + var/queue_position = 1 + while(length(queue) >= queue_position) + var/atom/atom_to_update = queue[queue_position] + if(!QDELETED(atom_to_update) && atom_to_update.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) + atom_to_update.UpdateOverlays() + + queue_position++ + if(MC_TICK_CHECK) + break + + queue.Cut(1, queue_position) + +/datum/controller/subsystem/overlays/proc/flush_queue() + var/queue_position = 1 + while(length(queue) >= queue_position) + process_atom_overlays_update(queue[queue_position]) + queue_position++ + CHECK_TICK + + LIST_RESIZE(queue, 0) + +/datum/controller/subsystem/overlays/proc/process_atom_overlays_update(atom/atom_to_update) + if(!QDELETED(atom_to_update) && atom_to_update.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) + atom_to_update.UpdateOverlays() /datum/controller/subsystem/overlays/proc/GetStateAppearance(icon, state) - var/list/subcache = state_cache[icon] - if (!subcache) - subcache = list() - state_cache[icon] = subcache - if (!subcache[state]) - var/image/image = image(icon, null, state) - subcache[state] = image.appearance - ++cache_size - return subcache[state] + var/list/state_to_appearance = state_cache[icon] + if(!state_to_appearance) + state_to_appearance = list() + state_cache[icon] = state_to_appearance + + var/state_appearance = state_to_appearance[state] + if(!state_appearance) + var/image/state_image = image(icon, null, state) + state_appearance = state_image.appearance + state_to_appearance[state] = state_appearance + cache_size++ + + return state_appearance /datum/controller/subsystem/overlays/proc/GetIconAppearance(icon) - if (!icon_cache[icon]) - var/image/image = image(icon) - icon_cache[icon] = image.appearance - ++cache_size - return icon_cache[icon] + var/icon_appearance = icon_cache[icon] + if (!icon_appearance) + var/image/icon_image = image(icon) + icon_appearance = icon_image.appearance + icon_cache[icon] = icon_appearance + cache_size++ + + return icon_appearance -/datum/controller/subsystem/overlays/proc/GetAppearanceList(atom/subject, list/sources) +/datum/controller/subsystem/overlays/proc/getAppearanceList(atom/subject, list/sources) if (!sources) return list() + if (!islist(sources)) sources = list(sources) + var/list/result = list() - var/icon/icon = subject.icon - var/atom/entry - for (var/i = 1 to length(sources)) - entry = sources[i] - if (!entry) + for (var/atom/source as anything in sources) + if(!source) continue - else if (istext(entry)) - result += GetStateAppearance(icon, entry) - else if (isicon(entry)) - result += GetIconAppearance(entry) + + if(istext(source)) + result += GetStateAppearance(subject.icon, source) + + else if(isicon(source)) + result += GetIconAppearance(source) + else - if (isloc(entry)) - if (entry.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) - entry.UpdateOverlays() - if (!ispath(entry)) - result += entry.appearance + if(isatom(source) && source.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) + source.UpdateOverlays() + + if(!ispath(source)) + result += source.appearance else - var/image/image = entry + var/image/image = source result += image.appearance + return result +/datum/controller/subsystem/overlays/proc/enque_atom_overlay_update(atom/atom_to_update) + if(!atom_to_update) + return + + if(atom_to_update.atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) + return + + atom_to_update.atom_flags |= ATOM_AWAITING_OVERLAY_UPDATE + SSoverlays.queue += atom_to_update + /// Immediately runs an overlay update. /atom/proc/ImmediateOverlayUpdate() @@ -147,11 +169,7 @@ SUBSYSTEM_DEF(overlays) /// Enqueues the atom for an overlay update if not already queued /atom/proc/QueueOverlayUpdate() SHOULD_NOT_OVERRIDE(TRUE) - if (atom_flags & ATOM_AWAITING_OVERLAY_UPDATE) - return - atom_flags |= ATOM_AWAITING_OVERLAY_UPDATE - SSoverlays.queue += src - + SSoverlays.enque_atom_overlay_update(src) /// Builds the atom's overlay state from caches /atom/proc/UpdateOverlays() @@ -160,6 +178,7 @@ SUBSYSTEM_DEF(overlays) if (QDELING(src)) LIST_RESIZE(overlays, 0) return + if (length(atom_protected_overlay_cache)) if (length(atom_overlay_cache)) overlays = atom_protected_overlay_cache + atom_overlay_cache @@ -203,7 +222,7 @@ SUBSYSTEM_DEF(overlays) SHOULD_NOT_OVERRIDE(TRUE) if (!sources) return - sources = SSoverlays.GetAppearanceList(src, sources) + sources = SSoverlays.getAppearanceList(src, sources) if (!length(sources)) return if (cache_target & ATOM_ICON_CACHE_PROTECTED) @@ -228,9 +247,11 @@ SUBSYSTEM_DEF(overlays) SHOULD_NOT_OVERRIDE(TRUE) if (!sources) return - sources = SSoverlays.GetAppearanceList(src, sources) + + sources = SSoverlays.getAppearanceList(src, sources) if (!length(sources)) return + var/update if (cache_target & ATOM_ICON_CACHE_PROTECTED) var/outcome = CutCacheBehavior(sources, atom_protected_overlay_cache) @@ -238,12 +259,14 @@ SUBSYSTEM_DEF(overlays) update = TRUE if (outcome == TRUE) atom_protected_overlay_cache = null + if (cache_target & ATOM_ICON_CACHE_NORMAL) var/outcome = CutCacheBehavior(sources, atom_overlay_cache) if (!isnull(outcome)) update = TRUE if (outcome == TRUE) atom_overlay_cache = null + if (update) QueueOverlayUpdate() diff --git a/code/controllers/subsystems/processing/icon_updates.dm b/code/controllers/subsystems/processing/icon_updates.dm index 1d2c918118104..5ce611a23d7f2 100644 --- a/code/controllers/subsystems/processing/icon_updates.dm +++ b/code/controllers/subsystems/processing/icon_updates.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(icon_update) flags = SS_TICKER priority = FIRE_PRIORITY_ICON_UPDATE init_order = SS_INIT_ICON_UPDATE - var/static/list/queue = list() + VAR_PRIVATE/static/list/queue = list() /datum/controller/subsystem/icon_update/Recover() @@ -19,44 +19,47 @@ SUBSYSTEM_DEF(icon_update) /datum/controller/subsystem/icon_update/Initialize(start_uptime) - fire(FALSE, TRUE) - - -/datum/controller/subsystem/icon_update/fire(resumed, no_mc_tick) - var/atom/atom - var/list/params - var/queue_length = length(queue) - for (var/i = 1 to queue_length) - atom = queue[i] - if (QDELETED(atom)) - continue - params = queue[atom] - if (islist(params)) - atom.update_icon(arglist(params)) - else - atom.update_icon() - if (no_mc_tick) - if (i % 100) - continue - CHECK_TICK - else if (MC_TICK_CHECK) - queue.Cut(1, i + 1) - return - if (queue_length) - queue.Cut(1, queue_length + 1) - suspend() + flush_queue() +/datum/controller/subsystem/icon_update/fire(resumed) + var/queue_position = 1 + while(length(queue) >= queue_position) + process_atom_icon_update(queue[queue_position]) + queue_position++ + if(MC_TICK_CHECK) + break + + queue.Cut(1, queue_position) + +/datum/controller/subsystem/icon_update/proc/flush_queue() + var/queue_position = 1 + while(length(queue) >= queue_position) + process_atom_icon_update(queue[queue_position]) + queue_position++ + CHECK_TICK + + LIST_RESIZE(queue, 0) + +/datum/controller/subsystem/icon_update/proc/process_atom_icon_update(atom/atom_to_update) + if(QDELETED(atom_to_update)) + return + + var/list/params = queue[atom_to_update] + if (islist(params)) + atom_to_update.update_icon(arglist(params)) + else + atom_to_update.update_icon() + +/datum/controller/subsystem/icon_update/proc/enque_atom_icon_update(atom/atom_to_update, arguments) + SSicon_update.queue[atom_to_update] = arguments /** * Adds the atom to the icon_update subsystem to be queued for icon updates. Use this if you're going to be pushing a * lot of icon updates at once. */ /atom/proc/queue_icon_update(...) - SSicon_update.queue[src] = length(args) ? args : TRUE - if (SSicon_update.suspended) - SSicon_update.wake() - + SSicon_update.enque_atom_icon_update(src, length(args) ? args : TRUE) -/hook/game_ready/proc/FlushIconUpdateQueue() - SSicon_update.fire(FALSE, TRUE) +/hook/game_ready/proc/flush_icon_update_queue() + SSicon_update.flush_queue() return TRUE diff --git a/code/game/area/area_power.dm b/code/game/area/area_power.dm index 963a86903be97..f67f32b2b282e 100644 --- a/code/game/area/area_power.dm +++ b/code/game/area/area_power.dm @@ -28,9 +28,31 @@ /area/proc/power_change() for(var/obj/machinery/M as anything in machinery_list) // for each machine in the area M.power_change() // reverify power status (to update icons etc.) + SEND_SIGNAL(src, COMSIG_AREA_POWER_CHANGE) if (fire || eject || party) update_icon() +/// Sets the apc in area. Sends COMSIG_AREA_APC_ADDED signal +/area/proc/set_apc(obj/machinery/power/apc/new_apc) + if(!istype(new_apc)) + CRASH("Invalid apc passed [log_info_line(new_apc)]") + + if(apc) + stack_trace("Apc set in area when old one is still present") + remove_apc() + + apc = new_apc + SEND_SIGNAL(src, COMSIG_AREA_APC_ADDED, new_apc) + +/// Removes current apc from area, if present. Sends COMSIG_AREA_APC_REMOVED signal +/area/proc/remove_apc() + if(!apc) + return + + SEND_SIGNAL(src, COMSIG_AREA_APC_REMOVED, apc) + apc = null + + /// Returns Integer. The total amount of power usage queued for the area from both `used_*` and `oneoff_*` for the given power channel, or all channels if `TOTAL` is passed instead. /area/proc/usage(chan) switch(chan) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index d2e549fb6405e..ccbb2f4ac2d85 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -15,7 +15,7 @@ ///2 = wired/built, 1 = circuit installed, 0 = frame var/buildstage = 2 var/number = 0 - var/last_tick //used to delay the powercheck + var/area/linked_area intercom_handling = TRUE /obj/item/device/radio/intercom/get_storage_cost() @@ -93,7 +93,7 @@ /obj/item/device/radio/intercom/Initialize(loc, dir, atom/frame) . = ..() - START_PROCESSING(SSobj, src) + find_and_set_linked_area() if (dir) set_dir(dir) @@ -148,10 +148,6 @@ . = ..() internal_channels[num2text(RAID_FREQ)] = list(access_syndicate) -/obj/item/device/radio/intercom/Destroy() - STOP_PROCESSING(SSobj, src) - return ..() - /obj/item/device/radio/intercom/attack_ai(mob/user) add_fingerprint(user) if (buildstage == 2) @@ -322,26 +318,6 @@ .["Wirecutters"] += "
Used for deconstruction. See deconstruction steps.
" .["Wrench"] += "Used for deconstruction. See deconstruction steps.
" -/obj/item/device/radio/intercom/Process() - if (wiresexposed) - on = FALSE - return - if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0)) - last_tick = world.timeofday - var/old_on = on - - if(!src.loc) - on = FALSE - else - var/area/A = get_area(src) - if(!A) - on = FALSE - else - on = A.powered(EQUIP) // set "on" to the power status - - if (on != old_on) - update_icon() - /obj/item/device/radio/intercom/on_update_icon() if (buildstage == 2 && wiresexposed) icon_state = "intercom-b2" @@ -349,10 +325,11 @@ icon_state = "intercom-b1" else if (buildstage == 0) icon_state = "intercom-f" - else if (!on) - icon_state = "intercom-p" else - icon_state = "intercom_[broadcasting][listening]" + if(on) + icon_state = "intercom_[broadcasting][listening]" + else + icon_state = "intercom-p" /obj/item/device/radio/intercom/ToggleBroadcast() ..() @@ -362,6 +339,39 @@ ..() update_icon() +/obj/item/device/radio/intercom/proc/find_and_set_linked_area() + var/area/target_area = get_area(src) + if(!target_area.apc) + RegisterSignal(target_area, COMSIG_AREA_APC_ADDED, PROC_REF(on_apc_add)) + return + + on_apc_add(target_area) + +/obj/item/device/radio/intercom/proc/on_apc_add(area/apc_area) + SIGNAL_HANDLER + + UnregisterSignal(apc_area, COMSIG_AREA_APC_ADDED) + linked_area = apc_area + RegisterSignal(apc_area, COMSIG_AREA_APC_REMOVED, PROC_REF(on_apc_removal)) + RegisterSignal(apc_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(change_status)) + +/obj/item/device/radio/intercom/proc/on_apc_removal(area/apc_area) + SIGNAL_HANDLER + + UnregisterSignal(apc_area, COMSIG_AREA_APC_REMOVED) + UnregisterSignal(apc_area, COMSIG_AREA_POWER_CHANGE) + linked_area = null + on = FALSE + update_icon() + + RegisterSignal(apc_area, COMSIG_AREA_APC_ADDED, PROC_REF(on_apc_add)) + +/obj/item/device/radio/intercom/proc/change_status() + SIGNAL_HANDLER + + on = linked_area.powered(EQUIP) + update_icon() + /obj/item/device/radio/intercom/broadcasting broadcasting = 1 diff --git a/code/modules/maps/map_template.dm b/code/modules/maps/map_template.dm index 538ec37a65321..4ae6a88591e99 100644 --- a/code/modules/maps/map_template.dm +++ b/code/modules/maps/map_template.dm @@ -11,6 +11,9 @@ var/base_turf_for_zs = null var/accessibility_weight = 0 var/template_flags = TEMPLATE_FLAG_ALLOW_DUPLICATES + // [SIERRA-ADD] + var/is_patrol = FALSE //Is the map intended to spawn to counter away site threats? + // [/SIERRA-ADD] /// Null, or a string reason for this type to be skipped in unit testing. var/skip_main_unit_tests diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 7df9d83a8c7a3..f279b86fa9994 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -95,8 +95,12 @@ if(response == "Yes") turn_on(user) -/obj/item/modular_computer/attack_ai(mob/user) +//SIERRA-REMOVE MODPACK AI +/* +/obj/item/modular_computer/attack_ai(mob/user) -------> mods\ai\code\ai.dm return attack_self(user) +*/ +//SIERRA-REMOVE /obj/item/modular_computer/attack_hand(mob/user) if(anchored) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7292c8525ee98..01c6ea536ad95 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -176,7 +176,7 @@ area = A if(autoname) SetName("\improper [area.name] APC") - area.apc = src + area.set_apc(src) . = ..() @@ -193,8 +193,8 @@ power_change() /obj/machinery/power/apc/Destroy() - src.update() - area.apc = null + update() + area.remove_apc() area.power_light = 0 area.power_equip = 0 area.power_environ = 0 @@ -813,9 +813,9 @@ if(istype(usr, /mob/living/silicon)) if(emagged || MACHINE_IS_BROKEN(src) || GET_FLAGS(stat, MACHINE_STAT_MAINT)) to_chat(usr, "The APC does not respond to the command.") - else - locked = !locked - update_icon() + else + locked = !locked + update_icon() else return FALSE diff --git a/code/modules/species/species.dm b/code/modules/species/species.dm index 0998beeb32e29..e2dd4e950fb42 100644 --- a/code/modules/species/species.dm +++ b/code/modules/species/species.dm @@ -761,11 +761,14 @@ The slots that you can use are found in items_clothing.dm and are the inventory continue if(S.subspecies_allowed && !(name in S.subspecies_allowed)) continue + if(src.species_flags && SPECIES_IPC) + break ADD_SORTED(facial_hair_style_by_gender, facialhairstyle, GLOBAL_PROC_REF(cmp_text_asc)) facial_hair_style_by_gender[facialhairstyle] = S return facial_hair_style_by_gender + /datum/species/proc/get_description(header, append, verbose = TRUE, skip_detail, skip_photo) var/list/damage_types = list( "physical trauma" = brute_mod, diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index cb420de843231..b8c71804f5758 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -20,6 +20,7 @@ /singleton/surgery_step/robotics/success_chance(mob/living/user, mob/living/carbon/human/target, obj/item/tool) . = ..() +/* SIERRA REMOVE if(!user.skill_check(SKILL_DEVICES, SKILL_TRAINED)) . -= 30 if(!user.skill_check(SKILL_DEVICES, SKILL_EXPERIENCED)) @@ -28,7 +29,15 @@ . += 35 if(user.skill_check(SKILL_DEVICES, SKILL_MASTER)) . += 30 - +*/ + if(!user.skill_check(SKILL_DEVICES, SKILL_BASIC)) + . -= 20 + if(!user.skill_check(SKILL_DEVICES, SKILL_TRAINED)) + . -= 20 + if(user.skill_check(SKILL_DEVICES, SKILL_EXPERIENCED)) + . += 20 + if(user.skill_check(SKILL_DEVICES, SKILL_MASTER)) + . += 30 ////////////////////////////////////////////////////////////////// // unscrew robotic limb hatch surgery step ////////////////////////////////////////////////////////////////// @@ -186,9 +195,9 @@ /singleton/surgery_step/robotics/repair_brute name = "Repair damage to prosthetic" allowed_tools = list( - /obj/item/weldingtool = 35, - /obj/item/weldingtool/electric = 50, - /obj/item/gun/energy/plasmacutter = 25, + /obj/item/weldingtool = 45, + /obj/item/weldingtool/electric = 60, + /obj/item/gun/energy/plasmacutter = 30, /obj/item/psychic_power/psiblade/master = 100 ) @@ -197,13 +206,15 @@ /singleton/surgery_step/robotics/repair_brute/success_chance(mob/living/user, mob/living/carbon/human/target, obj/item/tool) . = ..() - if(user.skill_check(SKILL_CONSTRUCTION, SKILL_BASIC)) - . += 5 + if(!user.skill_check(SKILL_CONSTRUCTION, SKILL_BASIC)) + . -= 15 if(user.skill_check(SKILL_CONSTRUCTION, SKILL_TRAINED)) - . += 10 + . += 15 + +/* SIERRA REMOVE if(!user.skill_check(SKILL_DEVICES, SKILL_EXPERIENCED)) . -= 10 - +*/ /singleton/surgery_step/robotics/repair_brute/pre_surgery_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected) @@ -264,8 +275,10 @@ . += 10 if(user.skill_check(SKILL_CONSTRUCTION, SKILL_TRAINED)) . += 10 +/* SIERRA REMOVE if(!user.skill_check(SKILL_DEVICES, SKILL_EXPERIENCED)) . -= 15 +*/ /singleton/surgery_step/robotics/repair_brittle/assess_bodypart(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = ..() @@ -305,13 +318,14 @@ /singleton/surgery_step/robotics/repair_burn/success_chance(mob/living/user, mob/living/carbon/human/target, obj/item/tool) . = ..() - if(user.skill_check(SKILL_ELECTRICAL, SKILL_BASIC)) - . += 5 + if(!user.skill_check(SKILL_ELECTRICAL, SKILL_BASIC)) + . -= 15 if(user.skill_check(SKILL_ELECTRICAL, SKILL_TRAINED)) - . += 10 + . += 15 +/* SIERRA REMOVE if(!user.skill_check(SKILL_DEVICES, SKILL_EXPERIENCED)) . -= 10 - +*/ /singleton/surgery_step/robotics/repair_burn/pre_surgery_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected) @@ -699,6 +713,14 @@ min_duration = 50 max_duration = 60 +/singleton/surgery_step/robotics/robone/weld/success_chance(mob/living/user, mob/living/carbon/human/target, obj/item/tool) + . = ..() + + if(user.skill_check(SKILL_CONSTRUCTION, SKILL_TRAINED)) + . += 10 + if(user.skill_check(SKILL_ELECTRICAL, SKILL_TRAINED)) + . += 10 + /singleton/surgery_step/robotics/robone/weld/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/prosthetic = affected.encased ? "\the [target]'s [affected.encased]" : "structural support in \the [target]'s [affected.name]" diff --git a/maps/away/bearcat/bearcat.dm b/maps/away/bearcat/bearcat.dm index 8702288b9b9a2..3cd47136cd197 100644 --- a/maps/away/bearcat/bearcat.dm +++ b/maps/away/bearcat/bearcat.dm @@ -36,7 +36,7 @@ description = "A wrecked light freighter." suffixes = list("bearcat/bearcat-1.dmm", "bearcat/bearcat-2.dmm") spawn_cost = 1 - player_cost = 4 + player_cost = 0 shuttles_to_initialise = list(/datum/shuttle/autodock/ferry/lift) area_usage_test_exempted_root_areas = list(/area/ship) apc_test_exempt_areas = list( @@ -52,7 +52,7 @@ /area/ship/scrap/shuttle/lift = NO_SCRUBBER|NO_VENT|NO_APC, /area/ship/scrap/command/hallway = NO_SCRUBBER|NO_VENT ) - spawn_weight = 0.67 + spawn_weight = 0.5 /datum/shuttle/autodock/ferry/lift name = "Cargo Lift" diff --git a/maps/away/scavver/scavver_gantry.dm b/maps/away/scavver/scavver_gantry.dm index e01f976457638..9c25a16b9ee60 100644 --- a/maps/away/scavver/scavver_gantry.dm +++ b/maps/away/scavver/scavver_gantry.dm @@ -8,7 +8,7 @@ description = "Salvage Gantry turned Ship" suffixes = list("scavver/scavver_gantry-1.dmm","scavver/scavver_gantry-2.dmm") spawn_cost = 1 - player_cost = 4 + player_cost = 0 accessibility_weight = 10 shuttles_to_initialise = list( /datum/shuttle/autodock/overmap/scavver_gantry, diff --git a/maps/away/skrellscoutship/skrellscoutship.dm b/maps/away/skrellscoutship/skrellscoutship.dm index 9eb6b2208d592..19d17e0f1baf2 100644 --- a/maps/away/skrellscoutship/skrellscoutship.dm +++ b/maps/away/skrellscoutship/skrellscoutship.dm @@ -11,13 +11,14 @@ description = "A Skrellian SDTF scouting vessel." suffixes = list("skrellscoutship/skrellscoutship_revamp.dmm") spawn_cost = 0.5 - player_cost = 4 + player_cost = 0 + is_patrol = TRUE shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/skrellscoutship, /datum/shuttle/autodock/overmap/skrellscoutshuttle) apc_test_exempt_areas = list( /area/ship/skrellscoutship/externalwing/port = NO_SCRUBBER|NO_VENT|NO_APC, /area/ship/skrellscoutship/externalwing/starboard = NO_SCRUBBER|NO_VENT|NO_APC ) - spawn_weight = 0.67 + spawn_weight = 0.5 /obj/overmap/visitable/sector/skrellscoutspace name = "Empty Sector" diff --git a/maps/away/voxship/voxship.dm b/maps/away/voxship/voxship.dm index 83307f5bac886..b72d3c250e090 100644 --- a/maps/away/voxship/voxship.dm +++ b/maps/away/voxship/voxship.dm @@ -12,10 +12,10 @@ description = "Vox Scavenger Ship." suffixes = list("voxship/voxship-2.dmm") spawn_cost = 0.5 - player_cost = 4 + player_cost = 0 shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/vox_ship, /datum/shuttle/autodock/overmap/vox_lander) area_usage_test_exempted_root_areas = list(/area/voxship) - spawn_weight = 0.67 + spawn_weight = 0.5 /obj/overmap/visitable/sector/vox_scav_ship name = "small asteroid cluster" diff --git a/maps/random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm b/maps/random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm index b944ce8a8d570..baeaa7f25fc74 100644 --- a/maps/random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm +++ b/maps/random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm @@ -6,7 +6,7 @@ description = "a fully functional colony on the frontier of settled space" suffixes = list("playablecolony/colony.dmm") spawn_cost = 3 - player_cost = 4 + player_cost = 0 template_flags = TEMPLATE_FLAG_CLEAR_CONTENTS | TEMPLATE_FLAG_NO_RUINS | TEMPLATE_FLAG_NO_RADS ruin_tags = RUIN_HUMAN|RUIN_HABITAT ban_ruins = list(/datum/map_template/ruin/exoplanet/playablecolony2) diff --git a/maps/random_ruins/exoplanet_ruins/playablecolony2/playablecolony2.dm b/maps/random_ruins/exoplanet_ruins/playablecolony2/playablecolony2.dm index 6979817d7b4a7..13f8d75361737 100644 --- a/maps/random_ruins/exoplanet_ruins/playablecolony2/playablecolony2.dm +++ b/maps/random_ruins/exoplanet_ruins/playablecolony2/playablecolony2.dm @@ -6,7 +6,7 @@ description = "a recently landed colony ship" suffixes = list("playablecolony2/colony2.dmm") spawn_cost = 2 - player_cost = 4 + player_cost = 0 template_flags = TEMPLATE_FLAG_CLEAR_CONTENTS | TEMPLATE_FLAG_NO_RUINS | TEMPLATE_FLAG_NO_RADS ruin_tags = RUIN_HUMAN|RUIN_HABITAT ban_ruins = list(/datum/map_template/ruin/exoplanet/playablecolony) diff --git a/maps/sierra/icons/mob/onmob/onmob_head.dmi b/maps/sierra/icons/mob/onmob/onmob_head.dmi index 0c4438eae7023..9943f1d74fe45 100644 Binary files a/maps/sierra/icons/mob/onmob/onmob_head.dmi and b/maps/sierra/icons/mob/onmob/onmob_head.dmi differ diff --git a/maps/sierra/icons/mob/onmob/onmob_suit.dmi b/maps/sierra/icons/mob/onmob/onmob_suit.dmi index 8d18cfa79f5ed..6900acc38f8c8 100644 Binary files a/maps/sierra/icons/mob/onmob/onmob_suit.dmi and b/maps/sierra/icons/mob/onmob/onmob_suit.dmi differ diff --git a/maps/sierra/icons/obj/clothing/obj_suit.dmi b/maps/sierra/icons/obj/clothing/obj_suit.dmi index 4a4c31fea2d6b..5d0cb546b0a76 100644 Binary files a/maps/sierra/icons/obj/clothing/obj_suit.dmi and b/maps/sierra/icons/obj/clothing/obj_suit.dmi differ diff --git a/maps/sierra/job/_job_defines.dm b/maps/sierra/job/_job_defines.dm index 862ab05203422..9ea432b2d4866 100644 --- a/maps/sierra/job/_job_defines.dm +++ b/maps/sierra/job/_job_defines.dm @@ -7,6 +7,6 @@ #define NABBER_JOBS /datum/job/ai, /datum/job/cyborg, /datum/job/janitor, /datum/job/scientist_assistant, /datum/job/chemist, /datum/job/roboticist, /datum/job/cargo_assistant, /datum/job/cook, /datum/job/engineer_trainee, /datum/job/doctor_trainee, /datum/job/bartender, /datum/job/steward -#define SKRELL_BLACKLISTED_JOBS /datum/job/hos, /datum/job/hop, /datum/job/cmo, /datum/job/iaa, /datum/job/psychiatrist,/datum/job/captain +#define SKRELL_BLACKLISTED_JOBS /datum/job/hos, /datum/job/hop, /datum/job/iaa, /datum/job/psychiatrist,/datum/job/captain #define MACHINE_BLACKLISTED_JOBS /datum/job/hos, /datum/job/psychiatrist, /datum/job/captain, /datum/job/security_assistant diff --git a/maps/sierra/machinery/machinery.dm b/maps/sierra/machinery/machinery.dm index efb48ed37c879..31332c6813c8b 100644 --- a/maps/sierra/machinery/machinery.dm +++ b/maps/sierra/machinery/machinery.dm @@ -117,6 +117,28 @@ islocked = 1 ssu_color = "#990000" +/obj/machinery/suit_storage_unit/explorer/engineer + name = "Expeditionary Engineer Voidsuit Storage Unit" + suit = /obj/item/clothing/suit/space/void/engineer + helmet = /obj/item/clothing/head/helmet/space/void/engineer + boots = /obj/item/clothing/shoes/magboots + tank = /obj/item/tank/oxygen + mask = /obj/item/clothing/mask/breath + req_access = list(access_explorer, access_expedition_shuttle_helm) + islocked = 1 + ssu_color = "#bf8833" + +/obj/machinery/suit_storage_unit/explorer/medic + name = "Expeditionary Medic Voidsuit Storage Unit" + suit = /obj/item/clothing/suit/space/void/medic + helmet = /obj/item/clothing/head/helmet/space/void/medic + boots = /obj/item/clothing/shoes/magboots + tank = /obj/item/tank/oxygen + mask = /obj/item/clothing/mask/breath + req_access = list(access_explorer, access_expedition_shuttle_helm) + islocked = 1 + ssu_color = "#8caecb" + /obj/machinery/suit_storage_unit/standard_unit icon_state = "industrial" base_icon_state = "industrial" diff --git a/maps/sierra/z1-z5_sierra.dmm b/maps/sierra/z1-z5_sierra.dmm index 0600c8146647b..7559859f44366 100644 --- a/maps/sierra/z1-z5_sierra.dmm +++ b/maps/sierra/z1-z5_sierra.dmm @@ -44774,6 +44774,10 @@ /obj/item/inflatable_dispenser, /turf/simulated/floor/tiled/steel_grid, /area/engineering/engine_eva) +"gDy" = ( +/obj/machinery/suit_storage_unit/explorer/engineer, +/turf/simulated/floor/tiled/techfloor, +/area/quartermaster/exploration/eva) "gDD" = ( /obj/structure/closet/secure_closet/el, /obj/floor_decal/borderfloor{ @@ -122598,11 +122602,7 @@ }, /area/space) "sgt" = ( -/obj/machinery/suit_storage_unit/explorer, -/obj/floor_decal/industrial/outline/yellow, -/obj/machinery/atmospherics/unary/vent_pump/on{ - dir = 4 - }, +/obj/machinery/suit_storage_unit/explorer/medic, /turf/simulated/floor/tiled/techfloor, /area/quartermaster/exploration/eva) "sgv" = ( @@ -157778,6 +157778,7 @@ /obj/floor_decal/corner/grey_alt{ dir = 5 }, +/obj/machinery/external_cooling_device, /turf/simulated/floor/tiled/white, /area/assembly/robotics) "xtN" = ( @@ -184952,7 +184953,7 @@ plv wBb xYO xyI -oWS +gDy sgt szw lJL diff --git a/mods/_maps/farfleet/code/farfleet.dm b/mods/_maps/farfleet/code/farfleet.dm index ea31ba6ac5d75..2df9f0c7a1efc 100644 --- a/mods/_maps/farfleet/code/farfleet.dm +++ b/mods/_maps/farfleet/code/farfleet.dm @@ -44,8 +44,9 @@ suffixes = list("farfleet-1.dmm", "farfleet-2.dmm") ban_ruins = list(/datum/map_template/ruin/away_site/patrol) spawn_cost = 0.5 - player_cost = 7 - spawn_weight = 1 + player_cost = 0 + spawn_weight = 0.5 + is_patrol = TRUE shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/snz) area_usage_test_exempted_areas = list( diff --git a/mods/_maps/sentinel/code/sentinel.dm b/mods/_maps/sentinel/code/sentinel.dm index 8b56d874d1e9e..a47aba8d989b9 100644 --- a/mods/_maps/sentinel/code/sentinel.dm +++ b/mods/_maps/sentinel/code/sentinel.dm @@ -45,8 +45,9 @@ suffixes = list("sentinel-1.dmm", "sentinel-2.dmm") ban_ruins = list(/datum/map_template/ruin/away_site/farfleet) spawn_cost = 0.5 - player_cost = 7 - spawn_weight = 1 + player_cost = 0 + spawn_weight = 0.5 + is_patrol = TRUE shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/reaper) area_usage_test_exempted_areas = list( diff --git a/mods/_master_files/code/_onclick/click.dm b/mods/_master_files/code/_onclick/click.dm new file mode 100644 index 0000000000000..3b1bdf224b6bb --- /dev/null +++ b/mods/_master_files/code/_onclick/click.dm @@ -0,0 +1,55 @@ +/mob/living/carbon/human/AltClickOn(atom/A) + if(get_dist(src, A) > 1) + return ..() + if(!stat && mind && ismob(A) && (A != src) && (src.species.name == SPECIES_ADHERENT)) + var/mob/living/carbon/human/adherent = src + var/obj/item/organ/internal/cell/adherent/adherent_core = adherent.internal_organs_by_name[BP_CELL] + if(adherent_core.ready_to_charge) + var/mob/living/carbon/human/target_human = A + var/mob/living/target = A + var/obj/item/cell/target_cell + var/obj/item/cell/adherent_cell + var/obj/item/organ/internal/cell/acell = locate() in adherent.internal_organs + if(acell && acell.cell) + adherent_cell = acell.cell + + if(adherent_cell && adherent_cell.charge <= 2000) + to_chat(src, SPAN_WARNING("Your cell charge is too low for this action.")) + return + + if(ishuman(target_human)) + var/obj/item/organ/internal/cell/cell = locate() in target_human.internal_organs + if(cell && cell.cell) + target_cell = cell.cell + else if(isrobot(target)) + var/mob/living/silicon/robot/robot = target + target_cell = robot.get_cell() + + target.visible_message(SPAN_WARNING("There is a loud crack and the smell of ozone as \the [adherent] touches \the [target].")) + playsound(loc, 'sound/effects/snap.ogg', 50, 1) + + if(target_cell) + if(target_cell.maxcharge > (target_cell.charge + 2000)) + target_cell.charge += 2000 + else + target_cell.charge = target_cell.maxcharge + to_chat(target, SPAN_NOTICE("Your [target_cell] has been charged.")) + adherent_cell.charge -= 2000 + if(istype(target_human) && target_human.species.name == SPECIES_ADHERENT) + next_click = world.time + 2 SECONDS + return + if(isrobot(target)) + target.apply_damage(100, DAMAGE_BURN, def_zone = src.zone_sel.selecting) + visible_message(SPAN_DANGER("[adherent] touches [target] with bright electrical arc connecting them.")) + to_chat(target, SPAN_DANGER("You detect damage to your components!")) + else if(ishuman(target)) + target.electrocute_act(100, src, def_zone = src.zone_sel.selecting) + visible_message(SPAN_DANGER("With bright electrical flash [adherent] touches [target] using it's tentacles.")) + else + target.apply_damage(100, DAMAGE_BURN, def_zone = src.zone_sel.selecting) + visible_message(SPAN_DANGER("With bright electrical flash [adherent] touches [target] using it's tentacles.")) + admin_attack_log(src, target, "Has electrocuted", "Has been electrocuted", "electrocuted") + target.throw_at(get_step(target,get_dir(src,target)), 5, 10) + next_click = world.time + 2 SECONDS + return + return ..() \ No newline at end of file diff --git a/mods/_master_files/code/modules/clothing/voidsuits.dm b/mods/_master_files/code/modules/clothing/voidsuits.dm new file mode 100644 index 0000000000000..9621094900221 --- /dev/null +++ b/mods/_master_files/code/modules/clothing/voidsuits.dm @@ -0,0 +1,79 @@ +/obj/item/clothing/head/helmet/space/void/medic + desc = "An atmos resistant helmet for space and planet exploration." + name = "medic voidsuit helmet" + icon = 'maps/torch/icons/obj/obj_head_solgov.dmi' + item_icons = list(slot_head_str = 'maps/sierra/icons/mob/onmob/onmob_head.dmi') + icon_state = "rig0_explorer" + item_state = "medic_helm" + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + light_overlay = "helmet_light_dual" + tinted = FALSE +/obj/item/clothing/suit/space/void/medic + desc = "An atmos resistant voidsuit for space and planet exploration." + name = "medic voidsuit" + icon = 'maps/sierra/icons/obj/clothing/obj_suit.dmi' + item_icons = list(slot_wear_suit_str = 'maps/sierra/icons/mob/onmob/onmob_suit.dmi') + icon_state = "void_medic" + item_state = "medic_rig" + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/toolbox,/obj/item/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/rcd,/obj/item/rpd) + +/obj/item/clothing/head/helmet/space/void/engineer + desc = "An atmos resistant helmet for space and planet exploration." + name = "engineer voidsuit helmet" + icon = 'maps/torch/icons/obj/obj_head_solgov.dmi' + item_icons = list(slot_head_str = 'maps/sierra/icons/mob/onmob/onmob_head.dmi') + icon_state = "rig0_explorer" + item_state = "engie_helm" + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + light_overlay = "helmet_light_dual" + tinted = FALSE +/obj/item/clothing/suit/space/void/engineer + desc = "An atmos resistant voidsuit for space and planet exploration." + name = "engineer voidsuit" + icon = 'maps/sierra/icons/obj/clothing/obj_suit.dmi' + item_icons = list(slot_wear_suit_str = 'maps/sierra/icons/mob/onmob/onmob_suit.dmi') + icon_state = "void_engie" + item_state = "engie_rig" + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/toolbox,/obj/item/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/rcd,/obj/item/rpd) + +/obj/item/clothing/suit/space/void/engineer/prepared + helmet = /obj/item/clothing/head/helmet/space/void/engineer + boots = /obj/item/clothing/shoes/magboots + item_flags = ITEM_FLAG_THICKMATERIAL | ITEM_FLAG_INVALID_FOR_CHAMELEON + +/obj/item/clothing/suit/space/void/medic/prepared + helmet = /obj/item/clothing/head/helmet/space/void/medic + boots = /obj/item/clothing/shoes/magboots + item_flags = ITEM_FLAG_THICKMATERIAL | ITEM_FLAG_INVALID_FOR_CHAMELEON + +/obj/item/clothing/head/helmet/space/void/medic + camera = /obj/machinery/camera/network/helmet + +/obj/item/clothing/head/helmet/space/void/engineer + camera = /obj/machinery/camera/network/helmet diff --git a/mods/_master_files/code/modules/species/station/adherent.dm b/mods/_master_files/code/modules/species/station/adherent.dm new file mode 100644 index 0000000000000..8884960d049c8 --- /dev/null +++ b/mods/_master_files/code/modules/species/station/adherent.dm @@ -0,0 +1,4 @@ +/datum/species/adherent/New() + LAZYINITLIST(inherent_verbs) + inherent_verbs += /mob/living/carbon/human/proc/toggle_emergency_discharge + ..() \ No newline at end of file diff --git a/mods/adherent_discharge/README.md b/mods/adherent_discharge/README.md new file mode 100644 index 0000000000000..7aa1bf23c2ee0 --- /dev/null +++ b/mods/adherent_discharge/README.md @@ -0,0 +1,74 @@ + +#### Список PRов: + +- https://github.com/SierraBay/SierraBay12/pull/1653 + + + +## Adherent Discharge + +ID мода: ADHERENT_DISCHARGE + + +### Описание мода + +Этот мод служит примером для разработчиков и существует лишь для того, +чтобы его можно было легко скопировать и вставить в другое место. + + +### Изменения *кор кода* + +- Отсутствуют + + +### Оверрайды + +- `mods/_master_files/code/_onclick/click.dm`: `/mob/living/carbon/human/AltClickOn()` +- `mods/_master_files/code/modules/species/station/adherent.dm`: `/datum/species/adherent/New()` + + +### Дефайны + +- Отсутствуют + + +### Используемые файлы, не содержащиеся в модпаке + +- Отсутствуют + + +### Авторы: + +Lexanx diff --git a/mods/adherent_discharge/_adherent_discharge.dm b/mods/adherent_discharge/_adherent_discharge.dm new file mode 100644 index 0000000000000..ee2718ce2524d --- /dev/null +++ b/mods/adherent_discharge/_adherent_discharge.dm @@ -0,0 +1,4 @@ +/singleton/modpack/adherent_discharge + name = "Adherent Discharge" + desc = "Добавляет Адхерентам кнопку удара электричеством." + author = "Lexanx" diff --git a/mods/adherent_discharge/_adherent_discharge.dme b/mods/adherent_discharge/_adherent_discharge.dme new file mode 100644 index 0000000000000..c8a66146a6812 --- /dev/null +++ b/mods/adherent_discharge/_adherent_discharge.dme @@ -0,0 +1,6 @@ +#ifndef MODPACK_ADHERENT_DISCHARGE +#define MODPACK_ADHERENT_DISCHARGE + +#include "_adherent_discharge.dm" +#include "code/adherent.dm" +#endif diff --git a/mods/adherent_discharge/code/adherent.dm b/mods/adherent_discharge/code/adherent.dm new file mode 100644 index 0000000000000..681dec209ae83 --- /dev/null +++ b/mods/adherent_discharge/code/adherent.dm @@ -0,0 +1,21 @@ +/obj/item/organ/internal/cell/adherent + var/ready_to_charge + + +/mob/living/carbon/human/proc/toggle_emergency_discharge() + set category = "Abilities" + set name = "Toggle emergency discharge" + set desc = "Allows you to overload your piezo capacitors." + + var/mob/living/carbon/human/adherent = src + var/obj/item/organ/internal/cell/adherent/adherent_core = adherent.internal_organs_by_name[BP_CELL] + if(!adherent_core.ready_to_charge) + adherent_core.ready_to_charge = TRUE + to_chat(src, SPAN_WARNING("The emergency discharge is ready for use.")) + to_chat(src, SPAN_GOOD("You are ready to discharge, use alt+click on target to electrocute them.")) + adherent.visible_message(SPAN_WARNING("You hear silent crackle sounds from [adherent] tentacles")) + playsound(loc, 'mods/adherent_discharge/sounds/discharge_on.ogg', 40, 1) + return + + adherent_core.ready_to_charge = FALSE + to_chat(src, SPAN_WARNING("You have relieved the tension of your tentacles.")) diff --git a/mods/adherent_discharge/sounds/discharge_on.ogg b/mods/adherent_discharge/sounds/discharge_on.ogg new file mode 100644 index 0000000000000..dcb9e407eb65c Binary files /dev/null and b/mods/adherent_discharge/sounds/discharge_on.ogg differ diff --git a/mods/ai/README.md b/mods/ai/README.md index 5950c2588ae15..53153d4a13c72 100644 --- a/mods/ai/README.md +++ b/mods/ai/README.md @@ -29,6 +29,7 @@ ID мода: AI - `code/modules/mob/living/silicon/ai/ai.dm`: `var/global/list/ai_verbs_default` - `code/modules/mob/observer/freelook/chunk.dm`: `/datum/obfuscation/proc/get_obfuscation()` +- `code/modules/modular_computers/computers/modular_computer/interaction.dm` : `/obj/item/modular_computer/attack_ai` + + +## Мод-пример + +ID мода: EX_RIGS + + +### Описание мода + +Добавляет новые риги для ЭК-инженера, и ЭК-медика + + +### Изменения *кор кода* + +- Отсутствует (сам в шоке) + + +### Оверрайды + +- `mods/_master_files/code/modules/clothing/voidsuits.dm` + + +### Дефайны + +- нет + + +### Используемые файлы, не содержащиеся в модпаке + +- нет + + +### Авторы: + +ddorou + diff --git a/mods/ex_rigs/_ex_rigs.dm b/mods/ex_rigs/_ex_rigs.dm new file mode 100644 index 0000000000000..54945b25a8c93 --- /dev/null +++ b/mods/ex_rigs/_ex_rigs.dm @@ -0,0 +1,4 @@ +/singleton/modpack/example + name = "EX_RIGS" + desc = "Новые риги для ЭК медика и инженера." + author = "ddorou" diff --git a/mods/ex_rigs/_ex_rigs.dme b/mods/ex_rigs/_ex_rigs.dme new file mode 100644 index 0000000000000..b64d21a2d40c6 --- /dev/null +++ b/mods/ex_rigs/_ex_rigs.dme @@ -0,0 +1,8 @@ +#ifndef EX_RIGS +#define EX_RIGS + + +// Далее просто включай свой код +// #include "code/something.dm" + +#endif diff --git a/mods/global_modpacks.dm b/mods/global_modpacks.dm index 4bb0be395e7a0..cf00edee2d8b7 100644 --- a/mods/global_modpacks.dm +++ b/mods/global_modpacks.dm @@ -1,5 +1,6 @@ // SIERRA TODO: GET RID OF IT!!! #include "ai/_ai.dme" +#include "adherent_discharge/_adherent_discharge.dme" #include "body_markings/_body_markings.dme" #include "client_verbs/_client_verbs.dme" #include "don_loadout/_don_loadout.dme"