", "\[cell\]")
text = replacetext(text, "", "\[logo\]")
return text
-
-#define string2charlist(string) (splittext(string, regex("(\\x0A|.)")) - splittext(string, ""))
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 7e57a394988..fc0f7520e0e 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -2017,5 +2017,10 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
set waitfor = FALSE
return call(source, proctype)(arglist(arguments))
+/proc/IsFrozen(atom/A)
+ if(A in GLOB.frozen_atom_list)
+ return TRUE
+ return FALSE
+
/// Waits at a line of code until X is true
#define UNTIL(X) while(!(X)) stoplag()
diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm
index 21af95cab48..ab3bfa85451 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -47,7 +47,10 @@ GLOBAL_LIST_EMPTY(ladders)
GLOBAL_LIST_INIT(active_diseases, list()) //List of Active disease in all mobs; purely for quick referencing.
GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects
-
+GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert
GLOBAL_LIST_EMPTY(explosive_walls)
GLOBAL_LIST_EMPTY(engine_beacon_list)
+
+/// List of wire colors for each object type of that round. One for airlocks, one for vendors, etc.
+GLOBAL_LIST_EMPTY(wire_color_directory) // This is an associative list with the `holder_type` as the key, and a list of colors as the value.
diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm
index f5f71e65c57..50e70bc62a4 100644
--- a/code/_globalvars/logging.dm
+++ b/code/_globalvars/logging.dm
@@ -34,4 +34,6 @@ GLOBAL_PROTECT(IClog)
GLOBAL_LIST_EMPTY(OOClog)
GLOBAL_PROTECT(OOClog)
+GLOBAL_DATUM_INIT(logging, /datum/logging, new /datum/logging())
+
GLOBAL_LIST_INIT(investigate_log_subjects, list("notes", "watchlist", "hrefs"))
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index fbb04d4c021..3872e266a4a 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -145,12 +145,10 @@
/mob/living/silicon/ai/MiddleClickOn(var/atom/A)
A.AIMiddleClick(src)
-/*
- The following criminally helpful code is just the previous code cleaned up;
- I have no idea why it was in atoms.dm instead of respective files.
-*/
-/atom/proc/AICtrlShiftClick(var/mob/user) // Examines
+// DEFAULT PROCS TO OVERRIDE
+
+/atom/proc/AICtrlShiftClick(mob/user) // Examines
if(user.client)
user.examinate(src)
return
@@ -158,74 +156,85 @@
/atom/proc/AIAltShiftClick()
return
-/obj/machinery/door/airlock/AIAltShiftClick() // Sets/Unsets Emergency Access Override
- if(density)
- Topic(src, list("src" = UID(), "command"="emergency", "activate" = "1"), 1) // 1 meaning no window (consistency!)
- else
- Topic(src, list("src" = UID(), "command"="emergency", "activate" = "0"), 1)
- return
-
-/atom/proc/AIShiftClick(var/mob/user)
+/atom/proc/AIShiftClick(mob/living/user) // borgs use this too
if(user.client)
user.examinate(src)
return
-/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
- if(density)
- Topic(src, list("src" = UID(), "command"="open", "activate" = "1"), 1) // 1 meaning no window (consistency!)
- else
- Topic(src, list("src" = UID(), "command"="open", "activate" = "0"), 1)
+/atom/proc/AICtrlClick(mob/living/silicon/ai/user)
return
-/atom/proc/AICtrlClick(var/mob/living/silicon/ai/user)
- return
-
-/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
- if(locked)
- Topic(src, list("src" = UID(), "command"="bolts", "activate" = "0"), 1)// 1 meaning no window (consistency!)
- else
- Topic(src, list("src" = UID(), "command"="bolts", "activate" = "1"), 1)
-
-/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
- Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
-
-/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
- Topic(src, list("src" = UID(), "command"="enable", "value"="[!enabled]"), 1) // 1 meaning no window (consistency!)
-
-/atom/proc/AIAltClick(var/atom/A)
+/atom/proc/AIAltClick(atom/A)
AltClick(A)
-/obj/machinery/door/airlock/AIAltClick() // Electrifies doors.
- if(!electrified_until)
- // permanent shock
- Topic(src, list("src" = UID(), "command"="electrify_permanently", "activate" = "1"), 1) // 1 meaning no window (consistency!)
- else
- // disable/6 is not in Topic; disable/5 disables both temporary and permanent shock
- Topic(src, list("src" = UID(), "command"="electrify_permanently", "activate" = "0"), 1)
+/atom/proc/AIMiddleClick(mob/living/user)
return
+/mob/living/silicon/ai/TurfAdjacent(turf/T)
+ return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T))
+
+
+// APC
+
+/obj/machinery/power/apc/AICtrlClick(mob/living/user) // turns off/on APCs.
+ toggle_breaker(user)
+
+
+// TURRETCONTROL
+
+// These two will be changed with TGUI turrets/turretcontrol.
+/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
+ Topic(src, list("src" = UID(), "command"="enable", "value"="[!enabled]"), 1) // 1 meaning no window (consistency!)
+
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
Topic(src, list("src" = UID(), "command"="lethal", "value"="[!lethal]"), 1) // 1 meaning no window (consistency!)
-/atom/proc/AIMiddleClick()
- return
-/obj/machinery/door/airlock/AIMiddleClick() // Toggles door bolt lights.
- if(!src.lights)
- Topic(src, list("src" = UID(), "command"="lights", "activate" = "1"), 1) // 1 meaning no window (consistency!)
+// AIRLOCKS
+
+/obj/machinery/door/airlock/AIAltShiftClick(mob/user) // Sets/Unsets Emergency Access Override
+ emergency = !emergency
+ update_icon()
+
+/obj/machinery/door/airlock/AIShiftClick(mob/user) // Opens and closes doors!
+ if(welded)
+ to_chat(user, "The airlock has been welded shut!")
+ if(locked)
+ locked = !locked
+ if(density)
+ open()
else
- Topic(src, list("src" = UID(), "command"="lights", "activate" = "0"), 1)
- return
+ close()
-/obj/machinery/ai_slipper/AICtrlClick() //Turns liquid dispenser on or off
+/obj/machinery/door/airlock/AICtrlClick(mob/living/silicon/ai/user) // Bolts doors
+ locked = !locked
+ update_icon()
+
+/obj/machinery/door/airlock/AIAltClick(mob/living/silicon/ai/user) // Electrifies doors.
+ if(wires.is_cut(WIRE_ELECTRIFY))
+ to_chat(user, "The electrification wire is cut - Cannot electrify the door.")
+ if(isElectrified())
+ electrify(0) // un-shock
+ else
+ electrify(-1) // permanent shock
+
+
+/obj/machinery/door/airlock/AIMiddleClick(mob/living/user) // Toggles door bolt lights.
+ if(wires.is_cut(WIRE_BOLT_LIGHT))
+ to_chat(user, "The bolt lights wire has been cut - The door bolt lights are permanently disabled.")
+ else if(lights)
+ lights = FALSE
+ to_chat(user, "The door bolt lights have been disabled.")
+ else if(!lights)
+ lights = TRUE
+ to_chat(user, "The door bolt lights have been enabled.")
+ update_icon()
+
+
+// AI-CONTROLLED SLIP GENERATOR IN AI CORE
+
+/obj/machinery/ai_slipper/AICtrlClick(mob/living/silicon/ai/user) //Turns liquid dispenser on or off
ToggleOn()
/obj/machinery/ai_slipper/AIAltClick() //Dispenses liquid if on
Activate()
-
-//
-// Override AdjacentQuick for AltClicking
-//
-
-/mob/living/silicon/ai/TurfAdjacent(var/turf/T)
- return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T))
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index d840f64bb4a..36b6d647b7d 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -73,7 +73,9 @@
var/dragged = modifiers["drag"]
if(dragged && !modifiers[dragged])
return
-
+ if(IsFrozen(A) && !is_admin(usr))
+ to_chat(usr, "Interacting with admin-frozen players is not permitted.")
+ return
if(modifiers["middle"] && modifiers["shift"] && modifiers["ctrl"])
MiddleShiftControlClickOn(A)
return
diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm
index ada0ce8cd30..856f724f925 100644
--- a/code/_onclick/hud/ai.dm
+++ b/code/_onclick/hud/ai.dm
@@ -64,7 +64,7 @@
/obj/screen/ai/alerts/Click()
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
- AI.subsystem_alarm_monitor()
+ AI.ai_alerts()
/obj/screen/ai/announcement
name = "Make Announcement"
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index a93e65c762b..7b53bce22de 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -3,7 +3,7 @@
//PUBLIC - call these wherever you want
-/mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE)
+/mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE, timeout_override, no_anim)
/*
Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
@@ -59,14 +59,16 @@
LAZYSET(alerts, category, alert) // This also creates the list if it doesn't exist
if(client && hud_used)
hud_used.reorganize_alerts()
- alert.transform = matrix(32, 6, MATRIX_TRANSLATE)
- animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
- if(alert.timeout)
- spawn(alert.timeout)
- if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
- clear_alert(category)
- alert.timeout = world.time + alert.timeout - world.tick_lag
+ if(!no_anim)
+ alert.transform = matrix(32, 6, MATRIX_TRANSLATE)
+ animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
+
+ var/timeout = timeout_override || alert.timeout
+ if(timeout)
+ addtimer(CALLBACK(alert, /obj/screen/alert/.proc/do_timeout, src, category), timeout)
+ alert.timeout = world.time + timeout - world.tick_lag
+
return alert
// Proc to clear an existing alert.
@@ -94,7 +96,6 @@
var/alerttooltipstyle = ""
var/override_alerts = FALSE //If it is overriding other alerts of the same type
-
/obj/screen/alert/MouseEntered(location,control,params)
openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle)
@@ -102,6 +103,12 @@
/obj/screen/alert/MouseExited()
closeToolTip(usr)
+/obj/screen/alert/proc/do_timeout(mob/M, category)
+ if(!M || !M.alerts)
+ return
+
+ if(timeout && M.alerts[category] == src && world.time >= timeout)
+ M.clear_alert(category)
//Gas alerts
/obj/screen/alert/not_enough_oxy
@@ -507,6 +514,34 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 300
var/atom/target = null
var/action = NOTIFY_JUMP
+ var/show_time_left = FALSE // If true you need to call START_PROCESSING manually
+ var/image/time_left_overlay // The last image showing the time left
+ var/datum/candidate_poll/poll // If set, on Click() it'll register the player as a candidate
+
+/obj/screen/alert/notify_action/process()
+ if(show_time_left)
+ var/timeleft = timeout - world.time
+ if(timeleft <= 0)
+ return PROCESS_KILL
+
+ if(time_left_overlay)
+ overlays -= time_left_overlay
+
+ var/obj/O = new
+ O.maptext = "[CEILING(timeleft / 10, 1)]"
+ O.maptext_width = O.maptext_height = 128
+ var/matrix/M = new
+ M.Translate(4, 16)
+ O.transform = M
+
+ var/image/I = image(O)
+ I.layer = FLOAT_LAYER
+ I.plane = FLOAT_PLANE + 1
+ overlays += I
+
+ time_left_overlay = I
+ qdel(O)
+ ..()
/obj/screen/alert/notify_action/Destroy()
target = null
@@ -515,20 +550,55 @@ so as to remain in compliance with the most up-to-date laws."
/obj/screen/alert/notify_action/Click()
if(!usr || !usr.client)
return
- if(!target)
- return
var/mob/dead/observer/G = usr
if(!istype(G))
return
- switch(action)
- if(NOTIFY_ATTACK)
- target.attack_ghost(G)
- if(NOTIFY_JUMP)
- var/turf/T = get_turf(target)
- if(T && isturf(T))
- G.loc = T
- if(NOTIFY_FOLLOW)
- G.ManualFollow(target)
+
+ if(poll)
+ if(poll.sign_up(G))
+ // Add a small overlay to indicate we've signed up
+ display_signed_up()
+ else if(target)
+ switch(action)
+ if(NOTIFY_ATTACK)
+ target.attack_ghost(G)
+ if(NOTIFY_JUMP)
+ var/turf/T = get_turf(target)
+ if(T && isturf(T))
+ G.loc = T
+ if(NOTIFY_FOLLOW)
+ G.ManualFollow(target)
+
+/obj/screen/alert/notify_action/Topic(href, href_list)
+ if(..())
+ return TRUE
+
+ if(href_list["signup"] && isobserver(usr) && poll?.sign_up(usr))
+ display_signed_up()
+
+/obj/screen/alert/notify_action/proc/display_signed_up()
+ var/image/I = image('icons/mob/screen_gen.dmi', icon_state = "selector")
+ I.layer = FLOAT_LAYER
+ I.plane = FLOAT_PLANE + 2
+ overlays += I
+
+/obj/screen/alert/notify_action/proc/display_stacks(stacks = 1)
+ if(stacks <= 1)
+ return
+
+ var/obj/O = new
+ O.maptext = "[stacks]x"
+ O.maptext_width = O.maptext_height = 128
+ var/matrix/M = new
+ M.Translate(4, 2)
+ O.transform = M
+
+ var/image/I = image(O)
+ I.layer = FLOAT_LAYER
+ I.plane = FLOAT_PLANE + 1
+ overlays += I
+
+ qdel(O)
/obj/screen/alert/notify_soulstone
name = "Soul Stone"
diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm
index a291120fb85..67df5eb3013 100644
--- a/code/_onclick/hud/ghost.dm
+++ b/code/_onclick/hud/ghost.dm
@@ -81,6 +81,9 @@
/obj/screen/ghost/respawn_pai/Click()
var/mob/dead/observer/G = usr
+ if(!GLOB.paiController.check_recruit(G))
+ to_chat(G, "You are not eligible to become a pAI.")
+ return
GLOB.paiController.recruitWindow(G)
/datum/hud/ghost
diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm
index d628124e052..6c9e95f457e 100644
--- a/code/_onclick/hud/guardian.dm
+++ b/code/_onclick/hud/guardian.dm
@@ -13,7 +13,7 @@
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
-
+
using = new /obj/screen/guardian/Manifest()
using.screen_loc = ui_rhand
static_inventory += using
@@ -49,8 +49,8 @@
/obj/screen/guardian/Manifest/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
- G.Manifest()
-
+ if(G.loc == G.summoner)
+ G.Manifest()
/obj/screen/guardian/Recall
icon_state = "recall"
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index f88244c0cd8..4fd5b956df5 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -81,7 +81,7 @@
user.do_attack_animation(M)
. = M.attacked_by(src, user, def_zone)
- add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL)
+ add_attack_logs(user, M, "Attacked with [name] ([uppertext(user.a_intent)]) ([uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL)
add_fingerprint(user)
diff --git a/code/_onclick/rig.dm b/code/_onclick/rig.dm
deleted file mode 100644
index ff55f35cb57..00000000000
--- a/code/_onclick/rig.dm
+++ /dev/null
@@ -1,84 +0,0 @@
-
-#define MIDDLE_CLICK 0
-#define ALT_CLICK 1
-#define CTRL_CLICK 2
-#define MAX_HARDSUIT_CLICK_MODE 2
-
-/client
- var/hardsuit_click_mode = MIDDLE_CLICK
-
-/client/verb/toggle_hardsuit_mode()
- set name = "Toggle Hardsuit Activation Mode"
- set desc = "Switch between hardsuit activation modes."
- set category = "OOC"
-
- hardsuit_click_mode++
- if(hardsuit_click_mode > MAX_HARDSUIT_CLICK_MODE)
- hardsuit_click_mode = 0
-
- switch(hardsuit_click_mode)
- if(MIDDLE_CLICK)
- to_chat(src, "Hardsuit activation mode set to middle-click.")
- if(ALT_CLICK)
- to_chat(src, "Hardsuit activation mode set to alt-click.")
- if(CTRL_CLICK)
- to_chat(src, "Hardsuit activation mode set to control-click.")
- else
- // should never get here, but just in case:
- log_runtime(EXCEPTION("Bad hardsuit click mode: [hardsuit_click_mode] - expected 0 to [MAX_HARDSUIT_CLICK_MODE]"), src)
- to_chat(src, "Somehow you bugged the system. Setting your hardsuit mode to middle-click.")
- hardsuit_click_mode = MIDDLE_CLICK
-
-/mob/living/MiddleClickOn(atom/A)
- if(client && client.hardsuit_click_mode == MIDDLE_CLICK)
- if(HardsuitClickOn(A))
- return
- ..()
-
-/mob/living/AltClickOn(atom/A)
- if(client && client.hardsuit_click_mode == ALT_CLICK)
- if(HardsuitClickOn(A))
- return
- ..()
-
-/mob/living/CtrlClickOn(atom/A)
- if(client && client.hardsuit_click_mode == CTRL_CLICK)
- if(HardsuitClickOn(A))
- return
- ..()
-
-/mob/living/proc/can_use_rig()
- return 0
-
-/mob/living/carbon/human/can_use_rig()
- return 1
-
-/mob/living/carbon/brain/can_use_rig()
- return istype(loc, /obj/item/mmi)
-
-/mob/living/silicon/ai/can_use_rig()
- return istype(loc, /obj/item/aicard)
-
-/mob/living/silicon/pai/can_use_rig()
- return loc == card
-
-/mob/living/proc/HardsuitClickOn(var/atom/A, var/alert_ai = 0)
- if(!can_use_rig() || (next_move > world.time))
- return 0
- var/obj/item/rig/rig = get_rig()
- if(istype(rig) && !rig.offline && rig.selected_module)
- if(src != rig.wearer)
- if(rig.ai_can_move_suit(src, check_user_module = 1))
- message_admins("[key_name_admin(src)] is trying to force \the [key_name_admin(rig.wearer)] to use a hardsuit module.")
- else
- return 0
- rig.selected_module.engage(A, alert_ai)
- if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns
- changeNext_move(CLICK_CD_MELEE)
- return 1
- return 0
-
-#undef MIDDLE_CLICK
-#undef ALT_CLICK
-#undef CTRL_CLICK
-#undef MAX_HARDSUIT_CLICK_MODE
diff --git a/code/controllers/subsystem/alarm.dm b/code/controllers/subsystem/alarm.dm
index 289adf6de40..3d91d763be3 100644
--- a/code/controllers/subsystem/alarm.dm
+++ b/code/controllers/subsystem/alarm.dm
@@ -1,31 +1,31 @@
-SUBSYSTEM_DEF(alarms)
- name = "Alarms"
- init_order = INIT_ORDER_ALARMS // 2
- offline_implications = "Alarms (Power, camera, fire, etc) will no longer be checked. No immediate action is needed."
- var/datum/alarm_handler/atmosphere/atmosphere_alarm = new()
- var/datum/alarm_handler/burglar/burglar_alarm = new()
- var/datum/alarm_handler/camera/camera_alarm = new()
- var/datum/alarm_handler/fire/fire_alarm = new()
- var/datum/alarm_handler/motion/motion_alarm = new()
- var/datum/alarm_handler/power/power_alarm = new()
- var/list/datum/alarm/all_handlers
+SUBSYSTEM_DEF(alarm)
+ name = "Alarm"
+ flags = SS_NO_INIT | SS_NO_FIRE
+ var/list/alarms = list("Motion" = list(), "Fire" = list(), "Atmosphere" = list(), "Power" = list(), "Camera" = list(), "Burglar" = list())
-/datum/controller/subsystem/alarms/Initialize(start_timeofday)
- all_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
- return ..()
+/datum/controller/subsystem/alarm/proc/triggerAlarm(class, area/A, list/O, obj/alarmsource)
+ var/list/L = alarms[class]
+ for(var/I in L)
+ if(I == A.name)
+ var/list/alarm = L[I]
+ var/list/sources = alarm[3]
+ if(!(alarmsource.UID() in sources))
+ sources += alarmsource.UID()
+ return TRUE
+ L[A.name] = list(get_area_name(A, TRUE), O, list(alarmsource.UID()))
+ SEND_SIGNAL(SSalarm, COMSIG_TRIGGERED_ALARM, class, A, O, alarmsource)
+ return TRUE
-/datum/controller/subsystem/alarms/fire()
- for(var/datum/alarm_handler/AH in all_handlers)
- AH.process()
+/datum/controller/subsystem/alarm/proc/cancelAlarm(class, area/A, obj/origin)
+ var/list/L = alarms[class]
+ var/cleared = FALSE
+ for(var/I in L)
+ if(I == A.name)
+ var/list/alarm = L[I]
+ var/list/srcs = alarm[3]
+ srcs -= origin.UID()
+ if(!length(srcs))
+ cleared = TRUE
+ L -= I
-/datum/controller/subsystem/alarms/proc/active_alarms()
- var/list/all_alarms = new ()
- for(var/datum/alarm_handler/AH in all_handlers)
- var/list/alarms = AH.alarms
- all_alarms += alarms
-
- return all_alarms
-
-/datum/controller/subsystem/alarms/proc/number_of_active_alarms()
- var/list/alarms = active_alarms()
- return alarms.len
+ SEND_SIGNAL(SSalarm, COMSIG_CANCELLED_ALARM, class, A, origin, cleared)
diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm
deleted file mode 100644
index 4eb468a0952..00000000000
--- a/code/controllers/subsystem/chat.dm
+++ /dev/null
@@ -1,67 +0,0 @@
-SUBSYSTEM_DEF(chat)
- name = "Chat"
- flags = SS_TICKER|SS_NO_INIT
- wait = 1
- priority = FIRE_PRIORITY_CHAT
- init_order = INIT_ORDER_CHAT
- offline_implications = "Chat messages will no longer be cleanly queued. No immediate action is needed."
-
- var/list/payload = list()
-
-
-/datum/controller/subsystem/chat/fire()
- for(var/i in payload)
- var/client/C = i
- if(C)
- C << output(payload[C], "browseroutput:output")
- payload -= C
-
- if(MC_TICK_CHECK)
- return
-
-
-/datum/controller/subsystem/chat/proc/queue(target, message, flag)
- if(!target || !message)
- return
-
- if(!istext(message))
- stack_trace("to_chat called with invalid input type")
- return
-
- if(target == world)
- target = GLOB.clients
-
- //Some macros remain in the string even after parsing and fuck up the eventual output
- message = replacetext(message, "\improper", "")
- message = replacetext(message, "\proper", "")
- message += " "
-
-
- //url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
- //Do the double-encoding here to save nanoseconds
- var/twiceEncoded = url_encode(url_encode(message))
-
- if(islist(target))
- for(var/I in target)
- var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible
-
- if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
- continue
-
- if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue
- C.chatOutput.messageQueue += message
- continue
-
- payload[C] += twiceEncoded
-
- else
- var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible
-
- if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
- return
-
- if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue
- C.chatOutput.messageQueue += message
- return
-
- payload[C] += twiceEncoded
diff --git a/code/controllers/subsystem/ghost_spawns.dm b/code/controllers/subsystem/ghost_spawns.dm
new file mode 100644
index 00000000000..ea0aefb88bd
--- /dev/null
+++ b/code/controllers/subsystem/ghost_spawns.dm
@@ -0,0 +1,275 @@
+SUBSYSTEM_DEF(ghost_spawns)
+ name = "Ghost Spawns"
+ init_order = INIT_ORDER_EVENTS
+ flags = SS_BACKGROUND
+ wait = 1 SECONDS
+ runlevels = RUNLEVEL_GAME
+ offline_implications = "Ghosts will no longer be able to respawn as event mobs (Blob, etc..). Shuttle call recommended."
+
+ /// List of polls currently ongoing, to be checked on next fire()
+ var/list/datum/candidate_poll/currently_polling
+ /// Whether there are active polls or not
+ var/polls_active = FALSE
+ /// Number of polls performed since the start
+ var/total_polls = 0
+ /// The poll that's closest to finishing
+ var/datum/candidate_poll/next_poll_to_finish
+
+/datum/controller/subsystem/ghost_spawns/fire()
+ if(!polls_active)
+ return
+ if(!currently_polling) // if polls_active is TRUE then this shouldn't happen, but still..
+ currently_polling = list()
+
+ for(var/poll in currently_polling)
+ var/datum/candidate_poll/P = poll
+ if(P.time_left() <= 0)
+ polling_finished(P)
+
+/**
+ * Polls for candidates with a question and a preview of the role
+ *
+ * This proc replaces /proc/pollCandidates.
+ * Should NEVER be used in a proc that has waitfor set to FALSE/0 (due to #define UNTIL)
+ * Arguments:
+ * * question - The question to ask to potential candidates
+ * * role - The role to poll for. Should be a ROLE_x enum. If set, potential candidates who aren't eligible will be ignored
+ * * antag_age_check - Whether to filter out potential candidates who don't have an old enough account
+ * * poll_time - How long to poll for in deciseconds
+ * * ignore_respawnability - Whether to ignore the player's respawnability
+ * * min_hours - The amount of hours needed for a potential candidate to be eligible
+ * * flash_window - Whether the poll should flash a potential candidate's game window
+ * * check_antaghud - Whether to filter out potential candidates who enabled AntagHUD
+ * * source - The atom, atom prototype, icon or mutable appearance to display as an icon in the alert
+ */
+/datum/controller/subsystem/ghost_spawns/proc/poll_candidates(question = "Would you like to play a special role?", role, antag_age_check = FALSE, poll_time = 30 SECONDS, ignore_respawnability = FALSE, min_hours = 0, flash_window = TRUE, check_antaghud = TRUE, source)
+ log_debug("Polling candidates [role ? "for [get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds")
+
+ // Start firing
+ polls_active = TRUE
+ total_polls++
+
+ var/datum/candidate_poll/P = new(role, question, poll_time)
+ LAZYADD(currently_polling, P)
+
+ // We're the poll closest to completion
+ if(!next_poll_to_finish || poll_time < next_poll_to_finish.time_left())
+ next_poll_to_finish = P
+
+ var/category = "[P.hash]_notify_action"
+
+ for(var/mob/dead/observer/M in (ignore_respawnability ? GLOB.player_list : GLOB.respawnable_list))
+ if(!is_eligible(M, role, antag_age_check, role, min_hours, check_antaghud))
+ continue
+
+ SEND_SOUND(M, 'sound/misc/notice2.ogg')
+ if(flash_window)
+ window_flash(M.client)
+
+ // If we somehow send two polls for the same mob type, but with a duration on the second one shorter than the time left on the first one,
+ // we need to keep the first one's timeout rather than use the shorter one
+ var/obj/screen/alert/notify_action/current_alert = LAZYACCESS(M.alerts, category)
+ var/alert_time = poll_time
+ var/alert_poll = P
+ if(current_alert && current_alert.timeout > (world.time + poll_time - world.tick_lag))
+ alert_time = current_alert.timeout - world.time + world.tick_lag
+ alert_poll = current_alert.poll
+
+ // Send them an on-screen alert
+ var/obj/screen/alert/notify_action/A = M.throw_alert(category, /obj/screen/alert/notify_action, timeout_override = alert_time, no_anim = TRUE)
+ if(!A)
+ continue
+
+ A.icon = ui_style2icon(M.client?.prefs.UI_style)
+ A.name = "Looking for candidates"
+ A.desc = "[question]\n\n(expires in [poll_time / 10] seconds)"
+ A.show_time_left = TRUE
+ A.poll = alert_poll
+
+ // Sign up inheritance and stacking
+ var/inherited_sign_up = FALSE
+ var/num_stack = 1
+ for(var/existing_poll in currently_polling)
+ var/datum/candidate_poll/P2 = existing_poll
+ if(P != P2 && P.hash == P2.hash)
+ // If there's already a poll for an identical mob type ongoing and the client is signed up for it, sign them up for this one
+ if(!inherited_sign_up && (M in P2.signed_up) && P.sign_up(M, TRUE))
+ A.display_signed_up()
+ inherited_sign_up = TRUE
+ // This number is used to display the number of polls the alert regroups
+ num_stack++
+ if(num_stack > 1)
+ A.display_stacks(num_stack)
+
+ // Image to display
+ var/image/I
+ if(source)
+ if(!ispath(source))
+ var/atom/S = source
+ var/old_layer = S.layer
+ var/old_plane = S.plane
+
+ S.layer = FLOAT_LAYER
+ S.plane = FLOAT_PLANE
+ A.overlays += S
+ S.layer = old_layer
+ S.plane = old_plane
+ else
+ I = image(source, layer = FLOAT_LAYER, dir = SOUTH)
+ else
+ // Just use a generic image
+ I = image('icons/effects/effects.dmi', icon_state = "static", layer = FLOAT_LAYER, dir = SOUTH)
+
+ if(I)
+ I.layer = FLOAT_LAYER
+ I.plane = FLOAT_PLANE
+ A.overlays += I
+
+ // Chat message
+ var/act_jump = ""
+ if(isatom(source))
+ act_jump = "\[Teleport]"
+ var/act_signup = "\[Sign Up]"
+ to_chat(M, "Now looking for candidates [role ? "to play as \an [get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]")
+
+ // Start processing it so it updates visually the timer
+ START_PROCESSING(SSprocessing, A)
+ A.process()
+
+ // Sleep until the time is up
+ UNTIL(P.finished)
+ return P.signed_up
+
+/**
+ * Returns whether an observer is eligible to be an event mob
+ *
+ * Arguments:
+ * * M - The mob to check eligibility
+ * * role - The role to check eligibility for. Checks 1. the client has enabled the role 2. the account's age for this role if antag_age_check is TRUE
+ * * antag_age_check - Whether to check the account's age or not for the given role.
+ * * role_text - The role's clean text. Used for checking job bans to determine eligibility
+ * * min_hours - The amount of minimum hours the client needs before being eligible
+ * * check_antaghud - Whether to consider a client who enabled AntagHUD ineligible or not
+ */
+/datum/controller/subsystem/ghost_spawns/proc/is_eligible(mob/M, role, antag_age_check, role_text, min_hours, check_antaghud)
+ . = FALSE
+ if(!M.key || !M.client)
+ return
+ if(role)
+ if(!(role in M.client.prefs.be_special))
+ return
+ if(antag_age_check)
+ if(!player_old_enough_antag(M.client, role))
+ return
+ if(role_text)
+ if(jobban_isbanned(M, role_text) || jobban_isbanned(M, "Syndicate"))
+ return
+ if(config.use_exp_restrictions && min_hours)
+ if(M.client.get_exp_type_num(EXP_TYPE_LIVING) < min_hours * 60)
+ return
+ if(check_antaghud && cannotPossess(M))
+ return
+
+ return TRUE
+
+/**
+ * Called by the subsystem when a poll's timer runs out
+ *
+ * Can be called manually to finish a poll prematurely
+ * Arguments:
+ * * P - The poll to finish
+ */
+/datum/controller/subsystem/ghost_spawns/proc/polling_finished(datum/candidate_poll/P)
+ // Trim players who aren't eligible anymore
+ var/len_pre_trim = length(P.signed_up)
+ P.trim_candidates()
+ log_debug("Candidate poll [P.role ? "for [get_roletext(P.role)]" : "\"[P.question]\""] finished. [len_pre_trim] players signed up, [length(P.signed_up)] after trimming")
+
+ P.finished = TRUE
+ currently_polling -= P
+
+ // Determine which is the next poll closest the completion or "disable" firing if there's none
+ if(!length(currently_polling))
+ polls_active = FALSE
+ next_poll_to_finish = null
+ else if(P == next_poll_to_finish)
+ next_poll_to_finish = null
+ for(var/poll in currently_polling)
+ var/datum/candidate_poll/P2 = poll
+ if(!next_poll_to_finish || P2.time_left() < next_poll_to_finish.time_left())
+ next_poll_to_finish = P2
+
+/datum/controller/subsystem/ghost_spawns/stat_entry(msg)
+ msg += "Active: [length(currently_polling)] | Total: [total_polls]"
+ if(next_poll_to_finish)
+ msg += " | Next: [DisplayTimeText(next_poll_to_finish.time_left())] ([length(next_poll_to_finish.signed_up)] candidates)"
+ ..(msg)
+
+// The datum that describes one instance of candidate polling
+/datum/candidate_poll
+ var/role // The role the poll is for
+ var/question // The question asked to observers
+ var/duration // The duration of the poll
+ var/list/mob/dead/observer/signed_up // The players who signed up to this poll
+ var/time_started // The world.time at which the poll was created
+ var/finished = FALSE // Whether the polling is finished
+ var/hash // Used to categorize in the alerts system
+
+/datum/candidate_poll/New(polled_role, polled_question, poll_duration)
+ role = polled_role
+ question = polled_question
+ duration = poll_duration
+ signed_up = list()
+ time_started = world.time
+ hash = copytext(md5("[question]_[role ? role : "0"]"), 1, 7)
+ return ..()
+
+/**
+ * Attempts to sign a (controlled) mob up
+ *
+ * Will fail if the mob is already signed up or the poll's timer ran out.
+ * Does not check for eligibility
+ * Arguments:
+ * * M - The (controlled) mob to sign up
+ * * silent - Whether no messages should appear or not. If not TRUE, signing up to this poll will also sign the mob up for identical polls
+ */
+/datum/candidate_poll/proc/sign_up(mob/dead/observer/M, silent = FALSE)
+ . = FALSE
+ if(!istype(M) || !M.key || !M.client)
+ return
+ if(M in signed_up)
+ if(!silent)
+ to_chat(M, "You have already signed up for this!")
+ return
+ if(time_left() <= 0)
+ if(!silent)
+ to_chat(M, "Sorry, you were too late for the consideration!")
+ SEND_SOUND(M, 'sound/machines/buzz-sigh.ogg')
+ return
+
+ signed_up += M
+ if(!silent)
+ to_chat(M, "You have signed up for this role! A candidate will be picked randomly soon..")
+ // Sign them up for any other polls with the same mob type
+ for(var/existing_poll in SSghost_spawns.currently_polling)
+ var/datum/candidate_poll/P = existing_poll
+ if(src != P && hash == P.hash && !(M in P.signed_up))
+ P.sign_up(M, TRUE)
+
+ return TRUE
+
+/**
+ * Deletes any candidates who may have disconnected from the list
+ */
+/datum/candidate_poll/proc/trim_candidates()
+ listclearnulls(signed_up)
+ for(var/mob in signed_up)
+ var/mob/M = mob
+ if(!M.key || !M.client)
+ signed_up -= M
+
+/**
+ * Returns the time left for a poll
+ */
+/datum/candidate_poll/proc/time_left()
+ return duration - (world.time - time_started)
diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm
index ef89317d0f5..3adfdf3972f 100644
--- a/code/controllers/subsystem/jobs.dm
+++ b/code/controllers/subsystem/jobs.dm
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(jobs)
/datum/controller/subsystem/jobs/fire()
if(!config.sql_enabled || !config.use_exp_tracking)
return
- update_exp(5,0)
+ INVOKE_ASYNC(GLOBAL_PROC, /.proc/update_exp, 5, 0)
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
occupations = list()
@@ -644,6 +644,27 @@ SUBSYSTEM_DEF(jobs)
oldjobdatum.current_positions--
newjobdatum.current_positions++
+/datum/controller/subsystem/jobs/proc/notify_dept_head(jobtitle, antext)
+ // Used to notify the department head of jobtitle X that their employee was brigged, demoted or terminated
+ if(!jobtitle || !antext)
+ return
+ var/datum/job/tgt_job = GetJob(jobtitle)
+ if(!tgt_job)
+ return
+ if(!tgt_job.department_head[1])
+ return
+ var/boss_title = tgt_job.department_head[1]
+ var/obj/item/pda/target_pda
+ for(var/obj/item/pda/check_pda in GLOB.PDAs)
+ if(check_pda.ownrank == boss_title)
+ target_pda = check_pda
+ break
+ if(!target_pda)
+ return
+ var/datum/data/pda/app/messenger/PM = target_pda.find_program(/datum/data/pda/app/messenger)
+ if(PM && PM.can_receive())
+ PM.notify("Automated Notification: \"[antext]\" (Unable to Reply)")
+
/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom)
var/record_html = "
"
diff --git a/code/controllers/subsystem/processing/instruments.dm b/code/controllers/subsystem/processing/instruments.dm
new file mode 100644
index 00000000000..3d571d2a13d
--- /dev/null
+++ b/code/controllers/subsystem/processing/instruments.dm
@@ -0,0 +1,86 @@
+PROCESSING_SUBSYSTEM_DEF(instruments)
+ name = "Instruments"
+ init_order = INIT_ORDER_INSTRUMENTS
+ wait = 1
+ flags = SS_TICKER|SS_BACKGROUND|SS_KEEP_TIMING
+ offline_implications = "Instruments will no longer play. No immediate action is needed."
+
+ /// List of all instrument data, associative id = datum
+ var/list/datum/instrument/instrument_data
+ /// List of all song datums.
+ var/list/datum/song/songs
+ /// Max lines in songs
+ var/musician_maxlines = 600
+ /// Max characters per line in songs
+ var/musician_maxlinechars = 300
+ /// Deciseconds between hearchecks. Too high and instruments seem to lag when people are moving around in terms of who can hear it. Too low and the server lags from this.
+ var/musician_hearcheck_mindelay = 5
+ /// Maximum instrument channels total instruments are allowed to use. This is so you don't have instruments deadlocking all sound channels.
+ var/max_instrument_channels = MAX_INSTRUMENT_CHANNELS
+ /// Current number of channels allocated for instruments
+ var/current_instrument_channels = 0
+ /// Single cached list for synthesizer instrument ids, so you don't have to have a new list with every synthesizer.
+ var/list/synthesizer_instrument_ids
+
+/datum/controller/subsystem/processing/instruments/Initialize()
+ initialize_instrument_data()
+ synthesizer_instrument_ids = get_allowed_instrument_ids()
+ return ..()
+
+/**
+ * Initializes all instrument datums
+ */
+/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
+ instrument_data = list()
+ for(var/path in subtypesof(/datum/instrument))
+ var/datum/instrument/I = path
+ if(initial(I.abstract_type) == path)
+ continue
+ I = new path
+ I.Initialize()
+ if(!I.id)
+ qdel(I)
+ continue
+ else
+ instrument_data[I.id] = I
+ CHECK_TICK
+
+/**
+ * Reserves a sound channel for a given instrument datum
+ *
+ * Arguments:
+ * * I - The instrument datum
+ */
+/datum/controller/subsystem/processing/instruments/proc/reserve_instrument_channel(datum/instrument/I)
+ if(current_instrument_channels > max_instrument_channels)
+ return
+ . = SSsounds.reserve_sound_channel(I)
+ if(!isnull(.))
+ current_instrument_channels++
+
+/**
+ * Called when a datum/song is created
+ *
+ * Arguments:
+ * * S - The created datum/song
+ */
+/datum/controller/subsystem/processing/instruments/proc/on_song_new(datum/song/S)
+ LAZYADD(songs, S)
+
+/**
+ * Called when a datum/song is deleted
+ *
+ * Arguments:
+ * * S - The deleted datum/song
+ */
+/datum/controller/subsystem/processing/instruments/proc/on_song_del(datum/song/S)
+ LAZYREMOVE(songs, S)
+
+/**
+ * Returns the instrument datum at the given ID or path
+ *
+ * Arguments:
+ * * id_or_path - The ID or path of the instrument
+ */
+/datum/controller/subsystem/processing/instruments/proc/get_instrument(id_or_path)
+ return instrument_data["[id_or_path]"]
diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm
index 247d71d05b8..08fa7709320 100644
--- a/code/controllers/subsystem/shuttles.dm
+++ b/code/controllers/subsystem/shuttles.dm
@@ -14,9 +14,9 @@ SUBSYSTEM_DEF(shuttle)
//emergency shuttle stuff
var/obj/docking_port/mobile/emergency/emergency
var/obj/docking_port/mobile/emergency/backup/backup_shuttle
- var/emergencyCallTime = 6000 //time taken for emergency shuttle to reach the station when called (in deciseconds)
- var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds)
- var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds)
+ var/emergencyCallTime = SHUTTLE_CALLTIME //time taken for emergency shuttle to reach the station when called (in deciseconds)
+ var/emergencyDockTime = SHUTTLE_DOCKTIME //time taken for emergency shuttle to leave again once it has docked (in deciseconds)
+ var/emergencyEscapeTime = SHUTTLE_ESCAPETIME //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds)
var/emergency_sec_level_time = 0 // time sec level was last raised to red or higher
var/area/emergencyLastCallLoc
var/emergencyNoEscape
diff --git a/code/controllers/subsystem/sounds.dm b/code/controllers/subsystem/sounds.dm
new file mode 100644
index 00000000000..33d97fcfe04
--- /dev/null
+++ b/code/controllers/subsystem/sounds.dm
@@ -0,0 +1,165 @@
+#define DATUMLESS "NO_DATUM"
+
+SUBSYSTEM_DEF(sounds)
+ name = "Sounds"
+ init_order = INIT_ORDER_SOUNDS
+ flags = SS_NO_FIRE
+ offline_implications = "Sounds may not play correctly. Shuttle call recommended."
+
+ var/using_channels_max = CHANNEL_HIGHEST_AVAILABLE // BYOND max channels
+ /// Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.
+ var/random_channels_min = 50
+ // Hey uh these two needs to be initialized fast because the whole "things get deleted before init" thing.
+ /// Assoc list, "[channel]" = either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel
+ var/list/using_channels
+ /// Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.
+ var/list/using_channels_by_datum
+ // Special datastructure for fast channel management
+ /// List of all channels as numbers
+ var/list/channel_list
+ /// Associative list of all reserved channels associated to their position. "[channel_number]" = index as number
+ var/list/reserved_channels
+ /// lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.
+ var/channel_random_low
+ /// higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.
+ var/channel_reserve_high
+
+/datum/controller/subsystem/sounds/Initialize()
+ setup_available_channels()
+ return ..()
+
+/**
+ * Sets up all available sound channels
+ */
+/datum/controller/subsystem/sounds/proc/setup_available_channels()
+ channel_list = list()
+ reserved_channels = list()
+ using_channels = list()
+ using_channels_by_datum = list()
+ for(var/i in 1 to using_channels_max)
+ channel_list += i
+ channel_random_low = 1
+ channel_reserve_high = length(channel_list)
+
+/**
+ * Removes a channel from using list
+ *
+ * Arguments:
+ * * channel - The channel number
+ */
+/datum/controller/subsystem/sounds/proc/free_sound_channel(channel)
+ var/text_channel = num2text(channel)
+ var/using = using_channels[text_channel]
+ using_channels -= text_channel
+ if(!using) // datum channel
+ using_channels_by_datum[using] -= channel
+ if(!length(using_channels_by_datum[using]))
+ using_channels_by_datum -= using
+ free_channel(channel)
+
+/**
+ * Frees all the channels a datum is using
+ *
+ * Arguments:
+ * * D - The datum
+ */
+/datum/controller/subsystem/sounds/proc/free_datum_channels(datum/D)
+ var/list/L = using_channels_by_datum[D]
+ if(!L)
+ return
+ for(var/channel in L)
+ using_channels -= num2text(channel)
+ free_channel(channel)
+ using_channels_by_datum -= D
+
+/**
+ * Frees all datumless channels
+ */
+/datum/controller/subsystem/sounds/proc/free_datumless_channels()
+ free_datum_channels(DATUMLESS)
+
+/**
+ * NO AUTOMATIC CLEANUP - If you use this, you better manually free it later!
+ *
+ * Returns an integer for channel
+ */
+/datum/controller/subsystem/sounds/proc/reserve_sound_channel_datumless()
+ . = reserve_channel()
+ if(!.) // oh no..
+ return FALSE
+ var/text_channel = num2text(.)
+ using_channels[text_channel] = DATUMLESS
+ LAZYADD(using_channels_by_datum[DATUMLESS], .)
+
+/**
+ * Reserves a channel for a datum. Automatic cleanup only when the datum is deleted.
+ *
+ * Returns an integer for channel
+ * Arguments:
+ * * D - The datum
+ */
+/datum/controller/subsystem/sounds/proc/reserve_sound_channel(datum/D)
+ if(!D) // i don't like typechecks but someone will fuck it up
+ CRASH("Attempted to reserve sound channel without datum using the managed proc.")
+ . = reserve_channel()
+ if(!.)
+ return FALSE
+ var/text_channel = num2text(.)
+ using_channels[text_channel] = D
+ LAZYADD(using_channels_by_datum[D], .)
+
+/**
+ * Reserves a channel and updates the datastructure. Private proc.
+ */
+/datum/controller/subsystem/sounds/proc/reserve_channel()
+ PRIVATE_PROC(TRUE)
+ if(channel_reserve_high <= random_channels_min) // out of channels
+ return
+ var/channel = channel_list[channel_reserve_high]
+ reserved_channels[num2text(channel)] = channel_reserve_high--
+ return channel
+
+/**
+ * Frees a channel and updates the datastructure. Private proc.
+ */
+/datum/controller/subsystem/sounds/proc/free_channel(number)
+ PRIVATE_PROC(TRUE)
+ var/text_channel = num2text(number)
+ var/index = reserved_channels[text_channel]
+ if(!index)
+ CRASH("Attempted to (internally) free a channel that wasn't reserved.")
+ reserved_channels -= text_channel
+ // push reserve index up, which makes it now on a channel that is reserved
+ channel_reserve_high++
+ // swap the reserved channel with the unreserved channel so the reserve index is now on an unoccupied channel and the freed channel is next to be used.
+ channel_list.Swap(channel_reserve_high, index)
+ // now, an existing reserved channel will likely (exception: unreserving last reserved channel) be at index
+ // get it, and update position.
+ var/text_reserved = num2text(channel_list[index])
+ if(!reserved_channels[text_reserved]) // if it isn't already reserved make sure we don't accidently mistakenly put it on reserved list!
+ return
+ reserved_channels[text_reserved] = index
+
+/**
+ * Random available channel, returns text
+ */
+/datum/controller/subsystem/sounds/proc/random_available_channel_text()
+ if(channel_random_low > channel_reserve_high)
+ channel_random_low = 1
+ . = "[channel_list[channel_random_low++]]"
+
+/**
+ * Random available channel, returns number
+ */
+/datum/controller/subsystem/sounds/proc/random_available_channel()
+ if(channel_random_low > channel_reserve_high)
+ channel_random_low = 1
+ . = channel_list[channel_random_low++]
+
+/**
+ * How many channels we have left
+ */
+/datum/controller/subsystem/sounds/proc/available_channels_left()
+ return length(channel_list) - random_channels_min
+
+#undef DATUMLESS
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 5d0a53c221e..e53c91ac20d 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -61,7 +61,7 @@ SUBSYSTEM_DEF(ticker)
if(GAME_STATE_STARTUP)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
round_start_time = world.time + (config.pregame_timestart * 10)
- to_chat(world, "Welcome to the pre-game lobby!")
+ to_chat(world, "Welcome to the pre-game lobby!")
to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds")
current_state = GAME_STATE_PREGAME
fire() // TG says this is a good idea
@@ -217,11 +217,11 @@ SUBSYSTEM_DEF(ticker)
for(var/obj/effect/landmark/spacepod/random/R in L)
qdel(R)
- to_chat(world, "Enjoy the game!")
+ to_chat(world, "Enjoy the game!")
world << sound('sound/AI/welcome.ogg')// Skie
if(SSholiday.holidays)
- to_chat(world, "and...")
+ to_chat(world, "and...")
for(var/holidayname in SSholiday.holidays)
var/datum/holiday/holiday = SSholiday.holidays[holidayname]
to_chat(world, "
[holiday.greet()]
")
diff --git a/code/controllers/subsystem/tickets/mentor_tickets.dm b/code/controllers/subsystem/tickets/mentor_tickets.dm
index 3fd003418a4..af4ea2e914d 100644
--- a/code/controllers/subsystem/tickets/mentor_tickets.dm
+++ b/code/controllers/subsystem/tickets/mentor_tickets.dm
@@ -6,17 +6,23 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
/datum/controller/subsystem/tickets/mentor_tickets
name = "Mentor Tickets"
+ offline_implications = "Mentor tickets will no longer be marked as stale. No immediate action is needed."
ticket_system_name = "Mentor Tickets"
ticket_name = "Mentor Ticket"
span_class = "mentorhelp"
+ other_ticket_name = "Admin"
+ other_ticket_permission = R_ADMIN
close_rights = R_MENTOR | R_ADMIN
- offline_implications = "Mentor tickets will no longer be marked as stale. No immediate action is needed."
-
-/datum/controller/subsystem/tickets/mentor_tickets/message_staff(var/msg)
- message_mentorTicket(msg)
+ rights_needed = R_MENTOR | R_ADMIN | R_MOD
/datum/controller/subsystem/tickets/mentor_tickets/Initialize()
close_messages = list("- [ticket_name] Closed -",
"Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.",
"Your [ticket_name] has now been closed.")
return ..()
+
+/datum/controller/subsystem/tickets/mentor_tickets/message_staff(msg)
+ message_mentorTicket(msg)
+
+/datum/controller/subsystem/tickets/mentor_tickets/create_other_system_ticket(datum/ticket/T)
+ SStickets.newTicket(T.clientName, T.content, T.title)
diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm
index 8fae7179706..64f91e96b6c 100644
--- a/code/controllers/subsystem/tickets/tickets.dm
+++ b/code/controllers/subsystem/tickets/tickets.dm
@@ -12,18 +12,23 @@
SUBSYSTEM_DEF(tickets)
name = "Admin Tickets"
- var/span_class = "adminticket"
- var/ticket_system_name = "Admin Tickets"
- var/ticket_name = "Admin Ticket"
- var/close_rights = R_ADMIN
- var/list/close_messages
init_order = INIT_ORDER_TICKETS
wait = 300
priority = FIRE_PRIORITY_TICKETS
offline_implications = "Admin tickets will no longer be marked as stale. No immediate action is needed."
-
flags = SS_BACKGROUND
+ var/span_class = "adminticket"
+ var/ticket_system_name = "Admin Tickets"
+ var/ticket_name = "Admin Ticket"
+ var/close_rights = R_ADMIN
+ var/rights_needed = R_ADMIN | R_MOD
+
+ /// The name of the other ticket type to convert to
+ var/other_ticket_name = "Mentor"
+ /// Which permission to look for when seeing if there is staff available for the other ticket type
+ var/other_ticket_permission = R_MENTOR
+ var/list/close_messages
var/list/allTickets = list() //make it here because someone might ahelp before the system has initialized
var/ticketCounter = 1
@@ -114,9 +119,37 @@ SUBSYSTEM_DEF(tickets)
to_chat_safe(returnClient(N), "Your [ticket_name] has now been resolved.")
return TRUE
+/datum/controller/subsystem/tickets/proc/convert_to_other_ticket(ticketId)
+ if(!check_rights(rights_needed))
+ return
+ if(alert("Are you sure to convert this ticket to an '[other_ticket_name]' ticket?",,"Yes","No") != "Yes")
+ return
+ if(!other_ticket_system_staff_check())
+ return
+ var/datum/ticket/T = allTickets[ticketId]
+ convert_ticket(T)
+
+/datum/controller/subsystem/tickets/proc/other_ticket_system_staff_check()
+ var/list/staff = staff_countup(other_ticket_permission)
+ if(!staff[1])
+ if(alert("No active staff online to answer the ticket. Are you sure you want to convert the ticket?",, "No", "Yes") != "Yes")
+ return FALSE
+ return TRUE
+
+/datum/controller/subsystem/tickets/proc/convert_ticket(datum/ticket/T)
+ T.ticketState = TICKET_CLOSED
+ var/client/C = usr.client
+ to_chat_safe(T.clientName, list("[key_name_hidden(C)] has converted your ticket to a [other_ticket_name] ticket.",\
+ "Be sure to use the correct type of help next time!"))
+ message_staff("[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.")
+ log_game("[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.")
+ create_other_system_ticket(T)
+
+/datum/controller/subsystem/tickets/proc/create_other_system_ticket(datum/ticket/T)
+ SSmentor_tickets.newTicket(T.clientName, T.content, T.title)
/datum/controller/subsystem/tickets/proc/autoRespond(N)
- if(!check_rights(R_ADMIN|R_MOD))
+ if(!check_rights(rights_needed))
return
var/datum/ticket/T = allTickets[N]
@@ -131,6 +164,7 @@ SUBSYSTEM_DEF(tickets)
"Already Resolved" = "The problem has been resolved already.",
"Mentorhelp" = "Please redirect your question to Mentorhelp, as they are better experienced with these types of questions.",
"Happens Again" = "Thanks, let us know if it continues to happen.",
+ "Github Issue Report" = "To report a bug, please go to our Github page. Then go to 'Issues'. Then 'New Issue'. Then fill out the report form. If the report would reveal current-round information, file it after the round ends.",
"Clear Cache" = "To fix a blank screen, go to the 'Special Verbs' tab and press 'Reload UI Resources'. If that fails, clear your BYOND cache (instructions provided with 'Reload UI Resources'). If that still fails, please adminhelp again, stating you have already done the following." ,
"IC Issue" = "This is an In Character (IC) issue and will not be handled by admins. You could speak to Security, Internal Affairs, a Departmental Head, Nanotrasen Representetive, or any other relevant authority currently on station.",
"Reject" = "Reject",
@@ -157,14 +191,17 @@ SUBSYSTEM_DEF(tickets)
resolveTicket(N)
message_staff("[C] has auto responded to [T.clientName]\'s adminhelp with: [message_key] ")
log_game("[C] has auto responded to [T.clientName]\'s adminhelp with: [response_phrases[message_key]]")
+ if("Mentorhelp")
+ convert_ticket(T)
else
var/msg_sound = sound('sound/effects/adminhelp.ogg')
SEND_SOUND(returnClient(N), msg_sound)
- to_chat(returnClient(N), "[key_name_hidden(C)] is autoresponding with: [response_phrases[message_key]]")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
+ to_chat_safe(returnClient(N), "[key_name_hidden(C)] is autoresponding with: [response_phrases[message_key]]")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [T.clientName]\'s adminhelp with: [message_key] ") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
T.lastStaffResponse = "Autoresponse: [message_key]"
resolveTicket(N)
log_game("[C] has auto responded to [T.clientName]\'s adminhelp with: [response_phrases[message_key]]")
+
//Set ticket state with key N to closed
/datum/controller/subsystem/tickets/proc/closeTicket(N)
var/datum/ticket/T = allTickets[N]
@@ -352,7 +389,7 @@ UI STUFF
dat += "
"
- t += "One "
- t += "TestLoop2 "
- t += "TestLoop3 "
-
- user << browse(t, "window=turntable;size=420x700")
-
-
-/obj/machinery/party/turntable/Topic(href, href_list)
- ..()
- if( href_list["on1"] )
- if(src.playing == 0)
-// to_chat(world, "Should be working...")
- var/sound/S = sound('sound/turntable/testloop1.ogg')
- S.repeat = 1
- S.channel = 10
- S.falloff = 2
- S.wait = 1
- S.environment = 0
- //for(var/mob/M in world)
- // if(M.loc.loc == src.loc.loc && M.music == 0)
-// to_chat(world, "Found the song...")
-// M << S
- // M.music = 1
- var/area/A = src.loc.loc
-
- for(var/obj/machinery/party/lasermachine/L in A)
- L.turnon()
- playing = 1
- while(playing == 1)
- for(var/mob/M in world)
- if((M.loc.loc in A) && M.music == 0)
-// to_chat(world, "Found the song...")
- M << S
- M.music = 1
- else if(!(M.loc.loc in A) && M.music == 1)
- var/sound/Soff = sound(null)
- Soff.channel = 10
- M << Soff
- M.music = 0
- sleep(10)
- return
- if( href_list["on2"] )
- if(src.playing == 0)
-// to_chat(world, "Should be working...")
- var/sound/S = sound('sound/turntable/testloop2.ogg')
- S.repeat = 1
- S.channel = 10
- S.falloff = 2
- S.wait = 1
- S.environment = 0
- //for(var/mob/M in world)
- // if(M.loc.loc == src.loc.loc && M.music == 0)
-// to_chat(world, "Found the song...")
-// M << S
- // M.music = 1
- var/area/A = src.loc.loc
- for(var/obj/machinery/party/lasermachine/L in A)
- L.turnon()
- playing = 1
- while(playing == 1)
- for(var/mob/M in world)
- if(M.loc.loc == src.loc.loc && M.music == 0)
-// to_chat(world, "Found the song...")
- M << S
- M.music = 1
- else if(M.loc.loc != src.loc.loc && M.music == 1)
- var/sound/Soff = sound(null)
- Soff.channel = 10
- M << Soff
- M.music = 0
- sleep(10)
- return
- if( href_list["on3"] )
- if(src.playing == 0)
-// to_chat(world, "Should be working...")
- var/sound/S = sound('sound/turntable/testloop3.ogg')
- S.repeat = 1
- S.channel = 10
- S.falloff = 2
- S.wait = 1
- S.environment = 0
- //for(var/mob/M in world)
- // if(M.loc.loc == src.loc.loc && M.music == 0)
-// to_chat(world, "Found the song...")
-// M << S
- // M.music = 1
- var/area/A = src.loc.loc
- for(var/obj/machinery/party/lasermachine/L in A)
- L.turnon()
- playing = 1
- while(playing == 1)
- for(var/mob/M in world)
- if(M.loc.loc == src.loc.loc && M.music == 0)
-// to_chat(world, "Found the song...")
- M << S
- M.music = 1
- else if(M.loc.loc != src.loc.loc && M.music == 1)
- var/sound/Soff = sound(null)
- Soff.channel = 10
- M << Soff
- M.music = 0
- sleep(10)
- return
-
-
- if( href_list["off"] )
- if(src.playing == 1)
- var/sound/S = sound(null)
- S.channel = 10
- S.wait = 1
- for(var/mob/M in world)
- M << S
- M.music = 0
- playing = 0
- var/area/A = src.loc.loc
- for(var/obj/machinery/party/lasermachine/L in A)
- L.turnoff()
-
-
-
-/obj/machinery/party/lasermachine
- name = "laser machine"
- desc = "A laser machine that shoots lasers."
- icon = 'icons/effects/lasers2.dmi'
- icon_state = "lasermachine"
- anchored = 1
- var/mirrored = 0
-
-/obj/effect/turntable_laser
- name = "laser"
- desc = "A laser..."
- icon = 'icons/effects/lasers2.dmi'
- icon_state = "laserred1"
- anchored = 1
- layer = 4
-
-/obj/item/lasermachine/New()
- ..()
-
-/obj/machinery/party/lasermachine/proc/turnon()
- var/wall = 0
- var/cycle = 1
- var/area/A = get_area(src)
- var/X = 1
- var/Y = 0
- if(mirrored == 0)
- while(wall == 0)
- if(cycle == 1)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y+Y
- F.z = src.z
- F.icon_state = "laserred1"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- X++
- if(cycle == 2)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y+Y
- F.z = src.z
- F.icon_state = "laserred2"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- Y++
- if(cycle == 3)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y+Y
- F.z = src.z
- F.icon_state = "laserred3"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- X++
- if(mirrored == 1)
- while(wall == 0)
- if(cycle == 1)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y-Y
- F.z = src.z
- F.icon_state = "laserred1m"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- Y++
- if(cycle == 2)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y-Y
- F.z = src.z
- F.icon_state = "laserred2m"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- X++
- if(cycle == 3)
- var/obj/effect/turntable_laser/F = new(src)
- F.x = src.x+X
- F.y = src.y-Y
- F.z = src.z
- F.icon_state = "laserred3m"
- var/area/AA = get_area(F)
- var/turf/T = get_turf(F)
- if(T.density == 1 || AA.name != A.name)
- qdel(F)
- return
- cycle++
- if(cycle > 3)
- cycle = 1
- X++
-
-
-
-/obj/machinery/party/lasermachine/proc/turnoff()
- var/area/A = src.loc.loc
- for(var/obj/effect/turntable_laser/F in A)
- qdel(F)
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 7aa5661febe..fdca5c56194 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -101,6 +101,7 @@
power_change()
/obj/machinery/vending/Destroy()
+ SStgui.close_uis(wires)
QDEL_NULL(wires)
QDEL_NULL(coin)
QDEL_NULL(inserted_item)
@@ -403,7 +404,7 @@
cashmoney.use(currently_vending.price)
// Vending machines have no idea who paid with cash
- credit_purchase("(cash)")
+ GLOB.vendor_account.credit(currently_vending.price, "Sale of [currently_vending.name]", name, "(cash)")
return 1
/**
@@ -443,26 +444,12 @@
return 0
else
// Okay to move the money at this point
- var/paid = customer_account.charge(currently_vending.price, GLOB.vendor_account,
+ customer_account.charge(currently_vending.price, GLOB.vendor_account,
"Purchase of [currently_vending.name]", name, GLOB.vendor_account.owner_name,
"Sale of [currently_vending.name]", customer_account.owner_name)
- if(paid)
- // Give the vendor the money. We use the account owner name, which means
- // that purchases made with stolen/borrowed card will look like the card
- // owner made them
- credit_purchase(customer_account.owner_name)
- return paid
+ return TRUE
-/**
- * Add money for current purchase to the vendor account.
- *
- * Called after the money has already been taken from the customer.
- */
-/obj/machinery/vending/proc/credit_purchase(var/target as text)
- GLOB.vendor_account.money += currently_vending.price
- GLOB.vendor_account.credit(currently_vending.price, "Sale of [currently_vending.name]",
- name, target)
/obj/machinery/vending/attack_ai(mob/user)
return attack_hand(user)
@@ -1385,7 +1372,6 @@
/obj/item/clothing/glasses/gglasses = 1,
/obj/item/clothing/shoes/jackboots = 1,
/obj/item/clothing/under/schoolgirl = 1,
- /obj/item/clothing/head/kitty = 1,
/obj/item/clothing/under/blackskirt = 1,
/obj/item/clothing/suit/toggle/owlwings = 1,
/obj/item/clothing/under/owl = 1,
@@ -1480,6 +1466,7 @@
/obj/item/clothing/under/victsuit/redblk = 1,
/obj/item/clothing/under/victsuit/red = 1,
/obj/item/clothing/suit/tailcoat = 1,
+ /obj/item/clothing/under/tourist_suit = 1,
/obj/item/clothing/suit/draculacoat = 1,
/obj/item/clothing/head/zepelli = 1,
/obj/item/clothing/under/redhawaiianshirt = 1,
diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm
index 5916d0f96c7..2248c37f518 100644
--- a/code/game/mecha/equipment/tools/mining_tools.dm
+++ b/code/game/mecha/equipment/tools/mining_tools.dm
@@ -94,7 +94,7 @@
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user)
target.visible_message("[chassis] is drilling [target] with [src]!",
"[chassis] is drilling you with [src]!")
- add_attack_logs(user, target, "DRILLED with [src] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ add_attack_logs(user, target, "DRILLED with [src] ([uppertext(user.a_intent)]) ([uppertext(damtype)])")
if(target.stat == DEAD && target.getBruteLoss() >= 200)
add_attack_logs(user, target, "gibbed")
if(LAZYLEN(target.butcher_results))
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index 63eeb21e165..5962a1eccbb 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -60,7 +60,7 @@
target.visible_message("[chassis] squeezes [target].", \
"[chassis] squeezes [target].",\
"You hear something crack.")
- add_attack_logs(chassis.occupant, M, "Squeezed with [src] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
+ add_attack_logs(chassis.occupant, M, "Squeezed with [src] ([uppertext(chassis.occupant.a_intent)]) ([uppertext(damtype)])")
start_cooldown()
else
step_away(M,chassis)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 9acdcba48de..e05fef18e5a 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -385,7 +385,7 @@
return
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
- name = "SGL-6 Grenade Launcher"
+ name = "SGL-6 Flashbang Launcher"
icon_state = "mecha_grenadelnchr"
origin_tech = "combat=4;engineering=4"
projectile = /obj/item/grenade/flashbang
@@ -411,7 +411,7 @@
return
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve
- name = "SOB-3 Grenade Launcher"
+ name = "SOB-3 Clusterbang Launcher"
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
origin_tech = "combat=4;materials=4"
projectiles = 3
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 1dc09d13e63..9a24edb4da3 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -331,6 +331,8 @@
else
occupant.clear_alert("mechaport")
if(leg_overload_mode)
+ log_message("Leg Overload damage.")
+ take_damage(1, BRUTE, FALSE, FALSE)
if(obj_integrity < max_integrity - max_integrity / 3)
leg_overload_mode = FALSE
step_in = initial(step_in)
@@ -502,7 +504,7 @@
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
else
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT))
- if(. >= 5 || prob(33))
+ if((. >= 5 || prob(33)) && !(. == 1 && leg_overload_mode)) //If it takes 1 damage and leg_overload_mode is true, do not say TAKING DAMAGE! to the user several times a second.
occupant_message("Taking damage!")
log_message("Took [damage_amount] points of damage. Damage type: [damage_type]")
@@ -540,7 +542,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
- user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.")
+ user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.")
log_message("Attack by hand/paw. Attacker - [user].")
@@ -870,7 +872,7 @@
return 0
use_power(melee_energy_drain)
if(M.damtype == BRUTE || M.damtype == BURN)
- add_attack_logs(M.occupant, src, "Mecha-attacked with [M] (INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
+ add_attack_logs(M.occupant, src, "Mecha-attacked with [M] ([uppertext(M.occupant.a_intent)]) ([uppertext(M.damtype)])")
. = ..()
/obj/mecha/emag_act(mob/user)
@@ -1273,6 +1275,9 @@
L.client.RemoveViewMod("mecha")
zoom_mode = FALSE
+/obj/mecha/force_eject_occupant()
+ go_out()
+
/////////////////////////
////// Access stuff /////
/////////////////////////
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 9dd1c771b17..639687a45e9 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -58,7 +58,7 @@
icon_state = "eggs"
var/amount_grown = 0
var/player_spiders = 0
- var/list/faction = list()
+ var/list/faction = list("spiders")
/obj/structure/spider/eggcluster/New()
..()
@@ -90,7 +90,7 @@
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
var/travelling_in_vent = 0
var/player_spiders = 0
- var/list/faction = list()
+ var/list/faction = list("spiders")
var/selecting_player = 0
/obj/structure/spider/spiderling/New()
@@ -180,7 +180,7 @@
if(player_spiders && !selecting_player)
selecting_player = 1
spawn()
- var/list/candidates = pollCandidates("Do you want to play as a spider?", ROLE_GSPIDER, 1)
+ var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a giant spider?", ROLE_GSPIDER, TRUE, source = S)
if(candidates.len)
var/mob/C = pick(candidates)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 76361776b0a..edcc6620531 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -2,6 +2,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
+
+ move_resist = null // Set in the Initialise depending on the item size. Unless it's overriden by a specific item
var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers
var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/blood_overlay_color = null
@@ -113,6 +115,23 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
hitsound = 'sound/items/welder.ogg'
if(damtype == "brute")
hitsound = "swing_hit"
+ if(!move_resist)
+ determine_move_resist()
+
+/obj/item/proc/determine_move_resist()
+ switch(w_class)
+ if(WEIGHT_CLASS_TINY)
+ move_resist = MOVE_FORCE_EXTREMELY_WEAK
+ if(WEIGHT_CLASS_SMALL)
+ move_resist = MOVE_FORCE_VERY_WEAK
+ if(WEIGHT_CLASS_NORMAL)
+ move_resist = MOVE_FORCE_WEAK
+ if(WEIGHT_CLASS_BULKY)
+ move_resist = MOVE_FORCE_NORMAL
+ if(WEIGHT_CLASS_HUGE)
+ move_resist = MOVE_FORCE_NORMAL
+ if(WEIGHT_CLASS_GIGANTIC)
+ move_resist = MOVE_FORCE_NORMAL
/obj/item/Destroy()
flags &= ~DROPDEL //prevent reqdels
@@ -506,7 +525,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
"You stab yourself in the eyes with [src]!" \
)
- add_attack_logs(user, M, "Eye-stabbed with [src] (INTENT: [uppertext(user.a_intent)])")
+ add_attack_logs(user, M, "Eye-stabbed with [src] ([uppertext(user.a_intent)])")
if(istype(H))
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 5f5c62abd21..97e46e3abb5 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -221,6 +221,12 @@
A.contents += thing
thing.change_area(old_area, A)
+ var/area/oldA = get_area(get_turf(usr))
+ var/list/firedoors = oldA.firedoors
+ for(var/door in firedoors)
+ var/obj/machinery/door/firedoor/FD = door
+ FD.CalculateAffectingAreas()
+
interact()
area_created = TRUE
return area_created
@@ -236,6 +242,10 @@
return
set_area_machinery_title(A,str,prevname)
A.name = str
+ if(A.firedoors)
+ for(var/D in A.firedoors)
+ var/obj/machinery/door/firedoor/FD = D
+ FD.CalculateAffectingAreas()
to_chat(usr, "You rename the '[prevname]' to '[str]'.")
interact()
return 1
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index eeb484b9f50..ce52e260bca 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -11,7 +11,7 @@
slot_flags = SLOT_BELT | SLOT_EARS
attack_verb = list("attacked", "coloured")
toolspeed = 1
- var/colour = "#FF0000" //RGB
+ var/colour = COLOR_RED
var/drawtype = "rune"
var/list/graffiti = list("body","amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","up","down","left","right","heart","borgsrogue","voxpox","shitcurity","catbeast","hieroglyphs1","hieroglyphs2","hieroglyphs3","security","syndicate1","syndicate2","nanotrasen","lie","valid","arrowleft","arrowright","arrowup","arrowdown","chicken","hailcrab","brokenheart","peace","scribble","scribble2","scribble3","skrek","squish","tunnelsnake","yip","youaredead")
var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
@@ -123,54 +123,54 @@
/obj/item/toy/crayon/red
icon_state = "crayonred"
- colour = "#DA0000"
+ colour = COLOR_RED
colourName = "red"
/obj/item/toy/crayon/orange
icon_state = "crayonorange"
- colour = "#FF9300"
+ colour = COLOR_ORANGE
colourName = "orange"
/obj/item/toy/crayon/yellow
icon_state = "crayonyellow"
- colour = "#FFF200"
+ colour = COLOR_YELLOW
colourName = "yellow"
/obj/item/toy/crayon/green
icon_state = "crayongreen"
- colour = "#A8E61D"
+ colour = COLOR_GREEN
colourName = "green"
/obj/item/toy/crayon/blue
icon_state = "crayonblue"
- colour = "#00B7EF"
+ colour = COLOR_BLUE
colourName = "blue"
/obj/item/toy/crayon/purple
icon_state = "crayonpurple"
- colour = "#DA00FF"
+ colour = COLOR_PURPLE
colourName = "purple"
/obj/item/toy/crayon/random/New()
icon_state = pick(list("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple"))
switch(icon_state)
if("crayonred")
- colour = "#DA0000"
+ colour = COLOR_RED
colourName = "red"
if("crayonorange")
- colour = "#FF9300"
+ colour = COLOR_ORANGE
colourName = "orange"
if("crayonyellow")
- colour = "#FFF200"
+ colour = COLOR_YELLOW
colourName = "yellow"
if("crayongreen")
- colour = "#A8E61D"
+ colour =COLOR_GREEN
colourName = "green"
if("crayonblue")
- colour = "#00B7EF"
+ colour = COLOR_BLUE
colourName = "blue"
if("crayonpurple")
- colour = "#DA00FF"
+ colour = COLOR_PURPLE
colourName = "purple"
..()
@@ -197,10 +197,10 @@
if(!Adjacent(usr) || usr.incapacitated())
return
if(href_list["color"])
- if(colour != "#FFFFFF")
- colour = "#FFFFFF"
+ if(colour != COLOR_WHITE)
+ colour = COLOR_WHITE
else
- colour = "#000000"
+ colour = COLOR_BLACK
update_window(usr)
else
..()
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 7a6b41966a8..e96fceb8b6c 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -191,7 +191,7 @@
if(CanUse(U))
if(!Use(U))
return
- to_chat(U, "You replace [target.fitting] with [src].")
+ to_chat(U, "You replace the light [target.fitting] with [src].")
if(target.status != LIGHT_EMPTY)
AddShards(1, U)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index b3695229790..42c134736d7 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -18,13 +18,6 @@
name = "syndicate personal AI device"
faction = list("syndicate")
-/obj/item/paicard/relaymove(var/mob/user, var/direction)
- if(user.stat || user.stunned)
- return
- var/obj/item/rig/rig = get_rig()
- if(istype(rig))
- rig.forced_move(direction, user)
-
/obj/item/paicard/New()
..()
overlays += "pai-off"
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 59d2c2a99bd..c8122fc34d6 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -186,10 +186,10 @@
update_icon()
START_PROCESSING(SSobj, src)
for(var/i, i<= 5, i++)
- wires.UpdateCut(i,1)
+ wires.on_cut(i, 1)
/obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I)
- if(!(buildstage == 3 && b_stat && wires.IsAllCut()))
+ if(!(buildstage == 3 && b_stat && wires.is_all_cut()))
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
@@ -270,4 +270,4 @@
/obj/item/radio/intercom/locked/prison/New()
..()
- wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
+ wires.cut(WIRE_RADIO_TRANSMIT)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 7cf09199cfd..528be3c5f87 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -76,6 +76,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
GLOB.global_radios |= src
/obj/item/radio/Destroy()
+ SStgui.close_uis(wires)
QDEL_NULL(wires)
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -127,8 +128,8 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
data["freq"] = format_frequency(frequency)
data["rawfreq"] = num2text(frequency)
- data["mic_cut"] = (wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
- data["spk_cut"] = (wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
+ data["mic_cut"] = (wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL))
+ data["spk_cut"] = (wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL))
var/list/chanlist = list_channels(user)
if(islist(chanlist) && chanlist.len)
@@ -184,10 +185,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
return can_admin_interact()
/obj/item/radio/proc/ToggleBroadcast()
- broadcasting = !broadcasting && !(wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
+ broadcasting = !broadcasting && !(wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL))
/obj/item/radio/proc/ToggleReception()
- listening = !listening && !(wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
+ listening = !listening && !(wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL))
/obj/item/radio/Topic(href, href_list)
if(..())
@@ -325,7 +326,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
// If we were to send to a channel we don't have, drop it.
return RADIO_CONNECTION_FAIL
-/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, var/verb = "says")
+/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, verbage = "says")
if(!on)
return 0 // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
@@ -334,7 +335,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
// Uncommenting this. To the above comment:
// The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom
- if(wires.IsIndexCut(RADIO_WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
+ if(wires.is_cut(WIRE_RADIO_TRANSMIT)) // The device has to have all its wires and shit intact
return 0
if(!M.IsVocal())
@@ -411,11 +412,16 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
jobname = "Unknown"
voicemask = TRUE
+ // Copy the message pieces so we can safely edit comms line without affecting the actual line
+ var/list/message_pieces_copy = list()
+ for(var/datum/multilingual_say_piece/S in message_pieces)
+ message_pieces_copy += new /datum/multilingual_say_piece(S.speaking, S.message)
+
// Make us a message datum!
var/datum/tcomms_message/tcm = new
tcm.sender_name = displayname
tcm.sender_job = jobname
- tcm.message_pieces = message_pieces
+ tcm.message_pieces = message_pieces_copy
tcm.source_level = position.z
tcm.freq = connection.frequency
tcm.vmask = voicemask
@@ -423,6 +429,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
tcm.connection = connection
tcm.vname = M.voice_name
tcm.sender = M
+ tcm.verbage = verbage
// Now put that through the stuff
var/handled = FALSE
if(connection)
@@ -509,7 +516,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
var/is_listening = TRUE
if(!on)
is_listening = FALSE
- if(!wires || wires.IsIndexCut(RADIO_WIRE_RECEIVE))
+ if(!wires || wires.is_cut(WIRE_RADIO_RECEIVER))
is_listening = FALSE
if(!listening)
is_listening = FALSE
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index f20a2cc5875..43697ac4776 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -72,7 +72,7 @@ REAGENT SCANNER
var/turf/U = O.loc
if(U && U.intact)
O.invisibility = 101
- O.alpha = 255
+ O.alpha = 255
for(var/mob/living/M in T.contents)
var/oldalpha = M.alpha
if(M.alpha < 255 && istype(M))
diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm
index 14bb468e049..f33e504a3e6 100644
--- a/code/game/objects/items/flag.dm
+++ b/code/game/objects/items/flag.dm
@@ -251,6 +251,7 @@
message_admins("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] (JMP).")
log_game("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
investigate_log("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB)
+ burn()
else
return ..()
@@ -267,8 +268,16 @@
/obj/item/flag/chameleon/burn()
if(boobytrap)
- boobytrap.prime()
- ..()
+ fire_act()
+ addtimer(CALLBACK(src, .proc/prime_boobytrap), boobytrap.det_time)
+ else
+ ..()
+
+/obj/item/flag/chameleon/proc/prime_boobytrap()
+ boobytrap.forceMove(get_turf(loc))
+ boobytrap.prime()
+ boobytrap = null
+ burn()
/obj/item/flag/chameleon/updateFlagIcon()
icon_state = updated_icon_state
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index eae59151a38..f1487a09986 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -29,7 +29,7 @@
"[user] has prodded you with [src]!")
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
- add_attack_logs(user, M, "Stunned with [src] (INTENT: [uppertext(user.a_intent)])")
+ add_attack_logs(user, M, "Stunned with [src] ([uppertext(user.a_intent)])")
/obj/item/borg/overdrive
name = "Overdrive"
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index ac635eebef7..4fef7b9f6d5 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -15,6 +15,7 @@
*/
GLOBAL_LIST_INIT(metal_recipes, list(
new /datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("barstool", /obj/structure/chair/stool/bar, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("shuttle seat", /obj/structure/chair/comfy/shuttle, 2, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = 1, on_floor = 1),
@@ -471,7 +472,8 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("cane mould", /obj/item/kitchen/mould/cane, 1, on_floor = 1), \
new /datum/stack_recipe("cash mould", /obj/item/kitchen/mould/cash, 1, on_floor = 1), \
new /datum/stack_recipe("coin mould", /obj/item/kitchen/mould/coin, 1, on_floor = 1), \
- new /datum/stack_recipe("sucker mould", /obj/item/kitchen/mould/loli, 1, on_floor = 1)))
+ new /datum/stack_recipe("sucker mould", /obj/item/kitchen/mould/loli, 1, on_floor = 1), \
+ new /datum/stack_recipe("warning cone", /obj/item/clothing/head/cone, 5, on_floor = 1)))
/obj/item/stack/sheet/plastic
name = "plastic"
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 66f35a169f9..cd1b91388d7 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -35,7 +35,7 @@
desc = "A translucent balloon. There's nothing in it."
icon = 'icons/obj/toy.dmi'
icon_state = "waterballoon-e"
- item_state = "balloon-empty"
+ item_state = "waterballoon-e"
/obj/item/toy/balloon/New()
..()
@@ -99,10 +99,10 @@
/obj/item/toy/balloon/update_icon()
if(src.reagents.total_volume >= 1)
icon_state = "waterballoon"
- item_state = "balloon"
+ item_state = "waterballoon"
else
icon_state = "waterballoon-e"
- item_state = "balloon-empty"
+ item_state = "waterballoon-e"
/obj/item/toy/syndicateballoon
name = "syndicate balloon"
@@ -344,56 +344,56 @@
/obj/item/toy/prize/ripley
name = "toy ripley"
- desc = "Mini-Mecha action figure! Collect them all! 1/11."
+ desc = "Mini-Mecha action figure! Collect them all! 1/11. This one is a ripley, a mining and engineering mecha."
/obj/item/toy/prize/fireripley
name = "toy firefighting ripley"
- desc = "Mini-Mecha action figure! Collect them all! 2/11."
+ desc = "Mini-Mecha action figure! Collect them all! 2/11. This one is a firefighter ripley, a fireproof mining and engineering mecha."
icon_state = "fireripleytoy"
/obj/item/toy/prize/deathripley
name = "toy deathsquad ripley"
- desc = "Mini-Mecha action figure! Collect them all! 3/11."
+ desc = "Mini-Mecha action figure! Collect them all! 3/11. This one is the black ripley used by the hero of DeathSquad, that TV drama about loose-cannon ERT officers!"
icon_state = "deathripleytoy"
/obj/item/toy/prize/gygax
name = "toy gygax"
- desc = "Mini-Mecha action figure! Collect them all! 4/11."
+ desc = "Mini-Mecha action figure! Collect them all! 4/11. This one is the speedy gygax combat mecha. Zoom zoom, pew pew!"
icon_state = "gygaxtoy"
/obj/item/toy/prize/durand
name = "toy durand"
- desc = "Mini-Mecha action figure! Collect them all! 5/11."
+ desc = "Mini-Mecha action figure! Collect them all! 5/11. This one is the heavy durand combat mecha. Stomp stomp!"
icon_state = "durandprize"
/obj/item/toy/prize/honk
name = "toy H.O.N.K."
- desc = "Mini-Mecha action figure! Collect them all! 6/11."
+ desc = "Mini-Mecha action figure! Collect them all! 6/11. This one is the infamous H.O.N.K mech!"
icon_state = "honkprize"
/obj/item/toy/prize/marauder
name = "toy marauder"
- desc = "Mini-Mecha action figure! Collect them all! 7/11."
+ desc = "Mini-Mecha action figure! Collect them all! 7/11. This one is the powerful marauder combat mecha! Run for cover!"
icon_state = "marauderprize"
/obj/item/toy/prize/seraph
name = "toy seraph"
- desc = "Mini-Mecha action figure! Collect them all! 8/11."
+ desc = "Mini-Mecha action figure! Collect them all! 8/11. This one is the powerful seraph combat mecha! Someone's in trouble!"
icon_state = "seraphprize"
/obj/item/toy/prize/mauler
name = "toy mauler"
- desc = "Mini-Mecha action figure! Collect them all! 9/11."
+ desc = "Mini-Mecha action figure! Collect them all! 9/11. This one is the deadly mauler combat mecha! Look out!"
icon_state = "maulerprize"
/obj/item/toy/prize/odysseus
name = "toy odysseus"
- desc = "Mini-Mecha action figure! Collect them all! 10/11."
+ desc = "Mini-Mecha action figure! Collect them all! 10/11. This one is the spindly, syringe-firing odysseus medical mecha."
icon_state = "odysseusprize"
/obj/item/toy/prize/phazon
name = "toy phazon"
- desc = "Mini-Mecha action figure! Collect them all! 11/11."
+ desc = "Mini-Mecha action figure! Collect them all! 11/11. This one is the mysterious Phazon combat mecha! Nobody's safe!"
icon_state = "phazonprize"
@@ -1591,182 +1591,217 @@ obj/item/toy/cards/deck/syndicate/black
/obj/item/toy/figure/cmo
name = "Chief Medical Officer action figure"
+ desc = "The ever-suffering CMO, from Space Life's SS12 figurine collection."
icon_state = "cmo"
toysay = "Suit sensors!"
/obj/item/toy/figure/assistant
name = "Assistant action figure"
+ desc = "The faceless, hairless scourge of the station, from Space Life's SS12 figurine collection."
icon_state = "assistant"
toysay = "Grey tide station wide!"
/obj/item/toy/figure/atmos
name = "Atmospheric Technician action figure"
+ desc = "The faithful atmospheric technician, from Space Life's SS12 figurine collection."
icon_state = "atmos"
toysay = "Glory to Atmosia!"
/obj/item/toy/figure/bartender
name = "Bartender action figure"
+ desc = "The suave bartender, from Space Life's SS12 figurine collection."
icon_state = "bartender"
toysay = "Wheres my monkey?"
/obj/item/toy/figure/borg
name = "Cyborg action figure"
+ desc = "The iron-willed cyborg, from Space Life's SS12 figurine collection."
icon_state = "borg"
toysay = "I. LIVE. AGAIN."
/obj/item/toy/figure/botanist
name = "Botanist action figure"
+ desc = "The drug-addicted botanist, from Space Life's SS12 figurine collection."
icon_state = "botanist"
toysay = "Dude, I see colors..."
/obj/item/toy/figure/captain
name = "Captain action figure"
+ desc = "The inept captain, from Space Life's SS12 figurine collection."
icon_state = "captain"
toysay = "Crew, the Nuke Disk is safely up my ass."
/obj/item/toy/figure/cargotech
name = "Cargo Technician action figure"
+ desc = "The hard-working cargo tech, from Space Life's SS12 figurine collection."
icon_state = "cargotech"
toysay = "For Cargonia!"
/obj/item/toy/figure/ce
name = "Chief Engineer action figure"
+ desc = "The expert Chief Engineer, from Space Life's SS12 figurine collection."
icon_state = "ce"
toysay = "Wire the solars!"
/obj/item/toy/figure/chaplain
name = "Chaplain action figure"
+ desc = "The obsessed Chaplain, from Space Life's SS12 figurine collection."
icon_state = "chaplain"
toysay = "Gods make me a killing machine please!"
/obj/item/toy/figure/chef
name = "Chef action figure"
+ desc = "The cannibalistic chef, from Space Life's SS12 figurine collection."
icon_state = "chef"
toysay = "I swear it's not human meat."
/obj/item/toy/figure/chemist
name = "Chemist action figure"
+ desc = "The legally dubious Chemist, from Space Life's SS12 figurine collection."
icon_state = "chemist"
toysay = "Get your pills!"
/obj/item/toy/figure/clown
name = "Clown action figure"
+ desc = "The mischevious Clown, from Space Life's SS12 figurine collection."
icon_state = "clown"
toysay = "Honk!"
/obj/item/toy/figure/ian
name = "Ian action figure"
+ desc = "The adorable corgi, from Space Life's SS12 figurine collection."
icon_state = "ian"
toysay = "Arf!"
/obj/item/toy/figure/detective
name = "Detective action figure"
+ desc = "The clever detective, from Space Life's SS12 figurine collection."
icon_state = "detective"
toysay = "This airlock has grey jumpsuit and insulated glove fibers on it."
/obj/item/toy/figure/dsquad
name = "Death Squad Officer action figure"
+ desc = "It's a member of the DeathSquad, a TV drama where loose-cannon ERT officers face up against the threats of the galaxy! It's from Space Life's special edition SS12 figurine collection."
icon_state = "dsquad"
toysay = "Eliminate all threats!"
/obj/item/toy/figure/engineer
name = "Engineer action figure"
+ desc = "The frantic engineer, from Space Life's SS12 figurine collection."
icon_state = "engineer"
toysay = "Oh god, the singularity is loose!"
/obj/item/toy/figure/geneticist
name = "Geneticist action figure"
+ desc = "The balding geneticist, from Space Life's SS12 figurine collection."
icon_state = "geneticist"
toysay = "I'm not qualified for this job."
/obj/item/toy/figure/hop
name = "Head of Personnel action figure"
+ desc = "The officious Head of Personnel, from Space Life's SS12 figurine collection."
icon_state = "hop"
- toysay = "Giving out all access!"
+ toysay = "Papers, please!"
/obj/item/toy/figure/hos
name = "Head of Security action figure"
+ desc = "The bloodlust-filled Head of Security, from Space Life's SS12 figurine collection."
icon_state = "hos"
- toysay = "I'm here to win, anything else is secondary."
+ toysay = "Space law? What?"
/obj/item/toy/figure/qm
name = "Quartermaster action figure"
+ desc = "The nationalistic Quartermaster, from Space Life's SS12 figurine collection."
icon_state = "qm"
toysay = "Hail Cargonia!"
/obj/item/toy/figure/janitor
name = "Janitor action figure"
+ desc = "The water-using Janitor, from Space Life's SS12 figurine collection."
icon_state = "janitor"
toysay = "Look at the signs, you idiot."
/obj/item/toy/figure/lawyer
name = "Internal Affairs Agent action figure"
+ desc = "The unappreciated Internal Affairs Agent, from Space Life's SS12 figurine collection."
icon_state = "lawyer"
toysay = "Standard Operating Procedure says they're guilty! Hacking is proof they're an Enemy of the Corporation!"
/obj/item/toy/figure/librarian
name = "Librarian action figure"
+ desc = "The quiet Librarian, from Space Life's SS12 figurine collection."
icon_state = "librarian"
toysay = "One day while..."
/obj/item/toy/figure/md
name = "Medical Doctor action figure"
+ desc = "The stressed-out doctor, from Space Life's SS12 figurine collection."
icon_state = "md"
toysay = "The patient is already dead!"
/obj/item/toy/figure/mime
name = "Mime action figure"
- desc = "A \"Space Life\" brand Mime action figure."
+ desc = "... from Space Life's SS12 figurine collection."
icon_state = "mime"
toysay = "..."
/obj/item/toy/figure/miner
name = "Shaft Miner action figure"
+ desc = "The gun-toting Shaft Miner, from Space Life's SS12 figurine collection."
icon_state = "miner"
toysay = "Oh god it's eating my intestines!"
/obj/item/toy/figure/ninja
name = "Ninja action figure"
+ desc = "It's the mysterious ninja! It's from Space Life's special edition SS12 figurine collection."
icon_state = "ninja"
toysay = "Oh god! Stop shooting, I'm friendly!"
/obj/item/toy/figure/wizard
name = "Wizard action figure"
+ desc = "It's the deadly, spell-slinging wizard! It's from Space Life's special edition SS12 figurine collection."
icon_state = "wizard"
toysay = "Ei Nath!"
/obj/item/toy/figure/rd
name = "Research Director action figure"
+ desc = "The ambitious RD, from Space Life's SS12 figurine collection."
icon_state = "rd"
toysay = "Blowing all of the borgs!"
/obj/item/toy/figure/roboticist
name = "Roboticist action figure"
+ desc = "The skillful Roboticist, from Space Life's SS12 figurine collection."
icon_state = "roboticist"
toysay = "He asked to be borged!"
/obj/item/toy/figure/scientist
name = "Scientist action figure"
+ desc = "The mad Scientist, from Space Life's SS12 figurine collection."
icon_state = "scientist"
toysay = "Someone else must have made those bombs!"
/obj/item/toy/figure/syndie
name = "Nuclear Operative action figure"
+ desc = "It's the red-suited Nuclear Operative! It's from Space Life's special edition SS12 figurine collection."
icon_state = "syndie"
toysay = "Get that fucking disk!"
/obj/item/toy/figure/secofficer
name = "Security Officer action figure"
+ desc = "The power-tripping Security Officer, from Space Life's SS12 figurine collection."
icon_state = "secofficer"
toysay = "I am the law!"
/obj/item/toy/figure/virologist
name = "Virologist action figure"
+ desc = "The pandemic-starting Virologist, from Space Life's SS12 figurine collection."
icon_state = "virologist"
- toysay = "The cure is potassium!"
+ toysay = "It's not my virus!"
/obj/item/toy/figure/warden
name = "Warden action figure"
+ desc = "The amnesiac Warden, from Space Life's SS12 figurine collection."
icon_state = "warden"
toysay = "Execute him for breaking in!"
diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm
new file mode 100644
index 00000000000..34d2bdd7ac8
--- /dev/null
+++ b/code/game/objects/items/weapons/batons.dm
@@ -0,0 +1,133 @@
+/// Delay in deci-seconds between two non-lethal attacks
+#define BATON_STUN_COOLDOWN 4 SECONDS
+/// Force of the telescopic baton when deployed
+#define BATON_TELESCOPIC_FORCE_DEPLOYED 10
+
+/**
+ * # Police Baton
+ *
+ * Knocks down the hit mob when not on harm intent and when [/obj/item/melee/classic_baton/on] is TRUE
+ *
+ * A non-lethal attack has a cooldown to avoid spamming
+ */
+/obj/item/melee/classic_baton
+ name = "police baton"
+ desc = "A wooden truncheon for beating criminal scum."
+ icon_state = "baton"
+ item_state = "classic_baton"
+ slot_flags = SLOT_BELT
+ force = 12 //9 hit crit
+ w_class = WEIGHT_CLASS_NORMAL
+ /// Whether the baton is on cooldown
+ var/on_cooldown = FALSE
+ /// Whether the baton is toggled on (to allow attacking)
+ var/on = TRUE
+
+/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
+ if(!on)
+ return ..()
+
+ add_fingerprint(user)
+ if((CLUMSY in user.mutations) && prob(50))
+ user.visible_message("[user] accidentally clubs [user.p_them()]self with [src]!", \
+ "You accidentally club yourself with [src]!")
+ user.Weaken(force * 3)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ H.apply_damage(force * 2, BRUTE, "head")
+ else
+ user.take_organ_damage(force * 2)
+ return
+
+ if(user.a_intent == INTENT_HARM || isrobot(target)) // Lethal attack or it's a borg (can't knock them down!)
+ return ..()
+ else if(!on_cooldown) // Non-lethal attack - knock them down
+ // Check for shield/countering
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
+ return
+ if(check_martial_counter(H, user))
+ return
+ // Visuals and sound
+ user.do_attack_animation(target)
+ playsound(target, 'sound/effects/woodhit.ogg', 75, TRUE, -1)
+ add_attack_logs(user, target, "Stunned with [src]")
+ target.visible_message("[user] has knocked down [target] with \the [src]!", \
+ "[user] has knocked down [target] with \the [src]!")
+ // Hit 'em
+ target.LAssailant = iscarbon(user) ? user : null
+ target.Weaken(3)
+ on_cooldown = TRUE
+ addtimer(CALLBACK(src, .proc/cooldown_finished), BATON_STUN_COOLDOWN)
+
+/**
+ * Called some time after a non-lethal attack
+ */
+/obj/item/melee/classic_baton/proc/cooldown_finished()
+ on_cooldown = FALSE
+
+/**
+ * # Fancy Cane
+ */
+/obj/item/melee/classic_baton/ntcane
+ name = "fancy cane"
+ desc = "A cane with special engraving on it. It seems well suited for fending off assailants..."
+ icon_state = "cane_nt"
+ item_state = "cane_nt"
+ needs_permit = FALSE
+
+/obj/item/melee/classic_baton/ntcane/is_crutch()
+ return TRUE
+
+/**
+ * # Telescopic Baton
+ */
+/obj/item/melee/classic_baton/telescopic
+ name = "telescopic baton"
+ desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
+ icon_state = "telebaton_0"
+ item_state = null
+ slot_flags = SLOT_BELT
+ w_class = WEIGHT_CLASS_SMALL
+ needs_permit = FALSE
+ force = 0
+ on = FALSE
+ /// Attack verbs when concealed (created on Initialize)
+ var/static/list/attack_verb_off
+ /// Attack verbs when extended (created on Initialize)
+ var/static/list/attack_verb_on
+
+/obj/item/melee/classic_baton/telescopic/Initialize(mapload)
+ . = ..()
+ if(!attack_verb_off)
+ attack_verb_off = list("hit", "poked")
+ attack_verb_on = list("smacked", "struck", "cracked", "beaten")
+ attack_verb = on ? attack_verb_on : attack_verb_off
+
+/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
+ on = !on
+ icon_state = "telebaton_[on]"
+ if(on)
+ to_chat(user, "You extend the baton.")
+ item_state = "nullrod"
+ w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
+ force = BATON_TELESCOPIC_FORCE_DEPLOYED //stunbaton damage
+ attack_verb = attack_verb_on
+ else
+ to_chat(user, "You collapse the baton.")
+ item_state = null //no sprite for concealment even when in hand
+ slot_flags = SLOT_BELT
+ w_class = WEIGHT_CLASS_SMALL
+ force = 0 //not so robust now
+ attack_verb = attack_verb_off
+ // Update mob hand visuals
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ H.update_inv_l_hand()
+ H.update_inv_r_hand()
+ playsound(loc, 'sound/weapons/batonextend.ogg', 50, TRUE)
+ add_fingerprint(user)
+
+#undef BATON_STUN_COOLDOWN
+#undef BATON_TELESCOPIC_FORCE_DEPLOYED
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index dc26b14e24b..b780a837559 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -212,6 +212,11 @@
return M
owner_ckey = null
+/obj/item/card/id/proc/getPlayerCkey()
+ var/mob/living/carbon/human/H = getPlayer()
+ if(istype(H))
+ return H.ckey
+
/obj/item/card/id/proc/is_untrackable()
return untrackable
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 42f65141094..fcfe183dddf 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -55,16 +55,15 @@
/obj/item/lipstick/random/Initialize(mapload)
. = ..()
- var/lscolor = pick(lipstick_colors) // A random color is picked from the var defined initially in a new var.
- colour = lipstick_colors[lscolor] // The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
- name = "[lscolor] lipstick" // The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
+ colour = pick(lipstick_colors)
+ name = "[colour] lipstick"
/obj/item/lipstick/attack_self(mob/user)
cut_overlays()
to_chat(user, "You twist \the [src] [open ? "closed" : "open"].")
open = !open
if(open)
- var/image/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color")
+ var/mutable_appearance/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color")
colored.color = lipstick_colors[colour]
icon_state = "lipstick_uncap"
add_overlay(colored)
diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm
index 4bddaf551ea..e3c145e790b 100644
--- a/code/game/objects/items/weapons/garrote.dm
+++ b/code/game/objects/items/weapons/garrote.dm
@@ -104,7 +104,7 @@
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
M.visible_message("[U] comes from behind and begins garroting [M] with the [src]!", \
- "[U]\ begins garroting you with the [src]![improvised ? "" : " You are unable to speak!"]", \
+ "[U] begins garroting you with the [src]![improvised ? "" : " You are unable to speak!"]", \
"You hear struggling and wire strain against flesh!")
return
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index b3028f13c90..13f9dd8f49d 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -5,39 +5,51 @@
origin_tech = "materials=2;combat=3"
light_power = 10
light_color = LIGHT_COLOR_WHITE
- var/light_time = 2
- var/range = 7
+
+ var/light_time = 0.2 SECONDS // The duration the area is illuminated
+ var/range = 7 // The range in tiles of the flashbang
/obj/item/grenade/flashbang/prime()
update_mob()
- var/flashbang_turf = get_turf(src)
- if(!flashbang_turf)
- return
+ var/turf/T = get_turf(src)
+ if(T)
+ // VFX and SFX
+ do_sparks(rand(5, 9), FALSE, src)
+ playsound(T, 'sound/effects/bang.ogg', 100, TRUE)
+ new /obj/effect/dummy/lighting_obj(T, light_color, range + 2, light_power, light_time)
- set_light(7)
-
- do_sparks(rand(5, 9), FALSE, src)
- playsound(flashbang_turf, 'sound/effects/bang.ogg', 25, 1)
- bang(flashbang_turf, src, range)
-
- for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here
- var/damage = round(30 / (get_dist(B, get_turf(src)) + 1))
- B.take_damage(damage, BURN, "melee", 0)
-
- spawn(light_time)
- qdel(src)
+ // Stunning & damaging mechanic
+ bang(T, src, range)
+ qdel(src)
+/**
+ * Creates a flashing effect that blinds and deafens mobs within range
+ *
+ * Also damages blobs
+ * Arguments:
+ * * T - The turf to flash
+ * * A - The flashing atom
+ * * range - The range in tiles of the flash
+ * * flash - Whether to flash (blind)
+ * * bang - Whether to bang (deafen)
+ */
/proc/bang(turf/T, atom/A, range = 7, flash = TRUE, bang = TRUE)
+ // Blob damage
+ for(var/obj/structure/blob/B in hear(range + 1, T))
+ var/damage = round(30 / (get_dist(B, T) + 1))
+ B.take_damage(damage, BURN, "melee", FALSE)
+
+ // Flashing mechanic
+ var/source_turf = get_turf(A)
for(var/mob/living/M in hearers(range, T))
if(M.stat == DEAD)
continue
M.show_message("BANG", 2)
- //Checking for protections
- var/ear_safety = M.check_ear_prot()
- var/distance = max(1, get_dist(get_turf(A), get_turf(M)))
+ var/distance = max(1, get_dist(source_turf, get_turf(M)))
+ var/stun_amount = max(10 / distance, 3)
- //Flash
+ // Flash
if(flash)
if(M.weakeyes)
M.visible_message("[M] screams and collapses!")
@@ -49,21 +61,20 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(E)
- E.receive_damage(8, 1)
-
+ E.receive_damage(8, TRUE)
if(M.flash_eyes(affect_silicon = TRUE))
- M.Stun(max(10 / distance, 3))
- M.Weaken(max(10 / distance, 3))
+ M.Stun(stun_amount)
+ M.Weaken(stun_amount)
-
- //Bang
+ // Bang
+ var/ear_safety = M.check_ear_prot()
if(bang)
- if(!distance || A.loc == M || A.loc == M.loc) //Holding on person or being exactly where lies is significantly more dangerous and voids protection
+ if(!distance || A.loc == M || A.loc == M.loc) // Holding on person or being exactly where lies is significantly more dangerous and voids protection
M.Stun(10)
M.Weaken(10)
if(!ear_safety)
- M.Stun(max(10 / distance, 3))
- M.Weaken(max(10 / distance, 3))
+ M.Stun(stun_amount)
+ M.Weaken(stun_amount)
M.AdjustEarDamage(rand(0, 5), 15)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -74,6 +85,5 @@
if(prob(ears.ear_damage - 5))
to_chat(M, "You can't hear anything!")
M.BecomeDeaf()
- else
- if(ears.ear_damage >= 5)
- to_chat(M, "Your ears start to ring!")
+ else if(ears.ear_damage >= 5)
+ to_chat(M, "Your ears start to ring!")
diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm
index 6dd07485f5b..53061e5fa61 100644
--- a/code/game/objects/items/weapons/grenades/smokebomb.dm
+++ b/code/game/objects/items/weapons/grenades/smokebomb.dm
@@ -19,7 +19,7 @@
/obj/item/grenade/smokebomb/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
- src.smoke.set_up(10, 0, usr.loc)
+ smoke.set_up(10, 0)
spawn(0)
src.smoke.start()
sleep(10)
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 1f73e5c7062..69b4abbe10d 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -126,13 +126,15 @@
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
-/obj/item/restraints/handcuffs/cable/proc/cable_color(var/colorC)
- if(colorC)
- if(colorC == "rainbow")
- colorC = color_rainbow()
- color = colorC
- else
+/obj/item/restraints/handcuffs/cable/proc/cable_color(colorC)
+ if(!colorC)
color = COLOR_RED
+ else if(colorC == "rainbow")
+ color = color_rainbow()
+ else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them
+ color = COLOR_ORANGE
+ else
+ color = colorC
/obj/item/restraints/handcuffs/cable/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index 6423bbeb6ff..974bd3b677f 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -255,7 +255,7 @@
possessed = TRUE
- var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, 0, 100)
+ var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, FALSE, 10 SECONDS, source = src)
var/mob/dead/observer/theghost = null
if(candidates.len)
diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm
index 6daabffe000..f987f047f11 100644
--- a/code/game/objects/items/weapons/shards.dm
+++ b/code/game/objects/items/weapons/shards.dm
@@ -83,7 +83,7 @@
/obj/item/shard/Crossed(mob/living/L, oldloc)
if(istype(L) && has_gravity(loc))
- if(L.incorporeal_move || L.flying)
+ if(L.incorporeal_move || L.flying || L.floating)
return
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
return ..()
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 26045731bd9..e7880fd0868 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -372,6 +372,15 @@
new /obj/item/ammo_box/magazine/m12g/buckshot(src)
new /obj/item/ammo_box/magazine/m12g/dragon(src)
+/obj/item/storage/backpack/duffel/syndie/ammo/shotgunXLmags
+ desc = "A large duffelbag, containing three types of extended drum magazines."
+
+/obj/item/storage/backpack/duffel/syndie/ammo/shotgunXLmags/New()
+ ..()
+ new /obj/item/ammo_box/magazine/m12g/XtrLrg(src)
+ new /obj/item/ammo_box/magazine/m12g/XtrLrg/buckshot(src)
+ new /obj/item/ammo_box/magazine/m12g/XtrLrg/dragon(src)
+
/obj/item/storage/backpack/duffel/mining_conscript/
name = "mining conscription kit"
desc = "A kit containing everything a crewmember needs to support a shaft miner in the field."
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 6d5a192c641..121782b2e8e 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -380,12 +380,13 @@
w_class = WEIGHT_CLASS_BULKY
flags = CONDUCT
materials = list(MAT_METAL=3000)
+ cant_hold = list(/obj/item/disk/nuclear) // Prevents some cheesing
-/obj/item/storage/bag/tray/attack(mob/living/M as mob, mob/living/user as mob)
+/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
..()
// Drop all the things. All of them.
var/list/obj/item/oldContents = contents.Copy()
- quick_empty()
+ drop_inventory(user)
// Make each item scatter a bit
for(var/obj/item/I in oldContents)
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 403088e2b71..e31e98789a3 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -204,8 +204,10 @@
/obj/item/flashlight/pen,
/obj/item/seeds,
/obj/item/wirecutters,
- /obj/item/wrench,
- )
+ /obj/item/wrench,
+ /obj/item/reagent_containers/spray/weedspray,
+ /obj/item/reagent_containers/spray/pestspray
+ )
/obj/item/storage/belt/security
name = "security belt"
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index da0094bb2ef..9ef94a861a0 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -846,7 +846,7 @@
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "matchbox"
- item_state = "zippo"
+ item_state = "matchbox"
storage_slots = 10
w_class = WEIGHT_CLASS_TINY
max_w_class = WEIGHT_CLASS_TINY
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index 37f568fa51a..f86ebb2f69d 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -226,14 +226,14 @@
name = "\improper DromedaryCo packet"
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
icon_state = "Dpacket"
- item_state = "cigpacket"
+ item_state = "Dpacket"
/obj/item/storage/fancy/cigarettes/syndicate
name = "\improper Syndicate Cigarettes"
desc = "A packet of six evil-looking cigarettes, A label on the packaging reads, \"Donk Co\""
icon_state = "robustpacket"
- item_state = "cigpacket"
+ item_state = "robustpacket"
/obj/item/storage/fancy/cigarettes/syndicate/New()
..()
@@ -244,14 +244,14 @@
name = "cigarette packet"
desc = "An obscure brand of cigarettes."
icon_state = "syndiepacket"
- item_state = "cigpacket"
+ item_state = "syndiepacket"
cigarette_type = /obj/item/clothing/mask/cigarette/syndicate
/obj/item/storage/fancy/cigarettes/cigpack_med
name = "Medical Marijuana Packet"
desc = "A prescription packet containing six marijuana cigarettes."
icon_state = "medpacket"
- item_state = "cigpacket"
+ item_state = "medpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/medical_marijuana
@@ -259,46 +259,46 @@
name = "\improper Uplift Smooth packet"
desc = "Your favorite brand, now menthol flavored."
icon_state = "upliftpacket"
- item_state = "cigpacket"
+ item_state = "upliftpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/menthol
/obj/item/storage/fancy/cigarettes/cigpack_robust
name = "\improper Robust packet"
desc = "Smoked by the robust."
icon_state = "robustpacket"
- item_state = "cigpacket"
+ item_state = "robustpacket"
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
name = "\improper Robust Gold packet"
desc = "Smoked by the truly robust."
icon_state = "robustgpacket"
- item_state = "cigpacket"
+ item_state = "robustgpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/robustgold
/obj/item/storage/fancy/cigarettes/cigpack_carp
name = "\improper Carp Classic packet"
desc = "Since 2313."
icon_state = "carppacket"
- item_state = "cigpacket"
+ item_state = "carppacket"
/obj/item/storage/fancy/cigarettes/cigpack_midori
name = "\improper Midori Tabako packet"
desc = "You can't understand the runes, but the packet smells funny."
icon_state = "midoripacket"
- item_state = "cigpacket"
+ item_state = "midoripacket"
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
name ="\improper Shady Jim's Super Slims"
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
icon_state = "shadyjimpacket"
- item_state = "cigpacket"
+ item_state = "shadyjimpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/shadyjims
/obj/item/storage/fancy/cigarettes/cigpack_random
name ="\improper Embellished Enigma packet"
desc = "For the true connoisseur of exotic flavors."
icon_state = "shadyjimpacket"
- item_state = "cigpacket"
+ item_state = "shadyjimpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/random
/obj/item/storage/fancy/rollingpapers
@@ -307,6 +307,7 @@
w_class = WEIGHT_CLASS_TINY
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig_paper_pack"
+ item_state = "cig_paper_pack"
storage_slots = 10
icon_type = "rolling paper"
can_hold = list(/obj/item/rollingpaper)
diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm
index 4ff769a7d3f..1e22015bc97 100644
--- a/code/game/objects/items/weapons/storage/firstaid.dm
+++ b/code/game/objects/items/weapons/storage/firstaid.dm
@@ -205,7 +205,7 @@
if(empty)
return
new /obj/item/reagent_containers/hypospray/combat(src)
- new /obj/item/reagent_containers/applicator/dual(src) // Because you ain't got no time to look at what damage dey taking yo
+ new /obj/item/reagent_containers/applicator/dual/syndi(src) // Because you ain't got no time to look at what damage dey taking yo
new /obj/item/defibrillator/compact/combat/loaded(src)
new /obj/item/clothing/glasses/hud/health/night(src)
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 16bd6f4caa8..49b6c6a11ea 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -438,8 +438,11 @@
if((!ishuman(usr) && (src.loc != usr)) || usr.stat || usr.restrained())
return
+ drop_inventory(usr)
+
+/obj/item/storage/proc/drop_inventory(user)
var/turf/T = get_turf(src)
- hide_from(usr)
+ hide_from(user)
for(var/obj/item/I in contents)
remove_from_storage(I, T)
CHECK_TICK
@@ -499,10 +502,9 @@
/obj/item/storage/attack_self(mob/user)
- //Clicking on itself will empty it, if it has the verb to do that.
- if(user.is_in_active_hand(src))
- if(verbs.Find(/obj/item/storage/verb/quick_empty))
- quick_empty()
+ //Clicking on itself will empty it, if allow_quick_empty is TRUE
+ if(allow_quick_empty && user.is_in_active_hand(src))
+ drop_inventory(user)
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
//Returns -1 if the atom was not found on container.
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
deleted file mode 100644
index e75935a3cc2..00000000000
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Weapons
- * Contains:
- * Banhammer
- * Classic Baton
- */
-
-/*
- * Banhammer
- */
-/obj/item/banhammer/attack(mob/M, mob/user)
- to_chat(M, " You have been banned FOR NO REISIN by [user]")
- to_chat(user, " You have BANNED [M]")
- playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
-
-/*
- * Classic Baton
- */
-
-/obj/item/melee/classic_baton
- name = "police baton"
- desc = "A wooden truncheon for beating criminal scum."
- icon_state = "baton"
- item_state = "classic_baton"
- slot_flags = SLOT_BELT
- force = 12 //9 hit crit
- w_class = WEIGHT_CLASS_NORMAL
- var/cooldown = 0
- var/on = 1
-
-/obj/item/melee/classic_baton/attack(mob/target as mob, mob/living/user as mob)
- if(on)
- add_fingerprint(user)
- if((CLUMSY in user.mutations) && prob(50))
- to_chat(user, "You club yourself over the head.")
- user.Weaken(3 * force)
- if(ishuman(user))
- var/mob/living/carbon/human/H = user
- H.apply_damage(2*force, BRUTE, "head")
- else
- user.take_organ_damage(2*force)
- return
- if(isrobot(target))
- ..()
- return
- if(!isliving(target))
- return
- if(user.a_intent == INTENT_HARM)
- if(!..()) return
- if(!isrobot(target)) return
- else
- if(cooldown <= 0)
- if(ishuman(target))
- var/mob/living/carbon/human/H = target
- if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
- return
- if(check_martial_counter(H, user))
- return
- playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
- target.Weaken(3)
- add_attack_logs(user, target, "Stunned with [src]")
- add_fingerprint(user)
- target.visible_message("[user] has knocked down [target] with \the [src]!", \
- "[user] has knocked down [target] with \the [src]!")
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = user
- cooldown = 1
- spawn(40)
- cooldown = 0
- return
- else
- return ..()
-
-/obj/item/melee/classic_baton/ntcane
- name = "fancy cane"
- desc = "A cane with special engraving on it. It seems well suited for fending off assailants..."
- icon_state = "cane_nt"
- item_state = "cane_nt"
- needs_permit = 0
-
-/obj/item/melee/classic_baton/ntcane/is_crutch()
- return 1
-
-//Telescopic baton
-/obj/item/melee/classic_baton/telescopic
- name = "telescopic baton"
- desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
- icon_state = "telebaton_0"
- item_state = null
- slot_flags = SLOT_BELT
- w_class = WEIGHT_CLASS_SMALL
- needs_permit = 0
- force = 0
- on = 0
-
-/obj/item/melee/classic_baton/telescopic/attack_self(mob/user as mob)
- on = !on
- if(on)
- to_chat(user, "You extend the baton.")
- icon_state = "telebaton_1"
- item_state = "nullrod"
- w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
- force = 10 //stunbaton damage
- attack_verb = list("smacked", "struck", "cracked", "beaten")
- else
- to_chat(user, "You collapse the baton.")
- icon_state = "telebaton_0"
- item_state = null //no sprite for concealment even when in hand
- slot_flags = SLOT_BELT
- w_class = WEIGHT_CLASS_SMALL
- force = 0 //not so robust now
- attack_verb = list("hit", "poked")
- if(istype(user,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = user
- H.update_inv_l_hand()
- H.update_inv_r_hand()
- playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
- add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm
index bc783457e76..edf32e2f5a6 100644
--- a/code/game/objects/items/weapons/tanks/jetpack.dm
+++ b/code/game/objects/items/weapons/tanks/jetpack.dm
@@ -219,28 +219,3 @@
turn_off(cur_user)
return
..()
-
-/obj/item/tank/jetpack/rig
- name = "jetpack"
- var/obj/item/rig/holder
- actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
-
-/obj/item/tank/jetpack/rig/examine()
- . = list("It's a jetpack. If you can see this, report it on the bug tracker.")
-
-/obj/item/tank/jetpack/rig/allow_thrust(num, mob/living/user)
- if(!on)
- return 0
-
- if(!istype(holder) || !holder.air_supply)
- return 0
-
- var/datum/gas_mixture/removed = holder.air_supply.air_contents.remove(num)
- if(removed.total_moles() < 0.005)
- turn_off(user)
- return 0
-
- var/turf/T = get_turf(user)
- T.assume_air(removed)
-
- return 1
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 9ded7947202..abc267d3a34 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -43,35 +43,31 @@
/obj/item/tank/proc/toggle_internals(mob/user, silent = FALSE)
var/mob/living/carbon/C = user
if(!istype(C))
- return 0
+ return FALSE
if(C.internal == src)
to_chat(C, "You close \the [src] valve.")
C.internal = null
else
- var/can_open_valve = 0
- if(C.get_organ_slot("breathing_tube"))
- can_open_valve = 1
- else if(C.wear_mask && C.wear_mask.flags & AIRTIGHT)
- can_open_valve = 1
- else if(ishuman(C))
- var/mob/living/carbon/human/H = C
- if(H.head && H.head.flags & AIRTIGHT)
- can_open_valve = 1
+ if(!C.get_organ_slot("breathing_tube")) // Breathing tubes can always use internals, if they have one, skip ahead and turn internals on/off
+ if(!C.wear_mask) // Do we have a mask equipped?
+ return FALSE
- if(can_open_valve)
+ var/obj/item/clothing/mask/M = C.wear_mask
+ // If the "mask" isn't actually a mask OR That mask isn't internals compatible AND Their headgear isn't internals compatible
+ if(!istype(M) || (!(initial(M.flags) & AIRTIGHT) && !(C.head.flags & AIRTIGHT)))
+ if(!silent)
+ to_chat(C, "You are not wearing a suitable mask or helmet.")
+ return FALSE
+ if(M.mask_adjusted) // If the mask is equipped but pushed down
+ M.adjustmask(C) // Adjust it back
+
+ if(!silent)
if(C.internal)
- if(!silent)
- to_chat(C, "You switch your internals to [src].")
+ to_chat(C, "You switch your internals to [src].")
else
- if(!silent)
- to_chat(C, "You open \the [src] valve.")
- C.internal = src
- else
- if(!silent)
- to_chat(C, "You are not wearing a suitable mask or helmet.")
- return 0
-
+ to_chat(C, "You open \the [src] valve.")
+ C.internal = src
C.update_action_buttons_icon()
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 32158a9a3ab..e5f903a1853 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -1,3 +1,6 @@
+/**
+ * # Banhammer
+ */
/obj/item/banhammer
desc = "A banhammer"
name = "banhammer"
@@ -13,11 +16,15 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
-
/obj/item/banhammer/suicide_act(mob/user)
to_chat(viewers(user), "[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.")
return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS
+/obj/item/banhammer/attack(mob/M, mob/user)
+ to_chat(M, " You have been banned FOR NO REISIN by [user]")
+ to_chat(user, " You have BANNED [M]")
+ playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
+
/obj/item/sord
name = "\improper SORD"
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index d40c628ed90..7a56c53f73a 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -351,3 +351,9 @@ a {
/obj/proc/check_uplink_validity()
return TRUE
+
+/obj/proc/force_eject_occupant()
+ // This proc handles safely removing occupant mobs from the object if they must be teleported out (due to being SSD/AFK, by admin teleport, etc) or transformed.
+ // In the event that the object doesn't have an overriden version of this proc to do it, log a runtime so one can be added.
+ CRASH("Proc force_eject_occupant() is not overriden on a machine containing a mob.")
+
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 04373502832..138c77f92eb 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -25,9 +25,13 @@
..()
spawn(1)
if(!opened) // if closed, any item at the crate's loc is put in the contents
+ var/itemcount = 0
for(var/obj/item/I in loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
+ // Ensure the storage cap is respected
+ if(++itemcount >= storage_capacity)
+ break
// Fix for #383 - C4 deleting fridges with corpses
/obj/structure/closet/Destroy()
@@ -354,6 +358,11 @@
/obj/structure/closet/AllowDrop()
return TRUE
+/obj/structure/closet/force_eject_occupant()
+ // Its okay to silently teleport mobs out of lockers, since the only thing affected is their contents list.
+ return
+
+
/obj/structure/closet/bluespace
name = "bluespace closet"
desc = "A storage unit that moves and stores through the fourth dimension."
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
index fd67afcf797..311bc4a38c7 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
@@ -45,8 +45,6 @@
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/radio/headset/headset_sci(src)
new /obj/item/radio/headset/headset_sci(src)
- new /obj/item/reagent_containers/food/drinks/oilcan(src)
- new /obj/item/reagent_containers/food/drinks/oilcan(src)
/obj/structure/closet/secure_closet/RD
name = "research director's locker"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index 763717dc270..7a648aa74e4 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -69,6 +69,11 @@
/obj/structure/closet/secure_closet/closed_item_click(mob/user)
togglelock(user)
+/obj/structure/closet/secure_closet/AltClick(mob/user)
+ ..()
+ if(Adjacent(user))
+ togglelock(user)
+
/obj/structure/closet/secure_closet/emag_act(mob/user)
if(!broken)
broken = TRUE
diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm
index fd726aab6a7..7629fc62918 100644
--- a/code/game/objects/structures/crates_lockers/crittercrate.dm
+++ b/code/game/objects/structures/crates_lockers/crittercrate.dm
@@ -82,9 +82,8 @@
content_mob = /mob/living/simple_animal/pet/dog/fox
/obj/structure/closet/critter/butterfly
- name = "butterflies crate"
+ name = "butterfly crate"
content_mob = /mob/living/simple_animal/butterfly
- amount = 50
/obj/structure/closet/critter/deer
name = "deer crate"
diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm
index 4531613610e..0c0a7f5e4dd 100644
--- a/code/game/objects/structures/dresser.dm
+++ b/code/game/objects/structures/dresser.dm
@@ -56,27 +56,20 @@
/obj/structure/dresser/crowbar_act(mob/user, obj/item/I)
. = TRUE
- if(!I.tool_start_check(src, user, 0))
+ if(!I.use_tool(src, user, 0))
return
TOOL_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 50, volume = I.tool_volume))
TOOL_DISMANTLE_SUCCESS_MESSAGE
-
+ deconstruct(disassembled = TRUE)
/obj/structure/dresser/wrench_act(mob/user, obj/item/I)
. = TRUE
- if(!I.use_tool(src, user, 0, volume = I.tool_volume))
- return
- if(anchored)
- WRENCH_UNANCHOR_MESSAGE
- anchored = FALSE
- else
- if(!isfloorturf(loc))
- user.visible_message("A floor must be present to secure [src]!")
- return
- WRENCH_ANCHOR_MESSAGE
- anchored = TRUE
+ default_unfasten_wrench(user, I, time = 20)
-/obj/structure/dresser/deconstruct(disassembled = TRUE)
- new /obj/item/stack/sheet/wood(drop_location(), 30)
- qdel(src)
+obj/structure/dresser/deconstruct(disassembled = FALSE)
+ var/mat_drop = 15
+ if(disassembled)
+ mat_drop = 30
+ new /obj/item/stack/sheet/wood(drop_location(), mat_drop)
+ ..()
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index cd7b3525478..33298669157 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -40,7 +40,7 @@
return
if(!in_range(src, user))
return
- if(!iscarbon(usr))
+ if(!iscarbon(usr) && !isrobot(usr))
return
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
opened = !opened
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 5fea799ecb0..6d27b21e686 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -76,14 +76,14 @@
if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/S = W
if(state == GIRDER_DISPLACED)
- if(S.get_amount() < 2)
- to_chat(user, "You need at least two rods to create a false wall!")
+ if(S.get_amount() < 5)
+ to_chat(user, "You need at least five rods to create a false wall!")
return
to_chat(user, "You start building a reinforced false wall...")
if(do_after(user, 20, target = src))
- if(!loc || !S || S.get_amount() < 2)
+ if(!loc || !S || S.get_amount() < 5)
return
- S.use(2)
+ S.use(5)
to_chat(user, "You create a false wall. Push on it to open or close the passage.")
var/obj/structure/falsewall/iron/FW = new (loc)
transfer_fingerprints_to(FW)
diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm
index d0bcd07f92f..4742a2c3c0c 100644
--- a/code/game/objects/structures/loom.dm
+++ b/code/game/objects/structures/loom.dm
@@ -11,12 +11,30 @@
anchored = TRUE
/obj/structure/loom/attackby(obj/item/I, mob/user)
- if(default_unfasten_wrench(user, I, 5))
- return
if(weave(I, user))
return
return ..()
+/obj/structure/loom/crowbar_act(mob/user, obj/item/I)
+ . = TRUE
+ if(!I.use_tool(src, user, 0))
+ return
+ TOOL_ATTEMPT_DISMANTLE_MESSAGE
+ if(I.use_tool(src, user, 50, volume = I.tool_volume))
+ TOOL_DISMANTLE_SUCCESS_MESSAGE
+ deconstruct(disassembled = TRUE)
+
+/obj/structure/loom/wrench_act(mob/user, obj/item/I)
+ . = TRUE
+ default_unfasten_wrench(user, I, time = 20)
+
+/obj/structure/loom/deconstruct(disassembled = FALSE)
+ var/mat_drop = 5
+ if(disassembled)
+ mat_drop = 10
+ new /obj/item/stack/sheet/wood(drop_location(), mat_drop)
+ ..()
+
///Handles the weaving.
/obj/structure/loom/proc/weave(obj/item/stack/sheet/cotton/W, mob/user)
if(!istype(W))
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
deleted file mode 100644
index c3d63c47862..00000000000
--- a/code/game/objects/structures/musician.dm
+++ /dev/null
@@ -1,341 +0,0 @@
-
-
-/datum/song
- var/name = "Untitled"
- var/list/lines = new()
- var/tempo = 5 // delay between notes
-
- var/playing = 0 // if we're playing
- var/help = 0 // if help is open
- var/repeat = 0 // number of times remaining to repeat
- var/max_repeat = 10 // maximum times we can repeat
-
- var/instrumentDir = "piano" // the folder with the sounds
- var/instrumentExt = "ogg" // the file extension
- var/obj/instrumentObj = null // the associated obj playing the sound
-
-/datum/song/New(dir, obj, ext = "ogg")
- tempo = sanitize_tempo(tempo)
- instrumentDir = dir
- instrumentObj = obj
- instrumentExt = ext
-
-/datum/song/Destroy()
- instrumentObj = null
- return ..()
-
-// note is a number from 1-7 for A-G
-// acc is either "b", "n", or "#"
-// oct is 1-8 (or 9 for C)
-/datum/song/proc/playnote(note, acc as text, oct)
- // handle accidental -> B<>C of E<>F
- if(acc == "b" && (note == 3 || note == 6)) // C or F
- if(note == 3)
- oct--
- note--
- acc = "n"
- else if(acc == "#" && (note == 2 || note == 5)) // B or E
- if(note == 2)
- oct++
- note++
- acc = "n"
- else if(acc == "#" && (note == 7)) //G#
- note = 1
- acc = "b"
- else if(acc == "#") // mass convert all sharps to flats, octave jump already handled
- acc = "b"
- note++
-
- // check octave, C is allowed to go to 9
- if(oct < 1 || (note == 3 ? oct > 9 : oct > 8))
- return
-
- // now generate name
- var/soundfile = "sound/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
- soundfile = file(soundfile)
- // make sure the note exists
- if(!fexists(soundfile))
- return
- // and play
- var/turf/source = get_turf(instrumentObj)
- var/sound/music_played = sound(soundfile)
- for(var/A in hearers(15, source))
- var/mob/M = A
- if(!M.client || !(M.client.prefs.sound & SOUND_INSTRUMENTS))
- continue
- M.playsound_local(source, null, 100, falloff = 5, S = music_played)
-
-/datum/song/proc/shouldStopPlaying(mob/user)
- if(instrumentObj)
- //if(!user.canUseTopic(instrumentObj))
- //return 1
- return !instrumentObj.anchored // add special cases to stop in subclasses
- else
- return 1
-
-/datum/song/proc/playsong(mob/user)
- while(repeat >= 0)
- var/cur_oct[7]
- var/cur_acc[7]
- for(var/i = 1 to 7)
- cur_oct[i] = 3
- cur_acc[i] = "n"
-
- for(var/line in lines)
- for(var/beat in splittext(lowertext(line), ","))
- var/list/notes = splittext(beat, "/")
- for(var/note in splittext(notes[1], "-"))
- if(!playing || shouldStopPlaying(user)) //If the instrument is playing, or special case
- playing = 0
- return
- if(length(note) == 0)
- continue
- var/cur_note = text2ascii(note) - 96
- if(cur_note < 1 || cur_note > 7)
- continue
- for(var/i=2 to length(note))
- var/ni = copytext(note,i,i+1)
- if(!text2num(ni))
- if(ni == "#" || ni == "b" || ni == "n")
- cur_acc[cur_note] = ni
- else if(ni == "s")
- cur_acc[cur_note] = "#" // so shift is never required
- else
- cur_oct[cur_note] = text2num(ni)
- playnote(cur_note, cur_acc[cur_note], cur_oct[cur_note])
- if(notes.len >= 2 && text2num(notes[2]))
- sleep(sanitize_tempo(tempo / text2num(notes[2])))
- else
- sleep(tempo)
- repeat--
- playing = 0
- repeat = 0
-
-/datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- if(!instrumentObj)
- return
-
- ui = SSnanoui.try_update_ui(user, instrumentObj, ui_key, ui, force_open)
- if(!ui)
- ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
- ui.open()
- ui.set_auto_update(1)
-
-/datum/song/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
- var/data[0]
-
- data["lines"] = lines
- data["tempo"] = tempo
-
- data["playing"] = playing
- data["help"] = help
- data["repeat"] = repeat
- data["maxRepeat"] = max_repeat
- data["minTempo"] = world.tick_lag
- data["maxTempo"] = 600
-
- return data
-
-/datum/song/Topic(href, href_list)
- if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || usr.incapacitated())
- usr << browse(null, "window=instrument")
- usr.unset_machine()
- return 1
-
- instrumentObj.add_fingerprint(usr)
-
- if(href_list["newsong"])
- playing = 0
- lines = new()
- tempo = sanitize_tempo(5) // default 120 BPM
- name = ""
- SSnanoui.update_uis(src)
-
- else if(href_list["import"])
- playing = 0
- var/t = ""
- do
- t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message)
- if(!in_range(instrumentObj, usr))
- return
-
- if(length(t) >= 12000)
- var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
- if(cont == "no")
- break
- while(length(t) > 12000)
-
- //split into lines
- spawn()
- lines = splittext(t, "\n")
- if(lines.len == 0)
- return 1
- if(copytext(lines[1],1,6) == "BPM: ")
- tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
- lines.Cut(1,2)
- else
- tempo = sanitize_tempo(5) // default 120 BPM
- if(lines.len > 200)
- to_chat(usr, "Too many lines!")
- lines.Cut(201)
- var/linenum = 1
- for(var/l in lines)
- if(length(l) > 200)
- to_chat(usr, "Line [linenum] too long!")
- lines.Remove(l)
- else
- linenum++
- SSnanoui.update_uis(src)
-
- else if(href_list["help"])
- help = !help
- SSnanoui.update_uis(src)
-
- if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
- if(playing)
- return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
- repeat += round(text2num(href_list["repeat"]))
- if(repeat < 0)
- repeat = 0
- if(repeat > max_repeat)
- repeat = max_repeat
- SSnanoui.update_uis(src)
-
- else if(href_list["tempo"])
- tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]) * world.tick_lag)
- SSnanoui.update_uis(src)
-
- else if(href_list["play"])
- if(playing)
- return
- playing = 1
- spawn()
- playsong(usr)
- SSnanoui.update_uis(src)
-
- else if(href_list["insertline"])
- var/num = round(text2num(href_list["insertline"]))
- if(num < 1 || num > lines.len + 1)
- return
-
- var/newline = html_encode(input("Enter your line: ", instrumentObj.name) as text|null)
- if(!newline || !in_range(instrumentObj, usr))
- return
- if(lines.len > 200)
- return
- if(length(newline) > 200)
- newline = copytext(newline, 1, 200)
-
- lines.Insert(num, newline)
- SSnanoui.update_uis(src)
-
- else if(href_list["deleteline"])
- var/num = round(text2num(href_list["deleteline"]))
- if(num > lines.len || num < 1)
- return
- lines.Cut(num, num + 1)
- SSnanoui.update_uis(src)
-
- else if(href_list["modifyline"])
- var/num = round(text2num(href_list["modifyline"]))
- var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
- if(!content || !in_range(instrumentObj, usr))
- return
- if(length(content) > 200)
- content = copytext(content, 1, 200)
- if(num > lines.len || num < 1)
- return
- lines[num] = content
- SSnanoui.update_uis(src)
-
- else if(href_list["stop"])
- playing = 0
- SSnanoui.update_uis(src)
-
-/datum/song/proc/sanitize_tempo(new_tempo)
- new_tempo = abs(new_tempo)
- return max(round(new_tempo, world.tick_lag), world.tick_lag)
-
-// subclass for handheld instruments, like violin
-/datum/song/handheld
-
-/datum/song/handheld/shouldStopPlaying()
- if(instrumentObj)
- return !isliving(instrumentObj.loc)
- else
- return 1
-
-
-//////////////////////////////////////////////////////////////////////////
-
-
-/obj/structure/piano
- name = "space minimoog"
- icon = 'icons/obj/musician.dmi'
- icon_state = "minimoog"
- anchored = 1
- density = 1
- var/datum/song/song
-
-
-/obj/structure/piano/New()
- ..()
- song = new("piano", src)
-
- if(prob(50))
- name = "space minimoog"
- desc = "This is a minimoog, like a space piano, but more spacey!"
- icon_state = "minimoog"
- else
- name = "space piano"
- desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
- icon_state = "piano"
-
-/obj/structure/piano/Destroy()
- QDEL_NULL(song)
- return ..()
-
-/obj/structure/piano/Initialize()
- if(song)
- song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
- ..()
-
-/obj/structure/piano/attack_hand(mob/user as mob)
- ui_interact(user)
-
-/obj/structure/piano/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- if(!isliving(user) || user.incapacitated() || !anchored)
- return
-
- song.ui_interact(user, ui_key, ui, force_open)
-
-/obj/structure/piano/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
- return song.ui_data(user, ui_key, state)
-
-/obj/structure/piano/Topic(href, href_list)
- song.Topic(href, href_list)
-
-/obj/structure/piano/wrench_act(mob/user, obj/item/I)
- . = TRUE
- if(!I.tool_use_check(user, 0))
- return
- if(!anchored && !isinspace())
- WRENCH_ANCHOR_MESSAGE
- if(!I.use_tool(src, user, 20, volume = I.tool_volume))
- return
- user.visible_message( \
- "[user] tightens [src]'s casters.", \
- " You have tightened [src]'s casters. Now it can be played again.", \
- "You hear ratchet.")
- anchored = TRUE
- else if(anchored)
- to_chat(user, " You begin to loosen [src]'s casters...")
- if(!I.use_tool(src, user, 40, volume = I.tool_volume))
- return
- user.visible_message( \
- "[user] loosens [src]'s casters.", \
- " You have loosened [src]. Now it can be pulled somewhere else.", \
- "You hear ratchet.")
- anchored = FALSE
- else
- to_chat(user, "[src] needs to be bolted to the floor!")
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index ba5258004a0..5a8a122be21 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -292,12 +292,12 @@
/obj/structure/sign/directions/engineering
name = "\improper Engineering Department"
- desc = "A direction sign, pointing out which way the Engineering department is."
+ desc = "A direction sign, pointing out which way the Engineering Department is."
icon_state = "direction_eng"
/obj/structure/sign/directions/security
name = "\improper Security Department"
- desc = "A direction sign, pointing out which way the Security department is."
+ desc = "A direction sign, pointing out which way the Security Department is."
icon_state = "direction_sec"
/obj/structure/sign/directions/medical
@@ -307,12 +307,12 @@
/obj/structure/sign/directions/evac
name = "\improper Escape Arm"
- desc = "A direction sign, pointing out which way escape shuttle dock is."
+ desc = "A direction sign, pointing out which way Escape Shuttle Dock is."
icon_state = "direction_evac"
/obj/structure/sign/directions/cargo
name = "\improper Cargo Department"
- desc = "A direction sign, pointing out which way the Cargo department is."
+ desc = "A direction sign, pointing out which way the Cargo Department is."
icon_state = "direction_supply"
/obj/structure/sign/explosives
diff --git a/code/game/sound.dm b/code/game/sound.dm
index 870ac5e6966..6882c27df3d 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -4,12 +4,13 @@
return
var/turf/turf_source = get_turf(source)
-
if(!turf_source)
return
+ if(!SSsounds.channel_list) // Not ready yet
+ return
//allocate a channel if necessary now so its the same for everyone
- channel = channel || open_sound_channel()
+ channel = channel || SSsounds.random_available_channel()
// Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
@@ -33,7 +34,7 @@
if(distance <= maxdistance)
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S)
-/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S)
+/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S, distance_multiplier = 1)
if(!client || !can_hear())
return
@@ -41,7 +42,7 @@
S = sound(get_sfx(soundin))
S.wait = 0 //No queue
- S.channel = channel || open_sound_channel()
+ S.channel = channel || SSsounds.random_available_channel()
S.volume = vol
if(vary)
@@ -55,6 +56,7 @@
//sound volume falloff with distance
var/distance = get_dist(T, turf_source)
+ distance *= distance_multiplier
S.volume -= max(distance - world.view, 0) * 2 //multiplicative falloff to add on top of natural audio falloff.
@@ -81,9 +83,9 @@
return //No sound
var/dx = turf_source.x - T.x // Hearing from the right/left
- S.x = dx
+ S.x = dx * distance_multiplier
var/dz = turf_source.y - T.y // Hearing from infront/behind
- S.z = dz
+ S.z = dz * distance_multiplier
// The y value is for above your head, but there is no ceiling in 2d spessmens.
S.y = 1
S.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
@@ -98,15 +100,14 @@
var/mob/M = m
M.playsound_local(M, null, volume, vary, frequency, falloff, channel, pressure_affected, S)
-/proc/open_sound_channel()
- var/static/next_channel = 1 //loop through the available 1024 - (the ones we reserve) channels and pray that its not still being used
- . = ++next_channel
- if(next_channel > CHANNEL_HIGHEST_AVAILABLE)
- next_channel = 1
-
/mob/proc/stop_sound_channel(chan)
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
+/mob/proc/set_sound_channel_volume(channel, volume)
+ var/sound/S = sound(null, FALSE, FALSE, channel, volume)
+ S.status = SOUND_UPDATE
+ SEND_SOUND(src, S)
+
/client/proc/playtitlemusic()
if(!SSticker || !SSticker.login_music || config.disable_lobby_music)
return
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index 6bc1c4ba142..def0142a481 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -53,6 +53,7 @@
wet_overlay = image('icons/effects/water.dmi', src, "ice_floor")
else
wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
+ wet_overlay.plane = FLOOR_OVERLAY_PLANE
overlays += wet_overlay
if(time == INFINITY)
return
diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm
index d8ed888bc27..26921ba9ffd 100644
--- a/code/game/turfs/simulated/floor/chasm.dm
+++ b/code/game/turfs/simulated/floor/chasm.dm
@@ -97,8 +97,8 @@
return FALSE
//Flies right over the chasm
if(isliving(AM))
- var/mob/M = AM
- if(M.flying)
+ var/mob/living/M = AM
+ if(M.flying || M.floating)
return FALSE
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 8f8e7fdca9a..2f90e4d7cc4 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -25,7 +25,7 @@
var/blocks_air = 0
- var/PathNode/PNode = null //associated PathNode in the A* algorithm
+ var/datum/pathnode/PNode = null //associated PathNode in the A* algorithm
flags = 0
@@ -165,7 +165,6 @@
var/mob/O = M
if(!O.lastarea)
O.lastarea = get_area(O.loc)
-// O.update_gravity(O.mob_has_gravity(src))
var/loopsanity = 100
for(var/atom/A in range(1))
@@ -264,6 +263,13 @@
if(SSair && !ignore_air)
SSair.add_to_active(src)
+ //update firedoor adjacency
+ var/list/turfs_to_check = get_adjacent_open_turfs(src) | src
+ for(var/I in turfs_to_check)
+ var/turf/T = I
+ for(var/obj/machinery/door/firedoor/FD in T)
+ FD.CalculateAffectingAreas()
+
if(!keep_cabling && !can_have_cabling())
for(var/obj/structure/cable/C in contents)
qdel(C)
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index 824159487eb..04ee5901054 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -1,6 +1,6 @@
-GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
+GLOBAL_VAR_INIT(normal_ooc_colour, "#275FC5")
GLOBAL_VAR_INIT(member_ooc_colour, "#035417")
-GLOBAL_VAR_INIT(mentor_ooc_colour, "#0099cc")
+GLOBAL_VAR_INIT(mentor_ooc_colour, "#00B0EB")
GLOBAL_VAR_INIT(moderator_ooc_colour, "#184880")
GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
@@ -53,6 +53,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
return
log_ooc(msg, src)
+ mob.create_log(OOC_LOG, msg)
var/display_colour = GLOB.normal_ooc_colour
if(holder && !holder.fakekey)
@@ -205,7 +206,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
return
log_looc(msg, src)
-
+ mob.create_log(LOOC_LOG, msg)
var/mob/source = mob.get_looc_source()
var/list/heard = get_mobs_in_view(7, source)
diff --git a/code/game/world.dm b/code/game/world.dm
index fdb0b8f63be..c279fa24b54 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -266,6 +266,13 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
update_status()
return "Set listed status to invisible."
+
+ else if("hostannounce" in input)
+ if(!key_valid)
+ return keySpamProtect(addr)
+
+ to_chat(world, "Server Announcement: [input["message"]]")
+
/proc/keySpamProtect(var/addr)
if(GLOB.world_topic_spam_protect_ip == addr && abs(GLOB.world_topic_spam_protect_time - world.time) < 50)
spawn(50)
@@ -333,6 +340,8 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
#endif
for(var/client/C in GLOB.clients)
+ var/secs_before_auto_reconnect = 10 // TODO: make it higher if server is due for an update @AffectedArc07
+ C << output(list2params(list(secs_before_auto_reconnect)), "browseroutput:reboot")
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[config.server]")
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 09df94dc06e..1f55fa11f70 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/DB ban/functions.dm
@@ -299,7 +299,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
datum/admins/proc/DB_ban_unban_by_id(var/id)
- if(!check_rights(R_BAN)) return
+ if(!check_rights(R_BAN))
+ return
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
@@ -343,9 +344,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
/client/proc/DB_ban_panel()
set category = "Admin"
set name = "Banning Panel"
- set desc = "Edit admin permissions"
+ set desc = "DB Ban Panel"
- if(!holder)
+ if(!check_rights(R_BAN))
return
holder.DB_ban_panel()
@@ -356,7 +357,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
if(!usr.client)
return
- if(!check_rights(R_BAN)) return
+ if(!check_rights(R_BAN))
+ return
establish_db_connection()
if(!GLOB.dbcon.IsConnected())
diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm
index 9aab12234d2..293504919d4 100644
--- a/code/modules/admin/NewBan.dm
+++ b/code/modules/admin/NewBan.dm
@@ -103,7 +103,8 @@ GLOBAL_PROTECT(banlist_savefile) // Obvious reasons
GLOB.banlist_savefile.cd = "/base"
if( GLOB.banlist_savefile.dir.Find("[ckey][computerid]") )
- to_chat(usr, "Ban already exists.")
+ if(usr)
+ to_chat(usr, "Ban already exists.")
return 0
else
GLOB.banlist_savefile.dir.Add("[ckey][computerid]")
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 1eed8083a97..07dd4975ddb 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -69,7 +69,10 @@ GLOBAL_VAR_INIT(nologevent, 0)
body += "Options panel for [M]"
if(M.client)
body += " played by [M.client] "
- body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
+ if(check_rights(R_PERMISSIONS, 0))
+ body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
+ else
+ body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
body += "\[" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]\]"
if(isnewplayer(M))
@@ -78,6 +81,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
body += " \[Heal\] "
body += "
\[ "
+ body += "LOGS - "
body += "VV - "
body += "[ADMIN_TP(M,"TP")] - "
if(M.client)
@@ -109,17 +113,18 @@ GLOBAL_VAR_INIT(nologevent, 0)
else
body += "Add to Watchlist "
- if(M.client)
body += "| Prison | "
body += "\ Send back to Lobby | "
+ body += "\ Erase Flavor Text | "
+ body += "\ Use Random Name | "
var/muted = M.client.prefs.muted
body += {" Mute:
- \[IC |
- OOC |
- PRAY |
- ADMINHELP |
- DEADCHAT\]
- (toggle all)
+ \[IC |
+ OOC |
+ PRAY |
+ ADMINHELP |
+ DEADCHAT\]
+ (toggle all)
"}
var/jumptoeye = ""
@@ -280,7 +285,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
/datum/admins/proc/vpn_whitelist()
set category = "Admin"
set name = "VPN Ckey Whitelist"
- if(!check_rights(R_ADMIN))
+ if(!check_rights(R_BAN))
return
var/key = stripped_input(usr, "Enter ckey to add/remove, or leave blank to cancel:", "VPN Whitelist add/remove", max_length=32)
if(key)
@@ -699,7 +704,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
var/msg = ""
if(SSticker.current_state == GAME_STATE_STARTUP)
msg = " (The server is still setting up, but the round will be started as soon as possible.)"
- message_admins("[usr.key] has started the game.[msg]")
+ message_admins("[usr.key] has started the game.[msg]")
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
@@ -760,19 +765,6 @@ GLOBAL_VAR_INIT(nologevent, 0)
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/toggle_aliens()
- set category = "Event"
- set desc="Toggle alien mobs"
- set name="Toggle Aliens"
-
- if(!check_rights(R_EVENT))
- return
-
- GLOB.aliens_allowed = !GLOB.aliens_allowed
- log_admin("[key_name(usr)] toggled aliens to [GLOB.aliens_allowed].")
- message_admins("[key_name_admin(usr)] toggled aliens [GLOB.aliens_allowed ? "on" : "off"].")
- feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/datum/admins/proc/delay()
set category = "Server"
set desc="Delay the game start/end"
diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm
index a627c96148f..527540e9490 100644
--- a/code/modules/admin/admin_investigate.dm
+++ b/code/modules/admin/admin_investigate.dm
@@ -33,7 +33,8 @@
/client/proc/investigate_show( subject in GLOB.investigate_log_subjects )
set name = "Investigate"
set category = "Admin"
- if(!holder) return
+ if(!check_rights(R_ADMIN))
+ return
switch(subject)
if("notes")
show_note()
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index f310a4502fa..b3957a86b44 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -10,11 +10,8 @@ GLOBAL_LIST_INIT(admin_verbs_default, list(
GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/check_antagonists, /*shows all antags*/
/datum/admins/proc/show_player_panel,
- /client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
- /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
- /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
/datum/admins/proc/announce, /*priority announce something to all clients.*/
/client/proc/colorooc, /*allows us to set a custom colour for everything we say in ooc*/
/client/proc/resetcolorooc, /*allows us to set a reset our ooc color*/
@@ -23,7 +20,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/
- /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
/client/proc/cmd_admin_open_logging_view,
@@ -37,6 +33,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/
+ /client/proc/admin_deny_shuttle, /*toggles availability of shuttle calling*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
/client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
@@ -54,36 +51,30 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/datum/admins/proc/PlayerNotes,
/client/proc/cmd_mentor_say,
/datum/admins/proc/show_player_notes,
- /datum/admins/proc/vpn_whitelist,
/client/proc/free_slot, /*frees slot for chosen job*/
/client/proc/toggleattacklogs,
/client/proc/toggleadminlogs,
/client/proc/toggledebuglogs,
/client/proc/update_mob_sprite,
- /client/proc/toggledrones,
/client/proc/man_up,
/client/proc/global_man_up,
/client/proc/delbook,
/client/proc/view_flagged_books,
+ /client/proc/view_asays,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
/client/proc/freeze,
- /client/proc/alt_check,
/client/proc/secrets,
- /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
- /client/proc/change_human_appearance_self, /* Allows the human-based mob itself to change its basic appearance */
/client/proc/debug_variables,
/client/proc/reset_all_tcs, /*resets all telecomms scripts*/
/client/proc/toggle_mentor_chat,
/client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/
- /client/proc/list_ssds_afks,
- /client/proc/cmd_admin_headset_message,
- /client/proc/spawn_floor_cluwne
+ /client/proc/list_ssds_afks
))
GLOBAL_LIST_INIT(admin_verbs_ban, list(
- /client/proc/unban_panel,
- /client/proc/jobbans,
- /client/proc/stickybanpanel
+ /client/proc/ban_panel,
+ /client/proc/stickybanpanel,
+ /datum/admins/proc/vpn_whitelist
))
GLOBAL_LIST_INIT(admin_verbs_sounds, list(
/client/proc/play_local_sound,
@@ -99,7 +90,6 @@ GLOBAL_LIST_INIT(admin_verbs_event, list(
/client/proc/drop_bomb,
/client/proc/cinematic,
/client/proc/one_click_antag,
- /datum/admins/proc/toggle_aliens,
/client/proc/cmd_admin_add_freeform_ai_law,
/client/proc/cmd_admin_add_random_ai_law,
/client/proc/make_sound,
@@ -109,6 +99,7 @@ GLOBAL_LIST_INIT(admin_verbs_event, list(
/client/proc/show_tip,
/client/proc/cmd_admin_change_custom_event,
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
+ /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
/client/proc/response_team, // Response Teams admin verb
@@ -116,7 +107,10 @@ GLOBAL_LIST_INIT(admin_verbs_event, list(
/client/proc/fax_panel,
/client/proc/event_manager_panel,
/client/proc/modify_goals,
- /client/proc/outfit_manager
+ /client/proc/outfit_manager,
+ /client/proc/cmd_admin_headset_message,
+ /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
+ /client/proc/change_human_appearance_self /* Allows the human-based mob itself to change its basic appearance */
))
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
@@ -125,24 +119,27 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list(
/client/proc/admin_deserialize
))
GLOBAL_LIST_INIT(admin_verbs_server, list(
+ /client/proc/reload_admins,
/client/proc/Set_Holiday,
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
/datum/admins/proc/delay,
/datum/admins/proc/toggleaban,
+ /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
+ /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
/client/proc/toggle_log_hrefs,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
- /client/proc/cmd_debug_del_all,
/client/proc/cmd_debug_del_sing,
- /datum/admins/proc/toggle_aliens,
/client/proc/delbook,
/client/proc/view_flagged_books,
+ /client/proc/view_asays,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
/client/proc/set_ooc,
- /client/proc/reset_ooc
+ /client/proc/reset_ooc,
+ /client/proc/toggledrones
))
GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/cmd_admin_list_open_jobs,
@@ -151,9 +148,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_admin_delete,
- /client/proc/cmd_debug_del_all,
/client/proc/cmd_debug_del_sing,
- /client/proc/reload_admins,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/toggledebuglogs,
@@ -196,7 +191,7 @@ GLOBAL_LIST_INIT(admin_verbs_mod, list(
/client/proc/player_panel_new,
/client/proc/dsay,
/datum/admins/proc/show_player_panel,
- /client/proc/jobbans,
+ /client/proc/ban_panel,
/client/proc/debug_variables /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
))
GLOBAL_LIST_INIT(admin_verbs_mentor, list(
@@ -366,19 +361,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
to_chat(mob, "Invisimin on. You are now as invisible as a ghost.")
mob.remove_from_all_data_huds()
-/client/proc/player_panel()
- set name = "Player Panel"
- set category = "Admin"
-
- if(!check_rights(R_ADMIN))
- return
-
- holder.player_panel_old()
- feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
/client/proc/player_panel_new()
- set name = "Player Panel New"
+ set name = "Player Panel"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD))
@@ -400,22 +384,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
-/client/proc/jobbans()
- set name = "Display Job bans"
- set category = "Admin"
-
- if(!check_rights(R_ADMIN|R_MOD))
- return
-
- if(config.ban_legacy_system)
- holder.Jobbans()
- else
- holder.DB_ban_panel()
- feedback_add_details("admin_verb","VJB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
-/client/proc/unban_panel()
- set name = "Unban Panel"
+/client/proc/ban_panel()
+ set name = "Ban Panel"
set category = "Admin"
if(!check_rights(R_BAN))
@@ -808,7 +778,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
set desc = "Allows you to change the mob appearance"
set category = null
- if(!check_rights(R_ADMIN))
+ if(!check_rights(R_EVENT))
return
if(!istype(H))
@@ -834,7 +804,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
set desc = "Allows the mob to change its appearance"
set category = null
- if(!check_rights(R_ADMIN))
+ if(!check_rights(R_EVENT))
return
if(!istype(H))
@@ -979,8 +949,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
else
to_chat(usr, "You now won't get debug log messages")
-/client/proc/man_up(mob/T as mob in GLOB.mob_list)
- set category = "Admin"
+/client/proc/man_up(mob/T as mob in GLOB.player_list)
+ set category = null
set name = "Man Up"
set desc = "Tells mob to man up and deal with it."
diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm
index 2122f88f4ed..699eca075bb 100644
--- a/code/modules/admin/banjob.dm
+++ b/code/modules/admin/banjob.dm
@@ -42,20 +42,6 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
else
return 0
-/*
-DEBUG
-/mob/verb/list_all_jobbans()
- set name = "list all jobbans"
-
- for(var/s in jobban_keylist)
- to_chat(world, s)
-
-/mob/verb/reload_jobbans()
- set name = "reload jobbans"
-
- jobban_loadbanfile()
-*/
-
/proc/jobban_loadbanfile()
if(config.ban_legacy_system)
var/savefile/S=new("data/job_full.ban")
diff --git a/code/modules/admin/machine_upgrade.dm b/code/modules/admin/machine_upgrade.dm
index 1e569b51d2d..4f38f70613d 100644
--- a/code/modules/admin/machine_upgrade.dm
+++ b/code/modules/admin/machine_upgrade.dm
@@ -1,20 +1,20 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
- set category = "Debug"
+ set category = null
- if(!check_rights(R_DEBUG))
+ if(!check_rights(R_DEBUG))
return
-
+
if(!istype(M))
to_chat(usr, "This can only be used on subtypes of /obj/machinery.")
return
-
+
var/new_rating = input("Enter new rating:","Num") as num
if(!isnull(new_rating) && M.component_parts)
for(var/obj/item/stock_parts/P in M.component_parts)
P.rating = new_rating
M.RefreshParts()
-
+
message_admins("[key_name_admin(usr)] has set the component rating of [M] to [new_rating]")
log_admin("[key_name(usr)] has set the component rating of [M] to [new_rating]")
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 1c6bab4d3cd..c2248261baa 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -332,65 +332,6 @@
usr << browse(dat, "window=players;size=600x480")
-//The old one
-/datum/admins/proc/player_panel_old()
- if(!usr.client.holder)
- return
- var/dat = "Player Menu"
- dat += "
Name
Real Name
Assigned Job
Key
Options
PM
Traitor?
"
- //add
IP:
to this if wanting to add back in IP checking
- //add
(IP: [M.lastKnownIP])
if you want to know their ip to the lists below
- var/list/mobs = sortmobs()
-
- for(var/mob/M in mobs)
- if(!M.ckey) continue
-
- dat += "
[M.name]
"
- if(isAI(M))
- dat += "
AI
"
- else if(isrobot(M))
- dat += "
Cyborg
"
- else if(issmall(M))
- dat += "
Monkey
"
- else if(ishuman(M))
- dat += "
[M.real_name]
"
- else if(istype(M, /mob/living/silicon/pai))
- dat += "
pAI
"
- else if(isnewplayer(M))
- dat += "
New Player
"
- else if(isobserver(M))
- dat += "
Ghost
"
- else if(isalien(M))
- dat += "
Alien
"
- else
- dat += "
Unknown
"
-
-
- if(istype(M,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(H.mind && H.mind.assigned_role)
- dat += "
"
-
- usr << browse(dat, "window=players;size=640x480")
-
-
/datum/admins/proc/check_antagonists_line(mob/M, caption = "", close = 1)
var/logout_status
diff --git a/code/modules/admin/sql_notes.dm b/code/modules/admin/sql_notes.dm
index a438a43eaec..04e28737479 100644
--- a/code/modules/admin/sql_notes.dm
+++ b/code/modules/admin/sql_notes.dm
@@ -2,7 +2,8 @@
if(checkrights && !check_rights(R_ADMIN|R_MOD))
return
if(!GLOB.dbcon.IsConnected())
- to_chat(usr, "Failed to establish database connection.")
+ if(usr)
+ to_chat(usr, "Failed to establish database connection.")
return
if(!target_ckey)
@@ -19,7 +20,8 @@
log_game("SQL ERROR obtaining ckey from player table. Error : \[[err]\]\n")
return
if(!query_find_ckey.NextRow())
- to_chat(usr, "[target_ckey] has not been seen before, you can only add notes to known players.")
+ if(usr)
+ to_chat(usr, "[target_ckey] has not been seen before, you can only add notes to known players.")
return
var/exp_data = query_find_ckey.item[2]
@@ -52,8 +54,8 @@
log_game("SQL ERROR adding new note to table. Error : \[[err]\]\n")
return
if(logged)
- log_admin("[key_name(usr)] has added a note to [target_ckey]: [notetext]")
- message_admins("[key_name_admin(usr)] has added a note to [target_ckey]: [notetext]")
+ log_admin("[usr ? key_name(usr) : adminckey] has added a note to [target_ckey]: [notetext]")
+ message_admins("[usr ? key_name_admin(usr) : adminckey] has added a note to [target_ckey]: [notetext]")
show_note(target_ckey)
/proc/remove_note(note_id)
@@ -63,7 +65,8 @@
var/notetext
var/adminckey
if(!GLOB.dbcon.IsConnected())
- to_chat(usr, "Failed to establish database connection.")
+ if(usr)
+ to_chat(usr, "Failed to establish database connection.")
return
if(!note_id)
return
@@ -82,15 +85,16 @@
var/err = query_del_note.ErrorMsg()
log_game("SQL ERROR removing note from table. Error : \[[err]\]\n")
return
- log_admin("[key_name(usr)] has removed a note made by [adminckey] from [ckey]: [notetext]")
- message_admins("[key_name_admin(usr)] has removed a note made by [adminckey] from [ckey]: [notetext]")
+ log_admin("[usr ? key_name(usr) : "Bot"] has removed a note made by [adminckey] from [ckey]: [notetext]")
+ message_admins("[usr ? key_name_admin(usr) : "Bot"] has removed a note made by [adminckey] from [ckey]: [notetext]")
show_note(ckey)
/proc/edit_note(note_id)
if(!check_rights(R_ADMIN|R_MOD))
return
if(!GLOB.dbcon.IsConnected())
- to_chat(usr, "Failed to establish database connection.")
+ if(usr)
+ to_chat(usr, "Failed to establish database connection.")
return
if(!note_id)
return
@@ -117,8 +121,8 @@
var/err = query_update_note.ErrorMsg()
log_game("SQL ERROR editing note. Error : \[[err]\]\n")
return
- log_admin("[key_name(usr)] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"")
- message_admins("[key_name_admin(usr)] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"")
+ log_admin("[usr ? key_name(usr) : "Bot"] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"")
+ message_admins("[usr ? key_name_admin(usr) : "Bot"] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"")
show_note(target_ckey)
/proc/show_note(target_ckey, index, linkless = 0)
diff --git a/code/modules/admin/tickets/adminticketsverbs.dm b/code/modules/admin/tickets/adminticketsverbs.dm
index 406019745f8..4e8e79f2a26 100644
--- a/code/modules/admin/tickets/adminticketsverbs.dm
+++ b/code/modules/admin/tickets/adminticketsverbs.dm
@@ -5,7 +5,7 @@
set name = "Open Admin Ticket Interface"
set category = "Admin"
- if(!holder || !check_rights(R_ADMIN))
+ if(!check_rights(R_ADMIN))
return
SStickets.showUI(usr)
@@ -14,7 +14,7 @@
set name = "Resolve All Open Admin Tickets"
set category = null
- if(!holder || !check_rights(R_ADMIN))
+ if(!check_rights(R_ADMIN))
return
if(alert("Are you sure you want to resolve ALL open admin tickets?","Resolve all open admin tickets?","Yes","No") != "Yes")
diff --git a/code/modules/admin/tickets/mentorticketsverbs.dm b/code/modules/admin/tickets/mentorticketsverbs.dm
index d65f4a30220..c7bec3e043d 100644
--- a/code/modules/admin/tickets/mentorticketsverbs.dm
+++ b/code/modules/admin/tickets/mentorticketsverbs.dm
@@ -5,7 +5,7 @@
set name = "Open Mentor Ticket Interface"
set category = "Admin"
- if(!holder || !check_rights(R_MENTOR|R_ADMIN))
+ if(!check_rights(R_MENTOR|R_ADMIN))
return
SSmentor_tickets.showUI(usr)
@@ -14,7 +14,7 @@
set name = "Resolve All Open Mentor Tickets"
set category = null
- if(!holder || !check_rights(R_ADMIN))
+ if(!check_rights(R_ADMIN))
return
if(alert("Are you sure you want to resolve ALL open mentor tickets?","Resolve all open mentor tickets?","Yes","No") != "Yes")
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 19bbc40ba25..2390394b280 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -14,7 +14,7 @@
if(!check_rights(R_ADMIN|R_MOD))
return
var/client/C = locateUID(href_list["rejectadminhelp"])
- if(!C)
+ if(!isclient(C))
return
C << 'sound/effects/adminhelp.ogg'
@@ -114,39 +114,39 @@
switch(bantype)
if(BANTYPE_PERMA)
if(!banckey || !banreason)
- to_chat(usr, "Not enough parameters (Requires ckey and reason)")
+ to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_TEMP)
if(!banckey || !banreason || !banduration)
- to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
+ to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
return
banjob = null
if(BANTYPE_JOB_PERMA)
if(!banckey || !banreason || !banjob)
- to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
+ to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
return
banduration = null
if(BANTYPE_JOB_TEMP)
if(!banckey || !banreason || !banjob || !banduration)
- to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
+ to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
return
if(BANTYPE_APPEARANCE)
if(!banckey || !banreason)
- to_chat(usr, "Not enough parameters (Requires ckey and reason)")
+ to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_PERMA)
if(!banckey || !banreason)
- to_chat(usr, "Not enough parameters (Requires ckey and reason)")
+ to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_TEMP)
if(!banckey || !banreason || !banduration)
- to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
+ to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
return
banjob = null
@@ -324,8 +324,8 @@
if(!check_rights(R_SPAWN)) return
var/mob/M = locateUID(href_list["mob"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
var/delmob = 0
@@ -436,18 +436,18 @@
if(!check_rights(R_BAN))
return
var/mob/M = locateUID(href_list["appearanceban"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.ckey) //sanity
- to_chat(usr, "This mob has no ckey")
+ to_chat(usr, "This mob has no ckey")
return
var/ban_ckey_param = href_list["dbbanaddckey"]
var/banreason = appearance_isbanned(M)
if(banreason)
/* if(!config.ban_legacy_system)
- to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
+ to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
DB_ban_panel(M.ckey)
return */
switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No"))
@@ -458,7 +458,7 @@
DB_ban_unban(M.ckey, BANTYPE_APPEARANCE)
appearance_unban(M)
message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1)
- to_chat(M, "[usr.client.ckey] has removed your appearance ban.")
+ to_chat(M, "[usr.client.ckey] has removed your appearance ban.")
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
if("Yes")
@@ -473,7 +473,7 @@
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
add_note(M.ckey, "Appearance banned - [reason]", null, usr.ckey, 0)
message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1)
- to_chat(M, "You have been appearance banned by [usr.client.ckey].")
+ to_chat(M, "You have been appearance banned by [usr.client.ckey].")
to_chat(M, "The reason is: [reason]")
to_chat(M, "Appearance ban can be lifted only upon request.")
if(config.banappeals)
@@ -487,15 +487,15 @@
// if(!check_rights(R_BAN)) return
var/mob/M = locateUID(href_list["jobban2"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.ckey) //sanity
- to_chat(usr, "This mob has no ckey")
+ to_chat(usr, "This mob has no ckey")
return
if(!SSjobs)
- to_chat(usr, "SSjobs has not been setup!")
+ to_chat(usr, "SSjobs has not been setup!")
return
var/dat = ""
@@ -735,8 +735,8 @@
if(!check_rights(R_BAN)) return
var/mob/M = locateUID(href_list["jobban4"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(M != usr) //we can jobban ourselves
@@ -747,7 +747,7 @@
var/ban_ckey_param = href_list["dbbanaddckey"]
if(!SSjobs)
- to_chat(usr, "SSjobs has not been setup!")
+ to_chat(usr, "SSjobs has not been setup!")
return
//get jobs for department if specified, otherwise just returnt he one job in a list.
@@ -840,7 +840,7 @@
msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
- to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].")
+ to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].")
to_chat(M, "The reason is: [reason]")
to_chat(M, "This jobban will be lifted in [mins] minutes.")
href_list["jobban2"] = 1 // lets it fall through and refresh
@@ -861,7 +861,7 @@
else msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
- to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].")
+ to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].")
to_chat(M, "The reason is: [reason]")
to_chat(M, "Jobban can be lifted only upon request.")
href_list["jobban2"] = 1 // lets it fall through and refresh
@@ -873,7 +873,7 @@
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
if(!config.ban_legacy_system)
- to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
+ to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
DB_ban_panel(M.ckey)
return
var/msg
@@ -894,22 +894,33 @@
continue
if(msg)
message_admins("[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1)
- to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].")
+ to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return 0 //we didn't do anything!
else if(href_list["boot2"])
var/mob/M = locateUID(href_list["boot2"])
- if(ismob(M))
- if(M.client && M.client.holder && (M.client.holder.rights & R_BAN))
- to_chat(usr, "[key_name_admin(M)] cannot be kicked from the server.")
+ if(!ismob(M))
+ return
+ var/client/C = M.client
+ if(C == null)
+ to_chat(usr, "Mob has no client to kick.")
+ return
+ if(alert("Kick [C.ckey]?",,"Yes","No") == "Yes")
+ if(C && C.holder && (C.holder.rights & R_BAN))
+ to_chat(usr, "[key_name_admin(C)] cannot be kicked from the server.")
return
- to_chat(M, "You have been kicked from the server")
- log_admin("[key_name(usr)] booted [key_name(M)].")
- message_admins("[key_name_admin(usr)] booted [key_name_admin(M)].", 1)
- //M.client = null
- qdel(M.client)
+ to_chat(C, "You have been kicked from the server")
+ log_admin("[key_name(usr)] booted [key_name(C)].")
+ message_admins("[key_name_admin(usr)] booted [key_name_admin(C)].", 1)
+ //C = null
+ qdel(C)
+
+ else if(href_list["open_logging_view"])
+ var/mob/M = locateUID(href_list["open_logging_view"])
+ if(ismob(M))
+ usr.client.open_logging_view(list(M), TRUE)
//Player Notes
else if(href_list["addnote"])
@@ -981,7 +992,7 @@
if(!check_rights(R_BAN)) return
var/mob/M = locateUID(href_list["newban"])
- if(!ismob(M))
+ if(!istype(M, /mob))
return
var/ban_ckey_param = href_list["dbbanaddckey"]
@@ -997,7 +1008,7 @@
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
- to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].")
+ to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].")
to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.")
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
@@ -1017,7 +1028,7 @@
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
- to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].")
+ to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].")
to_chat(M, "This ban does not expire automatically and must be appealed.")
if(M.client)
M.client.link_forum_account(TRUE)
@@ -1085,7 +1096,7 @@
return
var/mob/M = locateUID(href_list["mute"])
- if(!ismob(M)) return
+ if(!istype(M, /mob)) return
if(!M.client) return
var/mute_type = href_list["mute_type"]
@@ -1099,7 +1110,7 @@
if(SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
- var/dat = {"What mode do you wish to play?"}
+ var/dat = {"What mode do you wish to play?"}
for(var/mode in config.modes)
dat += {"[config.mode_names[mode]] "}
dat += {"Secret "}
@@ -1114,7 +1125,7 @@
return alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
- var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret."}
+ var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret."}
for(var/mode in config.modes)
dat += {"[config.mode_names[mode]] "}
dat += {"Random (default) "}
@@ -1152,7 +1163,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["monkeyone"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make monkey?",, "Yes", "No") != "Yes")
return
@@ -1167,7 +1178,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["corgione"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make corgi?",, "Yes", "No") != "Yes")
@@ -1182,7 +1193,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makePAI"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make pai?",, "Yes", "No") != "Yes")
return
@@ -1205,8 +1216,9 @@
if(!check_rights(R_SERVER|R_EVENT)) return
var/mob/M = locateUID(href_list["forcespeech"])
- if(!ismob(M))
- to_chat(usr, "this can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
@@ -1222,11 +1234,11 @@
return
var/mob/M = locateUID(href_list["sendtoprison"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
var/turf/prison_cell = pick(GLOB.prisonwarp)
@@ -1285,6 +1297,71 @@
NP.ckey = M.ckey
qdel(M)
+ else if(href_list["eraseflavortext"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ var/mob/M = locateUID(href_list["eraseflavortext"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
+ if(!M.client)
+ to_chat(usr, "[M] doesn't seem to have an active client.")
+ return
+
+ if(M.flavor_text == "" && M.client.prefs.flavor_text == "")
+ to_chat(usr, "[M] has no flavor text set.")
+ return
+
+ if(alert(usr, "Erase [key_name(M)]'s flavor text?", "Message", "Yes", "No") != "Yes")
+ return
+
+ log_admin("[key_name(usr)] has erased [key_name(M)]'s flavor text.")
+ message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.")
+
+ // Clears the mob's flavor text
+ M.flavor_text = ""
+
+ // Clear and save the DB character's flavor text
+ M.client.prefs.flavor_text = ""
+ M.client.prefs.save_character(M.client)
+
+ else if(href_list["userandomname"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ var/mob/M = locateUID(href_list["userandomname"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
+ if(!M.client)
+ to_chat(usr, "[M] doesn't seem to have an active client.")
+ return
+
+ if(alert(usr, "Force [key_name(M)] to use a random name?", "Message", "Yes", "No") != "Yes")
+ return
+
+ log_admin("[key_name(usr)] has forced [key_name(M)] to use a random name.")
+ message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.")
+
+ // Update the mob's name with a random one straight away
+ var/random_name = random_name(M.client.prefs.gender, M.client.prefs.species)
+ M.rename_character(M.real_name, random_name)
+
+ // Save that random name for next rounds
+ M.client.prefs.real_name = random_name
+ M.client.prefs.save_character(M.client)
+
+ else if(href_list["asays"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ usr.client.view_asays()
+
else if(href_list["tdome1"])
if(!check_rights(R_SERVER|R_EVENT)) return
@@ -1292,11 +1369,11 @@
return
var/mob/M = locateUID(href_list["tdome1"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1322,11 +1399,11 @@
return
var/mob/M = locateUID(href_list["tdome2"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1352,11 +1429,11 @@
return
var/mob/M = locateUID(href_list["tdomeadmin"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
M.Paralyse(5)
@@ -1374,11 +1451,11 @@
return
var/mob/M = locateUID(href_list["tdomeobserve"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1408,11 +1485,11 @@
return
var/mob/M = locateUID(href_list["aroomwarp"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
- to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
+ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
M.Paralyse(5)
@@ -1429,7 +1506,7 @@
var/mob/living/L = locateUID(href_list["revive"])
if(!istype(L))
- to_chat(usr, "This can only be used on instances of type /mob/living")
+ to_chat(usr, "This can only be used on instances of type /mob/living")
return
L.revive()
@@ -1441,7 +1518,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makeai"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make ai?",, "Yes", "No") != "Yes")
@@ -1457,7 +1534,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makealien"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make alien?",, "Yes", "No") != "Yes")
return
@@ -1469,7 +1546,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makeslime"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make slime?",, "Yes", "No") != "Yes")
return
@@ -1481,7 +1558,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makesuper"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make superhero?",, "Yes", "No") != "Yes")
@@ -1494,7 +1571,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["makerobot"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(alert(usr, "Confirm make robot?",, "Yes", "No") != "Yes")
return
@@ -1506,7 +1583,7 @@
var/mob/M = locateUID(href_list["makeanimal"])
if(isnewplayer(M))
- to_chat(usr, "This cannot be used on instances of type /mob/new_player")
+ to_chat(usr, "This cannot be used on instances of type /mob/new_player")
return
if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes")
return
@@ -1519,10 +1596,14 @@
var/mob/dead/observer/G = locateUID(href_list["incarn_ghost"])
if(!istype(G))
- to_chat(usr, "This will only work on /mob/dead/observer")
+ to_chat(usr, "This will only work on /mob/dead/observer")
+ return
var/posttransformoutfit = usr.client.robust_dress_shop()
+ if(!posttransformoutfit)
+ return
+
var/mob/living/carbon/human/H = G.incarnate_ghost()
if(posttransformoutfit && istype(H))
@@ -1536,7 +1617,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["togmutate"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
var/block=text2num(href_list["block"])
//testing("togmutate([href_list["block"]] -> [block])")
@@ -1546,6 +1627,11 @@
else if(href_list["adminplayeropts"])
var/mob/M = locateUID(href_list["adminplayeropts"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
show_player_panel(M)
else if(href_list["adminplayerobservefollow"])
@@ -1555,6 +1641,11 @@
return
C.admin_ghost()
var/mob/M = locateUID(href_list["adminplayerobservefollow"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
var/mob/dead/observer/A = C.mob
sleep(2)
A.ManualFollow(M)
@@ -1583,6 +1674,12 @@
return
SStickets.autoRespond(index)
+ if(href_list["convert_ticket"])
+ var/indexNum = text2num(href_list["convert_ticket"])
+ if(href_list["is_mhelp"])
+ SSmentor_tickets.convert_to_other_ticket(indexNum)
+ else
+ SStickets.convert_to_other_ticket(indexNum)
else if(href_list["cult_nextobj"])
if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes")
return
@@ -1603,10 +1700,10 @@
for(var/datum/mind/H in SSticker.mode.cult)
if (H.current)
- to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]")
+ to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]")
for(var/mob/dead/observer/O in GLOB.player_list)
- to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]")
+ to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]")
message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [SSticker.cultdat.entity_name].")
log_admin("[key_name(usr)] Voice of [SSticker.cultdat.entity_name]: [input]")
@@ -1628,6 +1725,11 @@
else if(href_list["adminmoreinfo"])
var/mob/M = locateUID(href_list["adminmoreinfo"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
admin_mob_info(M)
else if(href_list["adminspawncookie"])
@@ -1635,7 +1737,7 @@
var/mob/living/carbon/human/H = locateUID(href_list["adminspawncookie"])
if(!ishuman(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_l_hand )
@@ -1659,7 +1761,7 @@
var/mob/living/M = locateUID(href_list["BlueSpaceArtillery"])
if(!isliving(M))
- to_chat(usr, "This can only be used on instances of type /mob/living")
+ to_chat(usr, "This can only be used on instances of type /mob/living")
return
if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
@@ -1697,6 +1799,11 @@
return
var/mob/M = locateUID(href_list["CentcommReply"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
usr.client.admin_headset_message(M, "Centcomm")
else if(href_list["SyndicateReply"])
@@ -1704,6 +1811,11 @@
return
var/mob/M = locateUID(href_list["SyndicateReply"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
usr.client.admin_headset_message(M, "Syndicate")
else if(href_list["HeadsetMessage"])
@@ -1711,6 +1823,11 @@
return
var/mob/M = locateUID(href_list["HeadsetMessage"])
+
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
+
usr.client.admin_headset_message(M)
else if(href_list["EvilFax"])
@@ -1718,7 +1835,7 @@
return
var/mob/living/carbon/human/H = locateUID(href_list["EvilFax"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
var/etypes = list("Borgification", "Corgification", "Death By Fire", "Total Brain Death", "Honk Tumor", "Cluwne", "Demote", "Demote with Bot", "Revoke Fax Access", "Angry Fax Machine")
var/eviltype = input(src.owner, "Which type of evil fax do you wish to send [H]?","Its good to be baaaad...", "") as null|anything in etypes
@@ -1752,12 +1869,12 @@
P.ico = new
P.ico += "paper_stamp-[stampvalue]"
P.overlays += stampoverlay
- P.stamps += ""
+ P.stamps += ""
P.update_icon()
P.faxmachineid = fax.UID()
P.loc = fax.loc // Do not use fax.receivefax(P) here, as it won't preserve the type. Physically teleporting the fax paper is required.
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset)))
- to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
+ to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
to_chat(src.owner, "You sent a [eviltype] fax to [H]")
log_admin("[key_name(src.owner)] sent [key_name(H)] a [eviltype] fax")
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a [eviltype] fax")
@@ -1766,7 +1883,7 @@
return
var/mob/living/M = locateUID(href_list["Bless"])
if(!istype(M))
- to_chat(usr, "This can only be used on instances of type /mob/living")
+ to_chat(usr, "This can only be used on instances of type /mob/living")
return
var/btypes = list("To Arrivals", "Moderate Heal")
var/mob/living/carbon/human/H
@@ -1833,7 +1950,7 @@
var/petchoice = input("Select pet type", "Pets") as null|anything in pets
if(isnull(petchoice))
return
- var/list/mob/dead/observer/candidates = pollCandidates("Play as the special event pet [H]?", poll_time = 200, min_hours = 10)
+ var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Play as the special event pet [H]?", poll_time = 20 SECONDS, min_hours = 10, source = petchoice)
var/mob/dead/observer/theghost = null
if(candidates.len)
var/mob/living/simple_animal/pet/P = new petchoice(H.loc)
@@ -1886,7 +2003,7 @@
var/mob/living/M = locateUID(href_list["Smite"])
var/mob/living/carbon/human/H
if(!istype(M))
- to_chat(usr, "This can only be used on instances of type /mob/living")
+ to_chat(usr, "This can only be used on instances of type /mob/living")
return
var/ptypes = list("Lightning bolt", "Fire Death", "Gib")
if(ishuman(M))
@@ -1997,7 +2114,7 @@
var/datum/antagonist/traitor/T = new()
T.give_objectives = FALSE
to_chat(newtraitormind.current, "ATTENTION: It is time to pay your debt to the Syndicate...")
- to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]")
+ to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]")
newtraitormind.add_antag_datum(T)
else
to_chat(usr, "ERROR: Unable to find any valid candidate to send after [H].")
@@ -2026,10 +2143,10 @@
return
var/mob/living/carbon/human/H = locateUID(href_list["cryossd"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!href_list["cryoafk"] && !isLivingSSD(H))
- to_chat(usr, "This can only be used on living, SSD players.")
+ to_chat(usr, "This can only be used on living, SSD players.")
return
if(istype(H.loc, /obj/machinery/cryopod))
var/obj/machinery/cryopod/P = H.loc
@@ -2049,28 +2166,28 @@
return
var/mob/living/carbon/human/H = locateUID(href_list["FaxReplyTemplate"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
var/obj/item/paper/P = new /obj/item/paper(null)
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
P.name = "Central Command - paper"
var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions")
var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes
- var/tmsg = "
Nanotrasen Science Station [GLOB.using_map.station_short]
NAS Trurl Communications Department Report
"
+ var/tmsg = "
Nanotrasen Science Station [GLOB.using_map.station_short]
NAS Trurl Communications Department Report
"
if(stype == "Handle it yourselves!")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.
This is an automatic message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.
This is an automatic message."
else if(stype == "Illegible fax")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.
Please consult your nearest dictionary and/or thesaurus and try again.
This is an automatic message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.
Please consult your nearest dictionary and/or thesaurus and try again.
This is an automatic message."
else if(stype == "Fax not signed")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Your fax has not been correctly signed and, as such, we cannot verify your identity.
Please sign your faxes before sending them so that we may verify your identity.
This is an automatic message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Your fax has not been correctly signed and, as such, we cannot verify your identity.
Please sign your faxes before sending them so that we may verify your identity.
This is an automatic message."
else if(stype == "Not Right Now")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.
This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.
Please try again later.
This is an automatic message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.
This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.
Please try again later.
This is an automatic message."
else if(stype == "You are wasting our time")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.
Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.
This is an automatic message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.
Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.
This is an automatic message."
else if(stype == "Keep up the good work")
tmsg += "Greetings, esteemed crewmember. Your fax has been received successfully by NAS Trurl Fax Registration.
We at the NAS Trurl appreciate the good work that you have done here, and sincerely recommend that you continue such a display of dedication to the company.
This is absolutely not an automated message."
else if(stype == "ERT Instructions")
- tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Please utilize the Card Swipers if you wish to call for an ERT.
This is an automated message."
+ tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.
Please utilize the Card Swipers if you wish to call for an ERT.
This is an automated message."
else
return
tmsg += ""
@@ -2091,11 +2208,11 @@
P.ico = new
P.ico += "paper_stamp-[stampvalue]"
P.overlays += stampoverlay
- P.stamps += ""
+ P.stamps += ""
P.update_icon()
fax.receivefax(P)
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset)))
- to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
+ to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
to_chat(src.owner, "You sent a standard '[stype]' fax to [H]")
log_admin("[key_name(src.owner)] sent [key_name(H)] a standard '[stype]' fax")
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax")
@@ -2103,10 +2220,10 @@
else if(href_list["HONKReply"])
var/mob/living/carbon/human/H = locateUID(href_list["HONKReply"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset))
- to_chat(usr, "The person you are trying to contact is not wearing a headset")
+ to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from HONKplanet", "")
@@ -2123,13 +2240,13 @@
if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny")
var/mob/living/carbon/human/H = locateUID(href_list["ErtReply"])
if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
+ to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(H.stat != 0)
- to_chat(usr, "The person you are trying to contact is not conscious.")
+ to_chat(usr, "The person you are trying to contact is not conscious.")
return
if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset))
- to_chat(usr, "The person you are trying to contact is not wearing a headset")
+ to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "")
@@ -2137,7 +2254,7 @@
GLOB.ert_request_answered = TRUE
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].")
- to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].")
+ to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].")
else
src.owner.response_team()
@@ -2292,14 +2409,14 @@
P.stamped = new
P.stamped += /obj/item/stamp/centcom
P.overlays += stampoverlay
- P.stamps += ""
+ P.stamps += ""
else if(stamptype == "text")
if(!P.stamped)
P.stamped = new
P.stamped += /obj/item/stamp
P.overlays += stampoverlay
- P.stamps += "[stampvalue]"
+ P.stamps += "[stampvalue]"
if(destination != "All Departments")
if(!fax.receivefax(P))
@@ -2329,7 +2446,7 @@
if(notify == "Yes")
var/mob/living/carbon/human/H = sender
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset)))
- to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.")
+ to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.")
if(sender)
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1)
@@ -2348,8 +2465,8 @@
if(!check_rights(R_ADMIN))
return
var/mob/M = locateUID(href_list["getplaytimewindow"])
- if(!M)
- to_chat(usr, "ERROR: Mob not found.")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
cmd_mentor_show_exp_panel(M.client)
@@ -2357,6 +2474,9 @@
if(!check_rights(R_ADMIN)) return
var/mob/M = locateUID(href_list["jumpto"])
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
usr.client.jumptomob(M)
else if(href_list["getmob"])
@@ -2364,24 +2484,37 @@
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
var/mob/M = locateUID(href_list["getmob"])
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
usr.client.Getmob(M)
else if(href_list["sendmob"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locateUID(href_list["sendmob"])
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
usr.client.sendmob(M)
else if(href_list["narrateto"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locateUID(href_list["narrateto"])
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
usr.client.cmd_admin_direct_narrate(M)
else if(href_list["subtlemessage"])
- if(!check_rights(R_ADMIN)) return
+ if(!check_rights(R_EVENT))
+ return
var/mob/M = locateUID(href_list["subtlemessage"])
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
+ return
usr.client.cmd_admin_subtle_message(M)
else if(href_list["traitor"])
@@ -2392,8 +2525,8 @@
return
var/mob/M = locateUID(href_list["traitor"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob.")
+ if(!istype(M, /mob))
+ to_chat(usr, "This can only be used on instances of type /mob")
return
show_traitor_panel(M)
@@ -2462,7 +2595,7 @@
switch(where)
if("inhand")
if(!iscarbon(usr) && !isrobot(usr))
- to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.")
+ to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.")
where = "onfloor"
target = usr
@@ -2474,10 +2607,10 @@
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
if("inmarked")
if(!marked_datum)
- to_chat(usr, "You don't have any object marked. Abandoning spawn.")
+ to_chat(usr, "You don't have any object marked. Abandoning spawn.")
return
else if(!istype(marked_datum,/atom))
- to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
+ to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
return
else
target = marked_datum
@@ -2542,7 +2675,7 @@
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
- to_chat(usr, "You may only use this when the game is running.")
+ to_chat(usr, "You may only use this when the game is running.")
else if(href_list["memoeditlist"])
if(!check_rights(R_SERVER)) return
@@ -2622,7 +2755,7 @@
feedback_add_details("admin_secrets_fun_used","TriAI")
if("gravity")
if(!(SSticker && SSticker.mode))
- to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.")
+ to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.")
return
GLOB.gravity_is_on = !GLOB.gravity_is_on
for(var/area/A in world)
@@ -2959,7 +3092,7 @@
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if(ok)
- to_chat(world, text("A secret has been activated by []!", usr.key))
+ to_chat(world, text("A secret has been activated by []!", usr.key))
else if(href_list["secretsadmin"])
if(!check_rights(R_ADMIN)) return
@@ -2967,17 +3100,17 @@
var/ok = 0
switch(href_list["secretsadmin"])
if("list_signalers")
- var/dat = "Showing last [length(GLOB.lastsignalers)] signalers."
+ var/dat = "Showing last [length(GLOB.lastsignalers)] signalers."
for(var/sig in GLOB.lastsignalers)
dat += "[sig] "
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
- var/dat = "Showing last [length(GLOB.lawchanges)] law changes."
+ var/dat = "Showing last [length(GLOB.lawchanges)] law changes."
for(var/sig in GLOB.lawchanges)
dat += "[sig] "
usr << browse(dat, "window=lawchanges;size=800x500")
if("list_job_debug")
- var/dat = "Job Debug info."
+ var/dat = "Job Debug info."
if(SSjobs)
for(var/line in SSjobs.job_debug)
dat += "[line] "
@@ -2995,7 +3128,7 @@
alert("The game mode is [SSticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if("manifest")
- var/dat = "Showing Crew Manifest."
+ var/dat = "Showing Crew Manifest."
dat += "
Name
Position
"
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/H = thing
@@ -3006,7 +3139,7 @@
if("check_antagonist")
check_antagonists()
if("DNA")
- var/dat = "Showing DNA from blood."
+ var/dat = "Showing DNA from blood."
dat += "
Name
DNA
Blood Type
"
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/H = thing
@@ -3015,7 +3148,7 @@
dat += "
"
- var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
- popup.set_content(dat)
- popup.open()
+ data["has_id"] = FALSE
-/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
+ return data
+
+/obj/machinery/mineral/equipment_vendor/tgui_static_data(mob/user)
+ var/list/static_data[0]
+
+ // Available items - in static data because we don't wanna compute this list every time! It hardly changes.
+ static_data["items"] = list()
+ for(var/cat in prize_list)
+ var/list/cat_items = list()
+ for(var/prize_name in prize_list[cat])
+ var/datum/data/mining_equipment/prize = prize_list[cat][prize_name]
+ cat_items[prize_name] = list("name" = prize_name, "price" = prize.cost)
+ static_data["items"][cat] = cat_items
+
+ return static_data
+
+/obj/machinery/mineral/equipment_vendor/vv_edit_var(var_name, var_value)
+ // Gotta update the static data in case an admin VV's the items for some reason..!
+ if(var_name == "prize_list")
+ dirty_items = TRUE
+ return ..()
+
+/obj/machinery/mineral/equipment_vendor/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
+ // Update static data if need be
+ if(dirty_items)
+ if(!ui)
+ ui = SStgui.get_open_ui(user, src, ui_key)
+ if(ui) // OK so ui?. somehow breaks the implied src so this is needed
+ ui.initial_static_data = tgui_static_data(user)
+ dirty_items = FALSE
+
+ // Open the window
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ if(!ui)
+ ui = new(user, src, ui_key, "MiningVendor", name, 400, 450)
+ ui.open()
+ ui.set_autoupdate(FALSE)
+
+/obj/machinery/mineral/equipment_vendor/tgui_act(action, params)
if(..())
- return 1
+ return
- if(href_list["choice"])
- if(istype(inserted_id))
- if(href_list["choice"] == "eject")
- inserted_id.loc = loc
- inserted_id.verb_pickup()
- inserted_id = null
- else if(href_list["choice"] == "insert")
- var/obj/item/card/id/I = usr.get_active_hand()
- if(istype(I))
- if(!usr.drop_item())
- return
- I.loc = src
- inserted_id = I
- else
- to_chat(usr, "No valid ID.")
-
- if(href_list["purchase"])
- if(istype(inserted_id))
- var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
- if(!prize || !(prize in prize_list) || prize.cost > inserted_id.mining_points)
+ . = TRUE
+ switch(action)
+ if("logoff")
+ if(!inserted_id)
+ return
+ usr.put_in_hands(inserted_id)
+ inserted_id = null
+ if("purchase")
+ if(!inserted_id)
+ return
+ var/category = params["cat"] // meow
+ var/name = params["name"]
+ if(!(category in prize_list) || !(name in prize_list[category])) // Not trying something that's not in the list, are you?
+ return
+ var/datum/data/mining_equipment/prize = prize_list[category][name]
+ if(prize.cost > inserted_id.mining_points) // shouldn't be able to access this since the button is greyed out, but..
+ to_chat(usr, "You have insufficient points.")
return
inserted_id.mining_points -= prize.cost
- new prize.equipment_path(src.loc)
- updateUsrDialog()
+ new prize.equipment_path(loc)
+ else
+ return FALSE
+ add_fingerprint()
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
- updateUsrDialog()
return
if(panel_open)
if(istype(I, /obj/item/crowbar))
if(inserted_id)
inserted_id.forceMove(loc) //Prevents deconstructing the ORM from deleting whatever ID was inside it.
default_deconstruction_crowbar(user, I)
- return 1
+ return TRUE
if(istype(I, /obj/item/mining_voucher))
if(!powered())
return
- else
- RedeemVoucher(I, user)
+ redeem_voucher(I, user)
return
- if(istype(I,/obj/item/card/id))
+ if(istype(I, /obj/item/card/id))
if(!powered())
return
- else
- var/obj/item/card/id/C = usr.get_active_hand()
- if(istype(C) && !istype(inserted_id))
- if(!usr.drop_item())
- return
- C.forceMove(src)
- inserted_id = C
- interact(user)
+ var/obj/item/card/id/C = user.get_active_hand()
+ if(istype(C) && !istype(inserted_id))
+ if(!user.drop_item())
+ return
+ C.forceMove(src)
+ inserted_id = C
+ tgui_interact(user)
return
return ..()
-/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
+/**
+ * Called when someone slaps the machine with a mining voucher
+ *
+ * Arguments:
+ * * voucher - The voucher card item
+ * * redeemer - The person holding it
+ */
+/obj/machinery/mineral/equipment_vendor/proc/redeem_voucher(obj/item/mining_voucher/voucher, mob/redeemer)
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit")
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in items
@@ -240,11 +259,51 @@
qdel(voucher)
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
- do_sparks(5, 1, src)
+ do_sparks(5, TRUE, src)
if(prob(50 / severity) && severity < 3)
qdel(src)
-/**********************Mining Equipment Locker Items**************************/
+/**********************Mining Equiment Vendor (Golem)**************************/
+
+/obj/machinery/mineral/equipment_vendor/golem
+ name = "golem ship equipment vendor"
+
+/obj/machinery/mineral/equipment_vendor/golem/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/circuitboard/mining_equipment_vendor/golem(null)
+ component_parts += new /obj/item/stock_parts/matter_bin(null)
+ component_parts += new /obj/item/stock_parts/matter_bin(null)
+ component_parts += new /obj/item/stock_parts/matter_bin(null)
+ component_parts += new /obj/item/stack/sheet/glass(null)
+ RefreshParts()
+
+/obj/machinery/mineral/equipment_vendor/golem/Initialize()
+ . = ..()
+ desc += "\nIt seems a few selections have been added."
+ prize_list["Extra"] += list(
+ EQUIPMENT("Extra ID", /obj/item/card/id/golem, 250),
+ EQUIPMENT("Science Backpack", /obj/item/storage/backpack/science, 250),
+ EQUIPMENT("Full Toolbelt", /obj/item/storage/belt/utility/full/multitool, 250),
+ EQUIPMENT("Monkey Cube", /obj/item/reagent_containers/food/snacks/monkeycube, 250),
+ EQUIPMENT("Royal Cape of the Liberator", /obj/item/bedsheet/rd/royal_cape, 500),
+ EQUIPMENT("Grey Slime Extract", /obj/item/slime_extract/grey, 1000),
+ EQUIPMENT("KA Trigger Modification Kit", /obj/item/borg/upgrade/modkit/trigger_guard, 1000),
+ EQUIPMENT("Shuttle Console Board", /obj/item/circuitboard/shuttle/golem_ship, 2000),
+ EQUIPMENT("The Liberator's Legacy", /obj/item/storage/box/rndboards, 2000),
+ )
+
+/**********************Mining Equipment Datum**************************/
+
+/datum/data/mining_equipment
+ var/equipment_name = "generic"
+ var/equipment_path = null
+ var/cost = 0
+
+/datum/data/mining_equipment/New(name, path, equipment_cost)
+ equipment_name = name
+ equipment_path = path
+ cost = equipment_cost
/**********************Mining Equipment Voucher**********************/
@@ -300,3 +359,5 @@
/obj/item/storage/backpack/duffel/mining_conscript/full/New()
..()
new /obj/item/card/id/mining_access_card(src)
+
+#undef EQUIPMENT
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index c01d04beba8..54c23c89b5d 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -220,6 +220,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
var/datum/wires/explosive/gibtonite/wires
/obj/item/twohanded/required/gibtonite/Destroy()
+ SStgui.close_uis(wires)
QDEL_NULL(wires)
return ..()
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 336ebdb8b67..31ff0098335 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -53,7 +53,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log_old = body.attack_log_old //preserve our attack logs by copying them to our ghost
- logs = body.logs.Copy()
var/mutable_appearance/MA = copy_appearance(body)
if(body.mind && body.mind.name)
diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm
index 2f5627e8413..4d003753876 100644
--- a/code/modules/mob/dead/observer/say.dm
+++ b/code/modules/mob/dead/observer/say.dm
@@ -1,20 +1,10 @@
-/mob/dead/observer/say(var/message)
+/mob/dead/observer/say(message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if(!message)
return
- log_ghostsay(message, src)
-
- if(src.client)
- if(src.client.prefs.muted & MUTE_DEADCHAT)
- to_chat(src, "You cannot talk in deadchat (muted).")
- return
-
- if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
- return
-
- . = src.say_dead(message)
+ return say_dead(message)
/mob/dead/observer/emote(act, type, message, force)
diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm
index 2b07e10291f..2514ce68b06 100644
--- a/code/modules/mob/hear_say.dm
+++ b/code/modules/mob/hear_say.dm
@@ -47,7 +47,7 @@
. = trim(. + trim(msg))
. += "\""
-/mob/proc/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency)
+/mob/proc/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE)
if(!client)
return 0
@@ -74,7 +74,7 @@
return 0
var/speaker_name = speaker.name
- if(ishuman(speaker))
+ if(use_voice && ishuman(speaker))
var/mob/living/carbon/human/H = speaker
speaker_name = H.GetVoice()
@@ -99,9 +99,9 @@
if(speaker == src)
to_chat(src, "You cannot hear yourself speak!")
else
- to_chat(src, "[speaker_name][speaker.GetAltName()] talks but you cannot hear [speaker.p_them()].")
+ to_chat(src, "[speaker.name] talks but you cannot hear [speaker.p_them()].")
else
- to_chat(src, "[speaker_name][speaker.GetAltName()] [track][message]")
+ to_chat(src, "[speaker_name][use_voice ? speaker.GetAltName() : ""] [track][message]")
if(speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
playsound_local(source, speech_sound, sound_vol, 1, sound_frequency)
@@ -171,7 +171,14 @@
to_chat(src, heard)
-/mob/proc/hear_holopad_talk(list/message_pieces, var/verb = "says", var/mob/speaker = null)
+/mob/proc/hear_holopad_talk(list/message_pieces, verb = "says", mob/speaker = null)
+ if(sleeping || stat == UNCONSCIOUS)
+ hear_sleep(multilingual_to_message(message_pieces))
+ return
+
+ if(!can_hear())
+ return
+
var/message = combine_message(message_pieces, verb, speaker)
var/name = speaker.name
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index a46268daf50..50d9b6d5fd5 100644
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -186,7 +186,7 @@
if(prob(80))
new_name += " [pick(list("Hadii","Kaytam","Zhan-Khazan","Hharar","Njarir'Akhan"))]"
else
- new_name += ..(gender,1)
+ new_name += " [..(gender,1)]"
return new_name
/datum/language/vulpkanin
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index aeee677b905..f281b8abec3 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -81,7 +81,7 @@
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
return
-/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
+/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
return FALSE
/* Commented out because it's duplicated in life.dm
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index 5d828e7c181..79ed90a61b8 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -70,7 +70,7 @@
return
polling = 1
spawn()
- var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 0)
+ var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, FALSE, source = /mob/living/carbon/alien/larva)
var/mob/C = null
// To stop clientless larva, we will check that our host has a client
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 16014e7c353..a17d7b8ebbd 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -226,13 +226,6 @@
brainmob.emp_damage += rand(0,10)
..()
-/obj/item/mmi/relaymove(var/mob/user, var/direction)
- if(user.stat || user.stunned)
- return
- var/obj/item/rig/rig = src.get_rig()
- if(rig)
- rig.forced_move(direction, user)
-
/obj/item/mmi/Destroy()
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 98585262518..b6e93dc78ff 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -538,6 +538,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
take_organ_damage(10)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
+ if(victim.flying)
+ return
if(hurt)
victim.take_organ_damage(10)
take_organ_damage(10)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index d213ee7206f..4a0b9ea55b1 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -109,9 +109,6 @@
// log_world("k")
sql_report_death(src)
- if(wearing_rig)
- wearing_rig.notify_ai("Warning: user death event. Mobility control passed to integrated intelligence system.")
-
/mob/living/carbon/human/update_revive()
. = ..()
if(. && healthdoll)
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 10c2ac8f119..b69c13987b9 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -308,14 +308,14 @@
m_type = 1
if("bow", "bows")
- if(!buckled)
+ if(!restrained())
var/M = handle_emote_param(param)
message = "[src] bows[M ? " to [M]" : ""]."
m_type = 1
if("salute", "salutes")
- if(!buckled)
+ if(!restrained())
var/M = handle_emote_param(param)
message = "[src] salutes[M ? " to [M]" : ""]."
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 60891563ad2..3739e337542 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -301,14 +301,13 @@
else if(nutrition >= NUTRITION_LEVEL_FAT)
msg += "[p_they(TRUE)] [p_are()] quite chubby.\n"
- if(!ismachineperson(src) && blood_volume < BLOOD_VOLUME_SAFE)
+ if(blood_volume < BLOOD_VOLUME_SAFE)
msg += "[p_they(TRUE)] [p_have()] pale skin.\n"
if(bleedsuppress)
msg += "[p_they(TRUE)] [p_are()] bandaged with something.\n"
else if(bleed_rate)
- var/bleed_message = !ismachineperson(src) ? "bleeding" : "leaking"
- msg += "[p_they(TRUE)] [p_are()] [bleed_message]!\n"
+ msg += "[p_they(TRUE)] [p_are()] bleeding!\n"
if(reagents.has_reagent("teslium"))
msg += "[p_they(TRUE)] [p_are()] emitting a gentle blue glow!\n"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 16f1738d2f6..d495ca3d2f4 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -5,7 +5,6 @@
icon = 'icons/mob/human.dmi'
icon_state = "body_m_s"
deathgasp_on_death = TRUE
- var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(loc)
icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor.
@@ -182,13 +181,6 @@
stat("Tank Pressure", internal.air_contents.return_pressure())
stat("Distribution Pressure", internal.distribute_pressure)
- if(istype(back, /obj/item/rig))
- var/obj/item/rig/suit = back
- var/cell_status = "ERROR"
- if(suit.cell)
- cell_status = "[suit.cell.charge]/[suit.cell.maxcharge]"
- stat(null, "Suit charge: [cell_status]")
-
// I REALLY need to split up status panel things into datums
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(B && B.controlling)
@@ -963,16 +955,6 @@
var/obj/item/clothing/mask/MT = src.wear_mask
tinted += MT.tint
- //god help me
- if(istype(back, /obj/item/rig))
- var/obj/item/rig/O = back
- if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & HEAD))
- if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
- tinted = 2
- if((O.offline && O.offline_vision_restriction == 2) || (!O.offline && O.vision_restriction == 2))
- tinted = 3
- //im so sorry
-
return tinted
@@ -1465,12 +1447,13 @@
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes)
if(istype(dna.species) && dna.species.eyes)
- var/icon/eyes_icon = new /icon('icons/mob/human_face.dmi', dna.species.eyes)
+ var/icon/eyes_icon
if(eye_implant) //Eye implants override native DNA eye colo(u)r
eyes_icon = eye_implant.generate_icon()
else if(eyes)
eyes_icon = eyes.generate_icon()
else //Error 404: Eyes not found!
+ eyes_icon = new('icons/mob/human_face.dmi', dna.species.eyes)
eyes_icon.Blend("#800000", ICON_ADD)
return eyes_icon
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index f9058065fb0..621d8330761 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -129,13 +129,6 @@
O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health)
return STATUS_UPDATE_HEALTH
-
-/mob/living/carbon/human/Paralyse(amount)
- // Notify our AI if they can now control the suit.
- if(wearing_rig && !stat && paralysis < amount) //We are passing out right this second.
- wearing_rig.notify_ai("Warning: user consciousness failure. Mobility control passed to integrated intelligence system.")
- return ..()
-
/mob/living/carbon/human/adjustCloneLoss(amount)
if(dna.species && amount > 0)
amount = amount * dna.species.clone_mod
@@ -342,7 +335,5 @@ This function restores all organs.
..(damage, damagetype, def_zone, blocked)
return 1
- //Handle BRUTE and BURN damage
- handle_suit_punctures(damagetype, damage)
//Handle species apply_damage procs
return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, sharp, used_weapon)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 21a3e8bf274..c7798a51a08 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -531,17 +531,6 @@ emp_act
w_uniform.add_mob_blood(source)
update_inv_w_uniform()
-/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage)
-
- if(!wear_suit) return
- if(!istype(wear_suit,/obj/item/clothing/suit/space)) return
- if(damtype != BURN && damtype != BRUTE) return
-
- var/obj/item/clothing/suit/space/SS = wear_suit
- var/penetrated_dam = max(0,(damage - max(0,(SS.breach_threshold - SS.damage))))
-
- if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
-
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
@@ -583,41 +572,34 @@ emp_act
if(M.a_intent == INTENT_HARM)
if(w_uniform)
w_uniform.add_fingerprint(M)
- var/damage = rand(15, 30)
+ var/damage = prob(90) ? 20 : 0
if(!damage)
- playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
+ playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1)
visible_message("[M] has lunged at [src]!")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
- var/armor_block = run_armor_check(affecting, "melee")
+ var/armor_block = run_armor_check(affecting, "melee", armour_penetration = 10)
- playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
+ playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
visible_message("[M] has slashed at [src]!", \
"[M] has slashed at [src]!")
apply_damage(damage, BRUTE, affecting, armor_block)
- if(damage >= 25)
- visible_message("[M] has wounded [src]!", \
- "[M] has wounded [src]!")
- apply_effect(4, WEAKEN, armor_block)
- add_attack_logs(M, src, "Alien attacked")
+ add_attack_logs(M, src, "Alien attacked")
updatehealth("alien attack")
- if(M.a_intent == INTENT_DISARM)
- if(prob(80))
+ if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
+ var/obj/item/I = get_active_hand()
+ if(I && unEquip(I))
+ playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
+ visible_message("[M] disarms [src]!", "[M] disarms you!", "You hear aggressive shuffling!")
+ to_chat(M, "You disarm [src]!")
+ else
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
add_attack_logs(M, src, "Alien tackled")
visible_message("[M] has tackled down [src]!")
- else
- if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
- playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- drop_item()
- visible_message("[M] disarmed [src]!")
- else
- playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
- visible_message("[M] has tried to disarm [src]!")
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
. = ..()
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index 5e1b5163a24..7cb33bce249 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -16,12 +16,6 @@
else if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
thrust = C.jetpack
- else if(istype(back,/obj/item/rig))
- var/obj/item/rig/rig = back
- for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules)
- thrust = module.jets
- break
-
if(thrust)
if((movement_dir || thrust.stabilizers) && thrust.allow_thrust(0.01, src))
return 1
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 90653a6750b..15dfe74880e 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -302,14 +302,6 @@
if(!(head && head.flags & AIRTIGHT)) //if NOT (head AND head.flags CONTAIN AIRTIGHT)
null_internals = 1 //not wearing a mask or suitable helmet
- if(istype(back, /obj/item/rig)) //wearing a rigsuit
- var/obj/item/rig/rig = back //needs to be typecasted because this doesn't use get_rig() for some reason
- if(rig.offline && (rig.air_supply && internal == rig.air_supply)) //if rig IS offline AND (rig HAS air_supply AND internal IS air_supply)
- null_internals = 1 //offline suits do not breath
-
- else if(rig.air_supply && internal == rig.air_supply) //if rig HAS air_supply AND internal IS rig air_supply
- skip_contents_check = 1 //skip contents.Find() check, the oxygen is valid even being outside of the mob
-
if(!contents.Find(internal) && (!skip_contents_check)) //if internal NOT IN contents AND skip_contents_check IS false
null_internals = 1 //not a rigsuit and your oxygen is gone
diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm
index 01a9990ebd8..957b0828725 100644
--- a/code/modules/mob/living/carbon/human/say.dm
+++ b/code/modules/mob/living/carbon/human/say.dm
@@ -62,11 +62,6 @@
return ..()
/mob/living/carbon/human/proc/HasVoiceChanger()
- if(istype(back, /obj/item/rig))
- var/obj/item/rig/rig = back
- if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice)
- return rig.speech.voice_holder.voice
-
for(var/obj/item/gear in list(wear_mask, wear_suit, head))
if(!gear)
continue
diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm
index 0914852b131..a8e1eee5f52 100644
--- a/code/modules/mob/living/carbon/human/species/_species.dm
+++ b/code/modules/mob/living/carbon/human/species/_species.dm
@@ -519,9 +519,6 @@
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
if(!istype(M))
return
- if(H.frozen)
- to_chat(M, "Do not touch Admin-Frozen people.")
- return
if(istype(M))
var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"]
@@ -817,20 +814,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u
if(!isnull(hat.lighting_alpha))
H.lighting_alpha = min(hat.lighting_alpha, H.lighting_alpha)
- if(istype(H.back, /obj/item/rig)) ///aghhh so snowflakey
- var/obj/item/rig/rig = H.back
- if(rig.visor)
- if(!rig.helmet || (H.head && rig.helmet == H.head))
- if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
- var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
- if(istype(G))
- H.sight |= G.vision_flags
- H.see_in_dark = max(G.see_in_dark, H.see_in_dark)
- H.see_invisible = min(G.invis_view, H.see_invisible)
-
- if(!isnull(G.lighting_alpha))
- H.lighting_alpha = min(G.lighting_alpha, H.lighting_alpha)
-
if(H.vision_type)
H.sight |= H.vision_type.sight_flags
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark)
diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm
index a8639a1a948..2ce011c7159 100644
--- a/code/modules/mob/living/carbon/human/species/diona.dm
+++ b/code/modules/mob/living/carbon/human/species/diona.dm
@@ -74,6 +74,10 @@
..()
H.gender = NEUTER
+/datum/species/diona/on_species_loss(mob/living/carbon/human/H)
+ . = ..()
+ H.clear_alert("nolight")
+
/datum/species/diona/handle_reagents(mob/living/carbon/human/H, datum/reagent/R)
if(R.id == "glyphosate" || R.id == "atrazine")
H.adjustToxLoss(3) //Deal aditional damage
diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm
index ec37d3c6c9f..a1cab2ea466 100644
--- a/code/modules/mob/living/carbon/human/species/machine.dm
+++ b/code/modules/mob/living/carbon/human/species/machine.dm
@@ -22,7 +22,7 @@
death_message = "gives a short series of shrill beeps, their chassis shuddering before falling limp, nonfunctional."
death_sounds = list('sound/voice/borg_deathsound.ogg') //I've made this a list in the event we add more sounds for dead robots.
- species_traits = list(IS_WHITELISTED, NO_BREATHE, NO_SCAN, NO_INTORGANS, NO_PAIN, NO_DNA, RADIMMUNE, VIRUSIMMUNE, NO_GERMS, NO_DECAY, NOTRANSSTING) //Computers that don't decay? What a lie!
+ species_traits = list(IS_WHITELISTED, NO_BREATHE, NO_BLOOD, NO_SCAN, NO_INTORGANS, NO_PAIN, NO_DNA, RADIMMUNE, VIRUSIMMUNE, NO_GERMS, NO_DECAY, NOTRANSSTING) //Computers that don't decay? What a lie!
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY | ALL_RPARTS
dietflags = 0 //IPCs can't eat, so no diet
@@ -30,10 +30,6 @@
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
- blood_color = "#3C3C3C"
- exotic_blood = "oil"
- blood_damage_type = STAMINA
-
//Default styles for created mobs.
default_hair = "Blue IPC Screen"
dies_at_threshold = TRUE
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 1f38e564928..e667833dfe3 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -273,11 +273,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[UNDERWEAR_LAYER] = mutable_appearance(underwear_standing, layer = -UNDERWEAR_LAYER)
apply_overlay(UNDERWEAR_LAYER)
- if(lip_style && (LIPS in dna.species.species_traits))
- var/mutable_appearance/lips = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]_s")
- lips.color = lip_color
- standing += lips
-
overlays_standing[BODY_LAYER] = standing
apply_overlay(BODY_LAYER)
//tail
@@ -964,10 +959,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
var/mutable_appearance/standing
if(back.icon_override)
standing = mutable_appearance(back.icon_override, "[back.icon_state]", layer = -BACK_LAYER)
- else if(istype(back, /obj/item/rig))
- //If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
- var/obj/item/rig/rig = back
- standing = rig.mob_icon
else if(back.sprite_sheets && back.sprite_sheets[dna.species.name])
standing = mutable_appearance(back.sprite_sheets[dna.species.name], "[back.icon_state]", layer = -BACK_LAYER)
else
@@ -1307,6 +1298,11 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
else
. += "#000000"
+ if(lip_color && (LIPS in dna.species.species_traits))
+ . += "[lip_color]"
+ else
+ . += "#000000"
+
for(var/organ_tag in dna.species.has_limbs)
var/obj/item/organ/external/part = bodyparts_by_name[organ_tag]
if(isnull(part))
diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm
index cb607bae294..c3d0ca679d4 100644
--- a/code/modules/mob/living/carbon/update_icons.dm
+++ b/code/modules/mob/living/carbon/update_icons.dm
@@ -29,7 +29,7 @@
if(changed)
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
handle_transform_change()
- floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
+ floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
/mob/living/carbon/proc/handle_transform_change()
return
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 3062ef461f9..c0341f11b47 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -2,9 +2,8 @@
set waitfor = FALSE
set invisibility = 0
- if(flying) //TODO: Better floating
- animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
- animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
+ if(flying && !floating) //TODO: Better floating
+ float(TRUE)
if(client || registered_z) // This is a temporary error tracker to make sure we've caught everything
var/turf/T = get_turf(src)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index f3d23ca3f51..9e9724d20ec 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -3,8 +3,29 @@
var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.add_to_hud(src)
faction += "\ref[src]"
+ determine_move_and_pull_forces()
GLOB.mob_living_list += src
+// Used to determine the forces dependend on the mob size
+// Will only change the force if the force was not set in the mob type itself
+/mob/living/proc/determine_move_and_pull_forces()
+ var/value
+ switch(mob_size)
+ if(MOB_SIZE_TINY)
+ value = MOVE_FORCE_EXTREMELY_WEAK
+ if(MOB_SIZE_SMALL)
+ value = MOVE_FORCE_WEAK
+ if(MOB_SIZE_HUMAN)
+ value = MOVE_FORCE_NORMAL
+ if(MOB_SIZE_LARGE)
+ value = MOVE_FORCE_NORMAL // For now
+ if(!move_force)
+ move_force = value
+ if(!pull_force)
+ pull_force = value
+ if(!move_resist)
+ move_resist = value
+
/mob/living/prepare_huds()
..()
prepare_data_huds()
@@ -59,8 +80,9 @@
//Even if we don't push/swap places, we "touched" them, so spread fire
spreadFire(M)
- if(now_pushing)
- return 1
+ // No pushing if we're already pushing past something, or if the mob we're pushing into is anchored.
+ if(now_pushing || M.anchored)
+ return TRUE
//Should stop you pushing a restrained person out of the way
if(isliving(M))
@@ -68,7 +90,7 @@
if(L.pulledby && L.pulledby != src && L.restrained())
if(!(world.time % 5))
to_chat(src, "[L] is restrained, you cannot push past.")
- return 1
+ return TRUE
if(L.pulling)
if(ismob(L.pulling))
@@ -76,28 +98,28 @@
if(P.restrained())
if(!(world.time % 5))
to_chat(src, "[L] is restrained, you cannot push past.")
- return 1
+ return TRUE
if(moving_diagonally) //no mob swap during diagonal moves.
- return 1
+ return TRUE
if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure
if(isstructure(M.pulling) || isstructure(pulling))
- return 1
+ return TRUE
if(!M.buckled && !M.has_buckled_mobs())
var/mob_swap
//the puller can always swap with it's victim if on grab intent
if(M.pulledby == src && a_intent == INTENT_GRAB)
- mob_swap = 1
+ mob_swap = TRUE
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
- mob_swap = 1
+ mob_swap = TRUE
if(mob_swap)
//switch our position with M
if(loc && !loc.Adjacent(M.loc))
- return 1
- now_pushing = 1
+ return TRUE
+ now_pushing = TRUE
var/oldloc = loc
var/oldMloc = M.loc
@@ -114,18 +136,18 @@
if(!M_passmob)
M.pass_flags &= ~PASSMOB
- now_pushing = 0
- return 1
+ now_pushing = FALSE
+ return TRUE
// okay, so we didn't switch. but should we push?
// not if he's not CANPUSH of course
if(!(M.status_flags & CANPUSH))
- return 1
+ return TRUE
//anti-riot equipment is also anti-push
if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !istype(M.r_hand, /obj/item/clothing))
- return 1
+ return TRUE
if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !istype(M.l_hand, /obj/item/clothing))
- return 1
+ return TRUE
//Called when we bump into an obj
/mob/living/proc/ObjBump(obj/O)
@@ -175,13 +197,6 @@
AM.setDir(current_dir)
now_pushing = FALSE
-/mob/living/Stat()
- . = ..()
- if(. && get_rig_stats)
- var/obj/item/rig/rig = get_rig()
- if(rig)
- SetupStat(rig)
-
/mob/living/proc/can_track(mob/living/user)
//basic fast checks go first. When overriding this proc, I recommend calling ..() at the end.
var/turf/T = get_turf(src)
@@ -209,7 +224,7 @@
set category = "Object"
if(istype(AM) && Adjacent(AM))
- start_pulling(AM)
+ start_pulling(AM, show_message = TRUE)
else
stop_pulling()
@@ -743,16 +758,17 @@
/mob/living/proc/float(on)
if(throwing)
return
- var/fixed = 0
+ var/fixed = FALSE
if(anchored || (buckled && buckled.anchored))
- fixed = 1
+ fixed = TRUE
if(on && !floating && !fixed)
animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1)
- floating = 1
+ sleep(10)
+ animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
+ floating = TRUE
else if(((!on || fixed) && floating))
- var/final_pixel_y = get_standard_pixel_y_offset(lying)
- animate(src, pixel_y = final_pixel_y, time = 10)
- floating = 0
+ animate(src, pixel_y = get_standard_pixel_y_offset(lying), time = 10)
+ floating = FALSE
/mob/living/proc/can_use_vents()
return "You can't fit into that vent."
@@ -827,15 +843,17 @@
if(!used_item)
used_item = get_active_hand()
..()
- floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
+ floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
/mob/living/proc/do_jitter_animation(jitteriness, loop_amount = 6)
- var/amplitude = min(4, (jitteriness/100) + 1)
+ var/amplitude = min(4, (jitteriness / 100) + 1)
var/pixel_x_diff = rand(-amplitude, amplitude)
- var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
+ var/pixel_y_diff = rand(-amplitude / 3, amplitude / 3)
+ var/final_pixel_x = get_standard_pixel_x_offset(lying)
+ var/final_pixel_y = get_standard_pixel_y_offset(lying)
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = loop_amount)
- animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y) , time = 2)
- floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
+ animate(pixel_x = final_pixel_x , pixel_y = final_pixel_y , time = 2)
+ floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
/mob/living/proc/get_temperature(datum/gas_mixture/environment)
@@ -927,10 +945,10 @@
return 0
return 1
-/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, supress_message = FALSE)
+/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
if(!AM || !src)
return FALSE
- if(!(AM.can_be_pulled(src, state, force)))
+ if(!(AM.can_be_pulled(src, state, force, show_message)))
return FALSE
if(incapacitated())
return
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index b38f1819524..4da8aa97e06 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -113,7 +113,7 @@
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), I)
if(I.thrownby)
- add_attack_logs(I.thrownby, src, "Hit with thrown [I]")
+ add_attack_logs(I.thrownby, src, "Hit with thrown [I]", !I.throwforce ? ATKLOG_ALMOSTALL : null) // Only message if the person gets damages
else
return 1
else
@@ -219,7 +219,7 @@
fire_stacks += L.fire_stacks
IgniteMob()
-/mob/living/can_be_pulled(user, grab_state, force)
+/mob/living/can_be_pulled(user, grab_state, force, show_message = FALSE)
return ..() && !(buckled && buckled.buckle_prevents_pull)
/mob/living/water_act(volume, temperature, source, method = REAGENT_TOUCH)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index e230f7a2b99..f8a5f08b313 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -2,6 +2,11 @@
see_invisible = SEE_INVISIBLE_LIVING
pressure_resistance = 10
+ // Will be determined based on mob size if left null. Done in living/proc/determine_move_and_pull_forces()
+ move_resist = null
+ move_force = null
+ pull_force = null
+
//Health and life related vars
var/maxHealth = 100 //Maximum health that should be possible.
var/health = 100 //A mob's health
@@ -28,7 +33,7 @@
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
- var/floating = 0
+ var/floating = FALSE
var/mob_size = MOB_SIZE_HUMAN
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
var/digestion_ratio = 1 //controls how quickly reagents metabolize; largely governered by species attributes.
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 630b2223321..e944e692887 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -351,8 +351,6 @@ proc/get_radio_key_from_channel(var/channel)
return
if(stat)
- if(stat == DEAD)
- return say_dead(message_pieces)
return
if(is_muzzled())
@@ -451,14 +449,14 @@ proc/get_radio_key_from_channel(var/channel)
var/speech_bubble_test = say_test(message)
for(var/mob/M in listening)
- M.hear_say(message_pieces, verb, italics, src)
+ M.hear_say(message_pieces, verb, italics, src, use_voice = FALSE)
if(M.client)
speech_bubble_recipients.Add(M.client)
if(eavesdropping.len)
stars_all(message_pieces) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
- M.hear_say(message_pieces, verb, italics, src)
+ M.hear_say(message_pieces, verb, italics, src, use_voice = FALSE)
if(M.client)
speech_bubble_recipients.Add(M.client)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 737298e2815..a5a9269d63b 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
var/list/connected_robots = list()
var/aiRestorePowerRoutine = 0
//var/list/laws = list()
- var/alarms = list("Motion" = list(), "Fire" = list(), "Atmosphere" = list(), "Power" = list(), "Camera" = list())
+ alarms_listend_for = list("Motion", "Fire", "Atmosphere", "Power", "Camera", "Burglar")
var/viewalerts = 0
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
@@ -173,19 +173,19 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
add_language("Galactic Common", 1)
add_language("Sol Common", 1)
add_language("Tradeband", 1)
- add_language("Neo-Russkiya", 0)
- add_language("Gutter", 0)
- add_language("Sinta'unathi", 0)
- add_language("Siik'tajr", 0)
- add_language("Canilunzt", 0)
- add_language("Skrellian", 0)
- add_language("Vox-pidgin", 0)
- add_language("Orluum", 0)
- add_language("Rootspeak", 0)
+ add_language("Neo-Russkiya", 1)
+ add_language("Gutter", 1)
+ add_language("Sinta'unathi", 1)
+ add_language("Siik'tajr", 1)
+ add_language("Canilunzt", 1)
+ add_language("Skrellian", 1)
+ add_language("Vox-pidgin", 1)
+ add_language("Orluum", 1)
+ add_language("Rootspeak", 1)
add_language("Trinary", 1)
- add_language("Chittin", 0)
- add_language("Bubblish", 0)
- add_language("Clownish", 0)
+ add_language("Chittin", 1)
+ add_language("Bubblish", 1)
+ add_language("Clownish", 1)
if(!safety)//Only used by AIize() to successfully spawn an AI.
if(!B)//If there is no player/brain inside.
@@ -242,6 +242,46 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
return
show_borg_info()
+/mob/living/silicon/ai/proc/ai_alerts()
+ var/list/dat = list("Current Station Alerts\n")
+ dat += "Close
"
+ var/list/list/temp_alarm_list = SSalarm.alarms.Copy()
+ for(var/cat in temp_alarm_list)
+ if(!(cat in alarms_listend_for))
+ continue
+ dat += text("[] \n", cat)
+ var/list/list/L = temp_alarm_list[cat].Copy()
+ for(var/alarm in L)
+ var/list/list/alm = L[alarm].Copy()
+ var/area_name = alm[1]
+ var/C = alm[2]
+ var/list/list/sources = alm[3].Copy()
+ for(var/thing in sources)
+ var/atom/A = locateUID(thing)
+ if(A && A.z != z)
+ L -= alarm
+ continue
+ dat += ""
+ if(C && islist(C))
+ var/dat2 = ""
+ for(var/cam in C)
+ var/obj/machinery/camera/I = locateUID(cam)
+ if(!QDELETED(I))
+ dat2 += text("[][]", (dat2 == "") ? "" : " | ", I.c_tag)
+ dat += text("-- [] ([])", area_name, (dat2 != "") ? dat2 : "No Camera")
+ else
+ dat += text("-- [] (No Camera)", area_name)
+ if(sources.len > 1)
+ dat += text("- [] sources", sources.len)
+ dat += " \n"
+ if(!L.len)
+ dat += "-- All Systems Nominal \n"
+ dat += " \n"
+
+ viewalerts = TRUE
+ var/dat_text = dat.Join("")
+ src << browse(dat_text, "window=aialerts&can_close=0")
+
/mob/living/silicon/ai/proc/show_borg_info()
stat(null, text("Connected cyborgs: [connected_robots.len]"))
for(var/thing in connected_robots)
@@ -612,7 +652,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
if(href_list["switchcamera"])
switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras
if(href_list["showalerts"])
- subsystem_alarm_monitor()
+ ai_alerts()
if(href_list["show_paper"])
if(last_paper_seen)
src << browse(last_paper_seen, "window=show_paper")
@@ -787,12 +827,49 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
Bot.call_bot(src, waypoint)
+/mob/living/silicon/ai/alarm_triggered(src, class, area/A, list/O, obj/alarmsource)
+ if(!(class in alarms_listend_for))
+ return
+ if(alarmsource.z != z)
+ return
+ if(stat == DEAD)
+ return TRUE
+ if(O)
+ var/obj/machinery/camera/C = locateUID(O[1])
+ if(O.len == 1 && !QDELETED(C) && C.can_use())
+ queueAlarm("--- [class] alarm detected in [A.name]! ([C.c_tag])", class)
+ else if(O && O.len)
+ var/foo = 0
+ var/dat2 = ""
+ for(var/thing in O)
+ var/obj/machinery/camera/I = locateUID(thing)
+ if(!QDELETED(I))
+ dat2 += text("[][]", (!foo) ? "" : " | ", I.c_tag) //I'm not fixing this shit...
+ foo = 1
+ queueAlarm(text ("--- [] alarm detected in []! ([])", class, A.name, dat2), class)
+ else
+ queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class)
+ else
+ queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class)
+ if(viewalerts)
+ ai_alerts()
+
+/mob/living/silicon/ai/alarm_cancelled(src, class, area/A, obj/origin, cleared)
+ if(cleared)
+ if(!(class in alarms_listend_for))
+ return
+ if(origin.z != z)
+ return
+ queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0)
+ if(viewalerts)
+ ai_alerts()
+
/mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C)
if(!tracking)
cameraFollow = null
- if(!C || stat == DEAD) //C.can_use())
+ if(QDELETED(C) || stat == DEAD) //C.can_use())
return FALSE
if(!eyeobj)
@@ -1166,16 +1243,6 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
/mob/living/silicon/ai/can_buckle()
return FALSE
-// Pass lying down or getting up to our pet human, if we're in a rig.
-/mob/living/silicon/ai/lay_down()
- set name = "Rest"
- set category = "IC"
-
- resting = 0
- var/obj/item/rig/rig = get_rig()
- if(rig)
- rig.force_rest(src)
-
/mob/living/silicon/ai/switch_to_camera(obj/machinery/camera/C)
if(!C.can_use() || !is_in_chassis())
return FALSE
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index d23fedb09bc..faacf9ba359 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -142,7 +142,7 @@
acceleration = !acceleration
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
-/mob/camera/aiEye/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency)
+/mob/camera/aiEye/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE)
if(relay_speech)
if(istype(ai))
ai.relay_speech(speaker, message_pieces, verb)
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 61151e35c92..106eaf86d37 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -132,8 +132,6 @@
sleep(50)
theAPC = null
- process_queued_alarms()
-
/mob/living/silicon/ai/updatehealth(reason = "none given")
if(status_flags & GODMODE)
health = 100
diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm
index 599063c2724..a4e90b50f8e 100644
--- a/code/modules/mob/living/silicon/ai/say.dm
+++ b/code/modules/mob/living/silicon/ai/say.dm
@@ -80,17 +80,26 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement
Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
\
WARNING: Misuse of the announcement system will get you job banned."
- var/index = 0
- for(var/word in GLOB.vox_sounds)
- index++
- dat += "[capitalize(word)]"
- if(index != GLOB.vox_sounds.len)
- dat += " / "
+ // Show alert and voice sounds separately
+ var/vox_words = GLOB.vox_sounds - GLOB.vox_alerts
+ dat = help_format(GLOB.vox_alerts, dat)
+ dat = help_format(vox_words, dat)
var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400)
popup.set_content(dat)
popup.open()
+/mob/living/silicon/ai/proc/help_format(word_list, dat)
+ var/index = 0
+ for(var/word in word_list)
+ index++
+ dat += "[capitalize(word)]"
+ if(index != length(word_list))
+ dat += " / "
+ else
+ dat += ""
+ return dat
+
/mob/living/silicon/ai/proc/ai_announcement()
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 3d1293d2a34..0a4e4cee898 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -435,9 +435,6 @@
// Pass lying down or getting up to our pet human, if we're in a rig.
if(stat == CONSCIOUS && istype(loc,/obj/item/paicard))
resting = 0
- var/obj/item/rig/rig = get_rig()
- if(istype(rig))
- rig.force_rest(src)
else
resting = !resting
to_chat(src, "You are now [resting ? "resting" : "getting up"]")
@@ -520,7 +517,7 @@
/mob/living/silicon/pai/Bumped()
return
-/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
+/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
return FALSE
/mob/living/silicon/pai/update_canmove(delay_action_updates = 0)
@@ -566,6 +563,10 @@
var/obj/item/holder/H = ..()
if(!istype(H))
return
+ if(stat == DEAD)
+ H.icon = 'icons/mob/pai.dmi'
+ H.icon_state = "[chassis]_dead"
+ return
if(resting)
icon_state = "[chassis]"
resting = 0
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index 2a1662b064d..52d58ad659d 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -312,8 +312,3 @@ proc/robot_healthscan(mob/user, mob/living/M)
to_chat(user, "[capitalize(O.name)]: [O.damage]")
if(!organ_found)
to_chat(user, "No prosthetics located.")
-
- if(ismachineperson(H))
- to_chat(user, "Internal Fluid Level:[H.blood_volume]/[H.max_blood]")
- if(H.bleed_rate)
- to_chat(user, "Warning:External component leak detected!")
diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm
index 72d9b210712..65847c3a9b1 100644
--- a/code/modules/mob/living/silicon/robot/death.dm
+++ b/code/modules/mob/living/silicon/robot/death.dm
@@ -53,7 +53,7 @@
emote("deathgasp", force = TRUE)
if(module)
- module.handle_death(gibbed)
+ module.handle_death(src, gibbed)
// Only execute the below if we successfully died
. = ..(gibbed)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index 91970d030a6..270606361cb 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -19,6 +19,7 @@
ventcrawler = 2
magpulse = 1
mob_size = MOB_SIZE_SMALL
+ pull_force = MOVE_FORCE_VERY_WEAK // Can only drag small items
modules_break = FALSE
@@ -35,6 +36,14 @@
var/reboot_cooldown = 60 // one minute
var/last_reboot
var/emagged_time
+ var/list/pullable_drone_items = list(
+ /obj/item/pipe,
+ /obj/structure/disposalconstruct,
+ /obj/item/stack/cable_coil,
+ /obj/item/stack/rods,
+ /obj/item/stack/sheet,
+ /obj/item/stack/tile
+ )
holder_type = /obj/item/holder/drone
// var/sprite[0]
@@ -50,7 +59,7 @@
// Disable the microphone wire on Drones
if(radio)
- radio.wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
+ radio.wires.cut(WIRE_RADIO_TRANSMIT)
if(camera && ("Robots" in camera.network))
camera.network.Add("Engineering")
@@ -69,6 +78,10 @@
verbs -= /mob/living/silicon/robot/verb/Namepick
module = new /obj/item/robot_module/drone(src)
+ //Allows Drones to hear the Engineering channel.
+ module.channels = list("Engineering" = 1)
+ radio.recalculateChannels()
+
//Grab stacks.
stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module
stack_wood = locate(/obj/item/stack/sheet/wood) in src.module
@@ -154,15 +167,17 @@
return
else
- user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.")
+ var/confirm = alert("Using your ID on a Maintenance Drone will shut it down, are you sure you want to do this?", "Disable Drone", "Yes", "No")
+ if(confirm == ("Yes") && (user in range(3, src)))
+ user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.")
- if(emagged)
- return
+ if(emagged)
+ return
- if(allowed(W))
- shut_down()
- else
- to_chat(user, "Access denied.")
+ if(allowed(W))
+ shut_down()
+ else
+ to_chat(user, "Access denied.")
return
@@ -321,20 +336,22 @@
/mob/living/silicon/robot/drone/Bumped(atom/movable/AM)
return
-/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
+/mob/living/silicon/robot/drone/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
+
+ if(is_type_in_list(AM, pullable_drone_items))
+ ..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such
- if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct))
- ..()
else if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > WEIGHT_CLASS_SMALL)
- to_chat(src, "You are too small to pull that.")
+ if(show_message)
+ to_chat(src, "You are too small to pull that.")
return
else
..()
else
- to_chat(src, "You are too small to pull that.")
- return
+ if(show_message)
+ to_chat(src, "You are too small to pull that.")
/mob/living/silicon/robot/drone/add_robot_verbs()
src.verbs |= silicon_subsystems
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
index a0582c135e4..16e81f53276 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
@@ -8,7 +8,6 @@
//Has a list of items that it can hold.
var/list/can_hold = list(
- /obj/item/stock_parts/cell,
/obj/item/firealarm_electronics,
/obj/item/airalarm_electronics,
/obj/item/airlock_electronics,
@@ -24,6 +23,8 @@
/obj/item/mounted/frame/firealarm,
/obj/item/mounted/frame/newscaster_frame,
/obj/item/mounted/frame/intercom,
+ /obj/item/mounted/frame/extinguisher,
+ /obj/item/mounted/frame/light_switch,
/obj/item/rack_parts,
/obj/item/camera_assembly,
/obj/item/tank,
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 07080e694bf..a183a8fc455 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -13,7 +13,6 @@
handle_robot_cell()
process_locks()
update_items()
- process_queued_alarms()
/mob/living/silicon/robot/proc/handle_robot_cell()
@@ -46,7 +45,7 @@
/mob/living/silicon/robot/proc/handle_equipment()
if(camera && !scrambledcodes)
- if(stat == DEAD || wires.IsCameraCut())
+ if(stat == DEAD || wires.is_cut(WIRE_BORG_CAMERA))
camera.status = 0
else
camera.status = 1
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index faa51a58ec0..af1feef3ee7 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -59,7 +59,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/ear_protection = 0
var/damage_protection = 0
var/emp_protection = FALSE
- var/xeno_disarm_chance = 85
var/list/force_modules = list()
var/allow_rename = TRUE
@@ -72,11 +71,10 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/list/req_access
var/ident = 0
//var/list/laws = list()
- var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list())
var/viewalerts = 0
var/modtype = "Default"
var/lower_mod = 0
- var/datum/effect_system/spark_spread/spark_system//So they can initialize sparks whenever/N
+ var/datum/effect_system/spark_spread/spark_system //So they can initialize sparks whenever/N
var/jeton = 0
var/low_power_mode = 0 //whether the robot has no charge left.
var/weapon_lock = 0
@@ -112,7 +110,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
/mob/living/silicon/robot/get_cell()
return cell
-/mob/living/silicon/robot/New(loc, syndie = FALSE, unfinished = FALSE, alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
+/mob/living/silicon/robot/New(loc, syndie = FALSE, unfinished = FALSE, alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -134,13 +132,13 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
radio = new /obj/item/radio/borg(src)
common_radio = radio
- init(ai_to_sync_to = ai_to_sync_to)
+ init(alien, connect_to_AI, ai_to_sync_to)
if(has_camera && !camera)
camera = new /obj/machinery/camera(src)
camera.c_tag = real_name
camera.network = list("SS13","Robots")
- if(wires.IsCameraCut()) // 5 = BORG CAMERA
+ if(wires.is_cut(WIRE_BORG_CAMERA)) // 5 = BORG CAMERA
camera.status = 0
if(mmi == null)
@@ -172,18 +170,20 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
scanner = new(src)
scanner.Grant(src)
-/mob/living/silicon/robot/proc/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
+/mob/living/silicon/robot/proc/init(alien, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
make_laws()
additional_law_channels["Binary"] = ":b "
+ if(!connect_to_AI)
+ return
var/found_ai = ai_to_sync_to
if(!found_ai)
found_ai = select_active_ai_with_fewest_borgs()
if(found_ai)
- lawupdate = 1
+ lawupdate = TRUE
connect_to_ai(found_ai)
else
- lawupdate = 0
+ lawupdate = FALSE
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
@@ -270,6 +270,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
//Improved /N
/mob/living/silicon/robot/Destroy()
+ SStgui.close_uis(wires)
if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) mmi.loc = T
@@ -543,6 +544,43 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
src.verbs -= GLOB.robot_verbs_default
src.verbs -= silicon_subsystems
+/mob/living/silicon/robot/verb/cmd_robot_alerts()
+ set category = "Robot Commands"
+ set name = "Show Alerts"
+ if(usr.stat == DEAD)
+ to_chat(src, "Alert: You are dead.")
+ return //won't work if dead
+ robot_alerts()
+
+/mob/living/silicon/robot/proc/robot_alerts()
+ var/list/dat = list()
+ var/list/list/temp_alarm_list = SSalarm.alarms.Copy()
+ for(var/cat in temp_alarm_list)
+ if(!(cat in alarms_listend_for))
+ continue
+ dat += text("[cat] \n")
+ var/list/list/L = temp_alarm_list[cat].Copy()
+ for(var/alarm in L)
+ var/list/list/alm = L[alarm].Copy()
+ var/list/list/sources = alm[3].Copy()
+ var/area_name = alm[1]
+ for(var/thing in sources)
+ var/atom/A = locateUID(thing)
+ if(A && A.z != z)
+ L -= alarm
+ continue
+ dat += ""
+ dat += text("-- [area_name]")
+ dat += " \n"
+ if(!L.len)
+ dat += "-- All Systems Nominal \n"
+ dat += " \n"
+
+ var/datum/browser/alerts = new(usr, "robotalerts", "Current Station Alerts", 400, 410)
+ var/dat_text = dat.Join("")
+ alerts.set_content(dat_text)
+ alerts.open()
+
/mob/living/silicon/robot/proc/ionpulse()
if(!ionpulse_on)
return
@@ -604,6 +642,23 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
/mob/living/silicon/robot/InCritical()
return low_power_mode
+/mob/living/silicon/robot/alarm_triggered(src, class, area/A, list/O, obj/alarmsource)
+ if(!(class in alarms_listend_for))
+ return
+ if(alarmsource.z != z)
+ return
+ if(stat == DEAD)
+ return
+ queueAlarm(text("--- [class] alarm detected in [A.name]!"), class)
+
+/mob/living/silicon/robot/alarm_cancelled(src, class, area/A, obj/origin, cleared)
+ if(cleared)
+ if(!(class in alarms_listend_for))
+ return
+ if(origin.z != z)
+ return
+ queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0)
+
/mob/living/silicon/robot/ex_act(severity)
switch(severity)
if(1.0)
@@ -795,7 +850,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
opened = FALSE
update_icons()
return
- else if(wiresexposed && wires.IsAllCut())
+ else if(wiresexposed && wires.is_all_cut())
//Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob.
if(!mmi)
to_chat(user, "[src] has no brain to remove.")
@@ -1023,10 +1078,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
src << browse(null, t1)
return 1
- if(href_list["showalerts"])
- subsystem_alarm_monitor()
- return 1
-
if(href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
if(istype(O) && (O.loc == src))
@@ -1041,6 +1092,11 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
activate_module(O)
installed_modules()
+ //Show alerts window if user clicked on "Show alerts" in chat
+ if(href_list["showalerts"])
+ robot_alerts()
+ return TRUE
+
if(href_list["deact"])
var/obj/item/O = locate(href_list["deact"])
if(activated(O))
@@ -1233,7 +1289,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
/mob/living/silicon/robot/proc/SetLockdown(var/state = 1)
// They stay locked down if their wire is cut.
- if(wires.LockedCut())
+ if(wires.is_cut(WIRE_BORG_LOCKED))
state = 1
if(state)
throw_alert("locked", /obj/screen/alert/locked)
@@ -1343,14 +1399,13 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
ear_protection = 1 // Immunity to the audio part of flashbangs
damage_protection = 10 // Reduce all incoming damage by this number
- xeno_disarm_chance = 20
allow_rename = FALSE
modtype = "Commando"
faction = list("nanotrasen")
is_emaggable = FALSE
default_cell_type = /obj/item/stock_parts/cell/bluespace
-/mob/living/silicon/robot/deathsquad/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
+/mob/living/silicon/robot/deathsquad/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
laws = new /datum/ai_laws/deathsquad
module = new /obj/item/robot_module/deathsquad(src)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
@@ -1380,7 +1435,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/eprefix = "Amber"
-/mob/living/silicon/robot/ert/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
+/mob/living/silicon/robot/ert/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
laws = new /datum/ai_laws/ert_override
radio = new /obj/item/radio/borg/ert(src)
radio.recalculateChannels()
@@ -1413,7 +1468,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
damage_protection = 5 // Reduce all incoming damage by this number
eprefix = "Gamma"
magpulse = 1
- xeno_disarm_chance = 40
/mob/living/silicon/robot/destroyer
@@ -1433,11 +1487,12 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
ear_protection = 1 // Immunity to the audio part of flashbangs
emp_protection = TRUE // Immunity to EMP, due to heavy shielding
damage_protection = 20 // Reduce all incoming damage by this number. Very high in the case of /destroyer borgs, since it is an admin-only borg.
- xeno_disarm_chance = 10
default_cell_type = /obj/item/stock_parts/cell/bluespace
-/mob/living/silicon/robot/destroyer/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
- ..()
+/mob/living/silicon/robot/destroyer/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
+ aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
+ additional_law_channels["Binary"] = ":b "
+ laws = new /datum/ai_laws/deathsquad
module = new /obj/item/robot_module/destroyer(src)
module.add_languages(src)
module.add_subsystems_and_actions(src)
@@ -1446,6 +1501,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
qdel(radio)
radio = new /obj/item/radio/borg/ert/specops(src)
radio.recalculateChannels()
+ playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/destroyer/borg_icons()
if(base_icon == "")
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index 8445a399582..84eb782833b 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -2,19 +2,17 @@
if(M.a_intent == INTENT_DISARM)
if(!lying)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
- if(prob(xeno_disarm_chance))
- Stun(7)
- step(src, get_dir(M,src))
- spawn(5)
- step(src, get_dir(M,src))
- add_attack_logs(M, src, "Alien pushed over")
- playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
- visible_message("[M] has forced back [src]!",\
- "[M] has forced back [src]!")
+ var/obj/item/I = get_active_hand()
+ if(I)
+ uneq_active()
+ visible_message("[M] disarmed [src]!", "[M] has disabled [src]'s active module!")
+ add_attack_logs(M, src, "alien disarmed")
else
- playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
- visible_message("[M] took a swipe at [src]!",\
- "[M] took a swipe at [src]!")
+ Stun(2)
+ step(src, get_dir(M,src))
+ add_attack_logs(M, src, "Alien pushed over")
+ visible_message("[M] forces back [src]!", "[M] forces back [src]!")
+ playsound(loc, 'sound/weapons/pierce.ogg', 50, TRUE, -1)
else
..()
return
diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm
index 8e8c67693c5..ff967354131 100644
--- a/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -114,7 +114,7 @@
/obj/item/robot_module/proc/handle_custom_removal(component_id, mob/living/user, obj/item/W)
return FALSE
-/obj/item/robot_module/proc/handle_death(gibbed)
+/obj/item/robot_module/proc/handle_death(mob/living/silicon/robot/R, gibbed)
return
/obj/item/robot_module/standard
@@ -255,7 +255,7 @@
fix_modules()
-/obj/item/robot_module/engineering/handle_death()
+/obj/item/robot_module/engineering/handle_death(mob/living/silicon/robot/R, gibbed)
var/obj/item/gripper/G = locate(/obj/item/gripper) in modules
if(G)
G.drop_gripped_item(silent = TRUE)
@@ -368,6 +368,11 @@
R.add_language("Clownish",1)
R.add_language("Neo-Russkiya", 1)
+/obj/item/robot_module/butler/handle_death(mob/living/silicon/robot/R, gibbed)
+ var/obj/item/storage/bag/tray/cyborg/T = locate(/obj/item/storage/bag/tray/cyborg) in modules
+ if(istype(T))
+ T.drop_inventory(R)
+
/obj/item/robot_module/miner
name = "miner robot module"
@@ -623,7 +628,7 @@
..()
-/obj/item/robot_module/drone/handle_death()
+/obj/item/robot_module/drone/handle_death(mob/living/silicon/robot/R, gibbed)
var/obj/item/gripper/G = locate(/obj/item/gripper) in modules
if(G)
G.drop_gripped_item(silent = TRUE)
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index c923e0912b7..7f9c0849d9c 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -11,9 +11,11 @@
var/list/stating_laws = list()// Channels laws are currently being stated on
var/list/alarms_to_show = list()
var/list/alarms_to_clear = list()
+ var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
+ var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
+ var/list/alarms_listend_for = list("Motion", "Fire", "Atmosphere", "Power", "Camera")
//var/list/hud_list[10]
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
- var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
var/designation = ""
var/obj/item/camera/siliconcam/aiCamera = null //photography
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
@@ -25,9 +27,6 @@
//var/sensor_mode = 0 //Determines the current HUD.
- var/next_alarm_notice
- var/list/datum/alarm/queued_alarms = new()
-
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD)
@@ -46,6 +45,8 @@
diag_hud_set_health()
add_language("Galactic Common")
init_subsystems()
+ RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered)
+ RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled)
/mob/living/silicon/med_hud_set_health()
return //we use a different hud
@@ -55,10 +56,93 @@
/mob/living/silicon/Destroy()
GLOB.silicon_mob_list -= src
- for(var/datum/alarm_handler/AH in alarm_handlers)
- AH.unregister(src)
return ..()
+/mob/living/silicon/proc/alarm_triggered(src, class, area/A, list/O, obj/alarmsource)
+ return
+
+/mob/living/silicon/proc/alarm_cancelled(src, class, area/A, obj/origin, cleared)
+ return
+
+/mob/living/silicon/proc/queueAlarm(message, type, incoming = TRUE)
+ var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0)
+ if(incoming)
+ alarms_to_show += message
+ alarm_types_show[type] += 1
+ else
+ alarms_to_clear += message
+ alarm_types_clear[type] += 1
+
+ if(in_cooldown)
+ return
+
+ addtimer(CALLBACK(src, .proc/show_alarms), 3 SECONDS)
+
+/mob/living/silicon/proc/show_alarms()
+ if(alarms_to_show.len < 5)
+ for(var/msg in alarms_to_show)
+ to_chat(src, msg)
+ else if(length(alarms_to_show))
+
+ var/list/msg = list("--- ")
+
+ if(alarm_types_show["Burglar"])
+ msg += "BURGLAR: [alarm_types_show["Burglar"]] alarms detected. - "
+
+ if(alarm_types_show["Motion"])
+ msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - "
+
+ if(alarm_types_show["Fire"])
+ msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - "
+
+ if(alarm_types_show["Atmosphere"])
+ msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - "
+
+ if(alarm_types_show["Power"])
+ msg += "POWER: [alarm_types_show["Power"]] alarms detected. - "
+
+ if(alarm_types_show["Camera"])
+ msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
+
+ msg += "\[Show Alerts\]"
+ var/msg_text = msg.Join("")
+ to_chat(src, msg_text)
+
+ if(alarms_to_clear.len < 3)
+ for(var/msg in alarms_to_clear)
+ to_chat(src, msg)
+
+ else if(alarms_to_clear.len)
+ var/list/msg = list("--- ")
+
+ if(alarm_types_clear["Motion"])
+ msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - "
+
+ if(alarm_types_clear["Fire"])
+ msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - "
+
+ if(alarm_types_clear["Atmosphere"])
+ msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - "
+
+ if(alarm_types_clear["Power"])
+ msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - "
+
+ if(alarm_types_show["Camera"])
+ msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
+
+ msg += "\[Show Alerts\]"
+
+ var/msg_text = msg.Join("")
+ to_chat(src, msg_text)
+
+
+ alarms_to_show.Cut()
+ alarms_to_clear.Cut()
+ for(var/key in alarm_types_show)
+ alarm_types_show[key] = 0
+ for(var/key in alarm_types_clear)
+ alarm_types_clear[key] = 0
+
/mob/living/silicon/rename_character(oldname, newname)
// we actually don't want it changing minds and stuff
if(!newname)
@@ -283,63 +367,6 @@
if("Disable")
to_chat(src, "Sensor augmentations disabled.")
-/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
- if(!next_alarm_notice)
- next_alarm_notice = world.time + 10 SECONDS
-
- var/list/alarms = queued_alarms[alarm_handler]
- if(was_raised)
- // Raised alarms are always set
- alarms[alarm] = 1
- else
- // Alarms that were raised but then cleared before the next notice are instead removed
- if(alarm in alarms)
- alarms -= alarm
- // And alarms that have only been cleared thus far are set as such
- else
- alarms[alarm] = -1
-
-/mob/living/silicon/proc/process_queued_alarms()
- if(next_alarm_notice && (world.time > next_alarm_notice))
- next_alarm_notice = 0
-
- var/alarm_raised = 0
- for(var/datum/alarm_handler/AH in queued_alarms)
- var/list/alarms = queued_alarms[AH]
- var/reported = 0
- for(var/datum/alarm/A in alarms)
- if(alarms[A] == 1)
- if(!reported)
- reported = 1
- to_chat(src, "--- [AH.category] Detected ---")
- raised_alarm(A)
-
- for(var/datum/alarm_handler/AH in queued_alarms)
- var/list/alarms = queued_alarms[AH]
- var/reported = 0
- for(var/datum/alarm/A in alarms)
- if(alarms[A] == -1)
- if(!reported)
- reported = 1
- to_chat(src, "--- [AH.category] Cleared ---")
- to_chat(src, "\The [A.alarm_name()].")
-
- if(alarm_raised)
- to_chat(src, "\[Show Alerts\]")
-
- for(var/datum/alarm_handler/AH in queued_alarms)
- var/list/alarms = queued_alarms[AH]
- alarms.Cut()
-
-/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A)
- to_chat(src, "[A.alarm_name()]!")
-
-/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A)
- var/cameratext = ""
- for(var/obj/machinery/camera/C in A.cameras())
- cameratext += "[(cameratext == "")? "" : "|"][C.c_tag]"
- to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
-
/mob/living/silicon/adjustToxLoss(var/amount)
return STATUS_UPDATE_NONE
diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm
index e720400abd5..6ac5f8cded2 100644
--- a/code/modules/mob/living/silicon/silicon_defense.dm
+++ b/code/modules/mob/living/silicon/silicon_defense.dm
@@ -3,11 +3,10 @@
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent
- var/damage = rand(10, 20)
+ var/damage = 20
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- visible_message("[M] has slashed at [src]!", \
- "[M] has slashed at [src]!")
+ visible_message("[M] has slashed at [src]!", "[M] has slashed at [src]!")
if(prob(8))
flash_eyes(affect_silicon = 1)
add_attack_logs(M, src, "Alien attacked")
@@ -64,6 +63,6 @@
else
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/effects/bang.ogg', 10, 1)
- visible_message("[M] punches [src], but doesn't leave a dent.", \
- "[M] punches [src], but doesn't leave a dent.!")
+ visible_message("[M] punches [src], but doesn't leave a dent.", \
+ "[M] punches [src], but doesn't leave a dent.")
return FALSE
diff --git a/code/modules/mob/living/silicon/subsystems.dm b/code/modules/mob/living/silicon/subsystems.dm
index d18d41a40cf..65a92d07008 100644
--- a/code/modules/mob/living/silicon/subsystems.dm
+++ b/code/modules/mob/living/silicon/subsystems.dm
@@ -8,13 +8,11 @@
/mob/living/silicon
var/list/silicon_subsystems = list(
- /mob/living/silicon/proc/subsystem_alarm_monitor,
/mob/living/silicon/proc/subsystem_law_manager
)
/mob/living/silicon/ai
silicon_subsystems = list(
- /mob/living/silicon/proc/subsystem_alarm_monitor,
/mob/living/silicon/proc/subsystem_atmos_control,
/mob/living/silicon/proc/subsystem_crew_monitor,
/mob/living/silicon/proc/subsystem_law_manager,
@@ -23,7 +21,6 @@
/mob/living/silicon/robot/drone
silicon_subsystems = list(
- /mob/living/silicon/proc/subsystem_alarm_monitor,
/mob/living/silicon/proc/subsystem_law_manager,
/mob/living/silicon/proc/subsystem_power_monitor
)
@@ -32,30 +29,11 @@
register_alarms = 0
/mob/living/silicon/proc/init_subsystems()
- alarm_monitor = new(src)
atmos_control = new(src)
crew_monitor = new(src)
law_manager = new(src)
power_monitor = new(src)
- if(!register_alarms)
- return
-
- var/list/register_to = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
- for(var/datum/alarm_handler/AH in register_to)
- AH.register(src, /mob/living/silicon/proc/receive_alarm)
- queued_alarms[AH] = list() // Makes sure alarms remain listed in consistent order
- alarm_handlers |= AH
-
-/********************
-* Alarm Monitor *
-********************/
-/mob/living/silicon/proc/subsystem_alarm_monitor()
- set name = "Alarm Monitor"
- set category = "Subsystems"
-
- alarm_monitor.ui_interact(usr, state = GLOB.self_state)
-
/********************
* Atmos Control *
********************/
diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm
index b42f3275997..28fff50a124 100644
--- a/code/modules/mob/living/simple_animal/animal_defense.dm
+++ b/code/modules/mob/living/simple_animal/animal_defense.dm
@@ -42,13 +42,18 @@
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
- var/damage = rand(15, 30)
- visible_message("[M] has slashed at [src]!", \
- "[M] has slashed at [src]!")
- playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
- add_attack_logs(M, src, "Alien attacked")
- attack_threshold_check(damage)
- return
+ if(M.a_intent == INTENT_DISARM)
+ playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
+ visible_message("[M] [response_disarm] [name]!", "[M] [response_disarm] you!")
+ add_attack_logs(M, src, "Alien disarmed")
+ else
+ var/damage = rand(15, 30)
+ visible_message("[M] has slashed at [src]!", \
+ "[M] has slashed at [src]!")
+ playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
+ add_attack_logs(M, src, "Alien attacked")
+ attack_threshold_check(damage)
+ return TRUE
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
if(..()) //successful larva bite
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index f1278918898..dbd8ae6033a 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -66,6 +66,7 @@
RegisterSignal(src, COMSIG_CROSSED_MOVABLE, .proc/human_squish_check)
/mob/living/simple_animal/bot/mulebot/Destroy()
+ SStgui.close_uis(wires)
unload(0)
QDEL_NULL(wires)
QDEL_NULL(cell)
@@ -142,7 +143,7 @@
if(open)
icon_state="mulebot-hatch"
else
- icon_state = "mulebot[!wires.MobAvoid()]"
+ icon_state = "mulebot[wires.is_cut(WIRE_MOB_AVOIDANCE)]"
overlays.Cut()
if(load && !ismob(load))//buckling handles the mob offsets
load.pixel_y = initial(load.pixel_y) + 9
@@ -158,9 +159,9 @@
qdel(src)
if(2)
for(var/i = 1; i < 3; i++)
- wires.RandomCut()
+ wires.cut_random()
if(3)
- wires.RandomCut()
+ wires.cut_random()
return
/mob/living/simple_animal/bot/mulebot/bullet_act(obj/item/projectile/Proj)
@@ -169,7 +170,7 @@
unload(0)
if(prob(25))
visible_message("Something shorts out inside [src]!")
- wires.RandomCut()
+ wires.cut_random()
/mob/living/simple_animal/bot/mulebot/Topic(href, list/href_list)
if(..())
@@ -318,7 +319,7 @@
// returns true if the bot has power
/mob/living/simple_animal/bot/mulebot/proc/has_power()
- return !open && cell && cell.charge > 0 && wires.HasPower()
+ return !open && cell && cell.charge > 0 && !wires.is_cut(WIRE_MAIN_POWER1) && !wires.is_cut(WIRE_MAIN_POWER2)
/mob/living/simple_animal/bot/mulebot/proc/buzz(type)
switch(type)
@@ -362,7 +363,7 @@
if(istype(AM,/obj/structure/closet/crate))
CRATE = AM
else
- if(wires.LoadCheck())
+ if(!wires.is_cut(WIRE_LOADCHECK))
buzz(SIGH)
return // if not hacked, only allow crates to be loaded
@@ -459,8 +460,7 @@
on = 0
return
if(on)
- var/speed = (wires.Motor1() ? 1 : 0) + (wires.Motor2() ? 2 : 0)
-// to_chat(world, "speed: [speed]")
+ var/speed = (wires.is_cut(WIRE_MOTOR1) ? 1 : 0) + (wires.is_cut(WIRE_MOTOR2) ? 2 : 0)
var/num_steps = 0
switch(speed)
if(0)
@@ -624,7 +624,7 @@
// not loaded
if(auto_pickup) // find a crate
var/atom/movable/AM
- if(wires.LoadCheck()) // if hacked, load first unanchored thing we find
+ if(wires.is_cut(WIRE_LOADCHECK)) // if hacked, load first unanchored thing we find
for(var/atom/movable/A in get_step(loc, loaddir))
if(!A.anchored)
AM = A
@@ -672,7 +672,7 @@
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
- if(!wires.MobAvoid()) // usually just bumps, but if avoidance disabled knock over mobs
+ if(wires.is_cut(WIRE_MOB_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs
var/mob/M = obs
if(ismob(M))
if(istype(M,/mob/living/silicon/robot))
@@ -736,8 +736,8 @@
..()
/mob/living/simple_animal/bot/mulebot/receive_signal(datum/signal/signal)
- if(!wires.RemoteRX() || ..())
- return 1
+ if(wires.is_cut(WIRE_REMOTE_RX) || ..())
+ return TRUE
var/recv = signal.data["command"]
@@ -772,7 +772,7 @@
// send a radio signal with multiple data key/values
/mob/living/simple_animal/bot/mulebot/post_signal_multiple(var/freq, var/list/keyval)
- if(!wires.RemoteTX())
+ if(wires.is_cut(WIRE_REMOTE_TX))
return
..()
@@ -803,7 +803,7 @@
//Update navigation data. Called when commanded to deliver, return home, or a route update is needed...
/mob/living/simple_animal/bot/mulebot/proc/get_nav()
- if(!on || !wires.BeaconRX())
+ if(!on || wires.is_cut(WIRE_BEACON_RX))
return
for(var/obj/machinery/navbeacon/NB in GLOB.deliverybeacons)
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index f150005116e..4c2c2332924 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -17,7 +17,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
faction = list("cult")
- flying = 1
+ flying = TRUE
pressure_resistance = 100
universal_speak = 1
AIStatus = AI_OFF //normal constructs don't have AI
diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm
index 9aaffc6ef8f..ebf068ff130 100644
--- a/code/modules/mob/living/simple_animal/friendly/butterfly.dm
+++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm
@@ -15,6 +15,7 @@
harm_intent_damage = 1
friendly = "nudges"
density = 0
+ flying = TRUE
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = 2
mob_size = MOB_SIZE_TINY
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 24818d07652..f44244b7eae 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -123,6 +123,7 @@
for(var/mob/living/simple_animal/mouse/M in view(1, src))
if(!M.stat && Adjacent(M))
custom_emote(1, "splats \the [M]!")
+ M.death()
M.splat()
movement_target = null
stop_automated_movement = 0
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index ea8e949f1c7..58e3ad54089 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -126,6 +126,7 @@
gold_core_spawnable = FRIENDLY_SPAWN
blood_volume = BLOOD_VOLUME_NORMAL
var/obj/item/udder/udder = null
+ gender = FEMALE
/mob/living/simple_animal/cow/Initialize()
udder = new()
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 152e2494132..be3f985db2e 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -80,22 +80,16 @@
icon_resting = "mouse_[mouse_color]_sleep"
desc = "It's a small [mouse_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
-/mob/living/simple_animal/mouse/proc/splat()
- src.health = 0
- src.stat = DEAD
- src.icon_dead = "mouse_[mouse_color]_splat"
- src.icon_state = "mouse_[mouse_color]_splat"
- layer = MOB_LAYER
- if(client)
- client.time_died_as_mouse = world.time
-
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == INTENT_HELP)
get_scooped(M)
..()
-/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
- to_chat(src, "You are too small to pull anything.")
+/mob/living/simple_animal/mouse/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)//Prevents mouse from pulling things
+ if(istype(AM, /obj/item/reagent_containers/food/snacks/cheesewedge))
+ return ..() // Get dem
+ if(show_message)
+ to_chat(src, "You are too small to pull anything except cheese.")
return
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj, oldloc)
@@ -110,6 +104,10 @@
desc = "It's toast."
death()
+/mob/living/simple_animal/mouse/proc/splat()
+ icon_dead = "mouse_[mouse_color]_splat"
+ icon_state = "mouse_[mouse_color]_splat"
+
/mob/living/simple_animal/mouse/death(gibbed)
// Only execute the below if we successfully died
playsound(src, squeak_sound, 40, 1)
diff --git a/code/modules/mob/living/simple_animal/hostile/bat.dm b/code/modules/mob/living/simple_animal/hostile/bat.dm
index be04fc217e9..b47b0eb1f23 100644
--- a/code/modules/mob/living/simple_animal/hostile/bat.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bat.dm
@@ -16,6 +16,7 @@
maxHealth = 20
health = 20
mob_size = MOB_SIZE_TINY
+ flying = TRUE
harm_intent_damage = 8
melee_damage_lower = 10
melee_damage_upper = 10
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index 3276416fe7f..3419279ffe5 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -95,6 +95,10 @@
for(var/mob/A in searched_for)
. += A
+// All bee sprites are made up of overlays. They do not have any special sprite overlays for items placed on them, such as collars, so this proc is unneeded.
+/mob/living/simple_animal/hostile/poison/bees/regenerate_icons()
+ return
+
/mob/living/simple_animal/hostile/poison/bees/proc/generate_bee_visuals()
overlays.Cut()
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index b8c72d7cf84..2f97001d3ae 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -241,6 +241,14 @@ Difficulty: Very Hard
AT.pixel_y += random_y
return ..()
+/mob/living/simple_animal/hostile/megafauna/colossus/float(on) //we don't want this guy to float, messes up his animations
+ if(throwing)
+ return
+ if(on && !floating)
+ floating = TRUE
+ else if(!on && floating)
+ floating = FALSE
+
/obj/item/projectile/colossus
name ="death bolt"
icon_state= "chronobolt"
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm
index f44e6c1f88a..ca6987d735c 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm
@@ -26,21 +26,34 @@
flying = 1
var/carp_color = "carp" //holder for icon set
- var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple")
+ var/static/list/carp_colors = list(\
+ "lightpurple" = "#c3b9f1", \
+ "lightpink" = "#da77a8", \
+ "green" = "#70ff25", \
+ "grape" = "#df0afb", \
+ "swamp" = "#e5e75a", \
+ "turquoise" = "#04e1ed", \
+ "brown" = "#ca805a", \
+ "teal" = "#20e28e", \
+ "lightblue" = "#4d88cc", \
+ "rusty" = "#dd5f34", \
+ "beige" = "#bbaeaf", \
+ "yellow" = "#f3ca4a", \
+ "blue" = "#09bae1", \
+ "palegreen" = "#7ef099", \
+ )
/mob/living/simple_animal/hostile/retaliate/carp/Initialize(mapload)
. = ..()
carp_randomify()
update_icons()
-/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify()
- if(prob(1))
- carp_color = pick("white", "black")
- else
- carp_color = pick(icon_sets)
- icon_state = "[carp_color]"
- icon_living = "[carp_color]"
- icon_dead = "[carp_color]_dead"
+/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify(rarechance)
+ // Simplified version of: /mob/living/simple_animal/hostile/carp/proc/carp_randomify(rarechance)
+ var/our_color
+ our_color = pick(carp_colors)
+ add_atom_colour(carp_colors[our_color], FIXED_COLOUR_PRIORITY)
+ regenerate_icons()
/mob/living/simple_animal/hostile/retaliate/carp/koi
name = "space koi"
@@ -61,13 +74,15 @@
maxbodytemp = 1500
gold_core_spawnable = HOSTILE_SPAWN
+ var/randomize_icon = TRUE
/mob/living/simple_animal/hostile/retaliate/carp/koi/Initialize(mapload)
. = ..()
- var/koinum = rand(1, 4)
- icon_state = "koi[koinum]"
- icon_living = "koi[koinum]"
- icon_dead = "koi[koinum]-dead"
+ if(randomize_icon)
+ var/koinum = rand(1, 4)
+ icon_state = "koi[koinum]"
+ icon_living = "koi[koinum]"
+ icon_dead = "koi[koinum]-dead"
/mob/living/simple_animal/hostile/retaliate/carp/koi/Process_Spacemove(var/movement_dir)
return TRUE
@@ -76,3 +91,4 @@
icon_state = "koi5"
icon_living = "koi5"
icon_dead = "koi5-dead"
+ randomize_icon = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
index a3e32e9d35e..5d946662854 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
@@ -46,6 +46,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
+ flying = TRUE
pressure_resistance = 300
gold_core_spawnable = NO_SPAWN //too spooky for science
faction = list("undead") // did I mention ghost
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index decfc7146cf..f992bb3cc10 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -362,7 +362,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_size = MOB_SIZE_TINY
- flying = 1
+ flying = TRUE
bubble_icon = "syndibot"
gold_core_spawnable = HOSTILE_SPAWN
del_on_death = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm
index e7daced65ff..1946f1a32ee 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm
@@ -51,6 +51,10 @@
if(!(eggtype in eggtypes))
to_chat(src, "Unrecognized egg type.")
return 0
+ if(fed < feedings_to_lay)
+ // We have to check this again after the popup, to account for people spam-clicking the button, then doing all the popups at once.
+ to_chat(src, "You must wrap more humanoid prey before you can do this!")
+ return
visible_message("[src] lays a cluster of eggs.")
if(eggtype == TS_DESC_RED)
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 1)
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
index 047219a151b..6f33c51b246 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
@@ -15,7 +15,7 @@
ai_target_method = TS_DAMAGE_SIMPLE
icon_state = "terror_princess1"
icon_living = "terror_princess1"
- icon_dead = "terror_princess_dead1"
+ icon_dead = "terror_princess1_dead"
maxHealth = 150
health = 150
regen_points_per_hp = 1 // always regens very fast
@@ -51,7 +51,7 @@
if(fed == 0)
icon_state = "terror_princess1"
icon_living = "terror_princess1"
- icon_dead = "terror_princess_dead1"
+ icon_dead = "terror_princess1_dead"
desc = "An enormous spider. It looks strangely cute and fluffy, with soft pink fur covering most of its body."
else if(fed == 1)
icon_state = "terror_princess2"
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
index 7e36b411bae..907e46b523e 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
@@ -47,7 +47,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/purple/Life(seconds, times_fired)
. = ..()
- if(.) // if mob is NOT dead
+ if(stat != DEAD) // Can't use if(.) for this due to the fact it can sometimes return FALSE even when mob is alive.
if(!degenerate && spider_myqueen)
if(dcheck_counter >= 10)
dcheck_counter = 0
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
index bf3c98bb86a..737b6eba22a 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
@@ -66,7 +66,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/Life(seconds, times_fired)
. = ..()
- if(.) // if mob is NOT dead
+ if(stat != DEAD) // Can't use if(.) for this due to the fact it can sometimes return FALSE even when mob is alive.
if(ckey && canlay < 12 && hasnested) // max 12 eggs worth stored at any one time, realistically that's tons.
if(world.time > (spider_lastspawn + spider_spawnfrequency))
if(eggslaid >= 20)
@@ -287,6 +287,10 @@
if(eggtype == null || numlings == null)
to_chat(src, "Cancelled.")
return
+ if(canlay < numlings)
+ // We have to check this again after the popups, to account for people spam-clicking the button, then doing all the popups at once.
+ to_chat(src, "Too soon to do this again!")
+ return
canlay -= numlings
eggslaid += numlings
if(eggtype == TS_DESC_RED)
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
index 520143d71d0..ab36c6ca313 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
@@ -298,7 +298,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list)
/mob/living/simple_animal/hostile/poison/terror_spider/Life(seconds, times_fired)
. = ..()
- if(!.) // if mob is dead
+ if(stat == DEAD) // Can't use if(.) for this due to the fact it can sometimes return FALSE even when mob is alive.
if(prob(2))
// 2% chance every cycle to decompose
visible_message("\The dead body of the [src] decomposes!")
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 41786017ea2..8d6db8ade3c 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -86,6 +86,7 @@
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
var/obj/item/held_item = null
+ flying = TRUE
gold_core_spawnable = FRIENDLY_SPAWN
@@ -710,7 +711,7 @@
ears.talk_into(src, message_pieces, message_mode, verb)
used_radios += ears
-/mob/living/simple_animal/parrot/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency)
+/mob/living/simple_animal/parrot/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE)
if(speaker != src && prob(50))
parrot_hear(html_decode(multilingual_to_message(message_pieces)))
..()
diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm
index c3cb61d5970..729790d098c 100644
--- a/code/modules/mob/living/simple_animal/posessed_object.dm
+++ b/code/modules/mob/living/simple_animal/posessed_object.dm
@@ -32,8 +32,9 @@
animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled.
-/mob/living/simple_animal/possessed_object/start_pulling(var/atom/movable/AM) // Silly motherfuckers think they can pull things.
- to_chat(src, "You are unable to pull [AM]!")
+/mob/living/simple_animal/possessed_object/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) // Silly motherfuckers think they can pull things.
+ if(show_message)
+ to_chat(src, "You are unable to pull [AM]!")
/mob/living/simple_animal/possessed_object/ghost() // Ghosting will return the object to normal, and will not disqualify the ghoster from various mid-round antag positions.
diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm
index 663838d3a45..1e3c723b278 100644
--- a/code/modules/mob/living/simple_animal/shade.dm
+++ b/code/modules/mob/living/simple_animal/shade.dm
@@ -24,6 +24,7 @@
status_flags = 0
faction = list("cult")
status_flags = CANPUSH
+ flying = TRUE
loot = list(/obj/item/reagent_containers/food/snacks/ectoplasm)
del_on_death = 1
deathmessage = "lets out a contented sigh as their form unwinds."
diff --git a/code/modules/mob/living/simple_animal/slime/say.dm b/code/modules/mob/living/simple_animal/slime/say.dm
index 74241dc676c..8679d64a699 100644
--- a/code/modules/mob/living/simple_animal/slime/say.dm
+++ b/code/modules/mob/living/simple_animal/slime/say.dm
@@ -9,7 +9,7 @@
return verb
-/mob/living/simple_animal/slime/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency)
+/mob/living/simple_animal/slime/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE)
if(speaker != src && !stat)
if(speaker in Friends)
speech_buffer = list()
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 15f483bef76..1b67b53119a 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -265,7 +265,7 @@
/mob/living/simple_animal/slime/unEquip(obj/item/I, force)
return
-/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
+/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
return
/mob/living/simple_animal/slime/attack_ui(slot)
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 7cd2b4414f7..ce266ba5b8f 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -141,18 +141,6 @@
if(updating && val_change)
update_canmove()
-/mob/living/proc/StartFlying()
- var/val_change = !flying
- flying = TRUE
- if(val_change)
- update_animations()
-
-/mob/living/proc/StopFlying()
- var/val_change = !!flying
- flying = FALSE
- if(val_change)
- update_animations()
-
// SCALAR STATUS EFFECTS
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index 5345bda5b94..c222f76eadb 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -28,6 +28,7 @@
/mob/Login()
GLOB.player_list |= src
+ last_known_ckey = ckey
update_Login_details()
world.update_status()
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 3b86faeb7e6..848606be3ec 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -19,7 +19,6 @@
for(var/datum/alternate_appearance/AA in viewing_alternate_appearances)
AA.viewers -= src
viewing_alternate_appearances = null
- logs.Cut()
LAssailant = null
return ..()
@@ -578,6 +577,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
changeNext_move(CLICK_CD_POINT)
var/obj/P = new /obj/effect/temp_visual/point(tile)
P.invisibility = invisibility
+ P.pixel_x = A.pixel_x
+ P.pixel_y = A.pixel_y
return 1
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
@@ -880,6 +881,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return
if(!Adjacent(usr))
return
+ if(IsFrozen(src) && !is_admin(usr))
+ to_chat(usr, "Interacting with admin-frozen players is not permitted.")
+ return
if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src))
return
show_inv(usr)
@@ -1235,10 +1239,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
create_log_in_list(debug_log, text, collapse, world.timeofday)
/mob/proc/create_log(log_type, what, target = null, turf/where = get_turf(src))
- LAZYINITLIST(logs[log_type])
- var/list/log_list = logs[log_type]
+ if(!ckey)
+ return
+ var/real_ckey = ckey
+ if(ckey[1] == "@") // Admin aghosting will do this
+ real_ckey = copytext(ckey, 2)
var/datum/log_record/record = new(log_type, src, what, target, where, world.time)
- log_list.Add(record)
+ GLOB.logging.add_log(real_ckey, record)
/proc/create_log_in_list(list/target, text, collapse = TRUE, last_log)//forgive me code gods for this shitcode proc
//this proc enables lovely stuff like an attack log that looks like this: "[18:20:29-18:20:45]21x John Smith attacked Andrew Jackson with a crowbar."
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 1477be47d89..80404460b50 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -36,7 +36,7 @@
var/list/attack_log_old = list( )
var/list/debug_log = null
- var/list/logs = list() // Logs for each log type defined in __DEFINES/logs.dm
+ var/last_known_ckey = null // Used in logging
var/last_log = 0
var/obj/machinery/machine = null
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 5fb5bcb06c8..ff01fbe5cc9 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -113,7 +113,7 @@
var/question = "Do you want to play as [M.real_name ? M.real_name : M.name][M.job ? " ([M.job])" : ""]"
if(alert("Do you want to show the antag status?","Show antag status","Yes","No") == "Yes")
question += ", [M.mind?.special_role ? M.mind?.special_role : "No special role"]"
- var/list/mob/dead/observer/candidates = pollCandidates("[question]?", poll_time = 100, min_hours = minhours)
+ var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("[question]?", poll_time = 10 SECONDS, min_hours = minhours, source = M)
var/mob/dead/observer/theghost = null
if(LAZYLEN(candidates))
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 4797c685fe1..0325d13faf0 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -369,8 +369,9 @@
step(pulling, get_dir(pulling.loc, A))
return
-/mob/proc/update_gravity()
+/mob/proc/update_gravity(has_gravity)
return
+
/client/proc/check_has_body_select()
return mob && mob.hud_used && mob.hud_used.zone_select && istype(mob.hud_used.zone_select, /obj/screen/zone_sel)
diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm
index 0417e28f546..7a26de718b6 100644
--- a/code/modules/mob/say.dm
+++ b/code/modules/mob/say.dm
@@ -44,17 +44,27 @@
usr.emote(message)
-/mob/proc/say_dead(var/message)
- if(!(client && client.holder))
- if(!config.dsay_allowed)
- to_chat(src, "Deadchat is globally muted.")
+/mob/proc/say_dead(message)
+ if(client)
+ if(!client.holder)
+ if(!config.dsay_allowed)
+ to_chat(src, "Deadchat is globally muted.")
+ return
+
+ if(client.prefs.muted & MUTE_DEADCHAT)
+ to_chat(src, "You cannot talk in deadchat (muted).")
return
- if(client && !(client.prefs.toggles & CHAT_DEAD))
- to_chat(usr, "You have deadchat muted.")
- return
+ if(!(client.prefs.toggles & CHAT_DEAD))
+ to_chat(src, "You have deadchat muted.")
+ return
+
+ if(client.handle_spam_prevention(message, MUTE_DEADCHAT))
+ return
say_dead_direct("[pick("complains", "moans", "whines", "laments", "blubbers", "salts")], \"[message]\"", src)
+ create_log(DEADCHAT_LOG, message)
+ log_ghostsay(message, src)
/mob/proc/say_understands(var/mob/other, var/datum/language/speaking = null)
if(stat == DEAD)
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 8e7adea666b..d151a98309f 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -44,26 +44,37 @@
-//human -> robot
-/mob/living/carbon/human/proc/Robotize()
+/**
+ For transforming humans into robots (cyborgs).
+
+ Arguments:
+ * cell_type: A type path of the cell the new borg should receive.
+ * connect_to_default_AI: TRUE if you want /robot/New() to handle connecting the borg to the AI with the least borgs.
+ * AI: A reference to the AI we want to connect to.
+*/
+/mob/living/carbon/human/proc/Robotize(cell_type = null, connect_to_default_AI = TRUE, mob/living/silicon/ai/AI = null)
if(notransform)
return
for(var/obj/item/W in src)
unEquip(W)
- regenerate_icons()
+
notransform = 1
canmove = 0
icon = null
invisibility = 101
- for(var/t in bodyparts)
- qdel(t)
- for(var/i in internal_organs)
- qdel(i)
- var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc )
+ // Creating a new borg here will connect them to a default AI and notify that AI, if `connect_to_default_AI` is TRUE.
+ var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(loc, connect_to_AI = connect_to_default_AI)
- // cyborgs produced by Robotize get an automatic power cell
- O.cell = new /obj/item/stock_parts/cell/high(O)
+ // If `AI` is passed in, we want to connect to that AI specifically.
+ if(AI)
+ O.lawupdate = TRUE
+ O.connect_to_ai(AI)
+
+ if(!cell_type)
+ O.cell = new /obj/item/stock_parts/cell/high(O)
+ else
+ O.cell = new cell_type(O)
O.gender = gender
O.invisibility = 0
@@ -77,9 +88,8 @@
else
O.key = key
- O.loc = loc
+ O.forceMove(loc)
O.job = "Cyborg"
- O.notify_ai(1)
if(O.mind && O.mind.assigned_role == "Cyborg")
if(O.mind.role_alt_title == "Robot")
diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm
index 1708bcfb7a2..b603fc5974e 100644
--- a/code/modules/mob/update_status.dm
+++ b/code/modules/mob/update_status.dm
@@ -55,12 +55,6 @@
// Procs that update other things about the mob
-// Does various animations - Jitter, Flying, Spinning
-/mob/proc/update_animations()
- if(flying)
- animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
- animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
-
/mob/proc/update_stat()
return
diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm
index 4f1bd269337..a2357fd9ebe 100644
--- a/code/modules/modular_computers/computers/machinery/console_presets.dm
+++ b/code/modules/modular_computers/computers/machinery/console_presets.dm
@@ -35,7 +35,7 @@
/obj/machinery/modular_computer/console/preset/engineering/install_programs()
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
hard_drive.store_file(new/datum/computer_file/program/power_monitor())
- hard_drive.store_file(new/datum/computer_file/program/alarm_monitor())
+// hard_drive.store_file(new/datum/computer_file/program/alarm_monitor()) //TO-DO:TGUI--Uncomment Modular computers
hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor())
// ===== RESEARCH CONSOLE =====
diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm
index b85fb710e38..cae4b5ed2e2 100644
--- a/code/modules/modular_computers/file_system/programs/command/card.dm
+++ b/code/modules/modular_computers/file_system/programs/command/card.dm
@@ -222,7 +222,7 @@
if(is_authenticated(usr) && modify)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
- var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
+ var/temp_t = sanitize(reject_bad_name(copytext(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE))
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name)
@@ -251,7 +251,8 @@
message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name)
- SSjobs.slot_job_transfer(modify.rank, t1)
+ if(modify.owner_uid)
+ SSjobs.slot_job_transfer(modify.rank, t1)
var/mob/living/carbon/human/H = modify.getPlayer()
if(istype(H))
@@ -266,7 +267,7 @@
if("PRG_reg")
if(is_authenticated(usr))
- var/temp_name = reject_bad_name(href_list["reg"])
+ var/temp_name = reject_bad_name(href_list["reg"], TRUE)
if(temp_name)
modify.registered_name = temp_name
else
@@ -290,6 +291,8 @@
if(is_authenticated(usr))
var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE)
if(delcount)
+ message_admins("[key_name_admin(usr)] has wiped all ID computer logs.")
+ usr.create_log(MISC_LOG, "wiped all ID computer logs.")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
if("PRG_print")
@@ -331,9 +334,14 @@
if("PRG_terminate")
if(is_authenticated(usr))
var/jobnamedata = modify.getRankAndAssignment()
- log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
- message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
+ var/reason = sanitize(copytext(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN))
+ if(!reason || !is_authenticated(usr) || !modify)
+ return
+ log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".")
+ message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".")
+ usr.create_log(MISC_LOG, "terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\"")
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name)
+ SSjobs.notify_dept_head(modify.rank, "[scan.registered_name] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for \"[reason]\".")
modify.assignment = "Terminated"
modify.access = list()
diff --git a/code/modules/modular_computers/file_system/programs/engineering/alarm.dm b/code/modules/modular_computers/file_system/programs/engineering/alarm.dm
index 8cb47337a6d..2f2f4a08232 100644
--- a/code/modules/modular_computers/file_system/programs/engineering/alarm.dm
+++ b/code/modules/modular_computers/file_system/programs/engineering/alarm.dm
@@ -7,65 +7,71 @@
requires_ntnet = 1
network_destination = "alarm monitoring network"
size = 5
- var/list/datum/alarm_handler/alarm_handlers
+ var/tgui_id = "NtosStationAlertConsole"
+ var/ui_x = 315
+ var/ui_y = 500
+ var/has_alert = 0
+ var/list/alarms_listend_for = list("Fire", "Atmosphere", "Power")
-/datum/computer_file/program/alarm_monitor/New()
+/datum/computer_file/program/alarm_monitor/process_tick()
..()
- alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm)
- for(var/datum/alarm_handler/AH in alarm_handlers)
- AH.register(src, /datum/computer_file/program/alarm_monitor/proc/update_icon)
-/datum/computer_file/program/alarm_monitor/Destroy()
- for(var/datum/alarm_handler/AH in alarm_handlers)
- AH.unregister(src)
- QDEL_NULL(alarm_handlers)
- return ..()
+ if(has_alert)
+ program_icon_state = "alert-red"
+ ui_header = "alarm_red.gif"
+ update_computer_icon()
+ else
+ program_icon_state = "alert-green"
+ ui_header = "alarm_green.gif"
+ update_computer_icon()
+ return TRUE
-/datum/computer_file/program/alarm_monitor/proc/update_icon()
- for(var/datum/alarm_handler/AH in alarm_handlers)
- if(AH.has_major_alarms())
- program_icon_state = "alert-red"
- ui_header = "alarm_red.gif"
- update_computer_icon()
- return 1
- program_icon_state = "alert-green"
- ui_header = "alarm_green.gif"
- update_computer_icon()
- return 0
-
-/datum/computer_file/program/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
- if(!ui)
- var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers)
- assets.send(user)
- ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring", 575, 700)
- ui.set_auto_update(1)
- ui.set_layout_key("program")
- ui.open()
-
-/datum/computer_file/program/alarm_monitor/ui_data(mob/user)
+/datum/computer_file/program/alarm_monitor/tgui_data(mob/user)
var/list/data = get_header_data()
- var/categories[0]
- for(var/datum/alarm_handler/AH in alarm_handlers)
- categories[++categories.len] = list("category" = AH.category, "alarms" = list())
- for(var/datum/alarm/A in AH.major_alarms())
- var/cameras[0]
- var/lost_sources[0]
-
- if(isAI(user))
- for(var/obj/machinery/camera/C in A.cameras())
- cameras[++cameras.len] = C.nano_structure()
- for(var/datum/alarm_source/AS in A.sources)
- if(!AS.source)
- lost_sources[++lost_sources.len] = AS.source_name
-
- categories[categories.len]["alarms"] += list(list(
- "name" = sanitize(A.alarm_name()),
- "origin_lost" = A.origin == null,
- "has_cameras" = cameras.len,
- "cameras" = cameras,
- "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : ""))
- data["categories"] = categories
+ data["alarms"] = list()
+ for(var/class in SSalarm.alarms)
+ if(!(class in alarms_listend_for))
+ continue
+ data["alarms"][class] = list()
+ for(var/area in alarms[class])
+ data["alarms"][class] += area
return data
+
+/datum/computer_file/program/alarm_monitor/proc/alarm_triggered(src, class, area/A, list/O, obj/alarmsource)
+ if(is_station_level(alarmsource.z))
+ if(!(A.type in GLOB.the_station_areas))
+ return
+ else if(!is_mining_level(alarmsource.z) || istype(A, /area/ruin))
+ return
+ update_alarm_display()
+
+/datum/computer_file/program/alarm_monitor/proc/alarm_cancelled(src, class, area/A, obj/origin, cleared)
+ if(is_station_level(origin.z))
+ if(!(A.type in GLOB.the_station_areas))
+ return
+ else if(!is_mining_level(origin.z) || istype(A, /area/ruin))
+ return
+ update_alarm_display()
+
+/datum/computer_file/program/alarm_monitor/proc/update_alarm_display()
+ has_alert = FALSE
+ for(var/cat in alarms)
+ if(!(cat in alarms_listend_for))
+ continue
+ var/list/L = alarms[cat]
+ if(length(L))
+ has_alert = TRUE
+
+/datum/computer_file/program/alarm_monitor/run_program(mob/user)
+ . = ..(user)
+ GLOB.alarmdisplay += src
+ RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered)
+ RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled)
+
+/datum/computer_file/program/alarm_monitor/kill_program(forced = FALSE)
+ GLOB.alarmdisplay -= src
+ UnregisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM)
+ UnregisterSignal(SSalarm, COMSIG_CANCELLED_ALARM)
+ ..()
diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm
deleted file mode 100644
index cee3820b102..00000000000
--- a/code/modules/nano/modules/alarm_monitor.dm
+++ /dev/null
@@ -1,90 +0,0 @@
-/datum/nano_module/alarm_monitor
- name = "Alarm monitor"
- var/list_cameras = 0 // Whether or not to list camera references. A future goal would be to merge this with the enginering/security camera console. Currently really only for AI-use.
- var/list/datum/alarm_handler/alarm_handlers // The particular list of alarm handlers this alarm monitor should present to the user.
-
-/datum/nano_module/alarm_monitor/all/New()
- ..()
- alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
-
-/datum/nano_module/alarm_monitor/engineering/New()
- ..()
- alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm)
-
-/datum/nano_module/alarm_monitor/security/New()
- ..()
- alarm_handlers = list(SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.motion_alarm)
-
-/datum/nano_module/alarm_monitor/proc/register(var/object, var/procName)
- for(var/datum/alarm_handler/AH in alarm_handlers)
- AH.register(object, procName)
-
-/datum/nano_module/alarm_monitor/proc/unregister(var/object)
- for(var/datum/alarm_handler/AH in alarm_handlers)
- AH.unregister(object)
-
-/datum/nano_module/alarm_monitor/proc/all_alarms()
- var/list/all_alarms = new()
- for(var/datum/alarm_handler/AH in alarm_handlers)
- all_alarms += AH.alarms
-
- return all_alarms
-
-/datum/nano_module/alarm_monitor/proc/major_alarms()
- var/list/all_alarms = new()
- for(var/datum/alarm_handler/AH in alarm_handlers)
- all_alarms += AH.major_alarms()
-
- return all_alarms
-
-/datum/nano_module/alarm_monitor/proc/minor_alarms()
- var/list/all_alarms = new()
- for(var/datum/alarm_handler/AH in alarm_handlers)
- all_alarms += AH.minor_alarms()
-
- return all_alarms
-
-/datum/nano_module/alarm_monitor/Topic(ref, href_list)
- if(..())
- return 1
- if(href_list["switchTo"])
- var/obj/machinery/camera/C = locate(href_list["switchTo"]) in GLOB.cameranet.cameras
- if(!C || !isAI(usr))
- return
-
- usr.switch_to_camera(C)
- return 1
-
-/datum/nano_module/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.default_state)
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
- if(!ui)
- ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state)
- ui.open()
- ui.set_auto_update(1)
-
-/datum/nano_module/alarm_monitor/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
- var/data[0]
-
- var/categories[0]
- for(var/datum/alarm_handler/AH in alarm_handlers)
- categories[++categories.len] = list("category" = AH.category, "alarms" = list())
- for(var/datum/alarm/A in AH.major_alarms())
- var/cameras[0]
- var/lost_sources[0]
-
- if(isAI(user))
- for(var/obj/machinery/camera/C in A.cameras())
- cameras[++cameras.len] = C.nano_structure()
- for(var/datum/alarm_source/AS in A.sources)
- if(!AS.source)
- lost_sources[++lost_sources.len] = AS.source_name
-
- categories[categories.len]["alarms"] += list(list(
- "name" = sanitize(A.alarm_name()),
- "origin_lost" = A.origin == null,
- "has_cameras" = cameras.len,
- "cameras" = cameras,
- "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : ""))
- data["categories"] = categories
-
- return data
diff --git a/code/modules/ninja/suit/suit_initialisation.dm b/code/modules/ninja/suit/suit_initialisation.dm
index 59303b4707c..b9200d0e771 100644
--- a/code/modules/ninja/suit/suit_initialisation.dm
+++ b/code/modules/ninja/suit/suit_initialisation.dm
@@ -14,30 +14,30 @@
suitBusy = 1
if(suitActive && (alert("Confirm suit systems shutdown? This cannot be halted once it has started.", "Confirm Shutdown", "Yes", "No") == "Yes"))
- to_chat(usr, "Now de-initializing...")
+ to_chat(usr, "Now de-initializing...")
sleep(15)
- to_chat(usr, "Logging off, [usr.real_name]. Shutting down SpiderOS.")
+ to_chat(usr, "Logging off, [usr.real_name]. Shutting down SpiderOS.")
sleep(10)
- to_chat(usr, "Primary system status: OFFLINE.\nBackup system status: OFFLINE.")
+ to_chat(usr, "Primary system status: OFFLINE.\nBackup system status: OFFLINE.")
sleep(5)
- to_chat(usr, "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE.")
+ to_chat(usr, "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE.")
//TODO: Shut down any active abilities
sleep(10)
- to_chat(usr, "Disconnecting neural-net interface...Success.")
+ to_chat(usr, "Disconnecting neural-net interface...Success.")
QDEL_NULL(usr.hud_used)
usr.create_mob_hud()
usr.regenerate_icons()
sleep(5)
- to_chat(usr, "Disengaging neural-net interface...Success.")
+ to_chat(usr, "Disengaging neural-net interface...Success.")
sleep(10)
- to_chat(usr, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.")
+ to_chat(usr, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.")
//TODO: Grant verbs
toggle_suit_lock(usr)
usr.regenerate_icons()
@@ -45,24 +45,24 @@
suitActive = 0
else if(!suitActive) // Activate the suit.
- to_chat(usr, "Now initializing...")
+ to_chat(usr, "Now initializing...")
sleep(15)
- to_chat(usr, "Now establishing neural-net interface...")
+ to_chat(usr, "Now establishing neural-net interface...")
if(usr.mind.special_role != "Ninja")
to_chat(usr, "FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
return
sleep(10)
- to_chat(usr, "Neural-net established. Now monitoring brainwave pattern. \nBrainwave patternGREEN, proceeding.")
+ to_chat(usr, "Neural-net established. Now monitoring brainwave pattern. \nBrainwave patternGREEN, proceeding.")
sleep(10)
- to_chat(usr, "Securing external locking mechanism...")
+ to_chat(usr, "Securing external locking mechanism...")
if(!toggle_suit_lock(usr))
return
sleep(5)
- to_chat(usr, "Suit secured, extending neural-net interface...")
+ to_chat(usr, "Suit secured, extending neural-net interface...")
QDEL_NULL(usr.hud_used)
usr.hud_used = new /datum/hud/human(usr, 'icons/mob/screen_ninja.dmi', "#ffffff", 255)
@@ -71,22 +71,22 @@
usr.regenerate_icons()
sleep(10)
- to_chat(usr, "VOID-shift device status: ONLINE.\nCLOAK-tech device status:ONLINE")
+ to_chat(usr, "VOID-shift device status: ONLINE.\nCLOAK-tech device status:ONLINE")
sleep(5)
- to_chat(usr, "Primary system status: ONLINE.\nBackup system status: ONLINE.")
+ to_chat(usr, "Primary system status: ONLINE.\nBackup system status: ONLINE.")
if(suitCell)
- to_chat(usr, "Current energy capacity: [suitCell.charge]/[suitCell.maxcharge].")
+ to_chat(usr, "Current energy capacity: [suitCell.charge]/[suitCell.maxcharge].")
sleep(10)
- to_chat(usr, "All systems operational. Welcome to SpiderOS, [usr.real_name].")
+ to_chat(usr, "All systems operational. Welcome to SpiderOS, [usr.real_name].")
//TODO: Grant ninja verbs here.
suitBusy = 0
suitActive = 1
else
suitBusy = 0
- to_chat(usr, "NOTICE: Suit de-activation protocals aborted.")
+ to_chat(usr, "NOTICE: Suit de-activation protocals aborted.")
else
to_chat(usr, "FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
return
diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm
index 2234e2911a6..0492d3da694 100644
--- a/code/modules/paperwork/ticketmachine.dm
+++ b/code/modules/paperwork/ticketmachine.dm
@@ -7,6 +7,7 @@
icon_state = "ticketmachine"
desc = "A marvel of bureaucratic engineering encased in an efficient plastic shell. It can be refilled with a hand labeler refill roll and linked to buttons with a multitool."
density = FALSE
+ anchored = TRUE
maptext_height = 26
maptext_width = 32
maptext_x = 7
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 409abe3d724..4b64266f2b7 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -25,6 +25,11 @@
#define APC_UPDATE_ICON_COOLDOWN 200 // 20 seconds
+// main_status var
+#define APC_EXTERNAL_POWER_NOTCONNECTED 0
+#define APC_EXTERNAL_POWER_NOENERGY 1
+#define APC_EXTERNAL_POWER_GOOD 2
+
// APC malf status
#define APC_MALF_NOT_HACKED 1
#define APC_MALF_HACKED 2 // APC hacked by user, and user is in its core.
@@ -75,7 +80,7 @@
var/lastused_equip = 0
var/lastused_environ = 0
var/lastused_total = 0
- var/main_status = 0
+ var/main_status = APC_EXTERNAL_POWER_NOTCONNECTED
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
@@ -170,6 +175,7 @@
addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/Destroy()
+ SStgui.close_uis(wires)
GLOB.apcs -= src
if(malfai && operating)
malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000)
@@ -212,12 +218,11 @@
if(isarea(A))
area = A
// no-op, keep the name
- else if(isarea(A) && src.areastring == null)
+ else if(isarea(A) && !areastring)
area = A
name = "\improper [area.name] APC"
else
- area = get_area_name(areastring)
- name = "\improper [area.name] APC"
+ name = "\improper [get_area_name(area, TRUE)] APC"
area.apc |= src
update_icon()
@@ -429,8 +434,8 @@
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params)
- if(issilicon(user) && get_dist(src,user)>1)
- return src.attack_hand(user)
+ if(issilicon(user) && get_dist(src, user) > 1)
+ return attack_hand(user)
else if (istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside
if(cell)
@@ -445,7 +450,7 @@
W.forceMove(src)
cell = W
user.visible_message(\
- "[user.name] has inserted the power cell to [src.name]!",\
+ "[user.name] has inserted the power cell to [name]!",\
"You insert the power cell.")
chargecount = 0
update_icon()
@@ -474,7 +479,7 @@
return
user.visible_message("[user.name] adds cables to the APC frame.", \
"You start adding cables to the APC frame...")
- playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
+ playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 20, target = src))
if(C.get_amount() < 10 || !C)
return
@@ -499,10 +504,10 @@
user.visible_message("[user.name] inserts the power control board into [src].", \
"You start to insert the power control board into the frame...")
- playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
+ playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 10, target = src))
- if(has_electronics==0)
- has_electronics = 1
+ if(!has_electronics)
+ has_electronics = TRUE
locked = FALSE
to_chat(user, "You place the power control board inside the frame.")
qdel(W)
@@ -549,11 +554,11 @@
return
to_chat(user, "You are trying to remove the power control board..." )
if(I.use_tool(src, user, 50, volume = I.tool_volume))
- if(has_electronics==1)
- has_electronics = 0
+ if(has_electronics)
+ has_electronics = FALSE
if(stat & BROKEN)
user.visible_message(\
- "[user.name] has broken the power control board inside [src.name]!",
+ "[user.name] has broken the power control board inside [name]!",
"You break the charred power control board and remove the remains.",
"You hear a crack.")
return
@@ -561,19 +566,19 @@
else if(emagged) // We emag board, not APC's frame
emagged = FALSE
user.visible_message(
- "[user.name] has discarded emaged power control board from [src.name]!",
- "You discarded shorten board.")
+ "[user.name] has discarded the shorted power control board from [name]!",
+ "You discarded the shorted board.")
return
else if(malfhack) // AI hacks board, not APC's frame
user.visible_message(\
- "[user.name] has discarded strangely programmed power control board from [src.name]!",
- "You discarded strangely programmed board.")
+ "[user.name] has discarded strangely the programmed power control board from [name]!",
+ "You discarded the strangely programmed board.")
malfai = null
malfhack = 0
return
else
user.visible_message(\
- "[user.name] has removed the power control board from [src.name]!",
+ "[user.name] has removed the power control board from [name]!",
"You remove the power control board.")
new /obj/item/apc_electronics(loc)
return
@@ -648,7 +653,7 @@
else if(stat & (BROKEN|MAINT))
to_chat(user, "Nothing happens!")
else
- if(allowed(usr) && !isWireCut(APC_WIRE_IDSCAN) && !malfhack)
+ if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.")
update_icon()
@@ -711,36 +716,29 @@
// attack with hand - remove cell (if cover open) or interact with the APC
/obj/machinery/power/apc/attack_hand(mob/user)
-// if(!can_use(user)) This already gets called in interact() and in topic()
-// return
if(!user)
return
- src.add_fingerprint(user)
+ add_fingerprint(user)
- if(usr == user && opened && (!issilicon(user)))
+ if(usr == user && opened && !issilicon(user))
if(cell)
- if(issilicon(user))
- cell.loc=src.loc // Drop it, whoops.
- else
- user.put_in_hands(cell)
+ user.put_in_hands(cell)
cell.add_fingerprint(user)
cell.update_icon()
-
- src.cell = null
- user.visible_message("[user.name] removes the power cell from [src.name]!", "You remove the power cell.")
-// to_chat(user, "You remove the power cell.")
- charging = 0
- src.update_icon()
+ cell = null
+ user.visible_message("[user.name] removes [cell] from [src]!", "You remove the [cell].")
+ charging = FALSE
+ update_icon()
return
if(stat & (BROKEN|MAINT))
return
- src.interact(user)
+ interact(user)
/obj/machinery/power/apc/attack_ghost(mob/user)
if(panel_open)
wires.Interact(user)
- return ui_interact(user)
+ return tgui_interact(user)
/obj/machinery/power/apc/interact(mob/user)
if(!user)
@@ -749,7 +747,7 @@
if(panel_open)
wires.Interact(user)
- return ui_interact(user)
+ return tgui_interact(user)
/obj/machinery/power/apc/proc/get_malf_status(mob/living/silicon/ai/malf)
@@ -770,22 +768,16 @@
else
return APC_MALF_NOT_HACKED
-/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- if(!user)
- return
-
- // update the ui if it exists, returns null if no ui is passed/found
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
+/obj/machinery/power/apc/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- // the ui does not exist, so we'll create a new one
- ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460)
+ ui = new(user, src, ui_key, "APC", name, 510, 460, master_ui, state)
ui.open()
- // Auto update every Master Controller tick
- ui.set_auto_update(1)
-/obj/machinery/power/apc/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
- var/data[0]
+/obj/machinery/power/apc/tgui_data(mob/user)
+ var/list/data = list()
data["locked"] = is_locked(user)
+ data["normallyLocked"] = locked
data["isOperating"] = operating
data["externalPower"] = main_status
data["powerCellStatus"] = cell ? cell.percent() : null
@@ -853,10 +845,6 @@
// to_chat(world, "[area.power_equip]")
area.power_change()
-/obj/machinery/power/apc/proc/isWireCut(var/wireIndex)
- return wires.IsIndexCut(wireIndex)
-
-
/obj/machinery/power/apc/proc/can_use(var/mob/user, var/loud = 0) //used by attack_hand() and Topic()
if(user.can_admin_interact())
return 1
@@ -866,7 +854,7 @@
var/mob/living/silicon/ai/AI = user
var/mob/living/silicon/robot/robot = user
if( \
- src.aidisabled || \
+ aidisabled || \
malfhack && istype(malfai) && \
( \
(istype(AI) && (malfai!=AI && malfai != AI.parent)) || \
@@ -877,21 +865,21 @@
to_chat(user, "\The [src] has AI control disabled!")
user << browse(null, "window=apc")
user.unset_machine()
- return 0
+ return FALSE
else
- if((!in_range(src, user) || !istype(src.loc, /turf)))
- return 0
+ if((!in_range(src, user) || !istype(loc, /turf)))
+ return FALSE
var/mob/living/carbon/human/H = user
if(istype(H))
if(H.getBrainLoss() >= 60)
for(var/mob/M in viewers(src, null))
to_chat(M, "[H] stares cluelessly at [src] and drools.")
- return 0
+ return FALSE
else if(prob(H.getBrainLoss()))
to_chat(user, "You momentarily forget how to use [src].")
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/machinery/power/apc/proc/is_authenticated(mob/user as mob)
if(user.can_admin_interact())
@@ -909,104 +897,59 @@
else
return locked
-/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1)
- if(..())
- return 1
-
- if(!can_use(usr, 1))
- return 1
-
- if(href_list["lock"])
- if(!is_authenticated(usr))
- return
-
- coverlocked = !coverlocked
-
- else if(href_list["breaker"])
- if(!is_authenticated(usr))
- return
-
- toggle_breaker()
-
- else if(href_list["toggle_nightshift"])
- if(!is_authenticated(usr))
- return
-
- if(last_nightshift_switch > world.time + 100) // don't spam...
- to_chat(usr, "[src]'s night lighting circuit breaker is still cycling!")
- return
- last_nightshift_switch = world.time
- set_nightshift(!nightshift_lights)
-
- else if(href_list["cmode"])
- if(!is_authenticated(usr))
- return
-
- chargemode = !chargemode
- if(!chargemode)
- charging = 0
- update_icon()
-
- else if(href_list["eqp"])
- if(!is_authenticated(usr))
- return
-
- var/val = text2num(href_list["eqp"])
- equipment = setsubsystem(val)
- update_icon()
- update()
-
- else if(href_list["lgt"])
- if(!is_authenticated(usr))
- return
-
- var/val = text2num(href_list["lgt"])
- lighting = setsubsystem(val)
- update_icon()
- update()
-
- else if(href_list["env"])
- if(!is_authenticated(usr))
- return
-
- var/val = text2num(href_list["env"])
- environ = setsubsystem(val)
- update_icon()
- update()
- else if( href_list["close"] )
- SSnanoui.close_user_uis(usr, src)
-
- return 0
- else if(href_list["close2"])
- usr << browse(null, "window=apcwires")
-
- return 0
-
- else if(href_list["overload"])
- if(issilicon(usr) && !aidisabled)
- overload_lighting()
-
- else if(href_list["malfhack"])
- if(get_malf_status(usr))
- malfhack(usr)
-
- else if(href_list["occupyapc"])
- if(get_malf_status(usr))
- malfoccupy(usr)
-
- else if(href_list["deoccupyapc"])
- if(get_malf_status(usr))
- malfvacate()
-
- else if(href_list["toggleaccess"])
- if(istype(usr, /mob/living/silicon))
- if(emagged || aidisabled || (stat & (BROKEN|MAINT)))
- to_chat(usr, "The APC does not respond to the command.")
+/obj/machinery/power/apc/tgui_act(action, params)
+ if(..() || !can_use(usr, TRUE) || (locked && !usr.has_unlimited_silicon_privilege && (action != "toggle_nightshift") && !usr.can_admin_interact()))
+ return
+ . = TRUE
+ switch(action)
+ if("lock")
+ if(usr.has_unlimited_silicon_privilege)
+ if(emagged || stat & BROKEN)
+ to_chat(usr, "The APC does not respond to the command!")
+ return FALSE
+ else
+ locked = !locked
+ update_icon()
else
- locked = !locked
+ to_chat(usr, "Access Denied!")
+ return FALSE
+ if("cover")
+ coverlocked = !coverlocked
+ if("breaker")
+ toggle_breaker(usr)
+ if("toggle_nightshift")
+ if(last_nightshift_switch > world.time + 100) // don't spam...
+ to_chat(usr, "[src]'s night lighting circuit breaker is still cycling!")
+ return FALSE
+ last_nightshift_switch = world.time
+ set_nightshift(!nightshift_lights)
+ if("charge")
+ chargemode = !chargemode
+ if("channel")
+ if(params["eqp"])
+ equipment = setsubsystem(text2num(params["eqp"]))
update_icon()
-
- return 0
+ update()
+ else if(params["lgt"])
+ lighting = setsubsystem(text2num(params["lgt"]))
+ update_icon()
+ update()
+ else if(params["env"])
+ environ = setsubsystem(text2num(params["env"]))
+ update_icon()
+ update()
+ if("overload")
+ if(usr.has_unlimited_silicon_privilege)
+ overload_lighting()
+ if("hack")
+ if(get_malf_status(usr))
+ malfhack(usr)
+ if("occupy")
+ if(get_malf_status(usr))
+ malfoccupy(usr)
+ if("deoccupy")
+ if(get_malf_status(usr))
+ malfvacate()
/obj/machinery/power/apc/proc/toggle_breaker()
operating = !operating
@@ -1037,7 +980,7 @@
if(!malf.can_shunt)
to_chat(malf, "You cannot shunt!")
return
- if(!is_station_level(src.z))
+ if(!is_station_level(z))
return
occupier = new /mob/living/silicon/ai(src,malf.laws,null,1)
occupier.adjustOxyLoss(malf.getOxyLoss())
@@ -1084,21 +1027,21 @@
/obj/machinery/power/apc/proc/ion_act()
//intended to be exactly the same as an AI malf attack
- if(!src.malfhack && is_station_level(src.z))
+ if(!malfhack && is_station_level(z))
if(prob(3))
- src.locked = 1
- if(src.cell.charge > 0)
- src.cell.charge = 0
+ locked = TRUE
+ if(cell.charge > 0)
+ cell.charge = 0
cell.corrupt()
- src.malfhack = 1
+ malfhack = TRUE
update_icon()
var/datum/effect_system/smoke_spread/smoke = new
- smoke.set_up(3, 0, src.loc)
+ smoke.set_up(3, 0, loc)
smoke.attach(src)
smoke.start()
do_sparks(3, 1, src)
for(var/mob/M in viewers(src))
- M.show_message("The [src.name] suddenly lets out a blast of smoke and some sparks!", 3, "You hear sizzling electronics.", 2)
+ M.show_message("The [name] suddenly lets out a blast of smoke and some sparks!", 3, "You hear sizzling electronics.", 2)
/obj/machinery/power/apc/surplus()
@@ -1141,12 +1084,12 @@
var/excess = surplus()
- if(!src.avail())
- main_status = 0
+ if(!avail())
+ main_status = APC_EXTERNAL_POWER_NOTCONNECTED
else if(excess < 0)
- main_status = 1
+ main_status = APC_EXTERNAL_POWER_NOENERGY
else
- main_status = 2
+ main_status = APC_EXTERNAL_POWER_GOOD
if(debug)
log_debug("Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]")
@@ -1192,31 +1135,31 @@
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
autoflag = 3
- if(report_power_alarm && is_station_contact(z))
- SSalarms.power_alarm.clearAlarm(loc, src)
+ if(report_power_alarm)
+ area.poweralert(TRUE, src)
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
if(autoflag != 2)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
- if(report_power_alarm && is_station_contact(z))
- SSalarms.power_alarm.triggerAlarm(loc, src)
+ if(report_power_alarm)
+ area.poweralert(FALSE, src)
autoflag = 2
else if(cell.charge < 750 && cell.charge > 10) // <15%, turn off lighting & equipment
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
- if(report_power_alarm && is_station_contact(z))
- SSalarms.power_alarm.triggerAlarm(loc, src)
+ if(report_power_alarm)
+ area.poweralert(FALSE, src)
autoflag = 1
else if(cell.charge <= 0) // zero charge, turn all off
if(autoflag != 0)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
- if(report_power_alarm && is_station_contact(z))
- SSalarms.power_alarm.triggerAlarm(loc, src)
+ if(report_power_alarm)
+ area.poweralert(FALSE, src)
autoflag = 0
// now trickle-charge the cell
@@ -1261,7 +1204,7 @@
if(shock_mobs.len)
var/mob/living/L = pick(shock_mobs)
L.electrocute_act(rand(5, 25), "electrical arc")
- playsound(get_turf(L), 'sound/effects/eleczap.ogg', 75, 1)
+ playsound(get_turf(L), 'sound/effects/eleczap.ogg', 75, TRUE)
Beam(L, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
else // no cell, switch everything off
@@ -1271,8 +1214,8 @@
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
- if(report_power_alarm && is_station_contact(z))
- SSalarms.power_alarm.triggerAlarm(loc, src)
+ if(report_power_alarm)
+ area.poweralert(FALSE, src)
autoflag = 0
// update icon & area power if anything changed
@@ -1372,4 +1315,22 @@
L.update(FALSE)
CHECK_TICK
+/obj/machinery/power/apc/proc/relock_callback()
+ locked = TRUE
+ updateDialog()
+
+/obj/machinery/power/apc/proc/check_main_power_callback()
+ if(!wires.is_cut(WIRE_MAIN_POWER1) && !wires.is_cut(WIRE_MAIN_POWER2))
+ shorted = FALSE
+ updateDialog()
+
+/obj/machinery/power/apc/proc/check_ai_control_callback()
+ if(!wires.is_cut(WIRE_AI_CONTROL))
+ aidisabled = FALSE
+ updateDialog()
+
#undef APC_UPDATE_ICON_COOLDOWN
+
+#undef APC_EXTERNAL_POWER_NOTCONNECTED
+#undef APC_EXTERNAL_POWER_NOENERGY
+#undef APC_EXTERNAL_POWER_GOOD
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index b6c65d979cf..992020e7090 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -229,14 +229,15 @@ By design, d1 is the smallest direction and d2 is the highest
if(current_size >= STAGE_FIVE)
deconstruct()
-obj/structure/cable/proc/cable_color(var/colorC)
- if(colorC)
- if(colorC == "rainbow")
- color = color_rainbow()
- else
- color = colorC
+obj/structure/cable/proc/cable_color(colorC)
+ if(!colorC)
+ color = COLOR_RED
+ else if(colorC == "rainbow")
+ color = color_rainbow()
+ else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them
+ color = COLOR_ORANGE
else
- color = "#DD0000"
+ color = colorC
/obj/structure/cable/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
@@ -845,13 +846,15 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
-/obj/item/stack/cable_coil/proc/cable_color(var/colorC)
- if(colorC)
- if(colorC == "rainbow")
- colorC = color_rainbow()
- color = colorC
- else
+/obj/item/stack/cable_coil/proc/cable_color(colorC)
+ if(!colorC)
color = COLOR_RED
+ else if(colorC == "rainbow")
+ color = color_rainbow()
+ else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them
+ color = COLOR_ORANGE
+ else
+ color = colorC
/obj/item/stack/cable_coil/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 3e8d71b3280..9305faf6637 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -177,6 +177,8 @@
var/nightshift_light_power = 0.45
var/nightshift_light_color = "#FFDDCC"
+ var/bulb_emergency_colour = "#FF3232" // determines the colour of the light while it's in emergency mode
+
// the smaller bulb light fixture
/obj/machinery/light/small
@@ -238,7 +240,11 @@
switch(status) // set icon_states
if(LIGHT_OK)
- icon_state = "[base_state][on]"
+ var/area/A = get_area(src)
+ if(A && A.fire)
+ icon_state = "[base_state]_emergency"
+ else
+ icon_state = "[base_state][on]"
if(LIGHT_EMPTY)
icon_state = "[base_state]-empty"
on = FALSE
@@ -260,10 +266,20 @@
on = FALSE
update_icon()
if(on)
- var/BR = nightshift_enabled ? nightshift_light_range : brightness_range
- var/PO = nightshift_enabled ? nightshift_light_power : brightness_power
- var/CO = nightshift_enabled ? nightshift_light_color : brightness_color
- var/matching = light_range == BR && light_power == PO && light_color == CO
+ var/BR = brightness_range
+ var/PO = brightness_power
+ var/CO = brightness_color
+ if(color)
+ CO = color
+ var/area/A = get_area(src)
+ if(A && A.fire)
+ CO = bulb_emergency_colour
+ else if(nightshift_enabled)
+ BR = nightshift_light_range
+ PO = nightshift_light_power
+ if(!color)
+ CO = nightshift_light_color
+ var/matching = light && BR == light.light_range && PO == light.light_power && CO == light.light_color
if(!matching)
switchcount++
if(rigged)
@@ -627,7 +643,7 @@
/obj/item/light/Crossed(mob/living/L)
if(istype(L) && has_gravity(loc))
- if(L.incorporeal_move || L.flying)
+ if(L.incorporeal_move || L.flying || L.floating)
return
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
if(status == LIGHT_BURNED || status == LIGHT_OK)
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 046cf68a543..960340e90b6 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -310,16 +310,25 @@ field_generator power level display
//This is here to help fight the "hurr durr, release singulo cos nobody will notice before the
//singulo eats the evidence". It's not fool-proof but better than nothing.
//I want to avoid using global variables.
- spawn(1)
- var/temp = 1 //stops spam
- for(var/thing in GLOB.singularities)
- var/obj/singularity/O = thing
- if(O.last_warning && temp)
- if((world.time - O.last_warning) > 50) //to stop message-spam
- temp = 0
- message_admins("A singulo exists and a containment field has failed. Location: [get_area(src)] (JMP)",1)
- investigate_log("has failed whilst a singulo exists.","singulo")
- O.last_warning = world.time
+ INVOKE_ASYNC(src, .proc/admin_alert)
+
+/obj/machinery/field/generator/proc/admin_alert()
+ var/temp = TRUE //stops spam
+ for(var/thing in GLOB.singularities)
+ var/obj/singularity/O = thing
+ if(O.last_warning && temp && atoms_share_level(O, src))
+ if((world.time - O.last_warning) > 50) //to stop message-spam
+ temp = FALSE
+ // To the person who asks "Hey affected, why are you using this massive operator when you can use AREACOORD?" Well, ill tell you
+ // get_area_name is fucking broken and uses a for(x in world) search
+ // It doesnt even work, is expensive, and returns 0
+ // Im not refactoring one thing which could risk breaking all admin location logs
+ // Fight me
+ // [src ? "[get_location_name(src, TRUE)] [COORD(src)]" : "nonexistent location"] [ADMIN_JMP(src)] works much better and actually works at all
+ // Oh and yes, this exact comment was pasted from the exact same thing I did to tcomms code. Dont at me.
+ message_admins("A singularity exists and a containment field has failed on the same Z-Level. Singulo location: [O ? "[get_location_name(O, TRUE)] [COORD(O)]" : "nonexistent location"] [ADMIN_JMP(O)] | Field generator location: [src ? "[get_location_name(src, TRUE)] [COORD(src)]" : "nonexistent location"] [ADMIN_JMP(src)]")
+ investigate_log("has failed whilst a singulo exists.","singulo")
+ O.last_warning = world.time
/obj/machinery/field/generator/shock_field(mob/living/user)
if(fields.len)
diff --git a/code/modules/power/singularity/investigate.dm b/code/modules/power/singularity/investigate.dm
index 43e8c9f8a8b..4835e09411c 100644
--- a/code/modules/power/singularity/investigate.dm
+++ b/code/modules/power/singularity/investigate.dm
@@ -1,4 +1,4 @@
-/area/engine/engineering/power_alert(var/alarming)
- if(alarming)
- investigate_log("has a power alarm!","singulo")
+/area/engine/engineering/poweralert(state, source)
+ if(state != poweralm)
+ investigate_log("has a power alarm!", "singulo")
..()
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index 80b10ab3a8b..bead9c935ef 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -127,6 +127,8 @@
/obj/singularity/narsie/proc/acquire(var/mob/food)
if(food == target)
return
+ if(!target)
+ return
to_chat(target, "[uppertext(SSticker.cultdat.entity_name)] HAS LOST INTEREST IN YOU")
target = food
if(ishuman(target))
diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm
index b8ba53ae432..3ad96050123 100644
--- a/code/modules/power/singularity/particle_accelerator/particle_control.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm
@@ -27,6 +27,7 @@
use_log = list()
/obj/machinery/particle_accelerator/control_box/Destroy()
+ SStgui.close_uis(wires)
if(active)
toggle_power()
QDEL_NULL(wires)
@@ -41,6 +42,11 @@
else if(construction_state == 2) // Wires exposed
wires.Interact(user)
+/obj/machinery/particle_accelerator/control_box/multitool_act(mob/living/user, obj/item/I)
+ if(construction_state == 2) // Wires exposed
+ wires.Interact(user)
+ return TRUE
+
/obj/machinery/particle_accelerator/control_box/update_state()
if(construction_state < 3)
use_power = NO_POWER_USE
@@ -93,18 +99,18 @@
usr.unset_machine()
return
if(href_list["togglep"])
- if(!wires.IsIndexCut(PARTICLE_TOGGLE_WIRE))
+ if(!wires.is_cut(WIRE_PARTICLE_POWER))
toggle_power()
else if(href_list["scan"])
part_scan()
else if(href_list["strengthup"])
- if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
+ if(!wires.is_cut(WIRE_PARTICLE_STRENGTH))
add_strength()
else if(href_list["strengthdown"])
- if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
+ if(!wires.is_cut(WIRE_PARTICLE_STRENGTH))
remove_strength()
updateDialog()
diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm
index 5f58bcb5dd4..5743bea8475 100644
--- a/code/modules/power/tesla/coil.dm
+++ b/code/modules/power/tesla/coil.dm
@@ -21,6 +21,7 @@
RefreshParts()
/obj/machinery/power/tesla_coil/Destroy()
+ SStgui.close_uis(wires)
QDEL_NULL(wires)
return ..()
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index 8536a0195e3..e6165103234 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -123,6 +123,7 @@
if(keep)
stored_ammo.Insert(1,b)
update_mat_value()
+ update_icon()
return b
/obj/item/ammo_box/proc/give_round(obj/item/ammo_casing/R, replace_spent = 0)
diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm
index 8cb48f8e36a..5cc6a19b840 100644
--- a/code/modules/projectiles/ammunition/magazines.dm
+++ b/code/modules/projectiles/ammunition/magazines.dm
@@ -133,6 +133,9 @@
/obj/item/ammo_box/magazine/internal/shot/riot/short
max_ammo = 3
+/obj/item/ammo_box/magazine/internal/shot/riot/buckshot
+ ammo_type = /obj/item/ammo_casing/shotgun/buckshot
+
/obj/item/ammo_box/magazine/internal/grenadelauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
@@ -380,10 +383,7 @@
origin_tech = "combat=3;syndicate=1"
caliber = "shotgun"
max_ammo = 8
-
-/obj/item/ammo_box/magazine/m12g/update_icon()
- ..()
- icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/8, 1)*8]"
+ multiple_sprites = 2
/obj/item/ammo_box/magazine/m12g/buckshot
name = "shotgun magazine (12g buckshot slugs)"
@@ -411,6 +411,24 @@
icon_state = "m12gbc"
ammo_type = /obj/item/ammo_casing/shotgun/breaching
+/obj/item/ammo_box/magazine/m12g/XtrLrg
+ name = "\improper XL shotgun magazine (12g slugs)"
+ desc = "An extra large drum magazine."
+ icon_state = "m12gXlSl"
+ w_class = WEIGHT_CLASS_NORMAL
+ ammo_type = /obj/item/ammo_casing/shotgun
+ max_ammo = 16
+
+/obj/item/ammo_box/magazine/m12g/XtrLrg/buckshot
+ name = "\improper XL shotgun magazine (12g buckshot)"
+ icon_state = "m12gXlBs"
+ ammo_type = /obj/item/ammo_casing/shotgun/buckshot
+
+/obj/item/ammo_box/magazine/m12g/XtrLrg/dragon
+ name = "\improper XL shotgun magazine (12g dragon's breath)"
+ icon_state = "m12gXlDb"
+ ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
+
/obj/item/ammo_box/magazine/toy
name = "foam force META magazine"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index ce0abc8cc69..695ab02c43b 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -15,7 +15,6 @@
ammo_x_offset = 2
var/shaded_charge = 0 //if this gun uses a stateful charge bar for more detail
var/selfcharge = 0
- var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically
var/charge_tick = 0
var/charge_delay = 4
@@ -68,11 +67,6 @@
charge_tick = 0
if(!cell)
return // check if we actually need to recharge
- var/obj/item/ammo_casing/energy/E = ammo_type[select]
- if(use_external_power)
- var/obj/item/stock_parts/cell/external = get_external_cell()
- if(!external || !external.use(E.e_cost)) //Take power from the borg...
- return //Note, uses /10 because of shitty mods to the cell system
cell.give(100) //... to recharge the shot
on_recharge()
update_icon()
@@ -207,14 +201,3 @@
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
cell.give(shot.e_cost) //... to recharge the shot
-
-/obj/item/gun/energy/proc/get_external_cell()
- if(istype(loc, /obj/item/rig_module))
- var/obj/item/rig_module/module = loc
- if(module.holder && module.holder.wearer)
- var/mob/living/carbon/human/H = module.holder.wearer
- if(istype(H) && H.back)
- var/obj/item/rig/suit = H.back
- if(istype(suit))
- return suit.cell
- return null
diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm
index 3e9c882458e..9106d80ef98 100644
--- a/code/modules/projectiles/guns/energy/laser.dm
+++ b/code/modules/projectiles/guns/energy/laser.dm
@@ -95,12 +95,6 @@
..()
damage = min(damage+7, 100)
-/obj/item/gun/energy/lasercannon/mounted
- name = "mounted laser cannon"
- selfcharge = 1
- use_external_power = 1
- charge_delay = 10
-
/obj/item/gun/energy/lasercannon/cyborg
/obj/item/gun/energy/lasercannon/cyborg/newshot()
diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm
index 2df2d877c53..3d9925da974 100644
--- a/code/modules/projectiles/guns/energy/nuclear.dm
+++ b/code/modules/projectiles/guns/energy/nuclear.dm
@@ -21,11 +21,6 @@
/obj/item/gun/energy/gun/cyborg/emp_act()
return
-/obj/item/gun/energy/gun/mounted
- name = "mounted energy gun"
- selfcharge = 1
- use_external_power = 1
-
/obj/item/gun/energy/gun/mini
name = "miniature energy gun"
desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: disable and kill."
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index e2eb9e84057..da72c971130 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -112,10 +112,6 @@
max_mod_capacity = 0
empty_state = null
-/obj/item/gun/energy/kinetic_accelerator/crossbow/ninja
- name = "energy dart thrower"
- ammo_type = list(/obj/item/ammo_casing/energy/dart)
-
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
name = "energy crossbow"
desc = "A reverse engineered weapon using syndicate technology."
diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm
index 70bb8be7e46..141366dd5d9 100644
--- a/code/modules/projectiles/guns/energy/stun.dm
+++ b/code/modules/projectiles/guns/energy/stun.dm
@@ -7,11 +7,6 @@
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 3
-/obj/item/gun/energy/taser/mounted
- name = "mounted taser gun"
- selfcharge = 1
- use_external_power = 1
-
/obj/item/gun/energy/shock_revolver
name = "tesla revolver"
desc = "A high-tech revolver that fires internal, reusable shock cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers."
diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm
index 25db1f10dcb..ca4499c8832 100644
--- a/code/modules/projectiles/guns/projectile.dm
+++ b/code/modules/projectiles/guns/projectile.dm
@@ -95,6 +95,7 @@
if(!user.unEquip(A))
return
to_chat(user, "You screw [S] onto [src].")
+ playsound(src, 'sound/items/screwdriver.ogg', 40, 1)
suppressed = A
S.oldsound = fire_sound
S.initial_w_class = w_class
@@ -120,6 +121,7 @@
..()
return
to_chat(user, "You unscrew [suppressed] from [src].")
+ playsound(src, 'sound/items/screwdriver.ogg', 40, 1)
user.put_in_hands(suppressed)
fire_sound = S.oldsound
w_class = S.initial_w_class
diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm
index 17a20f82d59..ea52a954a5b 100644
--- a/code/modules/projectiles/guns/projectile/automatic.dm
+++ b/code/modules/projectiles/guns/projectile/automatic.dm
@@ -275,13 +275,27 @@
if(magazine)
overlays.Cut()
overlays += "[magazine.icon_state]"
- return
+ if(istype(magazine, /obj/item/ammo_box/magazine/m12g/XtrLrg))
+ w_class = WEIGHT_CLASS_BULKY
+ else
+ w_class = WEIGHT_CLASS_NORMAL
+ else
+ w_class = WEIGHT_CLASS_NORMAL
/obj/item/gun/projectile/automatic/shotgun/bulldog/update_icon()
overlays.Cut()
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
+/obj/item/gun/projectile/automatic/shotgun/bulldog/attackby(var/obj/item/A as obj, mob/user as mob, params)
+ if(istype(A, /obj/item/ammo_box/magazine/m12g/XtrLrg))
+ if(istype(loc, /obj/item/storage)) // To prevent inventory exploits
+ var/obj/item/storage/Strg = loc
+ if(Strg.max_w_class < WEIGHT_CLASS_BULKY)
+ to_chat(user, "You can't reload [src], with a XL mag, while it's in a normal bag.")
+ return
+ return ..()
+
/obj/item/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
empty_alarm()
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index 17a55722d2c..6c11fda5fd7 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -197,6 +197,8 @@
..()
post_sawoff()
+/obj/item/gun/projectile/shotgun/riot/buckshot //comes pre-loaded with buckshot rather than rubber
+ mag_type = /obj/item/ammo_box/magazine/internal/shot/riot/buckshot
///////////////////////
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 4aee2398b68..080114554bb 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -270,7 +270,6 @@
M.mind.transfer_to(new_mob)
else
new_mob.attack_log_old = M.attack_log_old.Copy()
- new_mob.logs = M.logs.Copy()
new_mob.key = M.key
to_chat(new_mob, "Your form morphs into that of a [randomize].")
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 91d5900610d..bacf2285c83 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -24,6 +24,7 @@
var/list/hacked_reagents = list("toxin")
var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode."
var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode."
+ var/is_drink = FALSE
/obj/machinery/chem_dispenser/get_cell()
return cell
@@ -120,7 +121,6 @@
var/usedpower = cell.give(recharge_amount)
if(usedpower)
use_power(15 * recharge_amount)
- SSnanoui.update_uis(src) // update all UIs attached to src
recharge_counter = 0
return
recharge_counter++
@@ -131,7 +131,6 @@
else
spawn(rand(0, 15))
stat |= NOPOWER
- SSnanoui.update_uis(src) // update all UIs attached to src
/obj/machinery/chem_dispenser/ex_act(severity)
if(severity < 3)
@@ -145,19 +144,17 @@
beaker = null
overlays.Cut()
-/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
+/obj/machinery/chem_dispenser/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
// update the ui if it exists, returns null if no ui is passed/found
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- // the ui does not exist, so we'll create a new() one
- // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
- ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
- // open the new ui window
+ ui = new(user, src, ui_key, "ChemDispenser", ui_title, 390, 655)
ui.open()
-/obj/machinery/chem_dispenser/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
+/obj/machinery/chem_dispenser/tgui_data(mob/user)
var/data[0]
+ data["glass"] = is_drink
data["amount"] = amount
data["energy"] = cell.charge ? cell.charge * powerefficiency : "0" //To prevent NaN in the UI.
data["maxEnergy"] = cell.maxcharge * powerefficiency
@@ -187,63 +184,59 @@
return data
-/obj/machinery/chem_dispenser/Topic(href, href_list)
+/obj/machinery/chem_dispenser/tgui_act(actions, params)
if(..())
- return TRUE
+ return
+ if(stat & (NOPOWER|BROKEN))
+ return
- if(href_list["amount"])
- amount = round(text2num(href_list["amount"]), 1) // round to nearest 1
- if(amount < 0) // Since the user can actually type the commands himself, some sanity checking
- amount = 0
- if(amount > 100)
- amount = 100
-
- if(href_list["dispense"])
- if(!is_operational() || QDELETED(cell))
- return
- if(beaker && dispensable_reagents.Find(href_list["dispense"]))
+ . = TRUE
+ switch(actions)
+ if("amount")
+ amount = clamp(round(text2num(params["amount"]), 1), 0, 50) // round to nearest 1 and clamp to 0 - 50
+ if("dispense")
+ if(!is_operational() || QDELETED(cell))
+ return
+ if(!beaker || !dispensable_reagents.Find(params["reagent"]))
+ return
var/datum/reagents/R = beaker.reagents
var/free = R.maximum_volume - R.total_volume
var/actual = min(amount, (cell.charge * powerefficiency) * 10, free)
-
if(!cell.use(actual / powerefficiency))
atom_say("Not enough energy to complete operation!")
return
-
- R.add_reagent(href_list["dispense"], actual)
+ R.add_reagent(params["reagent"], actual)
overlays.Cut()
if(!icon_beaker)
- icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position.
+ icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
icon_beaker.pixel_x = rand(-10, 5)
overlays += icon_beaker
-
- if(href_list["remove"])
- if(beaker)
- if(href_list["removeamount"])
- var/amount = text2num(href_list["removeamount"])
- if(isnum(amount) && (amount > 0))
- var/datum/reagents/R = beaker.reagents
- var/id = href_list["remove"]
- R.remove_reagent(id, amount)
- else if(isnum(amount) && (amount == -1)) //Isolate instead
- var/datum/reagents/R = beaker.reagents
- var/id = href_list["remove"]
- R.isolate_reagent(id)
-
- if(href_list["ejectBeaker"])
- if(beaker)
+ if("remove")
+ var/amount = text2num(params["amount"])
+ if(!beaker || !amount)
+ return
+ var/datum/reagents/R = beaker.reagents
+ var/id = params["reagent"]
+ if(amount > 0)
+ R.remove_reagent(id, amount)
+ else if(amount == -1) //Isolate instead
+ R.isolate_reagent(id)
+ if("ejectBeaker")
+ if(!beaker)
+ return
beaker.forceMove(loc)
if(Adjacent(usr) && !issilicon(usr))
usr.put_in_hands(beaker)
beaker = null
overlays.Cut()
+ else
+ return FALSE
add_fingerprint(usr)
- return TRUE // update UIs attached to this object
/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params)
if(exchange_parts(user, I))
- SSnanoui.update_uis(src)
+ SStgui.update_uis(src)
return
if(isrobot(user))
@@ -263,9 +256,9 @@
beaker = I
I.forceMove(src)
to_chat(user, "You set [I] on the machine.")
- SSnanoui.update_uis(src) // update all UIs attached to src
+ SStgui.update_uis(src) // update all UIs attached to src
if(!icon_beaker)
- icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position.
+ icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
icon_beaker.pixel_x = rand(-10, 5)
overlays += icon_beaker
return
@@ -299,8 +292,7 @@
to_chat(user, unhack_message)
dispensable_reagents -= hacked_reagents
hackedcheck = FALSE
- SSnanoui.update_uis(src)
-
+ SStgui.update_uis(src)
/obj/machinery/chem_dispenser/screwdriver_act(mob/user, obj/item/I)
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", "[initial(icon_state)]", I))
@@ -321,14 +313,14 @@
return attack_hand(user)
/obj/machinery/chem_dispenser/attack_ghost(mob/user)
- if(user.can_admin_interact())
- return attack_hand(user)
+ if(stat & BROKEN)
+ return
+ tgui_interact(user)
/obj/machinery/chem_dispenser/attack_hand(mob/user)
if(stat & BROKEN)
return
-
- ui_interact(user)
+ tgui_interact(user)
/obj/machinery/chem_dispenser/soda
icon_state = "soda_dispenser"
@@ -342,6 +334,7 @@
hacked_reagents = list("thirteenloko")
hack_message = "You change the mode from 'McNano' to 'Pizza King'."
unhack_message = "You change the mode from 'Pizza King' to 'McNano'."
+ is_drink = TRUE
/obj/machinery/chem_dispenser/soda/New()
..()
@@ -377,6 +370,7 @@
hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing", "sake")
hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes."
unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes."
+ is_drink = TRUE
/obj/machinery/chem_dispenser/beer/New()
..()
diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 39aa91099c0..8fddc97537f 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -1,15 +1,19 @@
/obj/machinery/chem_heater
name = "chemical heater"
- density = 1
- anchored = 1
+ density = TRUE
+ anchored = TRUE
icon = 'icons/obj/chemical.dmi'
icon_state = "mixer0b"
use_power = IDLE_POWER_USE
idle_power_usage = 40
- resistance_flags = FIRE_PROOF | ACID_PROOF
+ resistance_flags = FIRE_PROOF|ACID_PROOF
var/obj/item/reagent_containers/beaker = null
var/desired_temp = T0C
var/on = FALSE
+ /// Whether this should auto-eject the beaker once done heating/cooling.
+ var/auto_eject = FALSE
+ /// The higher this number, the faster reagents will heat/cool.
+ var/speed_increase = 0
/obj/machinery/chem_heater/New()
..()
@@ -19,35 +23,36 @@
component_parts += new /obj/item/stack/sheet/glass(null)
RefreshParts()
+/obj/machinery/chem_heater/RefreshParts()
+ speed_increase = initial(speed_increase)
+ for(var/obj/item/stock_parts/micro_laser/M in component_parts)
+ speed_increase += 5 * (M.rating - 1)
+
/obj/machinery/chem_heater/process()
..()
- if(stat & NOPOWER)
+ if(stat & (NOPOWER|BROKEN))
return
- var/state_change = FALSE
if(on)
if(beaker)
if(!beaker.reagents.total_volume)
on = FALSE
- SSnanoui.update_uis(src)
return
- beaker.reagents.temperature_reagents(desired_temp)
- beaker.reagents.temperature_reagents(desired_temp)
- if(abs(beaker.reagents.chem_temp - desired_temp) <= 3)
+ beaker.reagents.temperature_reagents(desired_temp, max(1, 35 - speed_increase))
+ if(round(beaker.reagents.chem_temp) == round(desired_temp))
+ playsound(loc, 'sound/machines/ding.ogg', 50, 1)
on = FALSE
- state_change = TRUE
-
- if(state_change)
- SSnanoui.update_uis(src)
+ if(auto_eject)
+ eject_beaker()
/obj/machinery/chem_heater/proc/eject_beaker(mob/user)
if(beaker)
beaker.forceMove(get_turf(src))
- if(Adjacent(user) && !issilicon(user))
+ if(user && Adjacent(user) && !issilicon(user))
user.put_in_hands(beaker)
beaker = null
icon_state = "mixer0b"
on = FALSE
- SSnanoui.update_uis(src)
+ SStgui.update_uis(src)
/obj/machinery/chem_heater/power_change()
if(powered())
@@ -55,7 +60,6 @@
else
spawn(rand(0, 15))
stat |= NOPOWER
- SSnanoui.update_uis(src)
/obj/machinery/chem_heater/attackby(obj/item/I, mob/user)
if(isrobot(user))
@@ -71,7 +75,7 @@
I.forceMove(src)
to_chat(user, "You add the beaker to the machine!")
icon_state = "mixer1b"
- SSnanoui.update_uis(src)
+ SStgui.update_uis(src)
return
if(exchange_parts(user, I))
@@ -95,62 +99,62 @@
default_deconstruction_crowbar(user, I)
/obj/machinery/chem_heater/attack_hand(mob/user)
- ui_interact(user)
+ tgui_interact(user)
/obj/machinery/chem_heater/attack_ghost(mob/user)
- if(user.can_admin_interact())
- return attack_hand(user)
+ tgui_interact(user)
/obj/machinery/chem_heater/attack_ai(mob/user)
add_hiddenprint(user)
return attack_hand(user)
-/obj/machinery/chem_heater/Topic(href, href_list)
+/obj/machinery/chem_heater/tgui_act(action, params)
if(..())
- return FALSE
+ return
+ if(stat & (NOPOWER|BROKEN))
+ return
- if(href_list["toggle_on"])
- if(!beaker.reagents.total_volume)
- return FALSE
- on = !on
- . = 1
-
- if(href_list["adjust_temperature"])
- var/val = href_list["adjust_temperature"]
- if(isnum(val))
- desired_temp = clamp(desired_temp+val, 0, 1000)
- else if(val == "input")
- var/target = input("Please input the target temperature", name) as num
- desired_temp = clamp(target, 0, 1000)
+ . = TRUE
+ switch(action)
+ if("toggle_on")
+ on = !on
+ if("adjust_temperature")
+ desired_temp = clamp(text2num(params["target"]), 0, 1000)
+ if("eject_beaker")
+ eject_beaker(usr)
+ . = FALSE
+ if("toggle_autoeject")
+ auto_eject = !auto_eject
else
return FALSE
- . = 1
+ add_fingerprint(usr)
- if(href_list["eject_beaker"])
- eject_beaker(usr)
- . = 0 //updated in eject_beaker() already
-
-/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null)
+/obj/machinery/chem_heater/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
if(user.stat || user.restrained())
return
- // update the ui if it exists, returns null if no ui is passed/found
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270)
+ ui = new(user, src, ui_key, "ChemHeater", "Chemical Heater", 350, 270, master_ui, state)
ui.open()
-/obj/machinery/chem_heater/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
+/obj/machinery/chem_heater/tgui_data(mob/user)
var/data[0]
+ var/cur_temp = beaker ? beaker.reagents.chem_temp : null
data["targetTemp"] = desired_temp
+ data["targetTempReached"] = FALSE
+ data["autoEject"] = auto_eject
data["isActive"] = on
- data["isBeakerLoaded"] = beaker ? 1 : 0
+ data["isBeakerLoaded"] = beaker ? TRUE : FALSE
- data["currentTemp"] = beaker ? beaker.reagents.chem_temp : null
+ data["currentTemp"] = cur_temp
data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null
data["beakerMaxVolume"] = beaker ? beaker.volume : null
+ if(cur_temp)
+ data["targetTempReached"] = round(cur_temp) == round(desired_temp)
+
//copy-pasted from chem dispenser
var/beakerContents[0]
if(beaker)
diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 4d1f577969c..f2b3247fe4b 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -1,3 +1,9 @@
+#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
+#define MAX_MULTI_AMOUNT 20 // Max number of pills/patches that can be made at once
+#define MAX_UNITS_PER_PILL 100 // Max amount of units in a pill
+#define MAX_UNITS_PER_PATCH 30 // Max amount of units in a patch
+#define MAX_CUSTOM_NAME_LEN 64 // Max length of a custom pill/condiment/whatever
+
/obj/machinery/chem_master
name = "\improper ChemMaster 3000"
density = TRUE
@@ -14,10 +20,12 @@
var/useramount = 30 // Last used amount
var/pillamount = 10
var/patchamount = 10
- var/bottlesprite = "bottle"
- var/pillsprite = "1"
+ var/bottlesprite = 1
+ var/pillsprite = 1
var/client/has_sprites = list()
var/printing = FALSE
+ var/static/list/pill_bottle_wrappers
+ var/static/list/bottle_styles
/obj/machinery/chem_master/New()
..()
@@ -94,7 +102,7 @@
beaker = I
I.forceMove(src)
to_chat(user, "You add the beaker to the machine!")
- SSnanoui.update_uis(src)
+ SStgui.update_uis(src)
update_icon()
else if(istype(I, /obj/item/storage/pill_bottle))
@@ -109,14 +117,10 @@
loaded_pill_bottle = I
I.forceMove(src)
to_chat(user, "You add [I] into the dispenser slot!")
- SSnanoui.update_uis(src)
+ SStgui.update_uis(src)
else
return ..()
-
-
-
-
/obj/machinery/chem_master/crowbar_act(mob/user, obj/item/I)
if(!panel_open)
return
@@ -142,319 +146,127 @@
power_change()
return TRUE
-/obj/machinery/chem_master/Topic(href, href_list)
+/obj/machinery/chem_master/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state)
if(..())
+ return
+ if(stat & (NOPOWER|BROKEN))
+ return
+
+ if(tgui_act_modal(action, params, ui, state))
return TRUE
add_fingerprint(usr)
usr.set_machine(src)
-
- if(href_list["ejectp"])
- if(loaded_pill_bottle)
- loaded_pill_bottle.forceMove(loc)
- loaded_pill_bottle = null
- else if(href_list["change_pillbottle"])
- if(loaded_pill_bottle)
- var/list/wrappers = list("Default wrapper", "Red wrapper", "Green wrapper", "Pale green wrapper", "Blue wrapper", "Light blue wrapper", "Teal wrapper", "Yellow wrapper", "Orange wrapper", "Pink wrapper", "Brown wrapper")
- var/chosen = input(usr, "Select a pillbottle wrapper", "Pillbottle wrapper", wrappers[1]) as null|anything in wrappers
- if(!chosen)
+ . = TRUE
+ switch(action)
+ if("toggle")
+ mode = !mode
+ if("ejectp")
+ if(loaded_pill_bottle)
+ loaded_pill_bottle.forceMove(loc)
+ loaded_pill_bottle = null
+ if("print")
+ if(printing || condi)
return
- var/color
- switch(chosen)
- if("Default wrapper")
- loaded_pill_bottle.cut_overlays()
- return
- if("Red wrapper")
- color = COLOR_RED
- if("Green wrapper")
- color = COLOR_GREEN
- if("Pink wrapper")
- color = COLOR_PINK
- if("Teal wrapper")
- color = COLOR_TEAL
- if("Blue wrapper")
- color = COLOR_BLUE
- if("Brown wrapper")
- color = COLOR_MAROON
- if("Light blue wrapper")
- color = COLOR_CYAN_BLUE
- if("Yellow wrapper")
- color = COLOR_YELLOW
- if("Pale green wrapper")
- color = COLOR_PALE_BTL_GREEN
- if("Orange wrapper")
- color = COLOR_ORANGE
- loaded_pill_bottle.wrapper_color = color
- loaded_pill_bottle.apply_wrap()
- else if(href_list["close"])
- usr << browse(null, "window=chem_master")
- onclose(usr, "chem_master")
- usr.unset_machine()
- return
- if(href_list["print_p"])
- if(!printing)
+ var/idx = text2num(params["idx"]) || 0
+ var/from_beaker = text2num(params["beaker"]) || FALSE
+ var/reagent_list = from_beaker ? beaker.reagents.reagent_list : reagents.reagent_list
+ if(idx < 1 || idx > length(reagent_list))
+ return
+
+ var/datum/reagent/R = reagent_list[idx]
+
printing = TRUE
visible_message("[src] rattles and prints out a sheet of paper.")
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
+
var/obj/item/paper/P = new /obj/item/paper(loc)
- P.info = "
Chemical Analysis
"
+ P.info = "
Chemical Analysis
"
P.info += "Time of analysis: [station_time_timestamp()]
', 'internal');
+
+ opts.rebootIntervalHandler = setInterval(function() {
+ timeLeftSecs -= intervalSecs;
+ if (timeLeftSecs <= 0) {
+ $("#reconnectTimer").text('Reconnecting...');
+ window.location.href = 'byond://winset?command=.reconnect';
+ clearInterval(opts.rebootIntervalHandler)
+ opts.rebootIntervalHandler = null;
+ } else {
+ $("#reconnectTimer").text('Reconnect (' + timeLeftSecs + ')');
+ }
+ }, intervalSecs * 1000);
+}
+
+function rebootFinished() {
+ if (opts.rebootIntervalHandler != null) {
+ clearInterval(opts.rebootIntervalHandler)
+ }
+ $(" Reconnected automatically!").insertBefore("#reconnectTimer");
+ $("#reconnectTimer").remove();
+}
+
/*****************************************
*
* MAKE MACRO DICTIONARY
@@ -603,7 +683,7 @@ $(function() {
'shideSpam': getCookie('hidespam'),
'darkChat': getCookie('darkChat'),
};
-
+
if (savedConfig.sfontSize) {
$messages.css('font-size', savedConfig.sfontSize);
internalOutput('Loaded font size setting of: '+savedConfig.sfontSize+'', 'internal');
@@ -961,18 +1041,18 @@ $(function() {
} else {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
-
+
// synchronous requests are depricated in modern browsers
- xmlHttp.open('GET', 'browserOutput.css', true);
+ xmlHttp.open('GET', 'browserOutput.css', true);
xmlHttp.onload = function (e) {
if (xmlHttp.status === 200) { // request successful
-
+
// Generate Log
var saved = '';
saved += $messages.html();
saved = saved.replace(/&/g, '&');
saved = saved.replace(/Chat Log \
'+
@@ -982,7 +1062,7 @@ $(function() {
openWindow('Style Doc Retrieve Error: '+xmlHttp.statusText);
}
}
-
+
// timeout and request errors
xmlHttp.timeout = 300;
xmlHttp.ontimeout = function (e) {
@@ -1043,15 +1123,21 @@ $(function() {
count++;
}
- var color = $('#highlightColor').val();
opts.highlightRegexEnable = document.querySelector("#highlightRegexEnable").checked
- color = color.trim();
- if (color == '' || color.charAt(0) != '#') {
- opts.highlightColor = '#FFFF00';
- } else {
- opts.highlightColor = color;
+
+ var color = $('#highlightColor').val();
+ if(color != opts.highlightColor) { // did the color even change?
+ color = color.trim();
+ if (color == '' || color.charAt(0) != '#') {
+ opts.highlightColor = '#FFFF00';
+ } else {
+ opts.highlightColor = color;
+ }
+ setHighlightColor();
}
+
regexHasError = false; //they changed the regex so it might be valid now
+ internalOutput('Highlights have been updated.',"internal") // simplest way to test if pattern works, why reinvent the wheel?
var $popup = $('#highlightPopup').closest('.popup');
$popup.remove();
diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm
index 74c9d844728..b073bece409 100644
--- a/goon/code/datums/browserOutput.dm
+++ b/goon/code/datums/browserOutput.dm
@@ -109,6 +109,7 @@ var/list/chatResources = list(
loaded = TRUE
winset(owner, "browseroutput", "is-disabled=false")
+ owner << output(null, "browseroutput:rebootFinished")
if(owner.holder)
loadAdmin()
for(var/message in messageQueue)
@@ -245,8 +246,8 @@ var/list/chatResources = list(
var/to_chat_filename
var/to_chat_line
var/to_chat_src
-// Call using macro: to_chat(target, message, flag)
-/proc/to_chat_immediate(target, message, flag)
+
+/proc/to_chat(target, message, flag)
if(!is_valid_tochat_message(message) || !is_valid_tochat_target(target))
target << message
@@ -304,17 +305,4 @@ var/to_chat_src
target << output(output_message, "browseroutput:output")
-/proc/to_chat(target, message, flag)
- /*
- If any of the following conditions are met, do NOT use SSchat. These conditions include:
- - Is the MC still initializing?
- - Has SSchat initialized?
- - Has SSchat been offlined due to MC crashes?
- If any of these are met, use the old chat system, otherwise people wont see messages
- */
- if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized || SSchat?.flags & SS_NO_FIRE)
- to_chat_immediate(target, message, flag)
- return
- SSchat.queue(target, message, flag)
-
#undef MAX_COOKIE_LENGTH
diff --git a/html/browser/marked-paradise.js b/html/browser/marked-paradise.js
index 03519139409..a92cadb1cfe 100644
--- a/html/browser/marked-paradise.js
+++ b/html/browser/marked-paradise.js
@@ -4,24 +4,22 @@
var $ = document.querySelector.bind(document);
function parse(node) {
- for (var i = 0; i < node.childNodes.length; i++) {
- parse(node.childNodes[i]);
- }
-
- if (!node.innerHTML) {
- return;
- }
-
- node.innerHTML = marked(node.innerHTML.replace(/ /gi, '\n').replace(/\t/gi, ''), { breaks: false, gfm: false })
- // marked.js wraps content into
tags, which is looks atrocious when we call it recursively.
- // The following line unwraps it.
- if (node.children.length == 1) {
- node.innerHTML = node.children[0].innerHTML;
- }
+ for (var i = 0; i < node.childNodes.length; i++)
+ parse(node.childNodes[i]);
+
+ if (!node.innerHTML)
+ return;
+
+ if (node.children.length == 0) {
+ node.innerHTML = marked(node.innerHTML.replace(/ /gi, '\n').replace(/\t/gi, ''), { breaks: false, gfm: false });
+ // marked.js wraps content into
tags, which is looks atrocious when we call it recursively.
+ // The following line unwraps it.
+ if (node.children.length == 1 && node.children[0].tagName == "P")
+ node.innerHTML = node.children[0].innerHTML;
+ }
}
-
+
window.onload = function() {
- if ($('#markdown')) {
- parse($('#markdown'));
- }
+ if ($('#markdown'))
+ parse($('#markdown'));
}
diff --git a/icons/effects/lasers2.dmi b/icons/effects/lasers2.dmi
deleted file mode 100644
index f774fb9430b..00000000000
Binary files a/icons/effects/lasers2.dmi and /dev/null differ
diff --git a/icons/mob/feet.dmi b/icons/mob/feet.dmi
index e6f132a73a5..3892442c6ea 100644
Binary files a/icons/mob/feet.dmi and b/icons/mob/feet.dmi differ
diff --git a/icons/mob/hands.dmi b/icons/mob/hands.dmi
index 6d6165509c8..66d1474d61a 100644
Binary files a/icons/mob/hands.dmi and b/icons/mob/hands.dmi differ
diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi
index 88b28aff5a9..1bd516110e5 100644
Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ
diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi
index df6b8f4de1f..07593d09c0c 100644
Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ
diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi
index 589135b8701..379c727930f 100644
Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ
diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi
index 8fd5f7d71b8..2fc6aa9c4c1 100644
Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ
diff --git a/icons/mob/inhands/equipment/instruments_lefthand.dmi b/icons/mob/inhands/equipment/instruments_lefthand.dmi
index 225f1768d99..aa3608fec28 100644
Binary files a/icons/mob/inhands/equipment/instruments_lefthand.dmi and b/icons/mob/inhands/equipment/instruments_lefthand.dmi differ
diff --git a/icons/mob/inhands/equipment/instruments_righthand.dmi b/icons/mob/inhands/equipment/instruments_righthand.dmi
index cc1df97183a..28085ff746d 100644
Binary files a/icons/mob/inhands/equipment/instruments_righthand.dmi and b/icons/mob/inhands/equipment/instruments_righthand.dmi differ
diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi
index a378d2e5b04..b2f1bfa90c6 100644
Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ
diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi
index 0a8847d7e4a..a7772c3ebf4 100644
Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ
diff --git a/icons/mob/rig_back.dmi b/icons/mob/rig_back.dmi
deleted file mode 100644
index 923939d323e..00000000000
Binary files a/icons/mob/rig_back.dmi and /dev/null differ
diff --git a/icons/mob/rig_modules.dmi b/icons/mob/rig_modules.dmi
deleted file mode 100644
index 3d18b5435ce..00000000000
Binary files a/icons/mob/rig_modules.dmi and /dev/null differ
diff --git a/icons/mob/species/drask/head.dmi b/icons/mob/species/drask/head.dmi
index b9f0604c960..f0c888e9f68 100644
Binary files a/icons/mob/species/drask/head.dmi and b/icons/mob/species/drask/head.dmi differ
diff --git a/icons/mob/species/drask/suit.dmi b/icons/mob/species/drask/suit.dmi
index d75a28f2bee..cef6dbdf836 100644
Binary files a/icons/mob/species/drask/suit.dmi and b/icons/mob/species/drask/suit.dmi differ
diff --git a/icons/mob/species/grey/head.dmi b/icons/mob/species/grey/head.dmi
index 4ff783bbb74..c059a3bff9d 100644
Binary files a/icons/mob/species/grey/head.dmi and b/icons/mob/species/grey/head.dmi differ
diff --git a/icons/mob/species/grey/helmet.dmi b/icons/mob/species/grey/helmet.dmi
index cf244cec6b2..3e592369adc 100644
Binary files a/icons/mob/species/grey/helmet.dmi and b/icons/mob/species/grey/helmet.dmi differ
diff --git a/icons/mob/species/grey/mask.dmi b/icons/mob/species/grey/mask.dmi
index cbbd722ae69..348a39c0f03 100644
Binary files a/icons/mob/species/grey/mask.dmi and b/icons/mob/species/grey/mask.dmi differ
diff --git a/icons/mob/species/grey/suit.dmi b/icons/mob/species/grey/suit.dmi
index 3070f6627ea..c22c9daf3dd 100644
Binary files a/icons/mob/species/grey/suit.dmi and b/icons/mob/species/grey/suit.dmi differ
diff --git a/icons/mob/species/grey/uniform.dmi b/icons/mob/species/grey/uniform.dmi
index c956187ffa1..7a74f930598 100644
Binary files a/icons/mob/species/grey/uniform.dmi and b/icons/mob/species/grey/uniform.dmi differ
diff --git a/icons/mob/species/skrell/helmet.dmi b/icons/mob/species/skrell/helmet.dmi
index e17fa4174c5..e54cdb52d0f 100644
Binary files a/icons/mob/species/skrell/helmet.dmi and b/icons/mob/species/skrell/helmet.dmi differ
diff --git a/icons/mob/species/tajaran/helmet.dmi b/icons/mob/species/tajaran/helmet.dmi
index 298ff823ea4..00c3f1d2bdc 100644
Binary files a/icons/mob/species/tajaran/helmet.dmi and b/icons/mob/species/tajaran/helmet.dmi differ
diff --git a/icons/mob/species/tajaran/suit.dmi b/icons/mob/species/tajaran/suit.dmi
index 2f7d8f34907..61929dcceda 100644
Binary files a/icons/mob/species/tajaran/suit.dmi and b/icons/mob/species/tajaran/suit.dmi differ
diff --git a/icons/mob/species/unathi/helmet.dmi b/icons/mob/species/unathi/helmet.dmi
index 1fc21dd1611..68f6171bb19 100644
Binary files a/icons/mob/species/unathi/helmet.dmi and b/icons/mob/species/unathi/helmet.dmi differ
diff --git a/icons/mob/species/unathi/suit.dmi b/icons/mob/species/unathi/suit.dmi
index 14d1eaaa73a..eabd0f94672 100644
Binary files a/icons/mob/species/unathi/suit.dmi and b/icons/mob/species/unathi/suit.dmi differ
diff --git a/icons/mob/species/vox/head.dmi b/icons/mob/species/vox/head.dmi
index 6c4b2b43f6a..fb5d153d30d 100644
Binary files a/icons/mob/species/vox/head.dmi and b/icons/mob/species/vox/head.dmi differ
diff --git a/icons/mob/species/vox/suit.dmi b/icons/mob/species/vox/suit.dmi
index 730149860d5..4161227ac79 100644
Binary files a/icons/mob/species/vox/suit.dmi and b/icons/mob/species/vox/suit.dmi differ
diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi
index d71fb9b1d21..12a0a371a94 100644
Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ
diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi
index 4a250a1fffc..b1876a7d063 100644
Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ
diff --git a/icons/obj/atmospherics/blue_pipe_tank.dmi b/icons/obj/atmospherics/blue_pipe_tank.dmi
deleted file mode 100644
index 3d2ee4c9d69..00000000000
Binary files a/icons/obj/atmospherics/blue_pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/digital_valve.dmi b/icons/obj/atmospherics/digital_valve.dmi
deleted file mode 100644
index 136523b7223..00000000000
Binary files a/icons/obj/atmospherics/digital_valve.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/dp_vent_pump.dmi b/icons/obj/atmospherics/dp_vent_pump.dmi
deleted file mode 100644
index 86dae2cf435..00000000000
Binary files a/icons/obj/atmospherics/dp_vent_pump.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/filter.dmi b/icons/obj/atmospherics/filter.dmi
deleted file mode 100644
index 99afb55d22b..00000000000
Binary files a/icons/obj/atmospherics/filter.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/mainspipe.dmi b/icons/obj/atmospherics/mainspipe.dmi
deleted file mode 100644
index df6c2bc0d3a..00000000000
Binary files a/icons/obj/atmospherics/mainspipe.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/n2o_pipe_tank.dmi b/icons/obj/atmospherics/n2o_pipe_tank.dmi
deleted file mode 100644
index 40efbd9f15d..00000000000
Binary files a/icons/obj/atmospherics/n2o_pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/omni_devices.dmi b/icons/obj/atmospherics/omni_devices.dmi
deleted file mode 100644
index 44497310026..00000000000
Binary files a/icons/obj/atmospherics/omni_devices.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/orange_pipe_tank.dmi b/icons/obj/atmospherics/orange_pipe_tank.dmi
deleted file mode 100644
index cc9442b8033..00000000000
Binary files a/icons/obj/atmospherics/orange_pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/passive_gate.dmi b/icons/obj/atmospherics/passive_gate.dmi
deleted file mode 100644
index 42e8c9dc74f..00000000000
Binary files a/icons/obj/atmospherics/passive_gate.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/pipe_manifold.dmi b/icons/obj/atmospherics/pipe_manifold.dmi
deleted file mode 100644
index 1e6f5750d1b..00000000000
Binary files a/icons/obj/atmospherics/pipe_manifold.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/pipe_tank.dmi b/icons/obj/atmospherics/pipe_tank.dmi
deleted file mode 100644
index 72310a2657d..00000000000
Binary files a/icons/obj/atmospherics/pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/pipe_vent.dmi b/icons/obj/atmospherics/pipe_vent.dmi
deleted file mode 100644
index e40f5946cf8..00000000000
Binary files a/icons/obj/atmospherics/pipe_vent.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/portables_connector.dmi b/icons/obj/atmospherics/portables_connector.dmi
deleted file mode 100644
index c651b959990..00000000000
Binary files a/icons/obj/atmospherics/portables_connector.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/pump.dmi b/icons/obj/atmospherics/pump.dmi
deleted file mode 100644
index e44a21991ba..00000000000
Binary files a/icons/obj/atmospherics/pump.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/red_orange_pipe_tank.dmi b/icons/obj/atmospherics/red_orange_pipe_tank.dmi
deleted file mode 100644
index 1770c46312a..00000000000
Binary files a/icons/obj/atmospherics/red_orange_pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/red_pipe_tank.dmi b/icons/obj/atmospherics/red_pipe_tank.dmi
deleted file mode 100644
index 3fedc659e03..00000000000
Binary files a/icons/obj/atmospherics/red_pipe_tank.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/relief_valve.dmi b/icons/obj/atmospherics/relief_valve.dmi
deleted file mode 100644
index 485bf792b19..00000000000
Binary files a/icons/obj/atmospherics/relief_valve.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/valve.dmi b/icons/obj/atmospherics/valve.dmi
deleted file mode 100644
index 9ce45199bd7..00000000000
Binary files a/icons/obj/atmospherics/valve.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/vent_pump.dmi b/icons/obj/atmospherics/vent_pump.dmi
deleted file mode 100644
index 6b1f57baa44..00000000000
Binary files a/icons/obj/atmospherics/vent_pump.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/vent_scrubber.dmi b/icons/obj/atmospherics/vent_scrubber.dmi
deleted file mode 100644
index 7133072cd79..00000000000
Binary files a/icons/obj/atmospherics/vent_scrubber.dmi and /dev/null differ
diff --git a/icons/obj/atmospherics/volume_pump.dmi b/icons/obj/atmospherics/volume_pump.dmi
deleted file mode 100644
index e3ff3cf9854..00000000000
Binary files a/icons/obj/atmospherics/volume_pump.dmi and /dev/null differ
diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi
index 1847e985d89..3f66fa90cd6 100644
Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ
diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi
index a0133e5b383..97710ac4805 100644
Binary files a/icons/obj/cigarettes.dmi and b/icons/obj/cigarettes.dmi differ
diff --git a/icons/obj/clothing/gloves.dmi b/icons/obj/clothing/gloves.dmi
index f7f54357fdb..06bb96f43a5 100644
Binary files a/icons/obj/clothing/gloves.dmi and b/icons/obj/clothing/gloves.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index f942f9fd8cd..30f34f01b4f 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ
diff --git a/icons/obj/clothing/shoes.dmi b/icons/obj/clothing/shoes.dmi
index 30cdfae56ef..aae2d9df6fb 100644
Binary files a/icons/obj/clothing/shoes.dmi and b/icons/obj/clothing/shoes.dmi differ
diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi
index 7400d5d63ef..62fc0a6120c 100644
Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ
diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi
index bb7a1ce9188..39789326c49 100644
Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ
diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi
index ac416274ebe..042b5fe7f38 100644
Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ
diff --git a/icons/obj/contraband.dmi b/icons/obj/contraband.dmi
index 97a11d05cad..444863abd71 100644
Binary files a/icons/obj/contraband.dmi and b/icons/obj/contraband.dmi differ
diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi
index 7351c8c7483..35ce076db6c 100644
Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ
diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi
index f1d09247bbd..1e61cebb799 100644
Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ
diff --git a/icons/obj/hydroponics/equipment.dmi b/icons/obj/hydroponics/equipment.dmi
index 9ad33b40e9d..3cb9e63cb38 100644
Binary files a/icons/obj/hydroponics/equipment.dmi and b/icons/obj/hydroponics/equipment.dmi differ
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index a82f3fa10a2..e30f3e44392 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ
diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi
index f8943c2c39b..49b594c1656 100644
Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ
diff --git a/icons/obj/musician.dmi b/icons/obj/musician.dmi
index 21078c58969..d55ecb7ebc0 100644
Binary files a/icons/obj/musician.dmi and b/icons/obj/musician.dmi differ
diff --git a/icons/obj/paper.dmi b/icons/obj/paper.dmi
deleted file mode 100644
index 55781076833..00000000000
Binary files a/icons/obj/paper.dmi and /dev/null differ
diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi
index 60eb897b2b1..51e9b66ee30 100644
Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ
diff --git a/icons/obj/recycling.dmi b/icons/obj/recycling.dmi
index 2a47e6817bb..c30eb425dda 100644
Binary files a/icons/obj/recycling.dmi and b/icons/obj/recycling.dmi differ
diff --git a/icons/obj/rig_modules.dmi b/icons/obj/rig_modules.dmi
deleted file mode 100644
index 90b1873d58e..00000000000
Binary files a/icons/obj/rig_modules.dmi and /dev/null differ
diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi
index 1ef7016307d..c51d2903b14 100644
Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ
diff --git a/nano/templates/adv_med.tmpl b/nano/templates/adv_med.tmpl
deleted file mode 100644
index a1ca2815679..00000000000
--- a/nano/templates/adv_med.tmpl
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-{{if !data.occupied}}
-
-
- {{else}}
- {{if data.locked}}
- Swipe an ID card to unlock this interface
- {{else}}
- Swipe an ID card to lock this interface
- {{/if}}
- {{/if}}
-
-{{else}}
-
-Deployment of weapon authorized by Nanotrasen Naval Command. Remember, friendly fire is grounds for termination of your contract and life.
-{{/if}}
\ No newline at end of file
diff --git a/nano/templates/chem_dispenser.tmpl b/nano/templates/chem_dispenser.tmpl
deleted file mode 100644
index 74d694530c9..00000000000
--- a/nano/templates/chem_dispenser.tmpl
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
- {{if data.isBeakerLoaded}}
- {{:helper.smoothRound(data.beakerFreeSpace)}} units of space remaining
- {{else}}
- No Dialysis Output Beaker Loaded
- {{/if}}
-
- Lines are a series of chords, separated by commas (,), each with notes seperated by hyphens (-).
-
- Every note in a chord will play together, with the chord timed by the tempo as defined above.
-
-
- Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.
-
- By default, every note is natural and in octave 3. Defining a different state for either is remembered for each note.
-
-
Example:C,D,E,F,G,A,B will play a Cmajor scale.
-
After a note has an accidental or octave placed, it will be remembered: C,C4,C#,C3 is C3,C4,C4#,C3#
-
-
-
- Chords can be played simply by seperating each note with a hyphon: A-C#,Cn-E,E-G#,Gn-B.
- A pause may be denoted by an empty chord: C,E,,C,G.
-
- To make a chord be a different time, end it with /x, where the chord length will be length defined by tempo / x, eg:C,G/2,E/4.
-
-
- Combined, an example line is: E-E4/4,F#/2,G#/8,B/8,E3-E4/4.
-
-
Lines may be up to 50 characters.
-
A song may only contain up to 50 lines.
-
-
- {{/if}}
-
-
\ No newline at end of file
diff --git a/nano/templates/wires.tmpl b/nano/templates/wires.tmpl
deleted file mode 100644
index 2702d97d7dc..00000000000
--- a/nano/templates/wires.tmpl
+++ /dev/null
@@ -1,24 +0,0 @@
-
-{{/if}}
diff --git a/paradise.dme b/paradise.dme
index b59a1d75541..6e1235bfc86 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -40,6 +40,7 @@
#include "code\__DEFINES\genetics.dm"
#include "code\__DEFINES\hud.dm"
#include "code\__DEFINES\hydroponics.dm"
+#include "code\__DEFINES\instruments.dm"
#include "code\__DEFINES\inventory.dm"
#include "code\__DEFINES\is_helpers.dm"
#include "code\__DEFINES\job.dm"
@@ -71,9 +72,11 @@
#include "code\__DEFINES\station_goals.dm"
#include "code\__DEFINES\status_effects.dm"
#include "code\__DEFINES\subsystems.dm"
+#include "code\__DEFINES\tgui.dm"
#include "code\__DEFINES\tools.dm"
#include "code\__DEFINES\typeids.dm"
#include "code\__DEFINES\vv.dm"
+#include "code\__DEFINES\wires.dm"
#include "code\__DEFINES\zlevel.dm"
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
@@ -87,6 +90,7 @@
#include "code\__HELPERS\files.dm"
#include "code\__HELPERS\game.dm"
#include "code\__HELPERS\global_lists.dm"
+#include "code\__HELPERS\heap.dm"
#include "code\__HELPERS\icon_smoothing.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\lists.dm"
@@ -108,8 +112,6 @@
#include "code\__HELPERS\sorts\InsertSort.dm"
#include "code\__HELPERS\sorts\MergeSort.dm"
#include "code\__HELPERS\sorts\TimSort.dm"
-#include "code\_DATASTRUCTURES\heap.dm"
-#include "code\_DATASTRUCTURES\stacks.dm"
#include "code\_globalvars\configuration.dm"
#include "code\_globalvars\game_modes.dm"
#include "code\_globalvars\genetics.dm"
@@ -136,7 +138,6 @@
#include "code\_onclick\observer.dm"
#include "code\_onclick\other_mobs.dm"
#include "code\_onclick\overmind.dm"
-#include "code\_onclick\rig.dm"
#include "code\_onclick\telekinesis.dm"
#include "code\_onclick\hud\_defines.dm"
#include "code\_onclick\hud\action_button.dm"
@@ -217,10 +218,10 @@
#include "code\controllers\subsystem\assets.dm"
#include "code\controllers\subsystem\atoms.dm"
#include "code\controllers\subsystem\changelog.dm"
-#include "code\controllers\subsystem\chat.dm"
#include "code\controllers\subsystem\events.dm"
#include "code\controllers\subsystem\fires.dm"
#include "code\controllers\subsystem\garbage.dm"
+#include "code\controllers\subsystem\ghost_spawns.dm"
#include "code\controllers\subsystem\holiday.dm"
#include "code\controllers\subsystem\icon_smooth.dm"
#include "code\controllers\subsystem\idlenpcpool.dm"
@@ -240,6 +241,7 @@
#include "code\controllers\subsystem\parallax.dm"
#include "code\controllers\subsystem\radio.dm"
#include "code\controllers\subsystem\shuttles.dm"
+#include "code\controllers\subsystem\sounds.dm"
#include "code\controllers\subsystem\spacedrift.dm"
#include "code\controllers\subsystem\statistics.dm"
#include "code\controllers\subsystem\sun.dm"
@@ -252,6 +254,7 @@
#include "code\controllers\subsystem\weather.dm"
#include "code\controllers\subsystem\processing\dcs.dm"
#include "code\controllers\subsystem\processing\fastprocess.dm"
+#include "code\controllers\subsystem\processing\instruments.dm"
#include "code\controllers\subsystem\processing\obj.dm"
#include "code\controllers\subsystem\processing\processing.dm"
#include "code\controllers\subsystem\tickets\mentor_tickets.dm"
@@ -273,6 +276,7 @@
#include "code\datums\hud.dm"
#include "code\datums\log_record.dm"
#include "code\datums\log_viewer.dm"
+#include "code\datums\logging.dm"
#include "code\datums\mind.dm"
#include "code\datums\mixed.dm"
#include "code\datums\mutable_appearance.dm"
@@ -305,6 +309,7 @@
#include "code\datums\components\paintable.dm"
#include "code\datums\components\slippery.dm"
#include "code\datums\components\spawner.dm"
+#include "code\datums\components\spooky.dm"
#include "code\datums\components\squeak.dm"
#include "code\datums\components\swarming.dm"
#include "code\datums\diseases\_disease.dm"
@@ -684,7 +689,6 @@
#include "code\game\machinery\syndicatebomb.dm"
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\transformer.dm"
-#include "code\game\machinery\turntable.dm"
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
@@ -730,6 +734,7 @@
#include "code\game\machinery\computer\salvage_ship.dm"
#include "code\game\machinery\computer\security.dm"
#include "code\game\machinery\computer\skills.dm"
+#include "code\game\machinery\computer\sm_monitor.dm"
#include "code\game\machinery\computer\specops_shuttle.dm"
#include "code\game\machinery\computer\station_alert.dm"
#include "code\game\machinery\computer\store.dm"
@@ -879,7 +884,6 @@
#include "code\game\objects\items\devices\flashlight.dm"
#include "code\game\objects\items\devices\floor_painter.dm"
#include "code\game\objects\items\devices\handheld_defib.dm"
-#include "code\game\objects\items\devices\instruments.dm"
#include "code\game\objects\items\devices\laserpointer.dm"
#include "code\game\objects\items\devices\lightreplacer.dm"
#include "code\game\objects\items\devices\machineprototype.dm"
@@ -940,6 +944,7 @@
#include "code\game\objects\items\tools\wrench.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\alien_specific.dm"
+#include "code\game\objects\items\weapons\batons.dm"
#include "code\game\objects\items\weapons\bee_briefcase.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cash.dm"
@@ -988,7 +993,6 @@
#include "code\game\objects\items\weapons\staff.dm"
#include "code\game\objects\items\weapons\stock_parts.dm"
#include "code\game\objects\items\weapons\stunbaton.dm"
-#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\teleprod.dm"
@@ -1084,7 +1088,6 @@
#include "code\game\objects\structures\misc.dm"
#include "code\game\objects\structures\mop_bucket.dm"
#include "code\game\objects\structures\morgue.dm"
-#include "code\game\objects\structures\musician.dm"
#include "code\game\objects\structures\noticeboard.dm"
#include "code\game\objects\structures\plasticflaps.dm"
#include "code\game\objects\structures\reflector.dm"
@@ -1206,8 +1209,8 @@
#include "code\modules\admin\verbs\adminjump.dm"
#include "code\modules\admin\verbs\adminpm.dm"
#include "code\modules\admin\verbs\adminsay.dm"
-#include "code\modules\admin\verbs\alt_check.dm"
#include "code\modules\admin\verbs\antag-ooc.dm"
+#include "code\modules\admin\verbs\asays.dm"
#include "code\modules\admin\verbs\atmosdebug.dm"
#include "code\modules\admin\verbs\BrokenInhands.dm"
#include "code\modules\admin\verbs\cinematic.dm"
@@ -1235,7 +1238,6 @@
#include "code\modules\admin\verbs\randomverbs.dm"
#include "code\modules\admin\verbs\serialization.dm"
#include "code\modules\admin\verbs\space_transitions.dm"
-#include "code\modules\admin\verbs\spawnfloorcluwne.dm"
#include "code\modules\admin\verbs\striketeam.dm"
#include "code\modules\admin\verbs\striketeam_syndicate.dm"
#include "code\modules\admin\verbs\ticklag.dm"
@@ -1245,14 +1247,6 @@
#include "code\modules\admin\verbs\SDQL2\SDQL_2.dm"
#include "code\modules\admin\verbs\SDQL2\SDQL_2_parser.dm"
#include "code\modules\admin\verbs\SDQL2\useful_procs.dm"
-#include "code\modules\alarm\alarm.dm"
-#include "code\modules\alarm\alarm_handler.dm"
-#include "code\modules\alarm\atmosphere_alarm.dm"
-#include "code\modules\alarm\burglar_alarm.dm"
-#include "code\modules\alarm\camera_alarm.dm"
-#include "code\modules\alarm\fire_alarm.dm"
-#include "code\modules\alarm\motion_alarm.dm"
-#include "code\modules\alarm\power_alarm.dm"
#include "code\modules\antagonists\_common\antag_datum.dm"
#include "code\modules\antagonists\_common\antag_helpers.dm"
#include "code\modules\antagonists\_common\antag_hud.dm"
@@ -1328,9 +1322,6 @@
#include "code\modules\buildmode\submodes\save.dm"
#include "code\modules\buildmode\submodes\throwing.dm"
#include "code\modules\buildmode\submodes\variable_edit.dm"
-#include "code\modules\busy_space\air_traffic.dm"
-#include "code\modules\busy_space\loremaster.dm"
-#include "code\modules\busy_space\organizations.dm"
#include "code\modules\client\asset_cache.dm"
#include "code\modules\client\client defines.dm"
#include "code\modules\client\client procs.dm"
@@ -1380,7 +1371,6 @@
#include "code\modules\clothing\shoes\magboots.dm"
#include "code\modules\clothing\shoes\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\alien.dm"
-#include "code\modules\clothing\spacesuits\breaches.dm"
#include "code\modules\clothing\spacesuits\chronosuit.dm"
#include "code\modules\clothing\spacesuits\ert.dm"
#include "code\modules\clothing\spacesuits\hardsuit.dm"
@@ -1388,24 +1378,6 @@
#include "code\modules\clothing\spacesuits\plasmamen.dm"
#include "code\modules\clothing\spacesuits\syndi.dm"
#include "code\modules\clothing\spacesuits\void.dm"
-#include "code\modules\clothing\spacesuits\rig\rig.dm"
-#include "code\modules\clothing\spacesuits\rig\rig_armormod.dm"
-#include "code\modules\clothing\spacesuits\rig\rig_attackby.dm"
-#include "code\modules\clothing\spacesuits\rig\rig_pieces.dm"
-#include "code\modules\clothing\spacesuits\rig\rig_verbs.dm"
-#include "code\modules\clothing\spacesuits\rig\rig_wiring.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\combat.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\computer.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\modules.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\utility.dm"
-#include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\combat.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\ert_suits.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\light.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\merc.dm"
-#include "code\modules\clothing\spacesuits\rig\suits\station.dm"
#include "code\modules\clothing\suits\alien.dm"
#include "code\modules\clothing\suits\armor.dm"
#include "code\modules\clothing\suits\bio.dm"
@@ -1635,6 +1607,25 @@
#include "code\modules\hydroponics\grown\tobacco.dm"
#include "code\modules\hydroponics\grown\tomato.dm"
#include "code\modules\hydroponics\grown\towercap.dm"
+#include "code\modules\instruments\_instrument_data.dm"
+#include "code\modules\instruments\_instrument_key.dm"
+#include "code\modules\instruments\brass.dm"
+#include "code\modules\instruments\chromatic_percussion.dm"
+#include "code\modules\instruments\fun.dm"
+#include "code\modules\instruments\guitar.dm"
+#include "code\modules\instruments\hardcoded.dm"
+#include "code\modules\instruments\organ.dm"
+#include "code\modules\instruments\piano.dm"
+#include "code\modules\instruments\synth_tones.dm"
+#include "code\modules\instruments\objs\items\_instrument.dm"
+#include "code\modules\instruments\objs\items\headphones.dm"
+#include "code\modules\instruments\objs\items\instruments.dm"
+#include "code\modules\instruments\objs\structures\_musician.dm"
+#include "code\modules\instruments\objs\structures\piano.dm"
+#include "code\modules\instruments\songs\_song.dm"
+#include "code\modules\instruments\songs\_song_ui.dm"
+#include "code\modules\instruments\songs\play_legacy.dm"
+#include "code\modules\instruments\songs\play_synthesized.dm"
#include "code\modules\karma\karma.dm"
#include "code\modules\keybindings\bindings_admin.dm"
#include "code\modules\keybindings\bindings_ai.dm"
@@ -2092,7 +2083,6 @@
#include "code\modules\modular_computers\file_system\programs\antagonist\revelation.dm"
#include "code\modules\modular_computers\file_system\programs\command\card.dm"
#include "code\modules\modular_computers\file_system\programs\command\comms.dm"
-#include "code\modules\modular_computers\file_system\programs\engineering\alarm.dm"
#include "code\modules\modular_computers\file_system\programs\engineering\power_monitor.dm"
#include "code\modules\modular_computers\file_system\programs\engineering\sm_monitor.dm"
#include "code\modules\modular_computers\file_system\programs\generic\configurator.dm"
@@ -2130,7 +2120,6 @@
#include "code\modules\nano\interaction\physical.dm"
#include "code\modules\nano\interaction\self.dm"
#include "code\modules\nano\interaction\zlevel.dm"
-#include "code\modules\nano\modules\alarm_monitor.dm"
#include "code\modules\nano\modules\atmos_control.dm"
#include "code\modules\nano\modules\ert_manager.dm"
#include "code\modules\nano\modules\human_appearance.dm"
@@ -2416,7 +2405,6 @@
#include "code\modules\surgery\other.dm"
#include "code\modules\surgery\plastic_surgery.dm"
#include "code\modules\surgery\remove_embedded_object.dm"
-#include "code\modules\surgery\rig_removal.dm"
#include "code\modules\surgery\robotics.dm"
#include "code\modules\surgery\surgery.dm"
#include "code\modules\surgery\tools.dm"
@@ -2468,6 +2456,7 @@
#include "code\modules\telesci\telepad.dm"
#include "code\modules\telesci\telesci_computer.dm"
#include "code\modules\tgui\external.dm"
+#include "code\modules\tgui\modal.dm"
#include "code\modules\tgui\states.dm"
#include "code\modules\tgui\tgui.dm"
#include "code\modules\tgui\modules\_base.dm"
diff --git a/sound/instruments/banjo/Ab3.ogg b/sound/instruments/banjo/Ab3.ogg
new file mode 100644
index 00000000000..66e263bd615
Binary files /dev/null and b/sound/instruments/banjo/Ab3.ogg differ
diff --git a/sound/instruments/banjo/Ab4.ogg b/sound/instruments/banjo/Ab4.ogg
new file mode 100644
index 00000000000..f003e03233a
Binary files /dev/null and b/sound/instruments/banjo/Ab4.ogg differ
diff --git a/sound/instruments/banjo/Ab5.ogg b/sound/instruments/banjo/Ab5.ogg
new file mode 100644
index 00000000000..c405725208e
Binary files /dev/null and b/sound/instruments/banjo/Ab5.ogg differ
diff --git a/sound/instruments/banjo/An3.ogg b/sound/instruments/banjo/An3.ogg
new file mode 100644
index 00000000000..1700704c9c1
Binary files /dev/null and b/sound/instruments/banjo/An3.ogg differ
diff --git a/sound/instruments/banjo/An4.ogg b/sound/instruments/banjo/An4.ogg
new file mode 100644
index 00000000000..eb7279f869e
Binary files /dev/null and b/sound/instruments/banjo/An4.ogg differ
diff --git a/sound/instruments/banjo/An5.ogg b/sound/instruments/banjo/An5.ogg
new file mode 100644
index 00000000000..d9cf57c0feb
Binary files /dev/null and b/sound/instruments/banjo/An5.ogg differ
diff --git a/sound/instruments/banjo/Bb3.ogg b/sound/instruments/banjo/Bb3.ogg
new file mode 100644
index 00000000000..d3f757c0ace
Binary files /dev/null and b/sound/instruments/banjo/Bb3.ogg differ
diff --git a/sound/instruments/banjo/Bb4.ogg b/sound/instruments/banjo/Bb4.ogg
new file mode 100644
index 00000000000..a9d869091bf
Binary files /dev/null and b/sound/instruments/banjo/Bb4.ogg differ
diff --git a/sound/instruments/banjo/Bb5.ogg b/sound/instruments/banjo/Bb5.ogg
new file mode 100644
index 00000000000..a56e6c25005
Binary files /dev/null and b/sound/instruments/banjo/Bb5.ogg differ
diff --git a/sound/instruments/banjo/Bn2.ogg b/sound/instruments/banjo/Bn2.ogg
new file mode 100644
index 00000000000..3154f974193
Binary files /dev/null and b/sound/instruments/banjo/Bn2.ogg differ
diff --git a/sound/instruments/banjo/Bn3.ogg b/sound/instruments/banjo/Bn3.ogg
new file mode 100644
index 00000000000..6c72ec2fd5a
Binary files /dev/null and b/sound/instruments/banjo/Bn3.ogg differ
diff --git a/sound/instruments/banjo/Bn4.ogg b/sound/instruments/banjo/Bn4.ogg
new file mode 100644
index 00000000000..b0e9a2b3b2f
Binary files /dev/null and b/sound/instruments/banjo/Bn4.ogg differ
diff --git a/sound/instruments/banjo/Bn5.ogg b/sound/instruments/banjo/Bn5.ogg
new file mode 100644
index 00000000000..1b002140b87
Binary files /dev/null and b/sound/instruments/banjo/Bn5.ogg differ
diff --git a/sound/instruments/banjo/Cn3.ogg b/sound/instruments/banjo/Cn3.ogg
new file mode 100644
index 00000000000..6ef414d9d01
Binary files /dev/null and b/sound/instruments/banjo/Cn3.ogg differ
diff --git a/sound/instruments/banjo/Cn4.ogg b/sound/instruments/banjo/Cn4.ogg
new file mode 100644
index 00000000000..4a26a6741db
Binary files /dev/null and b/sound/instruments/banjo/Cn4.ogg differ
diff --git a/sound/instruments/banjo/Cn5.ogg b/sound/instruments/banjo/Cn5.ogg
new file mode 100644
index 00000000000..901ed3bc08b
Binary files /dev/null and b/sound/instruments/banjo/Cn5.ogg differ
diff --git a/sound/instruments/banjo/Cn6.ogg b/sound/instruments/banjo/Cn6.ogg
new file mode 100644
index 00000000000..5cdbbb17cea
Binary files /dev/null and b/sound/instruments/banjo/Cn6.ogg differ
diff --git a/sound/instruments/banjo/Db3.ogg b/sound/instruments/banjo/Db3.ogg
new file mode 100644
index 00000000000..1ebffdf5025
Binary files /dev/null and b/sound/instruments/banjo/Db3.ogg differ
diff --git a/sound/instruments/banjo/Db4.ogg b/sound/instruments/banjo/Db4.ogg
new file mode 100644
index 00000000000..5b939365086
Binary files /dev/null and b/sound/instruments/banjo/Db4.ogg differ
diff --git a/sound/instruments/banjo/Db5.ogg b/sound/instruments/banjo/Db5.ogg
new file mode 100644
index 00000000000..6ee4dde9479
Binary files /dev/null and b/sound/instruments/banjo/Db5.ogg differ
diff --git a/sound/instruments/banjo/Db6.ogg b/sound/instruments/banjo/Db6.ogg
new file mode 100644
index 00000000000..fd73894fda6
Binary files /dev/null and b/sound/instruments/banjo/Db6.ogg differ
diff --git a/sound/instruments/banjo/Dn3.ogg b/sound/instruments/banjo/Dn3.ogg
new file mode 100644
index 00000000000..77491b01b8c
Binary files /dev/null and b/sound/instruments/banjo/Dn3.ogg differ
diff --git a/sound/instruments/banjo/Dn4.ogg b/sound/instruments/banjo/Dn4.ogg
new file mode 100644
index 00000000000..11f68b5a157
Binary files /dev/null and b/sound/instruments/banjo/Dn4.ogg differ
diff --git a/sound/instruments/banjo/Dn5.ogg b/sound/instruments/banjo/Dn5.ogg
new file mode 100644
index 00000000000..2e9ebe49891
Binary files /dev/null and b/sound/instruments/banjo/Dn5.ogg differ
diff --git a/sound/instruments/banjo/Dn6.ogg b/sound/instruments/banjo/Dn6.ogg
new file mode 100644
index 00000000000..89ae62361dc
Binary files /dev/null and b/sound/instruments/banjo/Dn6.ogg differ
diff --git a/sound/instruments/banjo/Eb3.ogg b/sound/instruments/banjo/Eb3.ogg
new file mode 100644
index 00000000000..1d1e43049d2
Binary files /dev/null and b/sound/instruments/banjo/Eb3.ogg differ
diff --git a/sound/instruments/banjo/Eb4.ogg b/sound/instruments/banjo/Eb4.ogg
new file mode 100644
index 00000000000..2722655f5a3
Binary files /dev/null and b/sound/instruments/banjo/Eb4.ogg differ
diff --git a/sound/instruments/banjo/Eb5.ogg b/sound/instruments/banjo/Eb5.ogg
new file mode 100644
index 00000000000..7a109dfdf79
Binary files /dev/null and b/sound/instruments/banjo/Eb5.ogg differ
diff --git a/sound/instruments/banjo/En3.ogg b/sound/instruments/banjo/En3.ogg
new file mode 100644
index 00000000000..4610efdd4f0
Binary files /dev/null and b/sound/instruments/banjo/En3.ogg differ
diff --git a/sound/instruments/banjo/En4.ogg b/sound/instruments/banjo/En4.ogg
new file mode 100644
index 00000000000..64c14daf915
Binary files /dev/null and b/sound/instruments/banjo/En4.ogg differ
diff --git a/sound/instruments/banjo/En5.ogg b/sound/instruments/banjo/En5.ogg
new file mode 100644
index 00000000000..8e0b6c1637e
Binary files /dev/null and b/sound/instruments/banjo/En5.ogg differ
diff --git a/sound/instruments/banjo/Fn3.ogg b/sound/instruments/banjo/Fn3.ogg
new file mode 100644
index 00000000000..5cdc4f13fb3
Binary files /dev/null and b/sound/instruments/banjo/Fn3.ogg differ
diff --git a/sound/instruments/banjo/Fn4.ogg b/sound/instruments/banjo/Fn4.ogg
new file mode 100644
index 00000000000..78d5454f186
Binary files /dev/null and b/sound/instruments/banjo/Fn4.ogg differ
diff --git a/sound/instruments/banjo/Fn5.ogg b/sound/instruments/banjo/Fn5.ogg
new file mode 100644
index 00000000000..b21559b4656
Binary files /dev/null and b/sound/instruments/banjo/Fn5.ogg differ
diff --git a/sound/instruments/banjo/Gb3.ogg b/sound/instruments/banjo/Gb3.ogg
new file mode 100644
index 00000000000..fd055b74717
Binary files /dev/null and b/sound/instruments/banjo/Gb3.ogg differ
diff --git a/sound/instruments/banjo/Gb4.ogg b/sound/instruments/banjo/Gb4.ogg
new file mode 100644
index 00000000000..f2c62510ed0
Binary files /dev/null and b/sound/instruments/banjo/Gb4.ogg differ
diff --git a/sound/instruments/banjo/Gb5.ogg b/sound/instruments/banjo/Gb5.ogg
new file mode 100644
index 00000000000..ab17347912b
Binary files /dev/null and b/sound/instruments/banjo/Gb5.ogg differ
diff --git a/sound/instruments/banjo/Gn3.ogg b/sound/instruments/banjo/Gn3.ogg
new file mode 100644
index 00000000000..ad52ef85c08
Binary files /dev/null and b/sound/instruments/banjo/Gn3.ogg differ
diff --git a/sound/instruments/banjo/Gn4.ogg b/sound/instruments/banjo/Gn4.ogg
new file mode 100644
index 00000000000..2ddb13b86b3
Binary files /dev/null and b/sound/instruments/banjo/Gn4.ogg differ
diff --git a/sound/instruments/banjo/Gn5.ogg b/sound/instruments/banjo/Gn5.ogg
new file mode 100644
index 00000000000..d5a7886c4cf
Binary files /dev/null and b/sound/instruments/banjo/Gn5.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_brass/c2.ogg b/sound/instruments/synthesis_samples/brass/crisis_brass/c2.ogg
new file mode 100644
index 00000000000..aaa1e27ab89
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_brass/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_brass/c3.ogg b/sound/instruments/synthesis_samples/brass/crisis_brass/c3.ogg
new file mode 100644
index 00000000000..ce50e76aae6
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_brass/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_brass/c4.ogg b/sound/instruments/synthesis_samples/brass/crisis_brass/c4.ogg
new file mode 100644
index 00000000000..22f34d67592
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_brass/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_brass/c5.ogg b/sound/instruments/synthesis_samples/brass/crisis_brass/c5.ogg
new file mode 100644
index 00000000000..eb5bb7c295e
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_brass/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trombone/C2.ogg b/sound/instruments/synthesis_samples/brass/crisis_trombone/C2.ogg
new file mode 100644
index 00000000000..bd299e321ab
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trombone/C2.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trombone/C3.ogg b/sound/instruments/synthesis_samples/brass/crisis_trombone/C3.ogg
new file mode 100644
index 00000000000..0519d2d20dd
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trombone/C3.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trombone/C4.ogg b/sound/instruments/synthesis_samples/brass/crisis_trombone/C4.ogg
new file mode 100644
index 00000000000..3b969a34b1c
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trombone/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trombone/C5.ogg b/sound/instruments/synthesis_samples/brass/crisis_trombone/C5.ogg
new file mode 100644
index 00000000000..75f709c16fe
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trombone/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trumpet/C4.ogg b/sound/instruments/synthesis_samples/brass/crisis_trumpet/C4.ogg
new file mode 100644
index 00000000000..ba347f80034
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trumpet/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/brass/crisis_trumpet/C5.ogg b/sound/instruments/synthesis_samples/brass/crisis_trumpet/C5.ogg
new file mode 100644
index 00000000000..cee89761d0d
Binary files /dev/null and b/sound/instruments/synthesis_samples/brass/crisis_trumpet/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C2.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C2.ogg
new file mode 100644
index 00000000000..105f7676557
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C2.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C3.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C3.ogg
new file mode 100644
index 00000000000..4aa33b6cded
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C3.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C4.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C4.ogg
new file mode 100644
index 00000000000..d661e8d7580
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C5.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C5.ogg
new file mode 100644
index 00000000000..bf650f1a6fa
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C6.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C6.ogg
new file mode 100644
index 00000000000..c00f7949b7e
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C6.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C7.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C7.ogg
new file mode 100644
index 00000000000..72588e9ca4c
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C7.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C8.ogg b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C8.ogg
new file mode 100644
index 00000000000..b2a0b445b92
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/fluid_celeste/C8.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/sgmbox/c2.ogg b/sound/instruments/synthesis_samples/chromatic/sgmbox/c2.ogg
new file mode 100644
index 00000000000..ecf6778343b
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/sgmbox/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/sgmbox/c3.ogg b/sound/instruments/synthesis_samples/chromatic/sgmbox/c3.ogg
new file mode 100644
index 00000000000..867e9ce00d0
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/sgmbox/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/sgmbox/c4.ogg b/sound/instruments/synthesis_samples/chromatic/sgmbox/c4.ogg
new file mode 100644
index 00000000000..446d45993e8
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/sgmbox/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/sgmbox/c5.ogg b/sound/instruments/synthesis_samples/chromatic/sgmbox/c5.ogg
new file mode 100644
index 00000000000..54d56400c03
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/sgmbox/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/vibraphone1/c2.ogg b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c2.ogg
new file mode 100644
index 00000000000..f3770c1f1a0
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/vibraphone1/c3.ogg b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c3.ogg
new file mode 100644
index 00000000000..28954fbb47f
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/vibraphone1/c4.ogg b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c4.ogg
new file mode 100644
index 00000000000..1233f5314a3
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/chromatic/vibraphone1/c5.ogg b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c5.ogg
new file mode 100644
index 00000000000..00daf331357
Binary files /dev/null and b/sound/instruments/synthesis_samples/chromatic/vibraphone1/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_clean/C2.ogg b/sound/instruments/synthesis_samples/guitar/crisis_clean/C2.ogg
new file mode 100644
index 00000000000..13ad54bff00
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_clean/C2.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_clean/C3.ogg b/sound/instruments/synthesis_samples/guitar/crisis_clean/C3.ogg
new file mode 100644
index 00000000000..17bf392c4b2
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_clean/C3.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_clean/C4.ogg b/sound/instruments/synthesis_samples/guitar/crisis_clean/C4.ogg
new file mode 100644
index 00000000000..feda419a0ad
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_clean/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_clean/C5.ogg b/sound/instruments/synthesis_samples/guitar/crisis_clean/C5.ogg
new file mode 100644
index 00000000000..bd088dd850e
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_clean/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_muted/C2.ogg b/sound/instruments/synthesis_samples/guitar/crisis_muted/C2.ogg
new file mode 100644
index 00000000000..09cdbeec42c
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_muted/C2.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_muted/C3.ogg b/sound/instruments/synthesis_samples/guitar/crisis_muted/C3.ogg
new file mode 100644
index 00000000000..f82c39cee5b
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_muted/C3.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_muted/C4.ogg b/sound/instruments/synthesis_samples/guitar/crisis_muted/C4.ogg
new file mode 100644
index 00000000000..23bfd113d6c
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_muted/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_muted/C5.ogg b/sound/instruments/synthesis_samples/guitar/crisis_muted/C5.ogg
new file mode 100644
index 00000000000..e5ec38d5ab8
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_muted/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_nylon/c2.ogg b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c2.ogg
new file mode 100644
index 00000000000..42a6cdfad3c
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_nylon/c3.ogg b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c3.ogg
new file mode 100644
index 00000000000..cd6414c0aa2
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_nylon/c4.ogg b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c4.ogg
new file mode 100644
index 00000000000..e5366018653
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_nylon/c5.ogg b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c5.ogg
new file mode 100644
index 00000000000..60382228374
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_nylon/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_steel/c2.ogg b/sound/instruments/synthesis_samples/guitar/crisis_steel/c2.ogg
new file mode 100644
index 00000000000..648549d594a
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_steel/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_steel/c3.ogg b/sound/instruments/synthesis_samples/guitar/crisis_steel/c3.ogg
new file mode 100644
index 00000000000..01ba59a908c
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_steel/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_steel/c4.ogg b/sound/instruments/synthesis_samples/guitar/crisis_steel/c4.ogg
new file mode 100644
index 00000000000..7cfaa8ca72b
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_steel/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/guitar/crisis_steel/c5.ogg b/sound/instruments/synthesis_samples/guitar/crisis_steel/c5.ogg
new file mode 100644
index 00000000000..b4ca49dc047
Binary files /dev/null and b/sound/instruments/synthesis_samples/guitar/crisis_steel/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_accordian/c2.ogg b/sound/instruments/synthesis_samples/organ/crisis_accordian/c2.ogg
new file mode 100644
index 00000000000..7c9870a7c3b
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_accordian/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_accordian/c3.ogg b/sound/instruments/synthesis_samples/organ/crisis_accordian/c3.ogg
new file mode 100644
index 00000000000..5723c2edd27
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_accordian/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_accordian/c4.ogg b/sound/instruments/synthesis_samples/organ/crisis_accordian/c4.ogg
new file mode 100644
index 00000000000..329f14f6feb
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_accordian/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_accordian/c5.ogg b/sound/instruments/synthesis_samples/organ/crisis_accordian/c5.ogg
new file mode 100644
index 00000000000..5e8ac69de28
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_accordian/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_church/c2.ogg b/sound/instruments/synthesis_samples/organ/crisis_church/c2.ogg
new file mode 100644
index 00000000000..ddc44c69c29
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_church/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_church/c3.ogg b/sound/instruments/synthesis_samples/organ/crisis_church/c3.ogg
new file mode 100644
index 00000000000..28557475284
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_church/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_church/c4.ogg b/sound/instruments/synthesis_samples/organ/crisis_church/c4.ogg
new file mode 100644
index 00000000000..906fff5bd8d
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_church/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_church/c5.ogg b/sound/instruments/synthesis_samples/organ/crisis_church/c5.ogg
new file mode 100644
index 00000000000..96d28a7206d
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_church/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_hammond/c2.ogg b/sound/instruments/synthesis_samples/organ/crisis_hammond/c2.ogg
new file mode 100644
index 00000000000..9b917b7eb53
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_hammond/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_hammond/c3.ogg b/sound/instruments/synthesis_samples/organ/crisis_hammond/c3.ogg
new file mode 100644
index 00000000000..c68410d6f09
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_hammond/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_hammond/c4.ogg b/sound/instruments/synthesis_samples/organ/crisis_hammond/c4.ogg
new file mode 100644
index 00000000000..df84ba99e8e
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_hammond/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_hammond/c5.ogg b/sound/instruments/synthesis_samples/organ/crisis_hammond/c5.ogg
new file mode 100644
index 00000000000..af8c178efe8
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_hammond/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_harmonica/c3.ogg b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c3.ogg
new file mode 100644
index 00000000000..268b41f1fce
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_harmonica/c4.ogg b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c4.ogg
new file mode 100644
index 00000000000..04ceb54bfc2
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_harmonica/c5.ogg b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c5.ogg
new file mode 100644
index 00000000000..b321983e74f
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_harmonica/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c2.ogg b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c2.ogg
new file mode 100644
index 00000000000..250a5c08e08
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c3.ogg b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c3.ogg
new file mode 100644
index 00000000000..8b1c23007bb
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c4.ogg b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c4.ogg
new file mode 100644
index 00000000000..098587183bb
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c5.ogg b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c5.ogg
new file mode 100644
index 00000000000..81b60ef4c2f
Binary files /dev/null and b/sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c2.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c2.ogg
new file mode 100644
index 00000000000..39e992fbd85
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c3.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c3.ogg
new file mode 100644
index 00000000000..04aa9852815
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c4.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c4.ogg
new file mode 100644
index 00000000000..aff97942e9e
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c5.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c5.ogg
new file mode 100644
index 00000000000..19fd937707a
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c6.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c6.ogg
new file mode 100644
index 00000000000..452e7485be1
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c6.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c7.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c7.ogg
new file mode 100644
index 00000000000..66c88185a73
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c7.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c8.ogg b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c8.ogg
new file mode 100644
index 00000000000..d93c5176ced
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_bright_piano/c8.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c2.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c2.ogg
new file mode 100644
index 00000000000..fabd90d2e6a
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c3.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c3.ogg
new file mode 100644
index 00000000000..e4cda1487aa
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c4.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c4.ogg
new file mode 100644
index 00000000000..c596994b3eb
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c5.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c5.ogg
new file mode 100644
index 00000000000..d265514e27b
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c6.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c6.ogg
new file mode 100644
index 00000000000..3e17b3f99a6
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c6.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c7.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c7.ogg
new file mode 100644
index 00000000000..b57a8a9109a
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c7.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c8.ogg b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c8.ogg
new file mode 100644
index 00000000000..ce4d9535e84
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_grand_piano/c8.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c2.ogg b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c2.ogg
new file mode 100644
index 00000000000..bb02363fffb
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c3.ogg b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c3.ogg
new file mode 100644
index 00000000000..1a532ac8d42
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c4.ogg b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c4.ogg
new file mode 100644
index 00000000000..16ff313baa3
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c5.ogg b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c5.ogg
new file mode 100644
index 00000000000..04161d2571b
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/crisis_harpsichord/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C2.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C2.ogg
new file mode 100644
index 00000000000..30a3c653a1c
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C2.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C3.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C3.ogg
new file mode 100644
index 00000000000..f6bc891506c
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C3.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C4.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C4.ogg
new file mode 100644
index 00000000000..ab47f6940c9
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C4.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C5.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C5.ogg
new file mode 100644
index 00000000000..5dfb9aa5291
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C6.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C6.ogg
new file mode 100644
index 00000000000..7bc8784207e
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C6.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C7.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C7.ogg
new file mode 100644
index 00000000000..185b4d3db64
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C7.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_harpsi/C8.ogg b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C8.ogg
new file mode 100644
index 00000000000..f358ef0810d
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_harpsi/C8.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c2.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c2.ogg
new file mode 100644
index 00000000000..048f9640bfe
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c2.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c3.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c3.ogg
new file mode 100644
index 00000000000..f1083d7dcb2
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c3.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c4.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c4.ogg
new file mode 100644
index 00000000000..244ebc3d5f2
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c4.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c5.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c5.ogg
new file mode 100644
index 00000000000..d3c68d64e9c
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c5.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c6.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c6.ogg
new file mode 100644
index 00000000000..2666ee66134
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c6.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c7.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c7.ogg
new file mode 100644
index 00000000000..050e463c0d1
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c7.ogg differ
diff --git a/sound/instruments/synthesis_samples/piano/fluid_piano/c8.ogg b/sound/instruments/synthesis_samples/piano/fluid_piano/c8.ogg
new file mode 100644
index 00000000000..4793c5b7fd7
Binary files /dev/null and b/sound/instruments/synthesis_samples/piano/fluid_piano/c8.ogg differ
diff --git a/sound/instruments/synthesis_samples/tones/Sawtooth.ogg b/sound/instruments/synthesis_samples/tones/Sawtooth.ogg
new file mode 100644
index 00000000000..10b1930a64c
Binary files /dev/null and b/sound/instruments/synthesis_samples/tones/Sawtooth.ogg differ
diff --git a/sound/instruments/synthesis_samples/tones/Sine.ogg b/sound/instruments/synthesis_samples/tones/Sine.ogg
new file mode 100644
index 00000000000..96a09d501b5
Binary files /dev/null and b/sound/instruments/synthesis_samples/tones/Sine.ogg differ
diff --git a/sound/instruments/synthesis_samples/tones/Square.ogg b/sound/instruments/synthesis_samples/tones/Square.ogg
new file mode 100644
index 00000000000..71029c07f95
Binary files /dev/null and b/sound/instruments/synthesis_samples/tones/Square.ogg differ
diff --git a/sound/instruments/violin/Ab1.mid b/sound/instruments/violin/Ab1.mid
new file mode 100644
index 00000000000..b8253364b4e
Binary files /dev/null and b/sound/instruments/violin/Ab1.mid differ
diff --git a/sound/instruments/violin/Ab2.mid b/sound/instruments/violin/Ab2.mid
new file mode 100644
index 00000000000..4cd7f9b55a7
Binary files /dev/null and b/sound/instruments/violin/Ab2.mid differ
diff --git a/sound/instruments/violin/Ab3.mid b/sound/instruments/violin/Ab3.mid
new file mode 100644
index 00000000000..e827cfc635e
Binary files /dev/null and b/sound/instruments/violin/Ab3.mid differ
diff --git a/sound/instruments/violin/Ab4.mid b/sound/instruments/violin/Ab4.mid
new file mode 100644
index 00000000000..57e1f76c976
Binary files /dev/null and b/sound/instruments/violin/Ab4.mid differ
diff --git a/sound/instruments/violin/Ab5.mid b/sound/instruments/violin/Ab5.mid
new file mode 100644
index 00000000000..59e95a6d997
Binary files /dev/null and b/sound/instruments/violin/Ab5.mid differ
diff --git a/sound/instruments/violin/Ab6.mid b/sound/instruments/violin/Ab6.mid
new file mode 100644
index 00000000000..9bd3436287b
Binary files /dev/null and b/sound/instruments/violin/Ab6.mid differ
diff --git a/sound/instruments/violin/Ab7.mid b/sound/instruments/violin/Ab7.mid
new file mode 100644
index 00000000000..3c90af807e2
Binary files /dev/null and b/sound/instruments/violin/Ab7.mid differ
diff --git a/sound/instruments/violin/Ab8.mid b/sound/instruments/violin/Ab8.mid
new file mode 100644
index 00000000000..873d771f2ae
Binary files /dev/null and b/sound/instruments/violin/Ab8.mid differ
diff --git a/sound/instruments/violin/An1.mid b/sound/instruments/violin/An1.mid
new file mode 100644
index 00000000000..d7f8a001d93
Binary files /dev/null and b/sound/instruments/violin/An1.mid differ
diff --git a/sound/instruments/violin/An2.mid b/sound/instruments/violin/An2.mid
new file mode 100644
index 00000000000..2f01800a075
Binary files /dev/null and b/sound/instruments/violin/An2.mid differ
diff --git a/sound/instruments/violin/An3.mid b/sound/instruments/violin/An3.mid
new file mode 100644
index 00000000000..c8ed3cdfa6c
Binary files /dev/null and b/sound/instruments/violin/An3.mid differ
diff --git a/sound/instruments/violin/An4.mid b/sound/instruments/violin/An4.mid
new file mode 100644
index 00000000000..e7984ca7e62
Binary files /dev/null and b/sound/instruments/violin/An4.mid differ
diff --git a/sound/instruments/violin/An5.mid b/sound/instruments/violin/An5.mid
new file mode 100644
index 00000000000..e1fd228f7a9
Binary files /dev/null and b/sound/instruments/violin/An5.mid differ
diff --git a/sound/instruments/violin/An6.mid b/sound/instruments/violin/An6.mid
new file mode 100644
index 00000000000..1c8df6c98e5
Binary files /dev/null and b/sound/instruments/violin/An6.mid differ
diff --git a/sound/instruments/violin/An7.mid b/sound/instruments/violin/An7.mid
new file mode 100644
index 00000000000..2784428daf9
Binary files /dev/null and b/sound/instruments/violin/An7.mid differ
diff --git a/sound/instruments/violin/An8.mid b/sound/instruments/violin/An8.mid
new file mode 100644
index 00000000000..2db2ab70a7d
Binary files /dev/null and b/sound/instruments/violin/An8.mid differ
diff --git a/sound/instruments/violin/Bb1.mid b/sound/instruments/violin/Bb1.mid
new file mode 100644
index 00000000000..693b73f5420
Binary files /dev/null and b/sound/instruments/violin/Bb1.mid differ
diff --git a/sound/instruments/violin/Bb2.mid b/sound/instruments/violin/Bb2.mid
new file mode 100644
index 00000000000..40da5f3da15
Binary files /dev/null and b/sound/instruments/violin/Bb2.mid differ
diff --git a/sound/instruments/violin/Bb3.mid b/sound/instruments/violin/Bb3.mid
new file mode 100644
index 00000000000..5bab6ccd636
Binary files /dev/null and b/sound/instruments/violin/Bb3.mid differ
diff --git a/sound/instruments/violin/Bb4.mid b/sound/instruments/violin/Bb4.mid
new file mode 100644
index 00000000000..dce830448ef
Binary files /dev/null and b/sound/instruments/violin/Bb4.mid differ
diff --git a/sound/instruments/violin/Bb5.mid b/sound/instruments/violin/Bb5.mid
new file mode 100644
index 00000000000..fda796e27b9
Binary files /dev/null and b/sound/instruments/violin/Bb5.mid differ
diff --git a/sound/instruments/violin/Bb6.mid b/sound/instruments/violin/Bb6.mid
new file mode 100644
index 00000000000..9e5da684f43
Binary files /dev/null and b/sound/instruments/violin/Bb6.mid differ
diff --git a/sound/instruments/violin/Bb7.mid b/sound/instruments/violin/Bb7.mid
new file mode 100644
index 00000000000..215c56cbe7e
Binary files /dev/null and b/sound/instruments/violin/Bb7.mid differ
diff --git a/sound/instruments/violin/Bb8.mid b/sound/instruments/violin/Bb8.mid
new file mode 100644
index 00000000000..4b55c34691f
Binary files /dev/null and b/sound/instruments/violin/Bb8.mid differ
diff --git a/sound/instruments/violin/Bn1.mid b/sound/instruments/violin/Bn1.mid
new file mode 100644
index 00000000000..27968b5f9e7
Binary files /dev/null and b/sound/instruments/violin/Bn1.mid differ
diff --git a/sound/instruments/violin/Bn2.mid b/sound/instruments/violin/Bn2.mid
new file mode 100644
index 00000000000..54c9b99d03f
Binary files /dev/null and b/sound/instruments/violin/Bn2.mid differ
diff --git a/sound/instruments/violin/Bn3.mid b/sound/instruments/violin/Bn3.mid
new file mode 100644
index 00000000000..f73476fb7bb
Binary files /dev/null and b/sound/instruments/violin/Bn3.mid differ
diff --git a/sound/instruments/violin/Bn4.mid b/sound/instruments/violin/Bn4.mid
new file mode 100644
index 00000000000..2aa30708a6c
Binary files /dev/null and b/sound/instruments/violin/Bn4.mid differ
diff --git a/sound/instruments/violin/Bn5.mid b/sound/instruments/violin/Bn5.mid
new file mode 100644
index 00000000000..0ebe636b714
Binary files /dev/null and b/sound/instruments/violin/Bn5.mid differ
diff --git a/sound/instruments/violin/Bn6.mid b/sound/instruments/violin/Bn6.mid
new file mode 100644
index 00000000000..3b8e1c217f7
Binary files /dev/null and b/sound/instruments/violin/Bn6.mid differ
diff --git a/sound/instruments/violin/Bn7.mid b/sound/instruments/violin/Bn7.mid
new file mode 100644
index 00000000000..afcb1982a13
Binary files /dev/null and b/sound/instruments/violin/Bn7.mid differ
diff --git a/sound/instruments/violin/Bn8.mid b/sound/instruments/violin/Bn8.mid
new file mode 100644
index 00000000000..3afd469256c
Binary files /dev/null and b/sound/instruments/violin/Bn8.mid differ
diff --git a/sound/instruments/violin/Cn1.mid b/sound/instruments/violin/Cn1.mid
new file mode 100644
index 00000000000..857120f31f4
Binary files /dev/null and b/sound/instruments/violin/Cn1.mid differ
diff --git a/sound/instruments/violin/Cn2.mid b/sound/instruments/violin/Cn2.mid
new file mode 100644
index 00000000000..3ccd6670e87
Binary files /dev/null and b/sound/instruments/violin/Cn2.mid differ
diff --git a/sound/instruments/violin/Cn3.mid b/sound/instruments/violin/Cn3.mid
new file mode 100644
index 00000000000..1851e4f8d27
Binary files /dev/null and b/sound/instruments/violin/Cn3.mid differ
diff --git a/sound/instruments/violin/Cn4.mid b/sound/instruments/violin/Cn4.mid
new file mode 100644
index 00000000000..65e8b0efe4e
Binary files /dev/null and b/sound/instruments/violin/Cn4.mid differ
diff --git a/sound/instruments/violin/Cn5.mid b/sound/instruments/violin/Cn5.mid
new file mode 100644
index 00000000000..544f921e43b
Binary files /dev/null and b/sound/instruments/violin/Cn5.mid differ
diff --git a/sound/instruments/violin/Cn6.mid b/sound/instruments/violin/Cn6.mid
new file mode 100644
index 00000000000..7c78dab2f07
Binary files /dev/null and b/sound/instruments/violin/Cn6.mid differ
diff --git a/sound/instruments/violin/Cn7.mid b/sound/instruments/violin/Cn7.mid
new file mode 100644
index 00000000000..3abe4cde086
Binary files /dev/null and b/sound/instruments/violin/Cn7.mid differ
diff --git a/sound/instruments/violin/Cn8.mid b/sound/instruments/violin/Cn8.mid
new file mode 100644
index 00000000000..06f14081b3b
Binary files /dev/null and b/sound/instruments/violin/Cn8.mid differ
diff --git a/sound/instruments/violin/Cn9.mid b/sound/instruments/violin/Cn9.mid
new file mode 100644
index 00000000000..62f4eef045a
Binary files /dev/null and b/sound/instruments/violin/Cn9.mid differ
diff --git a/sound/instruments/violin/Db1.mid b/sound/instruments/violin/Db1.mid
new file mode 100644
index 00000000000..88dba851452
Binary files /dev/null and b/sound/instruments/violin/Db1.mid differ
diff --git a/sound/instruments/violin/Db2.mid b/sound/instruments/violin/Db2.mid
new file mode 100644
index 00000000000..b510926b45f
Binary files /dev/null and b/sound/instruments/violin/Db2.mid differ
diff --git a/sound/instruments/violin/Db3.mid b/sound/instruments/violin/Db3.mid
new file mode 100644
index 00000000000..9954bbe478a
Binary files /dev/null and b/sound/instruments/violin/Db3.mid differ
diff --git a/sound/instruments/violin/Db4.mid b/sound/instruments/violin/Db4.mid
new file mode 100644
index 00000000000..2c5ff74db0a
Binary files /dev/null and b/sound/instruments/violin/Db4.mid differ
diff --git a/sound/instruments/violin/Db5.mid b/sound/instruments/violin/Db5.mid
new file mode 100644
index 00000000000..e5850a3fd04
Binary files /dev/null and b/sound/instruments/violin/Db5.mid differ
diff --git a/sound/instruments/violin/Db6.mid b/sound/instruments/violin/Db6.mid
new file mode 100644
index 00000000000..217c0ad014c
Binary files /dev/null and b/sound/instruments/violin/Db6.mid differ
diff --git a/sound/instruments/violin/Db7.mid b/sound/instruments/violin/Db7.mid
new file mode 100644
index 00000000000..ec32bdbf904
Binary files /dev/null and b/sound/instruments/violin/Db7.mid differ
diff --git a/sound/instruments/violin/Db8.mid b/sound/instruments/violin/Db8.mid
new file mode 100644
index 00000000000..555bce3db0d
Binary files /dev/null and b/sound/instruments/violin/Db8.mid differ
diff --git a/sound/instruments/violin/Dn1.mid b/sound/instruments/violin/Dn1.mid
new file mode 100644
index 00000000000..92e4e0d9581
Binary files /dev/null and b/sound/instruments/violin/Dn1.mid differ
diff --git a/sound/instruments/violin/Dn2.mid b/sound/instruments/violin/Dn2.mid
new file mode 100644
index 00000000000..34eb9d1db1b
Binary files /dev/null and b/sound/instruments/violin/Dn2.mid differ
diff --git a/sound/instruments/violin/Dn3.mid b/sound/instruments/violin/Dn3.mid
new file mode 100644
index 00000000000..fbd56085aaf
Binary files /dev/null and b/sound/instruments/violin/Dn3.mid differ
diff --git a/sound/instruments/violin/Dn4.mid b/sound/instruments/violin/Dn4.mid
new file mode 100644
index 00000000000..e13c7448292
Binary files /dev/null and b/sound/instruments/violin/Dn4.mid differ
diff --git a/sound/instruments/violin/Dn5.mid b/sound/instruments/violin/Dn5.mid
new file mode 100644
index 00000000000..8fd41e5c6fe
Binary files /dev/null and b/sound/instruments/violin/Dn5.mid differ
diff --git a/sound/instruments/violin/Dn6.mid b/sound/instruments/violin/Dn6.mid
new file mode 100644
index 00000000000..d47329e8f9e
Binary files /dev/null and b/sound/instruments/violin/Dn6.mid differ
diff --git a/sound/instruments/violin/Dn7.mid b/sound/instruments/violin/Dn7.mid
new file mode 100644
index 00000000000..b2496603876
Binary files /dev/null and b/sound/instruments/violin/Dn7.mid differ
diff --git a/sound/instruments/violin/Dn8.mid b/sound/instruments/violin/Dn8.mid
new file mode 100644
index 00000000000..56667a1a86d
Binary files /dev/null and b/sound/instruments/violin/Dn8.mid differ
diff --git a/sound/instruments/violin/Eb1.mid b/sound/instruments/violin/Eb1.mid
new file mode 100644
index 00000000000..829e6fcf185
Binary files /dev/null and b/sound/instruments/violin/Eb1.mid differ
diff --git a/sound/instruments/violin/Eb2.mid b/sound/instruments/violin/Eb2.mid
new file mode 100644
index 00000000000..66029b340cc
Binary files /dev/null and b/sound/instruments/violin/Eb2.mid differ
diff --git a/sound/instruments/violin/Eb3.mid b/sound/instruments/violin/Eb3.mid
new file mode 100644
index 00000000000..c982375941e
Binary files /dev/null and b/sound/instruments/violin/Eb3.mid differ
diff --git a/sound/instruments/violin/Eb4.mid b/sound/instruments/violin/Eb4.mid
new file mode 100644
index 00000000000..016ed4f1edf
Binary files /dev/null and b/sound/instruments/violin/Eb4.mid differ
diff --git a/sound/instruments/violin/Eb5.mid b/sound/instruments/violin/Eb5.mid
new file mode 100644
index 00000000000..ddb511795df
Binary files /dev/null and b/sound/instruments/violin/Eb5.mid differ
diff --git a/sound/instruments/violin/Eb6.mid b/sound/instruments/violin/Eb6.mid
new file mode 100644
index 00000000000..b7242b9ab99
Binary files /dev/null and b/sound/instruments/violin/Eb6.mid differ
diff --git a/sound/instruments/violin/Eb7.mid b/sound/instruments/violin/Eb7.mid
new file mode 100644
index 00000000000..773538340a5
Binary files /dev/null and b/sound/instruments/violin/Eb7.mid differ
diff --git a/sound/instruments/violin/Eb8.mid b/sound/instruments/violin/Eb8.mid
new file mode 100644
index 00000000000..4ad074e173b
Binary files /dev/null and b/sound/instruments/violin/Eb8.mid differ
diff --git a/sound/instruments/violin/En1.mid b/sound/instruments/violin/En1.mid
new file mode 100644
index 00000000000..79ab68df9df
Binary files /dev/null and b/sound/instruments/violin/En1.mid differ
diff --git a/sound/instruments/violin/En2.mid b/sound/instruments/violin/En2.mid
new file mode 100644
index 00000000000..cd61c8d0de5
Binary files /dev/null and b/sound/instruments/violin/En2.mid differ
diff --git a/sound/instruments/violin/En3.mid b/sound/instruments/violin/En3.mid
new file mode 100644
index 00000000000..da5b703d545
Binary files /dev/null and b/sound/instruments/violin/En3.mid differ
diff --git a/sound/instruments/violin/En4.mid b/sound/instruments/violin/En4.mid
new file mode 100644
index 00000000000..f7d3af024ff
Binary files /dev/null and b/sound/instruments/violin/En4.mid differ
diff --git a/sound/instruments/violin/En5.mid b/sound/instruments/violin/En5.mid
new file mode 100644
index 00000000000..d3d353943f9
Binary files /dev/null and b/sound/instruments/violin/En5.mid differ
diff --git a/sound/instruments/violin/En6.mid b/sound/instruments/violin/En6.mid
new file mode 100644
index 00000000000..73eb5b0697d
Binary files /dev/null and b/sound/instruments/violin/En6.mid differ
diff --git a/sound/instruments/violin/En7.mid b/sound/instruments/violin/En7.mid
new file mode 100644
index 00000000000..79a9462c844
Binary files /dev/null and b/sound/instruments/violin/En7.mid differ
diff --git a/sound/instruments/violin/En8.mid b/sound/instruments/violin/En8.mid
new file mode 100644
index 00000000000..88947fc7318
Binary files /dev/null and b/sound/instruments/violin/En8.mid differ
diff --git a/sound/instruments/violin/Fn1.mid b/sound/instruments/violin/Fn1.mid
new file mode 100644
index 00000000000..abe0d4e4051
Binary files /dev/null and b/sound/instruments/violin/Fn1.mid differ
diff --git a/sound/instruments/violin/Fn2.mid b/sound/instruments/violin/Fn2.mid
new file mode 100644
index 00000000000..d245bef3b54
Binary files /dev/null and b/sound/instruments/violin/Fn2.mid differ
diff --git a/sound/instruments/violin/Fn3.mid b/sound/instruments/violin/Fn3.mid
new file mode 100644
index 00000000000..e532e30dac9
Binary files /dev/null and b/sound/instruments/violin/Fn3.mid differ
diff --git a/sound/instruments/violin/Fn4.mid b/sound/instruments/violin/Fn4.mid
new file mode 100644
index 00000000000..47219c72fa2
Binary files /dev/null and b/sound/instruments/violin/Fn4.mid differ
diff --git a/sound/instruments/violin/Fn5.mid b/sound/instruments/violin/Fn5.mid
new file mode 100644
index 00000000000..630d16371d9
Binary files /dev/null and b/sound/instruments/violin/Fn5.mid differ
diff --git a/sound/instruments/violin/Fn6.mid b/sound/instruments/violin/Fn6.mid
new file mode 100644
index 00000000000..08cbc981bdb
Binary files /dev/null and b/sound/instruments/violin/Fn6.mid differ
diff --git a/sound/instruments/violin/Fn7.mid b/sound/instruments/violin/Fn7.mid
new file mode 100644
index 00000000000..6c28c7d272e
Binary files /dev/null and b/sound/instruments/violin/Fn7.mid differ
diff --git a/sound/instruments/violin/Fn8.mid b/sound/instruments/violin/Fn8.mid
new file mode 100644
index 00000000000..2d73762f269
Binary files /dev/null and b/sound/instruments/violin/Fn8.mid differ
diff --git a/sound/instruments/violin/Gb1.mid b/sound/instruments/violin/Gb1.mid
new file mode 100644
index 00000000000..d18668e8911
Binary files /dev/null and b/sound/instruments/violin/Gb1.mid differ
diff --git a/sound/instruments/violin/Gb2.mid b/sound/instruments/violin/Gb2.mid
new file mode 100644
index 00000000000..302f0c6fdc1
Binary files /dev/null and b/sound/instruments/violin/Gb2.mid differ
diff --git a/sound/instruments/violin/Gb3.mid b/sound/instruments/violin/Gb3.mid
new file mode 100644
index 00000000000..1f592fc9039
Binary files /dev/null and b/sound/instruments/violin/Gb3.mid differ
diff --git a/sound/instruments/violin/Gb4.mid b/sound/instruments/violin/Gb4.mid
new file mode 100644
index 00000000000..45854126f98
Binary files /dev/null and b/sound/instruments/violin/Gb4.mid differ
diff --git a/sound/instruments/violin/Gb5.mid b/sound/instruments/violin/Gb5.mid
new file mode 100644
index 00000000000..fb1e1da339a
Binary files /dev/null and b/sound/instruments/violin/Gb5.mid differ
diff --git a/sound/instruments/violin/Gb6.mid b/sound/instruments/violin/Gb6.mid
new file mode 100644
index 00000000000..bfa896bb784
Binary files /dev/null and b/sound/instruments/violin/Gb6.mid differ
diff --git a/sound/instruments/violin/Gb7.mid b/sound/instruments/violin/Gb7.mid
new file mode 100644
index 00000000000..a27763c1d47
Binary files /dev/null and b/sound/instruments/violin/Gb7.mid differ
diff --git a/sound/instruments/violin/Gb8.mid b/sound/instruments/violin/Gb8.mid
new file mode 100644
index 00000000000..aaab80a7276
Binary files /dev/null and b/sound/instruments/violin/Gb8.mid differ
diff --git a/sound/instruments/violin/Gn1.mid b/sound/instruments/violin/Gn1.mid
new file mode 100644
index 00000000000..1df52ab0760
Binary files /dev/null and b/sound/instruments/violin/Gn1.mid differ
diff --git a/sound/instruments/violin/Gn2.mid b/sound/instruments/violin/Gn2.mid
new file mode 100644
index 00000000000..6e0ca383127
Binary files /dev/null and b/sound/instruments/violin/Gn2.mid differ
diff --git a/sound/instruments/violin/Gn3.mid b/sound/instruments/violin/Gn3.mid
new file mode 100644
index 00000000000..bb3e6dedcbf
Binary files /dev/null and b/sound/instruments/violin/Gn3.mid differ
diff --git a/sound/instruments/violin/Gn4.mid b/sound/instruments/violin/Gn4.mid
new file mode 100644
index 00000000000..0c46432afee
Binary files /dev/null and b/sound/instruments/violin/Gn4.mid differ
diff --git a/sound/instruments/violin/Gn5.mid b/sound/instruments/violin/Gn5.mid
new file mode 100644
index 00000000000..f39dcf5e2b9
Binary files /dev/null and b/sound/instruments/violin/Gn5.mid differ
diff --git a/sound/instruments/violin/Gn6.mid b/sound/instruments/violin/Gn6.mid
new file mode 100644
index 00000000000..0efa2259ca1
Binary files /dev/null and b/sound/instruments/violin/Gn6.mid differ
diff --git a/sound/instruments/violin/Gn7.mid b/sound/instruments/violin/Gn7.mid
new file mode 100644
index 00000000000..22fd1b6bcb0
Binary files /dev/null and b/sound/instruments/violin/Gn7.mid differ
diff --git a/sound/instruments/violin/Gn8.mid b/sound/instruments/violin/Gn8.mid
new file mode 100644
index 00000000000..16b7171d627
Binary files /dev/null and b/sound/instruments/violin/Gn8.mid differ
diff --git a/sound/music/thunderdome.ogg b/sound/music/thunderdome.ogg
index 26b18df5e05..82780e416d4 100644
Binary files a/sound/music/thunderdome.ogg and b/sound/music/thunderdome.ogg differ
diff --git a/sound/turntable/testloop.ogg b/sound/turntable/testloop.ogg
deleted file mode 100644
index 453ad568fa2..00000000000
Binary files a/sound/turntable/testloop.ogg and /dev/null differ
diff --git a/sound/turntable/testloop1.ogg b/sound/turntable/testloop1.ogg
deleted file mode 100644
index 5e1210bfd06..00000000000
Binary files a/sound/turntable/testloop1.ogg and /dev/null differ
diff --git a/sound/turntable/testloop2.ogg b/sound/turntable/testloop2.ogg
deleted file mode 100644
index 5feaa762936..00000000000
Binary files a/sound/turntable/testloop2.ogg and /dev/null differ
diff --git a/sound/turntable/testloop3.ogg b/sound/turntable/testloop3.ogg
deleted file mode 100644
index 9ac0e02b773..00000000000
Binary files a/sound/turntable/testloop3.ogg and /dev/null differ
diff --git a/sound/weapons/banjoslap.ogg b/sound/weapons/banjoslap.ogg
new file mode 100644
index 00000000000..06a86a535dd
Binary files /dev/null and b/sound/weapons/banjoslap.ogg differ
diff --git a/sound/weapons/guitarslam.ogg b/sound/weapons/guitarslam.ogg
new file mode 100644
index 00000000000..4fa53db9404
Binary files /dev/null and b/sound/weapons/guitarslam.ogg differ
diff --git a/strings/tips.txt b/strings/tips.txt
index b2df1c17482..4218e01bbfe 100644
--- a/strings/tips.txt
+++ b/strings/tips.txt
@@ -1,4 +1,4 @@
-Where the space map levels connect is randomized every round, but are otherwise kept consistent within rounds.
+Space map levels' connections are randomized between rounds, but are otherwise kept consistent in the same round.
You can catch thrown items by toggling on your throw mode with an empty hand active.
To crack the safe in the vault, use a stethoscope or thermal drill.
You can climb onto a table by dragging yourself onto one. This takes some time. Clicking on a table that someone else is climbing onto will knock them down.
@@ -9,8 +9,8 @@ You can change the control scheme by pressing tab. One uses WASD for movement, w
Firesuits and winter coats offer mild protection from the cold, allowing you to spend longer periods of time near breaches and space than if wearing nothing at all.
Glass shards can be welded to make glass, and metal rods can be welded to make metal. Ores can be welded too, but this takes a lot of fuel.
If you need to drag multiple people either to safety or to space, bring a locker over and stuff them all in before hauling them off.
-You can grab someone by clicking on them with the grab intent, then upgrade the grab by clicking on them once more. An aggressive grab will momentarily stun someone, allow you to place them on a table by clicking on it, or throw them by toggling on throwing.
-Holding alt and left clicking a tile will allow you to see its contents in the top right window pane, which is much faster than right clicking.
+You can grab someone by clicking on them with the grab intent, then upgrade the grab by clicking on the grab itself. An aggressive grab will allow you to place them on a table by clicking on it, or throw them by toggling on throwing.
+Holding alt and left clicking a tile will allow you to see its contents in the top right window panel, which is much faster than right clicking.
The resist button will allow you to resist out of handcuffs, being buckled to a chair or bed, out of locked lockers and more. Whenever you're stuck, try resisting!
You can move an item out of the way by dragging it and then clicking on an adjacent tile with an empty hand.
You can recolor certain items like jumpsuits and gloves in washing machines by also throwing in a crayon.
@@ -21,7 +21,7 @@ When in doubt about technicial issues, clear your cache (byond launcher > cogwhe
Most things have special interactions with your middle mouse button, alt, shift, and control click. Experiment!
If you find yourself in a fistfight with another player, running away and calling for help is a perfectly viable option.
Different weapons have different strengths. Some weapons, such as spears, floor tiles, and throwing stars, deal more damage when thrown compared to when attacked normally.
-A thrown glass of water can make a slippery tile, allowing you to slow down your pursuers in a pinch.
+Clicking on a tile on harm intent with a glass of water can make a slippery tile, allowing you to slow down your pursuers in a pinch.
When dealing with security, you can often get your sentence negated entirely through cooperation and deception.
The P2P chat function found on tablet computers allows for a stealthy way to communicate with people.
We were all new once, be patient and guide new players in the right direction.
@@ -36,8 +36,8 @@ As the Captain, you have absolute access and control over the station, but this
As the Chief Medical Officer, your hypospray is like a refillable instant injection syringe that can hold 30 units and the unlike standard hypospray, yours is able to be filled with harmful reagents and injects without telling anyone what have you exactly injected the person with.
As the Chief Medical Officer, coordinate and communicate with your doctors, chemists, and geneticists during a nuclear emergency, blob infestation, or some other crisis to keep people alive and fighting.
As a Medical Doctor, you can surgically implant or extract things from people's chests. This can range from putting in a bomb to pulling out an alien larva.
-As a Medical Doctor, you must target the correct limb and be on help intent when trying to perform surgery on someone. Using disarm intent will intentionally fail the surgery step.
-As a Medical Doctor, corpses with the "...and their soul has departed" description no longer have a ghost attached to them and aren't revivable or clonable.
+As a Medical Doctor, you must target the correct limb and be on help intent when trying to perform surgery on someone.
+As a Medical Doctor, corpses with the "...and their soul has departed" description no longer have a ghost attached to them and aren't revivable or clonable right now, but they might be clonable later.
As a Medical Doctor, treating plasmamen is not impossible! Salbutamol stops them from suffocating and showers stop them from burning alive. You can even perform surgery on them by doing the procedure on a roller bed under a shower.
As a Chemist, there are dozens of chemicals that can heal, and even more that can cause harm. Experiment!
As a Chemist, some chemicals can only be synthesized by heating up the contents with a chemical heater or manually with lighters and similar tools.
@@ -50,7 +50,7 @@ As the Research Director, you can take AIs out of their cores by loading them in
As the Research Director, you can lock down cyborgs instead of blowing them up. Then you can have their laws reset or if that doesn't work, safely dismantled.
As the Research Director, you can spy on and even forge PDA communications with the message monitor console! The key is in your office.
As a Scientist, you can maximize the number of uses you get out of a slime by feeding it slime steroid, created from purple slimes, while alive. You can then apply extract enhancer, created from cerulean slimes, on each extract.
-As a Scientist, you can disable anomalies by scanning them with an analyzer, then send a signal on the frequency it gives you with a remote signaling device, or if researched, hit the anomaly with an anomaly analyzer. This will leave behind an anomaly core, which can be used to construct a Phazon mech or reactive armors!
+As a Scientist, you can disable anomalies by scanning them with an analyzer, then send a signal on the frequency it gives you with a remote signaling device. This will leave behind an anomaly core, which can be used to construct a Phazon mech!
As a Scientist, researchable stock parts can seriously improve the efficiency and speed of machines around the station. In some cases, it can even unlock new functions.
As a Roboticist, keep an ear out for anomaly announcements. If you get your hands on an anomaly core, you can build a Phazon mech!
As a Roboticist, you can repair your cyborgs with a welding tool. If they have taken burn damage, you can remove their battery, expose the wiring with a screwdriver and replace their wires with a cable coil.
@@ -59,12 +59,12 @@ As a Roboticist, you can augment people with cyborg limbs. Augmented limbs can e
As the AI, you can click on people's names to look at them. This only works if there are cameras that can see them, they aren't wearing agent IDs, or aren't using digital camouflage as changelings.
As the AI, you can quickly open and close doors by holding shift while clicking them, bolt them when holding ctrl, and even shock them while holding alt.
As the AI, you can take pictures with your camera and upload them to newscasters.
-As a Cyborg, choose your module carefully, as only cutting and mending your reset wire or using a cyborg reset module will let you repick it. If possible, refrain from choosing a module until a situation that requires one occurs.
+As a Cyborg, choose your module carefully, as only a cyborg reset module will let you repick it.
As a Cyborg, you are immune to most forms of stunning, and excel at almost everything far better than humans. However, flashes can easily stunlock you and you cannot do any precision work as you lack hands.
As a Cyborg, you are impervious to fires and heat. If you are rogue, you can release plasma fires everywhere and walk through them without a care in the world!
As a Cyborg, you are extremely vulnerable to EMPs as EMPs both stun you and damage you. The ion rifle in the armory or a traitor with an EMP kit can kill you in seconds.
-As an Engineering Cyborg, you can attach air alarm/fire alarm/APC frames to walls by placing them on the floor and using a screwdriver on them.
-As a Medical Cyborg, you can fully perform surgery and even augment people.
+As an Engineering Cyborg, you can attach air alarm/fire alarm/APC frames to walls by using your magnetic gripper.
+As a Medical Cyborg, you can partially perform surgery, as you cannot replace organs, but you cannot fail any surgery steps.
As a Janitor Cyborg, you are the bane of all slaughter demons. Cleaning up blood stains will severely gimp them.
As the Chief Engineer, you can rename areas or create entirely new ones using your station blueprints.
As the Chief Engineer, your hardsuit is significantly better than everybody else's. It has the best features of both engineering and atmospherics hardsuits, boasting nigh-invulnerability to radiation and all atmospheric conditions.
@@ -73,10 +73,10 @@ As an Engineer, you can electrify grilles by placing wire "nodes" beneath them:
As an Engineer, return to Engineering once in a while to check on the engine and SMES cells. It's always a good idea to make sure containment isn't compromised.
As an Engineer, you can power the station solely with the solar arrays. They will provide just enough electricity to power the station, however their output is still much worse compared to the true engine.
As an Engineer, you can cool a supermatter shard by spraying it with a fire extinguisher. Only for the brave!
-As an Engineer, you can repair windows by using a welding tool on them while on any intent other than harm.
+As an Engineer, you can repair windows by using a welding tool on them while on help intent.
As an Engineer, you can lock APCs, fire alarms, emitters, and radiation collectors using your ID card to prevent others from disabling them.
As an Engineer, don't underestimate the humble P.A.C.M.A.N. generators. With upgraded parts, a couple units working in tandem are sufficient to take over for an exploded engine or shattered solars.
-As an Engineer, you can pry open secure storage blast doors by disabling the engine room APC's main breaker. This is obviously a bad idea if the engine is running.
+As an Engineer, you can pry open secure storage blast doors by turning off the secure storage APC's enviroment power channel.
As an Atmospheric Technician, look into replacing your gas pumps with volumetric gas pumps, as those move air in flat numerical amounts, rather than percentages which leave trace gases.
As an Atmospheric Technician, you are better suited to fighting fires than anyone else. As such, you have access to better firesuits, backpack firefighter tanks, and a completely heat and fire proof hardsuit.
As an Atmospheric Technician, your backpack firefighter tank can launch cryofrost. This resin will extinguish fires and very quickly; it's ideal for plasma fires!
@@ -88,7 +88,7 @@ As the Warden, keep a close eye on the armory at all times, as it is a favored s
As the Warden, if a prisoner's crimes are heinous enough you can put them in permabrig or the gulag. Make sure to check on them once in a while!
As the Warden, you can implant criminals you suspect might re-offend with devices that will track their location and allow you to remotely inject them with disabling chemicals.
As a Security Officer, communicate and coordinate with your fellow officers using the security channel (:s) to avoid confusion.
-As a Security Officer, your sechuds or HUDsunglasses can not only see crewmates' job assignments and criminal status, but also if they are mindshield implanted. You can tell by the flashing blue outline around their job icon.
+As a Security Officer, your sechuds or HUDsunglasses let you see crewmates' job assignments, their criminal status, and whether they have a mindshield or not. A flashing green border around their job icon means they are mindshielded.
As a Security Officer, mindshield implants can only prevent someone from being turned into a cultist. It will not de-cult them if they have already been converted.
As a Security Officer, examining someone while wearing sechuds or HUDsunglasses will let you set their arrest level, which will cause Beepsky and other security bots to chase after them.
As the Detective, keep in mind that people leave fingerprints everywhere and on everything. With the exception of white latex, gloves will hide them. All is not lost, however, as gloves leave fibers specific to their kind such as black or nitrile, pointing to a general department.
@@ -111,7 +111,7 @@ As the Chaplain, you are much more likely to get a response by praying to the go
As a Botanist, you can hack the MegaSeed Vendor to get access to more exotic seeds. These seeds can alternatively be ordered from cargo.
As a Botanist, you can mutate the plants growing in your hydroponics trays with unstable mutagen or, as an alternative, crude radioactives from chemistry to get special variations.
As a Botanist, you should look into increasing the potency of your plants. This increases the size, amount of chemicals, points gained from grinding them in the biogenerator, and lets people know you are a proficient botanist.
-As a Botanist, you can combine production trait chemicals just like a Chemist. Chlorine (blumpkin) + radium and phosphorus (glowshrooms) equals unstable mutagen!
+As a Botanist, you can combine production trait chemicals just like a Chemist. Chlorine and plasma (blumpkin) + radium (glowshrooms) equals unstable mutagen!
As the Chef, you can create a very wide variety of food with the crafting menu. You can find it by looking for the hammer icon near your intents.
As the Chef, you can rename your custom made food with a pen.
As the Chef, if you are low on ingredients, consider making something that has several servings to last longer among the crew.
@@ -121,8 +121,8 @@ As a Janitor, mousetraps can be used to create bombs or booby-trap containers.
As the Librarian, be sure to keep the shelves stocked and the library clean for crew.
As a Cargo Technician, you can hack MULEbots to make them faster, run over people in their way, and even let you ride them!
As a Cargo Technician, you can order contraband items from the supply shuttle console by de-constructing it and using a multitool on the circuit board, the re-assembling it.
-As a Cargo Technician, you can earn more cargo points by shipping back crates from maintenance, liquid containers, plasma sheets, rare seeds from hydroponics, and more!
-As a Shaft Miner, the western side of the Asteroid has a lot more rare minerals than on the east, but is a lot more dangerous.
+As a Cargo Technician, you can earn more cargo points by shipping back crates from maintenance, plasma sheets, rare seeds from hydroponics, technology disks from R&D, and more!
+As a Shaft Miner, the north side of Lavaland has a lot more rare minerals than on the south, but is a lot more dangerous.
As a Shaft Miner, always have a GPS on you, so a fellow miner or cyborg can come to save you if you die.
As a Traitor, the cryptographic sequencer (emag) can not only open doors, but also lockers, crates, APCs and more. It can hack cyborgs, and even cause bots to go berserk. Use it on the right machines, and you can even order more traitor gear or contact the Syndicate. Experiment!
As a Traitor, subverting the AI to serve you can make it an extremely powerful ally. However, be careful of the wording in the laws you give it, as it may use your poorly written laws against you!
@@ -130,14 +130,14 @@ As a Traitor, the Captain and the Head of Security are two of the most difficult
As a Traitor, you can manufacture and recycle revolver bullets at a hacked autolathe, making the revolver an extremely powerful tool.
As a Traitor, you may sometimes be assigned to hunt other traitors, and in turn be hunted by others.
As a Traitor, the syndicate encryption key is very useful for coordinating plans with your fellow traitors -- or, of course, betraying them.
-As a Traitor, plasma can be injected into many things to sabotage them. Power cells, light bulbs, welding tools, cigars and e-cigs will all explode when used.
+As a Traitor, plasma can be injected into many things to sabotage them. Power cells, light bulbs, cigars and e-cigs will all explode when used.
As a Traitor, if you can find another Traitor and pool your TC you can buy a mega surplus crate, which costs 40TC but contains a lot of random syndicate gear.
As a Nuclear Operative, communication is key! Use ; to speak to your fellow operatives and coordinate an attack plan.
As a Nuclear Operative, you should look into purchasing a syndicate cyborg, as they can provide heavy fire support, full access, are immune to conventional stuns, and can easily take down the AI.
As a Nuclear Operative, stick together! While your equipment is robust, your fellow operatives are much better at saving your life: they can drag you away from danger while stunned and provide cover fire.
As a Nuclear Operative, you might end up in a situation where the AI has bolted you into a room. Having some spare C4 in your pocket can save your life.
As a Monkey, you can still wear a few human items, such as backpacks, gas masks, and hats, and still have two free hands.
-As the Malfunctioning AI, you can shunt to an APC if the situation gets bad. This disables your doomsday device if it is active.
+As the Malfunctioning AI, you can shunt to an APC if the situation gets bad.
As the Malfunctioning AI, you should either order your cyborgs to dismantle the robotics console or blow it up yourself in order to protect them.
As an Alien, your melee prowess is unmatched, but your ranged abilities are sorely lacking. Make use of corners to force a melee confrontation!
As an Alien, you take double damage from all burn attacks, such as lasers, welding tools, and fires. Furthermore, fire can destroy your resin and eggs. Expose areas to space to starve away any flamethrower fires before they can do damage!
@@ -155,11 +155,10 @@ As a Changeling, the Extract DNA sting counts for your genome absorb objective,
As a Changeling, you can absorb someone by strangling them and using the Absorb verb; this gives you the ability to rechoose your powers, the DNA of whoever you absorbed, the memory of the absorbed, and some samples of things the absorbed said.
As a Cultist, do not cause too much chaos before your objective is completed. If the shuttle gets called too soon, you may not have enough time to win.
As a Cultist, your team starts off very weak, but if necessary can quickly convert everything they have into raw power. Make sure you have the numbers and equipment to support going loud, or the cult will fall flat on its face.
-As a Cultist, the Blood Boil rune will deal massive amounts of brute damage to non-cultists, and some damage to fellow cultists of Nar'Sie nearby, but will create a fire where the rune stands on use.
+As a Cultist, the Blood Boil rune will deal massive amounts of brute damage to non-cultists, and some damage to fellow cultists nearby, but will create a fire where the rune stands on use.
As a Cultist, you can create an army of manifested goons using a combination of the Manifest rune, which creates homunculi from ghosts, and the Blood Drain rune, which drains life from anyone standing on any blood drain rune.
-As a Cultist, check the alert in the upper-right of your screen for all the details about your cult's current status and objective.
You can deconvert Cultists by feeding them large amounts of holy water.
-The Chaplain can bless any container with water by hitting it with their bible. Holy water has a myriad of uses against both cults and large amounts of it are a great contributor to success against them.
+The Chaplain can bless any container with water by hitting it with their bible. Holy water has a myriad of uses against cults and large amounts of it are a great contributor to success against them.
As a Wizard, you can turn people to stone, then animate the resulting statue with a staff of animation to create an extremely powerful minion, for all of 5 minutes at least.
As a Wizard, the fireball spell performs very poorly at close range, as it can easily catch you in the blast. It is best used as a form of artillery down long hallways.
As a Wizard, summoning guns will give everyone anything from a floral somatoray to a pulse rifle. Use at your own risk!
@@ -170,11 +169,10 @@ As an Abductor Agent, the combat mode vest has much higher resistance to every k
As an Abductor, the baton can cycle between four modes: stun, sleep, cuff and probe.
As a Revenant, the Chaplain is your worst enemy, as they can damage you massively with the null rod and make large swaths of the station impassable with holy water.
As a Revenant, your essence is also your health, so revealing yourself in front of humans to harvest the essence of the living is much safer if you've already stocked up on essences from poorly guarded corpses.
-As a Revenant, your Defile ability removes holy water from tiles in a small radius, along with salt, allowing you to reclaim the station from the chaplain if they've been covering the station in holy water. It can also be used to open morgue trays!
+As a Revenant, your Defile ability removes holy water from tiles in a small radius, allowing you to reclaim the station from the chaplain if they've been covering the station in holy water.
As a Revenant, your Overload Lights ability will only shock humans with lights if the lights are still on after a brief delay.
As a Revenant, your Malfunction ability in general damages machinery and mechanical objects, possibly even emagging some objects. Experiment!
-As a Revenant, the illness inflicted on humans by Blight can be easily cured by lying down or with holy water, making it best used on targets that have no time to lie down, such as humans in combat.
-As a Revenant, fastmos is your friend. Breaking windows to space can cause massive damage and mayhem.
+As a Revenant, space is your friend. Breaking windows to space can cause massive damage and mayhem.
As a Swarmer, you can deconstruct more things than you think. Try deconstructing light switches, buttons, air alarms and more. Experiment!
As a Swarmer, you can teleport fellow swarmers away if you think they are in danger.
As a Ghost, you can double click on just about anything to follow it. Or just warp around!
@@ -202,4 +200,4 @@ You can make lasertag turrets, for the ultimate lasertag tournament.
Blob structures take half damage from brute damage. Use lasers.
You can hide paper in vents, but you have to use a screwdriver to open it first.
While the Standard Operating Procedures aren't fully rules, they are there for safety and professional reasons.
-Killing the Wizard usually ends the round, unless they are a lich or Space Wizard Federation is RAGING.
\ No newline at end of file
+Killing the Wizard usually ends the round, unless they are a lich or Space Wizard Federation is RAGING.
diff --git a/tgui/packages/tgui/components/Box.js b/tgui/packages/tgui/components/Box.js
index 9d5e71c78a7..ada17f05d55 100644
--- a/tgui/packages/tgui/components/Box.js
+++ b/tgui/packages/tgui/components/Box.js
@@ -68,7 +68,10 @@ const mapColorPropTo = attrName => (style, value) => {
const styleMapperByPropName = {
// Direct mapping
+ display: mapRawPropTo('display'),
position: mapRawPropTo('position'),
+ float: mapRawPropTo('float'),
+ clear: mapRawPropTo('clear'),
overflow: mapRawPropTo('overflow'),
overflowX: mapRawPropTo('overflow-x'),
overflowY: mapRawPropTo('overflow-y'),
@@ -88,6 +91,9 @@ const styleMapperByPropName = {
opacity: mapRawPropTo('opacity'),
textAlign: mapRawPropTo('text-align'),
verticalAlign: mapRawPropTo('vertical-align'),
+ textTransform: mapRawPropTo('text-transform'),
+ wordWrap: mapRawPropTo('word-wrap'),
+ textOverflow: mapRawPropTo('text-overflow'),
// Boolean props
inline: mapBooleanPropTo('display', 'inline-block'),
bold: mapBooleanPropTo('font-weight', 'bold'),
@@ -125,6 +131,18 @@ const styleMapperByPropName = {
color: mapColorPropTo('color'),
textColor: mapColorPropTo('color'),
backgroundColor: mapColorPropTo('background-color'),
+ // Flex props
+ order: mapRawPropTo('order'),
+ flexDirection: mapRawPropTo('flex-direction'),
+ flexGrow: mapRawPropTo('flex-grow'),
+ flexShrink: mapRawPropTo('flex-shrink'),
+ flexWrap: mapRawPropTo('flex-wrap'),
+ flexFlow: mapRawPropTo('flex-flow'),
+ flexBasis: mapRawPropTo('flex-basis'),
+ flex: mapRawPropTo('flex'),
+ alignItems: mapRawPropTo('align-items'),
+ justifyContent: mapRawPropTo('justify-content'),
+ alignSelf: mapRawPropTo('align-self'),
// Utility props
fillPositionedParent: (style, value) => {
if (value) {
@@ -140,6 +158,9 @@ const styleMapperByPropName = {
export const computeBoxProps = props => {
const computedProps = {};
const computedStyles = {};
+ if (props.double) {
+ computedStyles["transform"] = "scale(2);";
+ }
// Compute props
for (let propName of Object.keys(props)) {
if (propName === 'style') {
diff --git a/tgui/packages/tgui/components/Collapsible.js b/tgui/packages/tgui/components/Collapsible.js
index 84af070fe18..080074e48ef 100644
--- a/tgui/packages/tgui/components/Collapsible.js
+++ b/tgui/packages/tgui/components/Collapsible.js
@@ -22,7 +22,7 @@ export class Collapsible extends Component {
...rest
} = props;
return (
-
+
+ Lines are a series of chords, separated by commas
+ (,),
+ each with notes seperated by hyphens
+ (-).
+
+ Every note in a chord will play together,
+ with the chord timed by the
+ tempo as defined above.
+
+
+ Notes are played by the
+ names of the note,
+ and optionally, the
+ accidental,
+ and/or the octave number.
+
+ By default, every note is
+ natural and in
+ octave 3.
+ Defining a different state for either is
+ remembered for each note.
+
+
+ Example:
+ C,D,E,F,G,A,B will play a
+ C
+ major scale.
+
+
+ After a note has an
+ accidental or
+ octave placed,
+ it will be remembered:
+ C,C4,C#,C3 is C3,C4,C4#,C3#
+
+
+
+
+ Chords
+ can be played simply by seperating each note
+ with a hyphen: A-C#,Cn-E,E-G#,Gn-B.
+ A pause
+ may be denoted by an empty chord: C,E,,C,G.
+
+ To make a chord be a different time, end it
+ with /x, where the chord length will be length defined by
+ tempo / x,
+ eg:C,G/2,E/4.
+
+
+ Combined, an example line is: E-E4/4,F#/2,G#/8,B/8,E3-E4/4.
+
+
Lines may be up to 300 characters.
+
A song may only contain up to 1,000 lines.
+
+
+
+ Lines are a series of chords, separated by commas
+ (,),
+ each with notes seperated by hyphens
+ (-).
+
+ Every note in a chord will play together,
+ with the chord timed by the
+ tempo as defined above.
+
+
+ Notes are played by the
+ names of the note,
+ and optionally, the
+ accidental,
+ and/or the octave number.
+
+ By default, every note is
+ natural and in
+ octave 3.
+ Defining a different state for either is
+ remembered for each note.
+
+
+ Example:
+ C,D,E,F,G,A,B will play a
+ C
+ major scale.
+
+
+ After a note has an
+ accidental or
+ octave placed,
+ it will be remembered:
+ C,C4,C#,C3 is C3,C4,C4#,C3#
+
+
+
+
+ Chords
+ can be played simply by seperating each note
+ with a hyphen: A-C#,Cn-E,E-G#,Gn-B.
+ A pause
+ may be denoted by an empty chord: C,E,,C,G.
+
+ To make a chord be a different time, end it
+ with /x, where the chord length will be length defined by
+ tempo / x,
+ eg:C,G/2,E/4.
+
+
+ Combined, an example line is: E-E4/4,F#/2,G#/8,B/8,E3-E4/4.
+
+
Lines may be up to 300 characters.
+
A song may only contain up to 1,000 lines.
+
+
+
Instrument Advanced Settings
+
+
+ Type:
+ Whether the instrument is legacy or synthesized.
+ Legacy instruments have a collection of sounds that are
+ selectively used depending on the note to play.
+ Synthesized instruments use a base sound and change its pitch to
+ match the note to play.
+
+
+ Current:
+ Which instrument sample to play. Some instruments
+ can be tuned to play different samples. Experiment!
+
+
+ Note Shift/Note Transpose:
+ The pitch to apply to all notes of the song.
+
+
+ Sustain Mode:
+ How a played note fades out.
+ Linear sustain means a note will fade out at a constant rate.
+
+ Exponential sustain means a note will fade out at an
+ exponential rate, sounding smoother.
+
+
+ Volume Dropoff Threshold:
+ The volume threshold at which a note is fully stopped.
+
+
+
+ Sustain indefinitely last held note:
+
+ Whether the last note should be sustained indefinitely.
+