diff --git a/ATTRIBUTIONS.md b/ATTRIBUTIONS.md index 3e5639a5217..abaf97a0b98 100644 --- a/ATTRIBUTIONS.md +++ b/ATTRIBUTIONS.md @@ -80,3 +80,9 @@ **Creator:** VerySoft (https://github.com/TS-Rogue-Star/Rogue-Star/pull/435)
**URL:** [Website](https://rogue-star.net/)
**License:** Permission granting in writing for use by Virgo and Chomp with proper attribution +
+**File:** `icons/mob/turkey.dmi` +**Title:** Turkey
+**Creator:** VerySoft (https://github.com/TS-Rogue-Star/Rogue-Star/pull/669)
+**URL:** [Website](https://rogue-star.net/)
+**License:** Permission granted in writing for use by Virgo and Chomp with proper attribution diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 87c430c5d7a..84ba70f55f4 100644 --- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm +++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm @@ -206,10 +206,10 @@ return data -/obj/machinery/atmospherics/binary/algae_farm/tgui_act(action, params) +/obj/machinery/atmospherics/binary/algae_farm/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("toggle") diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index 4a680494f78..fd1158f408a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -203,7 +203,7 @@ /obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob) if(..()) return - add_fingerprint(usr) + add_fingerprint(user) if(!allowed(user)) to_chat(user, span_warning("Access denied.")) return @@ -235,7 +235,7 @@ return data -/obj/machinery/atmospherics/binary/passive_gate/tgui_act(action, params) +/obj/machinery/atmospherics/binary/passive_gate/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -258,7 +258,7 @@ if("max") target_pressure = max_pressure_setting if("set") - var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0) + var/new_pressure = tgui_input_number(ui.user,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0) src.target_pressure = between(0, new_pressure, max_pressure_setting) if("set_flow_rate") @@ -269,11 +269,11 @@ if("max") set_flow_rate = air1.volume if("set") - var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0) + var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0) src.set_flow_rate = between(0, new_flow_rate, air1.volume) update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/W as obj, var/mob/user as mob) if (!W.has_tool_quality(TOOL_WRENCH)) diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 4c1a0d0ad80..70b498722f2 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -201,13 +201,13 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/pump/attack_hand(mob/user) if(..()) return - add_fingerprint(usr) + add_fingerprint(user) if(!allowed(user)) to_chat(user, span_warning("Access denied.")) return tgui_interact(user) -/obj/machinery/atmospherics/binary/pump/tgui_act(action, params) +/obj/machinery/atmospherics/binary/pump/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -223,11 +223,11 @@ Thus, the two variables affect pump operation are set in New(): if("max") target_pressure = max_pressure_setting if("set") - var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0) + var/new_pressure = tgui_input_number(ui.user,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0) src.target_pressure = between(0, new_pressure, max_pressure_setting) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) update_icon() /obj/machinery/atmospherics/binary/pump/power_change() diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 4409482f507..4d442b772a6 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -152,7 +152,7 @@ else return null -/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params) +/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -171,7 +171,7 @@ if("set_flow_rate") if(!configuring || use_power) return - var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0) + var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0) set_flow_rate = between(0, new_flow_rate, max_flow_rate) . = TRUE if("switch_mode") @@ -182,7 +182,7 @@ if("switch_filter") if(!configuring || use_power) return - var/new_filter = tgui_input_list(usr, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide")) + var/new_filter = tgui_input_list(ui.user, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide")) if(!new_filter) return switch_filter(dir_flag(params["dir"]), mode_return_switch(new_filter)) diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index 02c701c91e8..9d0b9c78f7f 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -164,7 +164,7 @@ return data -/obj/machinery/atmospherics/omni/mixer/tgui_act(action, params) +/obj/machinery/atmospherics/omni/mixer/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -184,7 +184,7 @@ . = TRUE if(!configuring || use_power) return - var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0) + var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0) set_flow_rate = between(0, new_flow_rate, max_flow_rate) if("switch_mode") . = TRUE @@ -195,7 +195,7 @@ . = TRUE if(!configuring || use_power) return - change_concentration(dir_flag(params["dir"])) + change_concentration(dir_flag(params["dir"]), ui.user) if("switch_conlock") . = TRUE if(!configuring || use_power) @@ -244,7 +244,7 @@ update_ports() rebuild_mixing_inputs() -/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(var/port = NORTH) +/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(var/port = NORTH, mob/user) tag_north_con = null tag_south_con = null tag_east_con = null @@ -266,7 +266,7 @@ if(non_locked < 1) return - var/new_con = (tgui_input_number(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100 + var/new_con = (tgui_input_number(user,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100 //cap it between 0 and the max remaining concentration new_con = between(0, new_con, remain_con) diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index 9201cee4a16..9e6613ebf2b 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -101,7 +101,7 @@ if(..()) return - src.add_fingerprint(usr) + src.add_fingerprint(user) tgui_interact(user) return diff --git a/code/ATMOSPHERICS/components/shutoff.dm b/code/ATMOSPHERICS/components/shutoff.dm index 7517cbd7efc..2084b8c901c 100644 --- a/code/ATMOSPHERICS/components/shutoff.dm +++ b/code/ATMOSPHERICS/components/shutoff.dm @@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves) return src.attack_hand(user) /obj/machinery/atmospherics/valve/shutoff/attack_hand(var/mob/user) - src.add_fingerprint(usr) + src.add_fingerprint(user) update_icon(1) close_on_leaks = !close_on_leaks to_chat(user, "You [close_on_leaks ? "enable" : "disable"] the automatic shutoff circuit.") diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 31544ac1f72..f332afee61c 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -182,7 +182,7 @@ return data -/obj/machinery/atmospherics/trinary/atmos_filter/tgui_act(action, params) +/obj/machinery/atmospherics/trinary/atmos_filter/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -216,7 +216,7 @@ if(4)//removing N2O filtered_out += "nitrous_oxide" - add_fingerprint(usr) + add_fingerprint(ui.user) update_icon() // diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 6397be2c59e..86ee7517622 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -100,11 +100,11 @@ if(..()) return tgui_interact(user) - // src.add_fingerprint(usr) + // src.add_fingerprint(user) // if(!src.allowed(user)) // to_chat(user, span_warning("Access denied.")) // return - // usr.set_machine(src) + // user.set_machine(src) // var/list/node_connects = get_node_connect_dirs() // var/dat = {span_bold("Power: ") + "[use_power?"On":"Off"]
// Set Flow Rate Limit: diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 0e051d9067d..9f0f220ec2a 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -161,7 +161,7 @@ return /obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob) - src.add_fingerprint(usr) + src.add_fingerprint(user) update_icon(1) sleep(10) if (src.state) diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 9923078311b..5dd984a0ff8 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -84,7 +84,7 @@ return data -/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params) +/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -103,7 +103,7 @@ var/new_setting = between(0, text2num(params["value"]), 100) set_power_level(new_setting) - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/atmospherics/unary/freezer/process() ..() diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index 7b6a5621eb1..078c97af8a1 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -36,11 +36,11 @@ if(!partner) return 0 - if(!air_master || air_master.current_cycle <= update_cycle) + if(!SSair || SSair.current_cycle <= update_cycle) return 0 - update_cycle = air_master.current_cycle - partner.update_cycle = air_master.current_cycle + update_cycle = SSair.current_cycle + partner.update_cycle = SSair.current_cycle var/air_heat_capacity = air_contents.heat_capacity() var/other_air_heat_capacity = partner.air_contents.heat_capacity() diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 67839d7d3ae..2c1a22a825c 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -104,7 +104,7 @@ return data -/obj/machinery/atmospherics/unary/heater/tgui_act(action, params) +/obj/machinery/atmospherics/unary/heater/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -123,7 +123,7 @@ var/new_setting = between(0, text2num(params["value"]), 100) set_power_level(new_setting) - add_fingerprint(usr) + add_fingerprint(ui.user) //upgrading parts /obj/machinery/atmospherics/unary/heater/RefreshParts() diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 9139f96e749..d51a3695293 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -131,7 +131,7 @@ return /obj/machinery/atmospherics/valve/attack_hand(mob/user as mob) - src.add_fingerprint(usr) + src.add_fingerprint(user) update_icon(1) sleep(10) if (src.open) diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index bfe6fa2ad4d..eeb01b42495 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -36,11 +36,11 @@ //Convenience function for atoms to update turfs they occupy /atom/movable/proc/update_nearby_tiles(need_rebuild) - if(!air_master) + if(!SSair) return 0 for(var/turf/simulated/turf in locs) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) return 1 diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index 21be29d25e1..688eb129922 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -5,7 +5,7 @@ /* Overview: - Connections are made between turfs by air_master.connect(). They represent a single point where two zones converge. + Connections are made between turfs by SSair.connect(). They represent a single point where two zones converge. Class Vars: A - Always a simulated turf. @@ -60,19 +60,19 @@ Class Procs: /connection/New(turf/simulated/A, turf/simulated/B) #ifdef ZASDBG - ASSERT(air_master.has_valid_zone(A)) - //ASSERT(air_master.has_valid_zone(B)) + ASSERT(HAS_VALID_ZONE(A)) + //ASSERT(HAS_VALID_ZONE(B)) #endif src.A = A src.B = B zoneA = A.zone if(!istype(B)) mark_space() - edge = air_master.get_edge(A.zone,B) + edge = SSair.get_edge(A.zone,B) edge.add_connection(src) else zoneB = B.zone - edge = air_master.get_edge(A.zone,B.zone) + edge = SSair.get_edge(A.zone,B.zone) edge.add_connection(src) /connection/proc/mark_direct() @@ -108,7 +108,7 @@ Class Procs: erase() return - var/block_status = air_master.air_blocked(A,B) + var/block_status = SSair.air_blocked(A,B) if(block_status & AIR_BLOCKED) //to_world("Blocked connection.") erase() @@ -133,7 +133,7 @@ Class Procs: return else edge.remove_connection(src) - edge = air_master.get_edge(A.zone, B) + edge = SSair.get_edge(A.zone, B) edge.add_connection(src) zoneA = A.zone @@ -155,7 +155,7 @@ Class Procs: //to_world("Zones changed, \...") if(A.zone && B.zone) edge.remove_connection(src) - edge = air_master.get_edge(A.zone, B.zone) + edge = SSair.get_edge(A.zone, B.zone) edge.add_connection(src) zoneA = A.zone zoneB = B.zone diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 0be44bb3584..85b2545d36e 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -2,7 +2,7 @@ Overview: These are what handle gas transfers between zones and into space. - They are found in a zone's edges list and in air_master.edges. + They are found in a zone's edges list and in SSair.edges. Each edge updates every air tick due to their role in gas transfer. They come in two flavors, /connection_edge/zone and /connection_edge/unsimulated. As the type names might suggest, they handle inter-zone and spacelike connections respectively. @@ -82,7 +82,7 @@ Class Procs: /connection_edge/proc/contains_zone(zone/Z) /connection_edge/proc/erase() - air_master.remove_edge(src) + SSair.remove_edge(src) //to_world("[type] Erased.") /connection_edge/proc/tick() @@ -169,19 +169,19 @@ Class Procs: if(equiv) if(direct) erase() - air_master.merge(A, B) + SSair.merge(A, B) return else A.air.equalize(B.air) - air_master.mark_edge_sleeping(src) + SSair.mark_edge_sleeping(src) - air_master.mark_zone_update(A) - air_master.mark_zone_update(B) + SSair.mark_zone_update(A) + SSair.mark_zone_update(B) /connection_edge/zone/recheck() // Edges with only one side being vacuum need processing no matter how close. if(!A.air.compare(B.air, vacuum_exception = 1)) - air_master.mark_edge_active(src) + SSair.mark_edge_active(src) //Helper proc to get connections for a zone. /connection_edge/zone/proc/get_connected_zone(zone/from) @@ -233,16 +233,16 @@ Class Procs: if(equiv) A.air.copy_from(air) - air_master.mark_edge_sleeping(src) + SSair.mark_edge_sleeping(src) - air_master.mark_zone_update(A) + SSair.mark_zone_update(A) /connection_edge/unsimulated/recheck() // Edges with only one side being vacuum need processing no matter how close. // Note: This handles the glaring flaw of a room holding pressure while exposed to space, but // does not specially handle the less common case of a simulated room exposed to an unsimulated pressurized turf. if(!A.air.compare(air, vacuum_exception = 1)) - air_master.mark_edge_active(src) + SSair.mark_edge_active(src) /proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) //This implements a simplistic version of the Stefan-Boltzmann law. diff --git a/code/ZAS/ConnectionManager.dm b/code/ZAS/ConnectionManager.dm index 3890cd85f5c..8d7e270cde0 100644 --- a/code/ZAS/ConnectionManager.dm +++ b/code/ZAS/ConnectionManager.dm @@ -16,7 +16,7 @@ Class Procs: Preferable to accessing the connection directly because it checks validity. place(connection/c, d) - Called by air_master.connect(). Sets the connection in the specified direction to c. + Called by SSair.connect(). Sets the connection in the specified direction to c. update_all() Called after turf/update_air_properties(). Updates the validity of all connections on this turf. diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm deleted file mode 100644 index 7f7b5752469..00000000000 --- a/code/ZAS/Controller.dm +++ /dev/null @@ -1,231 +0,0 @@ -var/datum/controller/subsystem/air/air_master - -var/tick_multiplier = 2 - -/* - -Overview: - The air controller does everything. There are tons of procs in here. - -Class Vars: - zones - All zones currently holding one or more turfs. - edges - All processing edges. - - tiles_to_update - Tiles scheduled to update next tick. - zones_to_update - Zones which have had their air changed and need air archival. - active_hotspots - All processing fire objects. - - active_zones - The number of zones which were archived last tick. Used in debug verbs. - next_id - The next UID to be applied to a zone. Mostly useful for debugging purposes as zones do not need UIDs to function. - -Class Procs: - - mark_for_update(turf/T) - Adds the turf to the update list. When updated, update_air_properties() will be called. - When stuff changes that might affect airflow, call this. It's basically the only thing you need. - - add_zone(zone/Z) and remove_zone(zone/Z) - Adds zones to the zones list. Does not mark them for update. - - air_blocked(turf/A, turf/B) - Returns a bitflag consisting of: - AIR_BLOCKED - The connection between turfs is physically blocked. No air can pass. - ZONE_BLOCKED - There is a door between the turfs, so zones cannot cross. Air may or may not be permeable. - - has_valid_zone(turf/T) - Checks the presence and validity of T's zone. - May be called on unsimulated turfs, returning 0. - - merge(zone/A, zone/B) - Called when zones have a direct connection and equivalent pressure and temperature. - Merges the zones to create a single zone. - - connect(turf/simulated/A, turf/B) - Called by turf/update_air_properties(). The first argument must be simulated. - Creates a connection between A and B. - - mark_zone_update(zone/Z) - Adds zone to the update list. Unlike mark_for_update(), this one is called automatically whenever - air is returned from a simulated turf. - - equivalent_pressure(zone/A, zone/B) - Currently identical to A.air.compare(B.air). Returns 1 when directly connected zones are ready to be merged. - - get_edge(zone/A, zone/B) - get_edge(zone/A, turf/B) - Gets a valid connection_edge between A and B, creating a new one if necessary. - - has_same_air(turf/A, turf/B) - Used to determine if an unsimulated edge represents a specific turf. - Simulated edges use connection_edge/contains_zone() for the same purpose. - Returns 1 if A has identical gases and temperature to B. - - remove_edge(connection_edge/edge) - Called when an edge is erased. Removes it from processing. - -*/ - -// -// The rest of the air subsystem is defined in air.dm -// - -/datum/controller/subsystem/air - //Geometry lists - var/list/zones = list() - var/list/edges = list() - //Geometry updates lists - var/list/tiles_to_update = list() - var/list/zones_to_update = list() - var/list/active_fire_zones = list() - var/list/active_hotspots = list() - var/list/active_edges = list() - - var/active_zones = 0 - var/current_cycle = 0 - var/next_id = 1 //Used to keep track of zone UIDs. - -/datum/controller/subsystem/air/proc/add_zone(zone/z) - zones.Add(z) - z.name = "Zone [next_id++]" - mark_zone_update(z) - -/datum/controller/subsystem/air/proc/remove_zone(zone/z) - zones.Remove(z) - zones_to_update.Remove(z) - -/datum/controller/subsystem/air/proc/air_blocked(turf/A, turf/B) - #ifdef ZASDBG - ASSERT(isturf(A)) - ASSERT(isturf(B)) - #endif - var/ablock = A.c_airblock(B) - if(ablock == BLOCKED) return BLOCKED - return ablock | B.c_airblock(A) - -/datum/controller/subsystem/air/proc/has_valid_zone(turf/simulated/T) - #ifdef ZASDBG - ASSERT(istype(T)) - #endif - return istype(T) && T.zone && !T.zone.invalid - -/datum/controller/subsystem/air/proc/merge(zone/A, zone/B) - #ifdef ZASDBG - ASSERT(istype(A)) - ASSERT(istype(B)) - ASSERT(!A.invalid) - ASSERT(!B.invalid) - ASSERT(A != B) - #endif - if(A.contents.len < B.contents.len) - A.c_merge(B) - mark_zone_update(B) - else - B.c_merge(A) - mark_zone_update(A) - -/datum/controller/subsystem/air/proc/connect(turf/simulated/A, turf/simulated/B) - #ifdef ZASDBG - ASSERT(istype(A)) - ASSERT(isturf(B)) - ASSERT(A.zone) - ASSERT(!A.zone.invalid) - //ASSERT(B.zone) - ASSERT(A != B) - #endif - - var/block = air_master.air_blocked(A,B) - if(block & AIR_BLOCKED) return - - var/direct = !(block & ZONE_BLOCKED) - var/space = !istype(B) - - if(!space) - if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0))) - merge(A.zone,B.zone) - return - - var/a_to_b = get_dir(A,B) - var/b_to_a = get_dir(B,A) - - if(!A.connections) A.connections = new - if(!B.connections) B.connections = new - - if(A.connections.get(a_to_b)) return - if(B.connections.get(b_to_a)) return - if(!space) - if(A.zone == B.zone) return - - - var/connection/c = new /connection(A,B) - - A.connections.place(c, a_to_b) - B.connections.place(c, b_to_a) - - if(direct) c.mark_direct() - -/datum/controller/subsystem/air/proc/mark_for_update(turf/T) - #ifdef ZASDBG - ASSERT(isturf(T)) - #endif - if(T.needs_air_update) return - tiles_to_update |= T - #ifdef ZASDBG - T.add_overlay(mark) - #endif - T.needs_air_update = 1 - -/datum/controller/subsystem/air/proc/mark_zone_update(zone/Z) - #ifdef ZASDBG - ASSERT(istype(Z)) - #endif - if(Z.needs_update) return - zones_to_update.Add(Z) - Z.needs_update = 1 - -/datum/controller/subsystem/air/proc/mark_edge_sleeping(connection_edge/E) - #ifdef ZASDBG - ASSERT(istype(E)) - #endif - if(E.sleeping) return - active_edges.Remove(E) - E.sleeping = 1 - -/datum/controller/subsystem/air/proc/mark_edge_active(connection_edge/E) - #ifdef ZASDBG - ASSERT(istype(E)) - #endif - if(!E.sleeping) return - active_edges.Add(E) - E.sleeping = 0 - -/datum/controller/subsystem/air/proc/equivalent_pressure(zone/A, zone/B) - return A.air.compare(B.air) - -/datum/controller/subsystem/air/proc/get_edge(zone/A, zone/B) - - if(istype(B)) - for(var/connection_edge/zone/edge in A.edges) - if(edge.contains_zone(B)) return edge - var/connection_edge/edge = new/connection_edge/zone(A,B) - edges.Add(edge) - edge.recheck() - return edge - else - for(var/connection_edge/unsimulated/edge in A.edges) - if(has_same_air(edge.B,B)) return edge - var/connection_edge/edge = new/connection_edge/unsimulated(A,B) - edges.Add(edge) - edge.recheck() - return edge - -/datum/controller/subsystem/air/proc/has_same_air(turf/A, turf/B) - if(A.oxygen != B.oxygen) return 0 - if(A.nitrogen != B.nitrogen) return 0 - if(A.phoron != B.phoron) return 0 - if(A.carbon_dioxide != B.carbon_dioxide) return 0 - if(A.temperature != B.temperature) return 0 - return 1 - -/datum/controller/subsystem/air/proc/remove_edge(connection_edge/E) - edges.Remove(E) - if(!E.sleeping) active_edges.Remove(E) diff --git a/code/ZAS/Diagnostic.dm b/code/ZAS/Diagnostic.dm index 7126588a30f..15fcd893479 100644 --- a/code/ZAS/Diagnostic.dm +++ b/code/ZAS/Diagnostic.dm @@ -8,12 +8,12 @@ /* if(!check_rights(R_DEBUG)) return - var/result = air_master.Tick() + var/result = SSair.Tick() if(result) to_chat(src, "Successfully Processed.") else - to_chat(src, "Failed to process! ([air_master.tick_progress])") + to_chat(src, "Failed to process! ([SSair.tick_progress])") */ /client/proc/Zone_Info(turf/T as null|turf) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 46871cc785e..9cbf665f83b 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -58,7 +58,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin fuel_objs.Cut() if(!fire_tiles.len) - air_master.active_fire_zones.Remove(src) + SSair.active_fire_zones.Remove(src) /zone/proc/remove_liquidfuel(var/used_liquid_fuel, var/remove_fire=0) if(!fuel_objs.len) @@ -94,7 +94,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin return 1 fire = new(src, fl) - air_master.active_fire_zones |= zone + SSair.active_fire_zones |= zone var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in src zone.fire_tiles |= src @@ -191,7 +191,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin set_light(3, 1, color) firelevel = fl - air_master.active_hotspots.Add(src) + SSair.active_hotspots.Add(src) /obj/fire/proc/fire_color(var/env_temperature) var/temperature = max(4000*sqrt(firelevel/vsc.fire_firelevel_multiplier), env_temperature) @@ -209,7 +209,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin T.fire = null loc = null - air_master.active_hotspots.Remove(src) + SSair.active_hotspots.Remove(src) /turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index c05e708036b..a67970c63aa 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -41,9 +41,8 @@ if(istype(unsim, /turf/simulated)) var/turf/simulated/sim = unsim - if(air_master.has_valid_zone(sim)) - - air_master.connect(sim, src) + if(HAS_VALID_ZONE(sim)) + SSair.connect(sim, src) /* Simple heuristic for determining if removing the turf from it's zone will not partition the zone (A very bad thing). @@ -162,7 +161,7 @@ var/turf/simulated/sim = unsim sim.open_directions |= reverse_dir[d] - if(air_master.has_valid_zone(sim)) + if(HAS_VALID_ZONE(sim)) //Might have assigned a zone, since this happens for each direction. if(!zone) @@ -195,7 +194,7 @@ if(verbose) to_world("Connecting to [sim.zone]") #endif - air_master.connect(src, sim) + SSair.connect(src, sim) #ifdef ZASDBG @@ -210,7 +209,7 @@ if(!postponed) postponed = list() postponed.Add(unsim) - if(!air_master.has_valid_zone(src)) //Still no zone, make a new one. + if(!HAS_VALID_ZONE(src)) //Still no zone, make a new one. var/zone/newzone = new/zone() newzone.add(src) @@ -223,7 +222,7 @@ //At this point, a zone should have happened. If it hasn't, don't add more checks, fix the bug. for(var/turf/T in postponed) - air_master.connect(src, T) + SSair.connect(src, T) /turf/proc/post_update_air_properties() if(connections) connections.update_all() @@ -279,7 +278,7 @@ /turf/simulated/return_air() if(zone) if(!zone.invalid) - air_master.mark_zone_update(zone) + SSair.mark_zone_update(zone) return zone.air else if(!air) diff --git a/code/ZAS/Zone.dm b/code/ZAS/Zone.dm index d07a280d040..b6d012afe7d 100644 --- a/code/ZAS/Zone.dm +++ b/code/ZAS/Zone.dm @@ -56,7 +56,7 @@ Class Procs: /zone/var/list/graphic_remove = list() /zone/New() - air_master.add_zone(src) + SSair.add_zone(src) air.temperature = TCMB air.group_multiplier = 1 air.volume = CELL_VOLUME @@ -65,7 +65,7 @@ Class Procs: #ifdef ZASDBG ASSERT(!invalid) ASSERT(istype(T)) - ASSERT(!air_master.has_valid_zone(T)) + ASSERT(!HAS_VALID_ZONE(T)) #endif var/datum/gas_mixture/turf_air = T.return_air() @@ -75,7 +75,7 @@ Class Procs: if(T.fire) var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in T fire_tiles.Add(T) - air_master.active_fire_zones |= src + SSair.active_fire_zones |= src if(fuel) fuel_objs += fuel if(air.graphic) T.update_graphic(air.graphic) @@ -122,11 +122,11 @@ Class Procs: if(E.contains_zone(into)) continue //don't need to rebuild this edge for(var/turf/T in E.connecting_turfs) - air_master.mark_for_update(T) + SSair.mark_for_update(T) /zone/proc/c_invalidate() invalid = 1 - air_master.remove_zone(src) + SSair.remove_zone(src) #ifdef ZASDBG for(var/turf/simulated/T in contents) T.dbg(invalid_zone) @@ -141,7 +141,7 @@ Class Procs: T.update_graphic(graphic_remove = air_graphic) //we need to remove the overlays so they're not doubled when the zone is rebuilt //T.dbg(invalid_zone) T.needs_air_update = 0 //Reset the marker so that it will be added to the list. - air_master.mark_for_update(T) + SSair.mark_for_update(T) /zone/proc/add_tile_air(datum/gas_mixture/tile_air) //air.volume += CELL_VOLUME @@ -152,7 +152,7 @@ Class Procs: air.group_multiplier = contents.len+1 /zone/proc/tick() - if(air.temperature >= PHORON_FLASHPOINT && !(src in air_master.active_fire_zones) && air.check_combustability() && contents.len) + if(air.temperature >= PHORON_FLASHPOINT && !(src in SSair.active_fire_zones) && air.check_combustability() && contents.len) var/turf/T = pick(contents) if(istype(T)) T.create_fire(vsc.fire_firelevel_multiplier) @@ -171,7 +171,7 @@ Class Procs: to_chat(M,name) for(var/g in air.gas) to_chat(M, "[gas_data.name[g]]: [air.gas[g]]") - to_chat(M, "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]°K ([air.temperature - T0C]°C)") + to_chat(M, "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]�K ([air.temperature - T0C]�C)") to_chat(M, "O2 per N2: [(air.gas["nitrogen"] ? air.gas["oxygen"]/air.gas["nitrogen"] : "N/A")] Moles: [air.total_moles]") to_chat(M, "Simulated: [contents.len] ([air.group_multiplier])") //to_chat(M, "Unsimulated: [unsimulated_contents.len]") @@ -192,4 +192,4 @@ Class Procs: to_chat(M, "Space Edges: [space_edges] ([space_coefficient] connections)") //for(var/turf/T in unsimulated_contents) - // to_chat(M, "[T] at ([T.x],[T.y])") \ No newline at end of file + // to_chat(M, "[T] at ([T.x],[T.y])") diff --git a/code/ZAS/_docs.dm b/code/ZAS/_docs.dm index 382f1f0abbf..822c8ac7b2a 100644 --- a/code/ZAS/_docs.dm +++ b/code/ZAS/_docs.dm @@ -15,7 +15,7 @@ Every air tick: Important Functions: -air_master.mark_for_update(turf) +SSair.mark_for_update(turf) When stuff happens, call this. It works on everything. You basically don't need to worry about any other functions besides CanPass(). diff --git a/code/__defines/MC.dm b/code/__defines/MC.dm index 5173da844c6..2c4360add9c 100644 --- a/code/__defines/MC.dm +++ b/code/__defines/MC.dm @@ -18,6 +18,15 @@ #define MC_AVG_FAST_UP_SLOW_DOWN(average, current) (average > current ? MC_AVERAGE_SLOW(average, current) : MC_AVERAGE_FAST(average, current)) #define MC_AVG_SLOW_UP_FAST_DOWN(average, current) (average < current ? MC_AVERAGE_SLOW(average, current) : MC_AVERAGE_FAST(average, current)) +///creates a running average of "things elapsed" per time period when you need to count via a smaller time period. +///eg you want an average number of things happening per second but you measure the event every tick (50 milliseconds). +///make sure both time intervals are in the same units. doesn't work if current_duration > total_duration or if total_duration == 0 +#define MC_AVG_OVER_TIME(average, current, total_duration, current_duration) ((((total_duration) - (current_duration)) / (total_duration)) * (average) + (current)) + +#define MC_AVG_MINUTES(average, current, current_duration) (MC_AVG_OVER_TIME(average, current, 1 MINUTES, current_duration)) + +#define MC_AVG_SECONDS(average, current, current_duration) (MC_AVG_OVER_TIME(average, current, 1 SECONDS, current_duration)) + #define NEW_SS_GLOBAL(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;} #define START_PROCESSING(Processor, Datum) if (!(Datum.datum_flags & DF_ISPROCESSING)) {Datum.datum_flags |= DF_ISPROCESSING;Processor.processing += Datum} @@ -70,18 +79,35 @@ #define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\ /datum/controller/subsystem/##X/New(){\ - NEW_SS_GLOBAL(SS##X);\ - PreInit();\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ }\ /datum/controller/subsystem/##X +#define TIMER_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/timer/##X);\ +/datum/controller/subsystem/timer/##X/New(){\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ +}\ +/datum/controller/subsystem/timer/##X/fire() {..() /*just so it shows up on the profiler*/} \ +/datum/controller/subsystem/timer/##X + #define PROCESSING_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/processing/##X);\ /datum/controller/subsystem/processing/##X/New(){\ - NEW_SS_GLOBAL(SS##X);\ - PreInit();\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ }\ +/datum/controller/subsystem/processing/##X/fire() {..() /*just so it shows up on the profiler*/} \ /datum/controller/subsystem/processing/##X +#define VERB_MANAGER_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/verb_manager/##X);\ +/datum/controller/subsystem/verb_manager/##X/New(){\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ +}\ +/datum/controller/subsystem/verb_manager/##X/fire() {..() /*just so it shows up on the profiler*/} \ +/datum/controller/subsystem/verb_manager/##X + // Boilerplate code for multi-step processors. See machines.dm for example use. #define INTERNAL_PROCESS_STEP(this_step, initial_step, proc_to_call, cost_var, next_step)\ if(current_step == this_step || (initial_step && !resumed)) /* So we start at step 1 if not resumed.*/ {\ diff --git a/code/__defines/ZAS.dm b/code/__defines/ZAS.dm index ba2b4b73e76..c8289fdc271 100644 --- a/code/__defines/ZAS.dm +++ b/code/__defines/ZAS.dm @@ -11,3 +11,5 @@ #define ATMOS_PASS_NO 2 // Never blocks air or zones. #define ATMOS_PASS_DENSITY 3 // Blocks air and zones if density = TRUE, allows both if density = FALSE #define ATMOS_PASS_PROC 4 // Call CanZASPass() using c_airblock + +#define HAS_VALID_ZONE(T) (T.zone && !T.zone.invalid) diff --git a/code/__defines/_planes+layers.dm b/code/__defines/_planes+layers.dm index a06ef90f7a8..f8ee1c976ea 100644 --- a/code/__defines/_planes+layers.dm +++ b/code/__defines/_planes+layers.dm @@ -187,6 +187,10 @@ What is the naming convention for planes or layers? #define PLANE_PLAYER_HUD_ITEMS 96 //Separate layer with which to apply colorblindness #define PLANE_PLAYER_HUD_ABOVE 97 //Things above the player hud +#define RADIAL_BACKGROUND_LAYER 0 +///1000 is an unimportant number, it's just to normalize copied layers +#define RADIAL_CONTENT_LAYER 1000 + #define PLANE_ADMIN3 99 //Purely for shenanigans (above HUD) diff --git a/code/__defines/callbacks.dm b/code/__defines/callbacks.dm index 126ef1ea1cf..91d036b9441 100644 --- a/code/__defines/callbacks.dm +++ b/code/__defines/callbacks.dm @@ -1,4 +1,8 @@ -#define GLOBAL_PROC "some_magic_bullshit" - +#define GLOBAL_PROC "some_magic_bullshit" +/// A shorthand for the callback datum, [documented here](datum/callback.html) #define CALLBACK new /datum/callback + #define INVOKE_ASYNC world.ImmediateInvokeAsync + +/// like CALLBACK but specifically for verb callbacks +#define VERB_CALLBACK new /datum/callback/verb_callback diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 63ea0e136f6..8213aa200f5 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -41,6 +41,7 @@ #define CE_DARKSIGHT "darksight" // Gives perfect vision in dark #define REAGENTS_PER_SHEET 20 +#define REAGENTS_PER_ORE 20 // Attached to CE_ANTIBIOTIC #define ANTIBIO_NORM 1 diff --git a/code/__defines/faction.dm b/code/__defines/faction.dm index 2d975b6cbb6..766c2d51aac 100644 --- a/code/__defines/faction.dm +++ b/code/__defines/faction.dm @@ -105,6 +105,7 @@ #define FACTION_SWARMER "swarmer" #define FACTION_TEPPI "teppi" #define FACTION_TUNNELCLOWN "tunnelclown" +#define FACTION_TURKEY "turkey" #define FACTION_WILD_ANIMAL "wild animal" #define FACTION_WOLFGIRL "wolfgirl" #define FACTION_WOLFTAUR "wolftaur" diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index a7dba8be88c..2a0b2ce9dea 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -40,6 +40,9 @@ #define ACCESSORY_SLOT_ARMOR_M 0x8000 #define ACCESSORY_SLOT_HELM_C 0x10000 //24 bit - higher than 0x80000 will overflow +#define ACCESSORY_SLOT_RING 0x20000 //rings, knuckledusters +#define ACCESSORY_SLOT_WRIST 0x40000 //wristwatches, wrist PDA maybe? + // Bitmasks for the /obj/item/var/flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses. // WARNING: The following flags apply only to the external suit! #define HIDEGLOVES 0x1 diff --git a/code/__defines/jobs.dm b/code/__defines/jobs.dm index c20f5e3cd98..70e38c6876d 100644 --- a/code/__defines/jobs.dm +++ b/code/__defines/jobs.dm @@ -201,6 +201,7 @@ #define JOB_ALT_CONSTRUCTION_ENGINEER "Construction Engineer" #define JOB_ALT_ENGINEERING_CONTRACTOR "Engineering Contractor" #define JOB_ALT_COMPUTER_TECHNICIAN "Computer Technician" + #define JOB_ALT_SALVAGE_TECHNICIAN "Salvage Technician" #define JOB_ATMOSPHERIC_TECHNICIAN "Atmospheric Technician" // Atmospheric Technician alt titles diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 313da615bde..4d80021c0ff 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -189,6 +189,8 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define FIRE_PRIORITY_CHAT 400 #define FIRE_PRIORITY_OVERLAYS 500 #define FIRE_PRIORITY_TIMER 700 +#define FIRE_PRIORITY_SPEECH_CONTROLLER 900 +#define FIRE_PRIORITY_DELAYED_VERBS 950 #define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost. /** diff --git a/code/__defines/update_icons.dm b/code/__defines/update_icons.dm index 4fa21751be5..7120edd1680 100644 --- a/code/__defines/update_icons.dm +++ b/code/__defines/update_icons.dm @@ -1 +1,49 @@ -#define MOB_WATER_LAYER 36 +// These are used as the layers for the icons, as well as indexes in a list that holds onto them. +// Technically the layers used are all -100+layer to make them FLOAT_LAYER overlays. +//Human Overlays Indexes///////// +#define MUTATIONS_LAYER 1 //Mutations like fat, and lasereyes +#define SKIN_LAYER 2 //Skin things added by a call on species +#define BLOOD_LAYER 3 //Bloodied hands/feet/anything else +#define BODYPARTS_LAYER 4 //Bodyparts layer +#define MOB_DAM_LAYER 5 //Injury overlay sprites like open wounds +#define SURGERY_LAYER 6 //Overlays for open surgical sites +#define UNDERWEAR_LAYER 7 //Underwear/bras/etc +#define TAIL_LOWER_LAYER 8 //Tail as viewed from the south +#define WING_LOWER_LAYER 9 //Wings as viewed from the south +#define SHOES_LAYER_ALT 10 //Shoe-slot item (when set to be under uniform via verb) +#define UNIFORM_LAYER 11 //Uniform-slot item +#define ID_LAYER 12 //ID-slot item +#define SHOES_LAYER 13 //Shoe-slot item +#define GLOVES_LAYER 14 //Glove-slot item +#define BELT_LAYER 15 //Belt-slot item +#define SUIT_LAYER 16 //Suit-slot item +#define TAIL_UPPER_LAYER 17 //Some species have tails to render (As viewed from the N, E, or W) +#define GLASSES_LAYER 18 //Eye-slot item +#define BELT_LAYER_ALT 19 //Belt-slot item (when set to be above suit via verb) +#define SUIT_STORE_LAYER 20 //Suit storage-slot item +#define BACK_LAYER 21 //Back-slot item +#define HAIR_LAYER 22 //The human's hair +#define HAIR_ACCESSORY_LAYER 23 //Simply move this up a number if things are added. +#define EARS_LAYER 24 //Both ear-slot items (combined image) +#define EYES_LAYER 25 //Mob's eyes (used for glowing eyes) +#define FACEMASK_LAYER 26 //Mask-slot item +#define GLASSES_LAYER_ALT 27 //So some glasses can appear on top of hair and things +#define HEAD_LAYER 28 //Head-slot item +#define HANDCUFF_LAYER 29 //Handcuffs, if the human is handcuffed, in a secret inv slot +#define LEGCUFF_LAYER 30 //Same as handcuffs, for legcuffs +#define L_HAND_LAYER 31 //Left-hand item +#define R_HAND_LAYER 32 //Right-hand item +#define WING_LAYER 33 //Wings or protrusions over the suit. +#define TAIL_UPPER_LAYER_ALT 34 //Modified tail-sprite layer. Tend to be larger. +#define MODIFIER_EFFECTS_LAYER 35 //Effects drawn by modifiers +#define FIRE_LAYER 36 //'Mob on fire' overlay layer +#define MOB_WATER_LAYER 37 +#define TARGETED_LAYER 38 //'Aimed at' overlay layer +#define VORE_BELLY_LAYER 39 +#define VORE_TAIL_LAYER 40 + +#define TOTAL_LAYERS 40 // <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list. + +//These two are only used for gargoyles currently +#define HUMAN_BODY_LAYERS list(MUTATIONS_LAYER, TAIL_LOWER_LAYER, WING_LOWER_LAYER, BODYPARTS_LAYER, SKIN_LAYER, BLOOD_LAYER, MOB_DAM_LAYER, TAIL_UPPER_LAYER, HAIR_LAYER, HAIR_ACCESSORY_LAYER, EYES_LAYER, WING_LAYER, VORE_BELLY_LAYER, VORE_TAIL_LAYER, TAIL_UPPER_LAYER_ALT) +#define HUMAN_OTHER_LAYERS list(MODIFIER_EFFECTS_LAYER, FIRE_LAYER, MOB_WATER_LAYER, TARGETED_LAYER) diff --git a/code/__defines/verb_manager.dm b/code/__defines/verb_manager.dm new file mode 100644 index 00000000000..11ea6ada4d8 --- /dev/null +++ b/code/__defines/verb_manager.dm @@ -0,0 +1,36 @@ +/** + * verb queuing thresholds. remember that since verbs execute after SendMaps the player wont see the effects of the verbs on the game world + * until SendMaps executes next tick, and then when that later update reaches them. thus most player input has a minimum latency of world.tick_lag + player ping. + * however thats only for the visual effect of player input, when a verb processes the actual latency of game state changes or semantic latency is effectively 1/2 player ping, + * unless that verb is queued for the next tick in which case its some number probably smaller than world.tick_lag. + * so some verbs that represent player input are important enough that we only introduce semantic latency if we absolutely need to. + * its for this reason why player clicks are handled in SSinput before even movement - semantic latency could cause someone to move out of range + * when the verb finally processes but it was in range if the verb had processed immediately and overtimed. + */ + +///queuing tick_usage threshold for verbs that are high enough priority that they only queue if the server is overtiming. +///ONLY use for critical verbs +#define VERB_OVERTIME_QUEUE_THRESHOLD 100 +///queuing tick_usage threshold for verbs that need lower latency more than most verbs. +#define VERB_HIGH_PRIORITY_QUEUE_THRESHOLD 95 +///default queuing tick_usage threshold for most verbs which can allow a small amount of latency to be processed in the next tick +#define VERB_DEFAULT_QUEUE_THRESHOLD 85 + +///attempt to queue this verb process if the server is overloaded. evaluates to FALSE if queuing isnt necessary or if it failed. +///_verification_args... are only necessary if the verb_manager subsystem youre using checks them in can_queue_verb() +///if you put anything in _verification_args that ISNT explicitely put in the can_queue_verb() override of the subsystem youre using, +///it will runtime. +#define TRY_QUEUE_VERB(_verb_callback, _tick_check, _subsystem_to_use, _verification_args...) (_queue_verb(_verb_callback, _tick_check, _subsystem_to_use, _verification_args)) +///queue wrapper for TRY_QUEUE_VERB() when you want to call the proc if the server isnt overloaded enough to queue +#define QUEUE_OR_CALL_VERB(_verb_callback, _tick_check, _subsystem_to_use, _verification_args...) \ + if(!TRY_QUEUE_VERB(_verb_callback, _tick_check, _subsystem_to_use, _verification_args)) {\ + _verb_callback:InvokeAsync() \ + }; + +//goes straight to SSverb_manager with default tick threshold +#define DEFAULT_TRY_QUEUE_VERB(_verb_callback, _verification_args...) (TRY_QUEUE_VERB(_verb_callback, VERB_DEFAULT_QUEUE_THRESHOLD, null, _verification_args)) +#define DEFAULT_QUEUE_OR_CALL_VERB(_verb_callback, _verification_args...) QUEUE_OR_CALL_VERB(_verb_callback, VERB_DEFAULT_QUEUE_THRESHOLD, null, _verification_args) + +//default tick threshold but nondefault subsystem +#define TRY_QUEUE_VERB_FOR(_verb_callback, _subsystem_to_use, _verification_args...) (TRY_QUEUE_VERB(_verb_callback, VERB_DEFAULT_QUEUE_THRESHOLD, _subsystem_to_use, _verification_args)) +#define QUEUE_OR_CALL_VERB_FOR(_verb_callback, _subsystem_to_use, _verification_args...) QUEUE_OR_CALL_VERB(_verb_callback, VERB_DEFAULT_QUEUE_THRESHOLD, _subsystem_to_use, _verification_args) diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 1f76dcac9a3..80d66f555da 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -172,7 +172,7 @@ if(ismob(I)) if(!sight_check || isInSight(I, O)) - L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects) + L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects, ignore_show_messages) if(include_mobs) if(client_check) var/mob/M = I @@ -185,7 +185,7 @@ var/obj/check_obj = I if(ignore_show_messages || check_obj.show_messages) if(!sight_check || isInSight(I, O)) - L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects) + L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects, ignore_show_messages) if(include_objects) L |= I diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 72bed469c97..80abfae6522 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -52,8 +52,9 @@ GLOBAL_LIST_INIT(custom_species_bases, new) // Species that can be used for a Cu //Underwear var/datum/category_collection/underwear/global_underwear = new() - //Backpacks -var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag", "Sports Bag", "Strapless Satchel") //VOREStation edit + //Customizables +GLOBAL_LIST_INIT(headsetlist, list("Standard","Bowman","Earbud")) +var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag", "Sports Bag", "Strapless Satchel") var/global/list/pdachoicelist = list("Default", "Slim", "Old", "Rugged", "Holographic", "Wrist-Bound","Slider", "Vintage") var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg) diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 520b98d39ad..725335f267a 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -343,16 +343,17 @@ //The icon var could be local in the proc, but it's a waste of resources // to always create it and then throw it out. /var/icon/text_tag_icons = 'icons/chattags.dmi' -/var/list/text_tag_cache = list() +GLOBAL_LIST_EMPTY(text_tag_cache) + /proc/create_text_tag(var/tagname, var/tagdesc = tagname, var/client/C = null) if(!(C && C.prefs?.read_preference(/datum/preference/toggle/chat_tags))) return tagdesc - if(!text_tag_cache[tagname]) - var/icon/tag = icon(text_tag_icons, tagname) - text_tag_cache[tagname] = tag + if(!GLOB.text_tag_cache[tagname]) + var/datum/asset/spritesheet/chatassets = get_asset_datum(/datum/asset/spritesheet/chat) + GLOB.text_tag_cache[tagname] = chatassets.icon_tag(tagname) if(!C.tgui_panel.is_ready() || C.tgui_panel.oldchat) return "[tagdesc]" - return icon2html(text_tag_cache[tagname], C, extra_classes = "text_tag") + return GLOB.text_tag_cache[tagname] /proc/create_text_tag_old(var/tagname, var/tagdesc = tagname, var/client/C = null) if(!(C && C.prefs?.read_preference(/datum/preference/toggle/chat_tags))) @@ -620,3 +621,8 @@ return json_decode(data) catch return null + +/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts +/proc/sanitize_css_class_name(name) + var/static/regex/regex = new(@"[^a-zA-Z0-9]","g") + return replacetext(name, regex, "") diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 057f988dcb9..8b5c5d0325b 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -420,7 +420,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/select_active_ai(var/mob/user) var/list/ais = active_ais() if(ais.len) - if(user) . = tgui_input_list(usr, "AI signals detected:", "AI selection", ais) + if(user) . = tgui_input_list(user, "AI signals detected:", "AI selection", ais) else . = pick(ais) return . @@ -974,7 +974,7 @@ Turf and target are seperate in case you want to teleport some distance from a t if(toupdate.len) for(var/turf/simulated/T1 in toupdate) - air_master.mark_for_update(T1) + SSair.mark_for_update(T1) return copiedobjs diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 15acd142c67..80d086a298c 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -44,7 +44,7 @@ if(aiCamera && aiCamera.in_camera_mode) aiCamera.camera_mode_off() if(is_component_functioning("camera")) - aiCamera.captureimage(A, usr) + aiCamera.captureimage(A, src) else to_chat(src, span_userdanger("Your camera isn't functional.")) return diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 774acba147f..518c3e03c57 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -396,7 +396,7 @@ var/list/global_huds = list( set hidden = 1 if(!hud_used) - to_chat(usr, span_warning("This mob type does not use a HUD.")) + to_chat(src, span_warning("This mob type does not use a HUD.")) return FALSE if(!client) return FALSE diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 32725ec5aed..b8032273250 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -3,33 +3,52 @@ GLOBAL_LIST_EMPTY(radial_menus) -// Ported from TG - /obj/screen/radial icon = 'icons/mob/radial.dmi' - layer = LAYER_HUD_ABOVE plane = PLANE_PLAYER_HUD_ABOVE + vis_flags = VIS_INHERIT_PLANE + var/click_on_hover = FALSE var/datum/radial_menu/parent +/obj/screen/radial/proc/set_parent(new_value) + if(parent) + UnregisterSignal(parent, COMSIG_PARENT_QDELETING) + parent = new_value + if(parent) + RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(handle_parent_del)) + +/obj/screen/radial/proc/handle_parent_del() + SIGNAL_HANDLER + set_parent(null) + /obj/screen/radial/slice icon_state = "radial_slice" var/choice var/next_page = FALSE var/tooltips = FALSE -/obj/screen/radial/Destroy() - parent = null - return ..() +/obj/screen/radial/slice/set_parent(new_value) + . = ..() + if(parent) + icon_state = parent.radial_slice_icon /obj/screen/radial/slice/MouseEntered(location, control, params) . = ..() - icon_state = "radial_slice_focus" + if(next_page || !parent) + icon_state = "radial_slice_focus" + else + icon_state = "[parent.radial_slice_icon]_focus" if(tooltips) openToolTip(usr, src, params, title = name) + if (click_on_hover && !isnull(usr) && !isnull(parent)) + Click(location, control, params) /obj/screen/radial/slice/MouseExited(location, control, params) . = ..() - icon_state = "radial_slice" + if(next_page || !parent) + icon_state = "radial_slice" + else + icon_state = parent.radial_slice_icon if(tooltips) closeToolTip(usr) @@ -38,7 +57,7 @@ GLOBAL_LIST_EMPTY(radial_menus) if(next_page) parent.next_page() else - parent.element_chosen(choice,usr) + parent.element_chosen(choice, usr, params) /obj/screen/radial/center name = "Close Menu" @@ -57,9 +76,18 @@ GLOBAL_LIST_EMPTY(radial_menus) parent.finished = TRUE /datum/radial_menu - var/list/choices = list() //List of choice id's - var/list/choices_icons = list() //choice_id -> icon - var/list/choices_values = list() //choice_id -> choice + /// List of choice IDs + var/list/choices = list() + + /// choice_id -> icon + var/list/choices_icons = list() + + /// choice_id -> choice + var/list/choices_values = list() + + /// choice_id -> /datum/radial_menu_choice + var/list/choice_datums = list() + var/list/page_data = list() //list of choices per page @@ -87,6 +115,9 @@ GLOBAL_LIST_EMPTY(radial_menus) var/py_shift = 0 var/entry_animation = TRUE + ///A replacement icon state for the generic radial slice bg icon. Doesn't affect the next page nor the center buttons + var/radial_slice_icon + //If we swap to vis_contens inventory these will need a redo /datum/radial_menu/proc/check_screen_border(mob/user) var/atom/movable/AM = anchor @@ -98,6 +129,8 @@ GLOBAL_LIST_EMPTY(radial_menus) else py_shift = 32 restrict_to_dir(NORTH) //I was going to parse screen loc here but that's more effort than it's worth. + else if(hudfix_method && AM.loc) + anchor = get_atom_on_turf(anchor) //Sets defaults //These assume 45 deg min_angle @@ -116,7 +149,7 @@ GLOBAL_LIST_EMPTY(radial_menus) starting_angle = 180 ending_angle = 45 -/datum/radial_menu/proc/setup_menu(use_tooltips) +/datum/radial_menu/proc/setup_menu(use_tooltips, set_page = 1, click_on_hover = FALSE) if(ending_angle > starting_angle) zone = ending_angle - starting_angle else @@ -129,7 +162,7 @@ GLOBAL_LIST_EMPTY(radial_menus) for(var/i in 1 to elements_to_add) //Create all elements var/obj/screen/radial/slice/new_element = new /obj/screen/radial/slice new_element.tooltips = use_tooltips - new_element.parent = src + new_element.set_parent(src) elements += new_element var/page = 1 @@ -152,22 +185,31 @@ GLOBAL_LIST_EMPTY(radial_menus) page_data[page] = current pages = page - current_page = 1 - update_screen_objects(anim = entry_animation) + current_page = clamp(set_page, 1, pages) + update_screen_objects(entry_animation, click_on_hover) -/datum/radial_menu/proc/update_screen_objects(anim = FALSE) +/datum/radial_menu/proc/update_screen_objects(anim = FALSE, click_on_hover = FALSE) var/list/page_choices = page_data[current_page] var/angle_per_element = round(zone / page_choices.len) for(var/i in 1 to elements.len) - var/obj/screen/radial/E = elements[i] + var/obj/screen/radial/element = elements[i] var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360) if(i > page_choices.len) - HideElement(E) + HideElement(element) + element.click_on_hover = FALSE else - SetElement(E,page_choices[i],angle,anim = anim,anim_order = i) + SetElement(element,page_choices[i],angle,anim = anim,anim_order = i) + // Only activate click on hover after the animation plays + if (!click_on_hover) + continue + if (anim) + addtimer(VARSET_CALLBACK(element, click_on_hover, TRUE), i * 0.5) + else + element.click_on_hover = TRUE /datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E) E.cut_overlays() + E.vis_contents.Cut() E.alpha = 0 E.name = "None" E.maptext = null @@ -194,13 +236,22 @@ GLOBAL_LIST_EMPTY(radial_menus) E.alpha = 255 E.mouse_opacity = MOUSE_OPACITY_ICON E.cut_overlays() + E.vis_contents.Cut() if(choice_id == NEXT_PAGE_ID) E.name = "Next Page" E.next_page = TRUE + E.icon_state = "radial_slice" // Resets the bg icon state to the default for next page buttons. E.add_overlay("radial_next") else - if(istext(choices_values[choice_id])) + //This isn't granted to exist, so use the ?. operator for conditionals that use it. + var/datum/radial_menu_choice/choice_datum = choice_datums[choice_id] + if(choice_datum?.name) + E.name = choice_datum.name + else if(istext(choices_values[choice_id])) E.name = choices_values[choice_id] + else if(ispath(choices_values[choice_id],/atom)) + var/atom/A = choices_values[choice_id] + E.name = initial(A.name) else var/atom/movable/AM = choices_values[choice_id] //Movables only E.name = AM.name @@ -209,15 +260,21 @@ GLOBAL_LIST_EMPTY(radial_menus) E.next_page = FALSE if(choices_icons[choice_id]) E.add_overlay(choices_icons[choice_id]) + if (choice_datum?.info) + var/obj/effect/abstract/info/info_button = new(E, choice_datum.info) + info_button.plane = PLANE_PLAYER_HUD_ABOVE + info_button.layer = RADIAL_CONTENT_LAYER + E.vis_contents += info_button /datum/radial_menu/New() close_button = new - close_button.parent = src + close_button.set_parent(src) /datum/radial_menu/proc/Reset() choices.Cut() choices_icons.Cut() choices_values.Cut() + choice_datums.Cut() current_page = 1 /datum/radial_menu/proc/element_chosen(choice_id,mob/user) @@ -226,7 +283,7 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/proc/get_next_id() return "c_[choices.len]" -/datum/radial_menu/proc/set_choices(list/new_choices, use_tooltips) +/datum/radial_menu/proc/set_choices(list/new_choices, use_tooltips, click_on_hover = FALSE, set_page = 1) if(choices.len) Reset() for(var/E in new_choices) @@ -237,13 +294,20 @@ GLOBAL_LIST_EMPTY(radial_menus) var/I = extract_image(new_choices[E]) if(I) choices_icons[id] = I - setup_menu(use_tooltips) + if (istype(new_choices[E], /datum/radial_menu_choice)) + choice_datums[id] = new_choices[E] + setup_menu(use_tooltips, set_page, click_on_hover) -/datum/radial_menu/proc/extract_image(E) - var/mutable_appearance/MA = new /mutable_appearance(E) +/datum/radial_menu/proc/extract_image(to_extract_from) + if (istype(to_extract_from, /datum/radial_menu_choice)) + var/datum/radial_menu_choice/choice = to_extract_from + to_extract_from = choice.image + + var/mutable_appearance/MA = new /mutable_appearance(to_extract_from) if(MA) - MA.layer = LAYER_HUD_ABOVE + MA.plane = PLANE_PLAYER_HUD_ABOVE + MA.layer = RADIAL_CONTENT_LAYER MA.appearance_flags |= RESET_TRANSFORM return MA @@ -253,15 +317,16 @@ GLOBAL_LIST_EMPTY(radial_menus) current_page = WRAP(current_page + 1,1,pages+1) update_screen_objects() -/datum/radial_menu/proc/show_to(mob/M) +/datum/radial_menu/proc/show_to(mob/M, offset_x = 0, offset_y = 0) if(current_user) hide() if(!M.client || !anchor) return current_user = M.client //Blank - menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing",layer = LAYER_HUD_ABOVE) - menu_holder.appearance_flags |= KEEP_APART + menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER, pixel_x = offset_x, pixel_y = offset_y) + menu_holder.plane = PLANE_PLAYER_HUD_ABOVE + menu_holder.appearance_flags |= KEEP_APART|RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM menu_holder.vis_contents += elements + close_button current_user.images += menu_holder @@ -283,9 +348,7 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/Destroy() Reset() hide() - QDEL_LIST_NULL(elements) - QDEL_NULL(close_button) - QDEL_NULL(custom_check_callback) + custom_check_callback = null . = ..() /* @@ -293,30 +356,66 @@ GLOBAL_LIST_EMPTY(radial_menus) Choices should be a list where list keys are movables or text used for element names and return value and list values are movables/icons/images used for element icons */ -/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE) +/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE, radial_slice_icon = "radial_slice", autopick_single_option = TRUE, entry_animation = TRUE, click_on_hover = FALSE, user_space = FALSE) if(!user || !anchor || !length(choices)) return + + if(length(choices)==1 && autopick_single_option) + return choices[1] + if(!uniqueid) uniqueid = "defmenu_[REF(user)]_[REF(anchor)]" if(GLOB.radial_menus[uniqueid]) + if(!no_repeat_close) + var/datum/radial_menu/menu = GLOB.radial_menus[uniqueid] + menu.finished = TRUE return var/datum/radial_menu/menu = new + menu.entry_animation = entry_animation GLOB.radial_menus[uniqueid] = menu if(radius) menu.radius = radius if(istype(custom_check)) menu.custom_check_callback = custom_check - menu.anchor = anchor + menu.anchor = user_space ? user : anchor + menu.radial_slice_icon = radial_slice_icon menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud - menu.set_choices(choices, tooltips) - menu.show_to(user) + menu.set_choices(choices, tooltips, click_on_hover) + var/offset_x = 0 + var/offset_y = 0 + if (user_space) + var/turf/user_turf = get_turf(user) + var/turf/anchor_turf = get_turf(anchor) + offset_x = (anchor_turf.x - user_turf.x) * ICON_SIZE_X + anchor.pixel_x - user.pixel_x + offset_y = (anchor_turf.y - user_turf.y) * ICON_SIZE_Y + anchor.pixel_y - user.pixel_y + menu.show_to(user, offset_x, offset_y) menu.wait(user, anchor, require_near) var/answer = menu.selected_choice - QDEL_NULL(menu) + qdel(menu) GLOB.radial_menus -= uniqueid + if(require_near && !in_range(anchor, user)) + return + if(istype(custom_check)) + if(!custom_check.Invoke()) + return return answer +/// Can be provided to choices in radial menus if you want to provide more information +/datum/radial_menu_choice + /// Required -- what to display for this button + var/image + + /// If provided, this will be the name the radial slice hud button. This has priority over everything else. + var/name + + /// If provided, will display an info button that will put this text in your chat + var/info + +/datum/radial_menu_choice/Destroy(force) + . = ..() + QDEL_NULL(image) + #undef NEXT_PAGE_ID #undef DEFAULT_CHECK_DELAY diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 06c93c37fb1..4b062a6b5fe 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -282,11 +282,11 @@ var/obj/screen/robot_inventory //r.client.screen += robot_inventory //"store" icon if(!r.module) - to_chat(usr, span_danger("No module selected")) + to_chat(r, span_danger("No module selected")) return if(!r.module.modules) - to_chat(usr, span_danger("Selected module has no modules to select")) + to_chat(r, span_danger("Selected module has no modules to select")) return if(!r.robot_modules_background) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm deleted file mode 100644 index b741f129ede..00000000000 --- a/code/controllers/configuration.dm +++ /dev/null @@ -1,1203 +0,0 @@ -var/list/gamemode_cache = list() - -/datum/configuration - var/static/server_name = null // server name (for world name / status) - var/static/server_suffix = 0 // generate numeric suffix based on server port - - var/static/nudge_script_path = "nudge.py" // where the nudge.py script is located - - var/static/log_ooc = 0 // log OOC channel - var/static/log_access = 0 // log login/logout - var/static/log_say = 0 // log client say - var/static/log_admin = 0 // log admin actions - var/static/log_debug = 1 // log debug output - var/static/log_game = 0 // log game events - var/static/log_vote = 0 // log voting - var/static/log_whisper = 0 // log client whisper - var/static/log_emote = 0 // log emotes - var/static/log_attack = 0 // log attack messages - var/static/log_adminchat = 0 // log admin chat messages - var/static/log_adminwarn = 0 // log warnings admins get about bomb construction and such - var/static/log_pda = 0 // log pda messages - var/static/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits - var/static/log_runtime = 0 // logs world.log to a file - var/static/log_world_output = 0 // log to_world_log(messages) - var/static/log_graffiti = 0 // logs graffiti - var/static/sql_enabled = 0 // for sql switching - var/static/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour - var/static/allow_vote_restart = 0 // allow votes to restart - var/static/ert_admin_call_only = 0 - var/static/allow_vote_mode = 0 // allow votes to change mode - var/static/allow_admin_jump = 1 // allows admin jumping - var/static/allow_admin_spawning = 1 // allows admin item spawning - var/static/allow_admin_rev = 1 // allows admin revives - var/static/pregame_time = 180 // pregame time in seconds - var/static/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default) - var/static/vote_period = 600 // length of voting period (deciseconds, default 1 minute) - var/static/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called - var/static/vote_autotransfer_interval = 36000 // length of time before next sequential autotransfer vote - var/static/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100). - var/static/vote_no_default = 0 // vote does not default to nochange/norestart (tbi) - var/static/vote_no_dead = 0 // dead people can't vote (tbi) -// var/static/enable_authentication = 0 // goon authentication - var/static/del_new_on_log = 1 // del's new players if they log before they spawn in - var/static/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard - var/static/traitor_scaling = 0 //if amount of traitors scales based on amount of players - var/static/objectives_disabled = 0 //if objectives are disabled or not - var/static/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other - var/static/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. - var/static/allow_Metadata = 0 // Metadata is supported. - var/static/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. - var/static/fps = 20 - var/static/tick_limit_mc_init = TICK_LIMIT_MC_INIT_DEFAULT //SSinitialization throttling - var/static/Tickcomp = 0 - var/static/socket_talk = 0 // use socket_talk to communicate with other processes - var/static/list/resource_urls = null - var/static/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round. - var/static/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round. - var/static/list/mode_names = list() - var/static/list/modes = list() // allowed modes - var/static/list/votable_modes = list() // votable modes - var/static/list/probabilities = list() // relative probability of each mode - var/static/list/player_requirements = list() // Overrides for how many players readied up a gamemode needs to start. - var/static/list/player_requirements_secret = list() // Same as above, but for the secret gamemode. - var/static/humans_need_surnames = 0 - var/static/allow_random_events = 0 // enables random events mid-round when set to 1 - var/static/enable_game_master = 0 // enables the 'smart' event system. - var/static/allow_ai = 1 // allow ai job - var/static/allow_ai_shells = FALSE // allow AIs to enter and leave special borg shells at will, and for those shells to be buildable. - var/static/give_free_ai_shell = FALSE // allows a specific spawner object to instantiate a premade AI Shell - var/static/hostedby = null - - var/static/respawn = 1 - var/static/respawn_time = 3000 // time before a dead player is allowed to respawn (in ds, though the config file asks for minutes, and it's converted below) - var/static/respawn_message = span_boldnotice("Make sure to play a different character, and please roleplay correctly!") - - var/static/guest_jobban = 1 - var/static/usewhitelist = 0 - var/static/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0 - var/static/show_mods = 0 - var/static/show_devs = 0 - var/static/show_mentors = 0 - var/static/show_event_managers = 0 - var/static/mods_can_tempban = 0 - var/static/mods_can_job_tempban = 0 - var/static/mod_tempban_max = 1440 - var/static/mod_job_tempban_max = 1440 - var/static/load_jobs_from_txt = 0 - var/static/ToRban = 0 - var/static/automute_on = 0 //enables automuting/spam prevention - var/static/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. - - var/static/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds... - var/static/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active. - - var/static/character_slots = 10 // The number of available character slots - var/static/loadout_slots = 3 // The number of loadout slots per character - - var/static/max_maint_drones = 5 //This many drones can spawn, - var/static/allow_drone_spawn = 1 //assuming the admin allow them to. - var/static/drone_build_time = 1200 //A drone will become available every X ticks since last drone spawn. Default is 2 minutes. - - var/static/disable_player_mice = 0 - var/static/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech - - var/static/usealienwhitelist = 0 - var/static/limitalienplayers = 0 - var/static/alien_to_human_ratio = 0.5 - var/static/allow_extra_antags = 0 - var/static/guests_allowed = 1 - var/static/debugparanoid = 0 - var/static/panic_bunker = 0 - var/static/paranoia_logging = 0 - - var/static/ip_reputation = FALSE //Should we query IPs to get scores? Generates HTTP traffic to an API service. - var/static/ipr_email //Left null because you MUST specify one otherwise you're making the internet worse. - var/static/ipr_block_bad_ips = FALSE //Should we block anyone who meets the minimum score below? Otherwise we just log it (If paranoia logging is on, visibly in chat). - var/static/ipr_bad_score = 1 //The API returns a value between 0 and 1 (inclusive), with 1 being 'definitely VPN/Tor/Proxy'. Values equal/above this var are considered bad. - var/static/ipr_allow_existing = FALSE //Should we allow known players to use VPNs/Proxies? If the player is already banned then obviously they still can't connect. - var/static/ipr_minimum_age = 5 //How many days before a player is considered 'fine' for the purposes of allowing them to use VPNs. - - var/static/serverurl - var/static/server - var/static/banappeals - var/static/wikiurl - var/static/wikisearchurl - var/static/forumurl - var/static/githuburl - var/static/discordurl - var/static/rulesurl - var/static/mapurl - var/static/patreonurl - - //Alert level description - var/static/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." - var/static/alert_desc_yellow_upto = "A minor security emergency has developed. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced." - var/static/alert_desc_yellow_downto = "Code yellow procedures are now in effect. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced." - var/static/alert_desc_violet_upto = "A major medical emergency has developed. Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey all relevant instructions from medical staff." - var/static/alert_desc_violet_downto = "Code violet procedures are now in effect; Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey relevant instructions from medical staff." - var/static/alert_desc_orange_upto = "A major engineering emergency has developed. Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff." - var/static/alert_desc_orange_downto = "Code orange procedures are now in effect; Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff." - var/static/alert_desc_blue_upto = "A major security emergency has developed. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person." - var/static/alert_desc_blue_downto = "Code blue procedures are now in effect. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person." - var/static/alert_desc_red_upto = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised." - var/static/alert_desc_red_downto = "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised." - var/static/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." - - var/static/forbid_singulo_possession = 0 - - //game_options.txt configs - - var/static/health_threshold_softcrit = 0 - var/static/health_threshold_crit = 0 - var/static/health_threshold_dead = -100 - - var/static/organ_health_multiplier = 1 - var/static/organ_regeneration_multiplier = 1 - var/static/organs_decay - var/static/default_brain_health = 400 - var/static/allow_headgibs = FALSE - - //Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt, - //so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun. - var/static/organ_damage_spillover_multiplier = 0.5 - - var/static/bones_can_break = 0 - var/static/limbs_can_break = 0 - - var/static/revival_pod_plants = 1 - var/static/revival_cloning = 1 - var/static/revival_brain_life = -1 - - var/static/use_loyalty_implants = 0 - - var/static/welder_vision = 1 - var/static/generate_map = 0 - var/static/no_click_cooldown = 0 - - //Used for modifying movement speed for mobs. - //Unversal modifiers - var/static/run_speed = 0 - var/static/walk_speed = 0 - - //Mob specific modifiers. NOTE: These will affect different mob types in different ways - var/static/human_delay = 0 - var/static/robot_delay = 0 - var/static/monkey_delay = 0 - var/static/alien_delay = 0 - var/static/slime_delay = 0 - var/static/animal_delay = 0 - - var/static/footstep_volume = 0 - - var/static/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt - var/static/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt - var/static/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database - var/static/use_age_restriction_for_antags = 0 //Do antags use account age restrictions? --requires database - - var/static/simultaneous_pm_warning_timeout = 100 - - var/static/use_recursive_explosions //Defines whether the server uses recursive or circular explosions. - var/static/multi_z_explosion_scalar = 0.5 //Multiplier for how much weaker explosions are on neighboring z levels. - - var/static/assistant_maint = 0 //Do assistants get maint access? - var/static/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour. - var/static/ghost_interaction = 0 - - var/static/comms_password = "" - - var/static/enter_allowed = 1 - - var/use_irc_bot = 0 - var/use_node_bot = 0 - var/irc_bot_port = 0 - var/irc_bot_host = "" - var/irc_bot_export = 0 // whether the IRC bot in use is a Bot32 (or similar) instance; Bot32 uses world.Export() instead of nudge.py/libnudge - var/main_irc = "" - var/admin_irc = "" - var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix - var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge. - var/use_overmap = 0 - - var/static/list/engine_map = list("Supermatter Engine", "Edison's Bane") // Comma separated list of engines to choose from. Blank means fully random. - - // Event settings - var/static/expected_round_length = 3 * 60 * 60 * 10 // 3 hours - // If the first delay has a custom start time - // No custom time, no custom time, between 80 to 100 minutes respectively. - var/static/list/event_first_run = list(EVENT_LEVEL_MUNDANE = null, EVENT_LEVEL_MODERATE = null, EVENT_LEVEL_MAJOR = list("lower" = 48000, "upper" = 60000)) - // The lowest delay until next event - // 10, 30, 50 minutes respectively - var/static/list/event_delay_lower = list(EVENT_LEVEL_MUNDANE = 6000, EVENT_LEVEL_MODERATE = 18000, EVENT_LEVEL_MAJOR = 30000) - // The upper delay until next event - // 15, 45, 70 minutes respectively - var/static/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000) - - var/static/aliens_allowed = 1 //Changed to 1 so player xenos can lay eggs. - var/static/ninjas_allowed = 0 - var/static/abandon_allowed = 1 - var/static/ooc_allowed = 1 - var/static/looc_allowed = 1 - var/static/dooc_allowed = 1 - var/static/dsay_allowed = 1 - - var/persistence_disabled = FALSE - var/persistence_ignore_mapload = FALSE - - var/allow_byond_links = 0 - var/allow_discord_links = 0 - var/allow_url_links = 0 // honestly if I were you i'd leave this one off, only use in dire situations - - var/starlight = 0 // Whether space turfs have ambient light or not - - var/static/list/ert_species = list(SPECIES_HUMAN) - - var/static/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010" - - var/static/aggressive_changelog = 0 - - var/static/list/language_prefixes = list(",","#")//Default language prefixes - - var/static/show_human_death_message = 1 - - var/static/radiation_resistance_calc_mode = RAD_RESIST_CALC_SUB // 0:1 subtraction:division for computing effective radiation on a turf - var/static/radiation_decay_rate = 1 //How much radiation is reduced by each tick - var/static/radiation_resistance_multiplier = 8.5 //VOREstation edit - var/static/radiation_material_resistance_divisor = 1 - var/static/radiation_lower_limit = 0.35 //If the radiation level for a turf would be below this, ignore it. - - var/static/autostart_solars = FALSE // If true, specifically mapped in solar control computers will set themselves up when the round starts. - - // New shiny SQLite stuff. - // The basics. - var/static/sqlite_enabled = FALSE // If it should even be active. SQLite can be ran alongside other databases but you should not have them do the same functions. - - // In-Game Feedback. - var/static/sqlite_feedback = FALSE // Feedback cannot be submitted if this is false. - var/static/list/sqlite_feedback_topics = list("General") // A list of 'topics' that feedback can be catagorized under by the submitter. - var/static/sqlite_feedback_privacy = FALSE // If true, feedback submitted can have its author name be obfuscated. This is not 100% foolproof (it's md5 ffs) but can stop casual snooping. - var/static/sqlite_feedback_cooldown = 0 // How long one must wait, in days, to submit another feedback form. Used to help prevent spam, especially with privacy active. 0 = No limit. - var/static/sqlite_feedback_min_age = 0 // Used to block new people from giving feedback. This metric is very bad but it can help slow down spammers. - - var/static/defib_timer = 10 // How long until someone can't be defibbed anymore, in minutes. - var/static/defib_braindamage_timer = 2 // How long until someone will get brain damage when defibbed, in minutes. The closer to the end of the above timer, the more brain damage they get. - - // disables the annoying "You have already logged in this round, disconnect or be banned" popup for multikeying, because it annoys the shit out of me when testing. - var/static/disable_cid_warn_popup = FALSE - - // whether or not to use the nightshift subsystem to perform lighting changes - var/static/enable_night_shifts = FALSE - - // How strictly the loadout enforces object species whitelists - var/loadout_whitelist = LOADOUT_WHITELIST_LAX - - var/static/vgs_access_identifier = null // VOREStation Edit - VGS - var/static/vgs_server_port = null // VOREStation Edit - VGS - - var/disable_webhook_embeds = FALSE - - var/static/list/jukebox_track_files - - var/static/suggested_byond_version - var/static/suggested_byond_build - - var/static/invoke_youtubedl = null - - - var/static/asset_transport - - var/static/cache_assets = FALSE - - var/static/save_spritesheets = FALSE - - var/static/asset_simple_preload = FALSE - - var/static/asset_cdn_webroot - - var/static/asset_cdn_url - - //Enables/Disables the appropriate mob type from obtaining the verb on spawn. Still allows admins to manually give it to them. - var/static/allow_robot_recolor = FALSE - var/static/allow_simple_mob_recolor = FALSE - - -/datum/configuration/New() - var/list/L = subtypesof(/datum/game_mode) - for (var/T in L) - // I wish I didn't have to instance the game modes in order to look up - // their information, but it is the only way (at least that I know of). - var/datum/game_mode/M = new T() - if (M.config_tag) - gamemode_cache[M.config_tag] = M // So we don't instantiate them repeatedly. - if(!(M.config_tag in modes)) // ensure each mode is added only once - log_misc("Adding game mode [M.name] ([M.config_tag]) to configuration.") - modes += M.config_tag - mode_names[M.config_tag] = M.name - probabilities[M.config_tag] = M.probability - player_requirements[M.config_tag] = M.required_players - player_requirements_secret[M.config_tag] = M.required_players_secret - if (M.votable) - src.votable_modes += M.config_tag - src.votable_modes += "secret" - -/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist - var/list/Lines = file2list(filename) - - for(var/t in Lines) - if(!t) continue - - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - - var/pos = findtext(t, " ") - var/name = null - var/value = null - - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - - if (!name) - continue - - if(type == "config") - switch (name) - if ("resource_urls") - config.resource_urls = splittext(value, " ") - - if ("admin_legacy_system") - config.admin_legacy_system = 1 - - if ("ban_legacy_system") - config.ban_legacy_system = 1 - - if ("use_age_restriction_for_jobs") - config.use_age_restriction_for_jobs = 1 - - if ("use_age_restriction_for_antags") - config.use_age_restriction_for_antags = 1 - - if ("jobs_have_minimal_access") - config.jobs_have_minimal_access = 1 - - if ("use_recursive_explosions") - use_recursive_explosions = 1 - - if ("multi_z_explosion_scalar") - multi_z_explosion_scalar = text2num(value) - - if ("log_ooc") - config.log_ooc = 1 - - if ("log_access") - config.log_access = 1 - - if ("sql_enabled") - config.sql_enabled = 1 - - if ("log_say") - config.log_say = 1 - - if ("debug_paranoid") - config.debugparanoid = 1 - - if ("log_admin") - config.log_admin = 1 - - if ("log_debug") - config.log_debug = text2num(value) - - if ("log_game") - config.log_game = 1 - - if ("log_vote") - config.log_vote = 1 - - if ("log_whisper") - config.log_whisper = 1 - - if ("log_attack") - config.log_attack = 1 - - if ("log_emote") - config.log_emote = 1 - - if ("log_adminchat") - config.log_adminchat = 1 - - if ("log_adminwarn") - config.log_adminwarn = 1 - - if ("log_pda") - config.log_pda = 1 - - if ("log_world_output") - config.log_world_output = 1 - - if ("log_hrefs") - config.log_hrefs = 1 - - if ("log_runtime") - config.log_runtime = 1 - - if ("log_graffiti") - config.log_graffiti = 1 - - if ("generate_map") - config.generate_map = 1 - - if ("no_click_cooldown") - config.no_click_cooldown = 1 - - if("allow_admin_ooccolor") - config.allow_admin_ooccolor = 1 - - if ("allow_vote_restart") - config.allow_vote_restart = 1 - - if ("allow_vote_mode") - config.allow_vote_mode = 1 - - if ("allow_admin_jump") - config.allow_admin_jump = 1 - - if("allow_admin_rev") - config.allow_admin_rev = 1 - - if ("allow_admin_spawning") - config.allow_admin_spawning = 1 - - if ("allow_byond_links") - allow_byond_links = 1 - - if ("allow_discord_links") - allow_discord_links = 1 - - if ("allow_url_links") - allow_url_links = 1 - - if ("no_dead_vote") - config.vote_no_dead = 1 - - if ("default_no_vote") - config.vote_no_default = 1 - - if ("pregame_time") - config.pregame_time = text2num(value) - - if ("vote_delay") - config.vote_delay = text2num(value) - - if ("vote_period") - config.vote_period = text2num(value) - - if ("vote_autotransfer_initial") - config.vote_autotransfer_initial = text2num(value) - - if ("vote_autotransfer_interval") - config.vote_autotransfer_interval = text2num(value) - - if ("vote_autogamemode_timeleft") - config.vote_autogamemode_timeleft = text2num(value) - - if("ert_admin_only") - config.ert_admin_call_only = 1 - - if ("allow_ai") - config.allow_ai = 1 - - if ("allow_ai_shells") - config.allow_ai_shells = TRUE - - if("give_free_ai_shell") - config.give_free_ai_shell = TRUE - -// if ("authentication") -// config.enable_authentication = 1 - - if ("norespawn") - config.respawn = 0 - - if ("respawn_time") - var/raw_minutes = text2num(value) - config.respawn_time = raw_minutes MINUTES - - if ("respawn_message") - config.respawn_message = span_boldnotice("[value]") - - if ("servername") - config.server_name = value - - if ("serversuffix") - config.server_suffix = 1 - - if ("nudge_script_path") - config.nudge_script_path = value - - if ("hostedby") - config.hostedby = value - - if ("serverurl") - config.serverurl = value - - if ("server") - config.server = value - - if ("banappeals") - config.banappeals = value - - if ("wikiurl") - config.wikiurl = value - - if ("wikisearchurl") - config.wikisearchurl = value - - if ("forumurl") - config.forumurl = value - - if ("rulesurl") - config.rulesurl = value - - if ("mapurl") - config.mapurl = value - - if ("githuburl") - config.githuburl = value - - if ("discordurl") - config.discordurl = value - - if ("patreonurl") - config.patreonurl = value - - if ("guest_jobban") - config.guest_jobban = 1 - - if ("guest_ban") - config.guests_allowed = 0 - - if ("disable_ooc") - config.ooc_allowed = 0 - config.looc_allowed = 0 - - if ("disable_entry") - config.enter_allowed = 0 - - if ("disable_dead_ooc") - config.dooc_allowed = 0 - - if ("disable_dsay") - config.dsay_allowed = 0 - - if ("disable_respawn") - config.abandon_allowed = 0 - - if ("usewhitelist") - config.usewhitelist = 1 - - if ("feature_object_spell_system") - config.feature_object_spell_system = 1 - - if ("allow_metadata") - config.allow_Metadata = 1 - - if ("traitor_scaling") - config.traitor_scaling = 1 - - if ("aliens_allowed") - config.aliens_allowed = 1 - - if ("ninjas_allowed") - config.ninjas_allowed = 1 - - if ("objectives_disabled") - config.objectives_disabled = 1 - - if("protect_roles_from_antagonist") - config.protect_roles_from_antagonist = 1 - - if("persistence_disabled") - config.persistence_disabled = TRUE // Previously this forcibly set persistence enabled in the saves. - - if("persistence_ignore_mapload") - config.persistence_ignore_mapload = TRUE - - if ("probability") - var/prob_pos = findtext(value, " ") - var/prob_name = null - var/prob_value = null - - if (prob_pos) - prob_name = lowertext(copytext(value, 1, prob_pos)) - prob_value = copytext(value, prob_pos + 1) - if (prob_name in config.modes) - config.probabilities[prob_name] = text2num(prob_value) - else - log_misc("Unknown game mode probability configuration definition: [prob_name].") - else - log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].") - - if ("required_players", "required_players_secret") - var/req_pos = findtext(value, " ") - var/req_name = null - var/req_value = null - var/is_secret_override = findtext(name, "required_players_secret") // Being extra sure we're not picking up an override for Secret by accident. - - if(req_pos) - req_name = lowertext(copytext(value, 1, req_pos)) - req_value = copytext(value, req_pos + 1) - if(req_name in config.modes) - if(is_secret_override) - config.player_requirements_secret[req_name] = text2num(req_value) - else - config.player_requirements[req_name] = text2num(req_value) - else - log_misc("Unknown game mode player requirement configuration definition: [req_name].") - else - log_misc("Incorrect player requirement configuration definition: [req_name] [req_value].") - - if("allow_random_events") - config.allow_random_events = 1 - - if("enable_game_master") - config.enable_game_master = 1 - - if("kick_inactive") - config.kick_inactive = text2num(value) - - if("show_mods") - config.show_mods = 1 - - if("show_devs") - config.show_devs = 1 - - if("show_mentors") - config.show_mentors = 1 - - if("show_event_managers") - config.show_event_managers = 1 - - if("mods_can_tempban") - config.mods_can_tempban = 1 - - if("mods_can_job_tempban") - config.mods_can_job_tempban = 1 - - if("mod_tempban_max") - config.mod_tempban_max = text2num(value) - - if("mod_job_tempban_max") - config.mod_job_tempban_max = text2num(value) - - if("load_jobs_from_txt") - load_jobs_from_txt = 1 - - if("alert_red_upto") - config.alert_desc_red_upto = value - - if("alert_red_downto") - config.alert_desc_red_downto = value - - if("alert_blue_downto") - config.alert_desc_blue_downto = value - - if("alert_blue_upto") - config.alert_desc_blue_upto = value - - if("alert_green") - config.alert_desc_green = value - - if("alert_delta") - config.alert_desc_delta = value - - if("forbid_singulo_possession") - forbid_singulo_possession = 1 - - if("popup_admin_pm") - config.popup_admin_pm = 1 - - if("allow_holidays") - Holiday = 1 - - if("use_irc_bot") - use_irc_bot = 1 - - if("use_node_bot") - use_node_bot = 1 - - if("irc_bot_port") - config.irc_bot_port = value - - if("irc_bot_export") - irc_bot_export = 1 - - if("ticklag") - var/ticklag = text2num(value) - if(ticklag > 0) - fps = 10 / ticklag - - if("tick_limit_mc_init") - tick_limit_mc_init = text2num(value) - - if("allow_antag_hud") - config.antag_hud_allowed = 1 - if("antag_hud_restricted") - config.antag_hud_restricted = 1 - - if("socket_talk") - socket_talk = text2num(value) - - if("tickcomp") - Tickcomp = 1 - - if("humans_need_surnames") - humans_need_surnames = 1 - - if("tor_ban") - ToRban = 1 - - if("automute_on") - automute_on = 1 - - if("usealienwhitelist") - usealienwhitelist = 1 - - if("alien_player_ratio") - limitalienplayers = 1 - alien_to_human_ratio = text2num(value) - - if("assistant_maint") - config.assistant_maint = 1 - - if("gateway_delay") - config.gateway_delay = text2num(value) - - if("continuous_rounds") - config.continous_rounds = 1 - - if("ghost_interaction") - config.ghost_interaction = 1 - - if("disable_player_mice") - config.disable_player_mice = 1 - - if("uneducated_mice") - config.uneducated_mice = 1 - - if("comms_password") - config.comms_password = value - - if("irc_bot_host") - config.irc_bot_host = value - - if("main_irc") - config.main_irc = value - - if("admin_irc") - config.admin_irc = value - - if("python_path") - if(value) - config.python_path = value - - if("use_lib_nudge") - config.use_lib_nudge = 1 - - if("allow_cult_ghostwriter") - config.cult_ghostwriter = 1 - - if("req_cult_ghostwriter") - config.cult_ghostwriter_req_cultists = text2num(value) - - if("character_slots") - config.character_slots = text2num(value) - - if("loadout_slots") - config.loadout_slots = text2num(value) - - if("allow_drone_spawn") - config.allow_drone_spawn = text2num(value) - - if("drone_build_time") - config.drone_build_time = text2num(value) - - if("max_maint_drones") - config.max_maint_drones = text2num(value) - - if("use_overmap") - config.use_overmap = 1 - - if("engine_map") - config.engine_map = splittext(value, ",") -/* - if("station_levels") - using_map.station_levels = text2numlist(value, ";") - - if("admin_levels") - using_map.admin_levels = text2numlist(value, ";") - - if("contact_levels") - using_map.contact_levels = text2numlist(value, ";") - - if("player_levels") - using_map.player_levels = text2numlist(value, ";") -*/ - if("expected_round_length") - config.expected_round_length = MinutesToTicks(text2num(value)) - - if("disable_welder_vision") - config.welder_vision = 0 - - if("allow_extra_antags") - config.allow_extra_antags = 1 - - if("event_custom_start_mundane") - var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) - - if("event_custom_start_moderate") - var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) - - if("event_custom_start_major") - var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) - - if("event_delay_lower") - var/values = text2numlist(value, ";") - config.event_delay_lower[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1]) - config.event_delay_lower[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2]) - config.event_delay_lower[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3]) - - if("event_delay_upper") - var/values = text2numlist(value, ";") - config.event_delay_upper[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1]) - config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2]) - config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3]) - - if("starlight") - value = text2num(value) - config.starlight = value >= 0 ? value : 0 - - if("ert_species") - config.ert_species = splittext(value, ";") - if(!config.ert_species.len) - config.ert_species += SPECIES_HUMAN - - if("law_zero") - law_zero = value - - if("aggressive_changelog") - config.aggressive_changelog = 1 - - if("default_language_prefixes") - var/list/values = splittext(value, " ") - if(values.len > 0) - language_prefixes = values - - if("radiation_lower_limit") - radiation_lower_limit = text2num(value) - - if("radiation_resistance_calc_divide") - radiation_resistance_calc_mode = RAD_RESIST_CALC_DIV - - if("radiation_resistance_calc_subtract") - radiation_resistance_calc_mode = RAD_RESIST_CALC_SUB - - if("radiation_resistance_multiplier") - radiation_resistance_multiplier = text2num(value) - - if("radiation_material_resistance_divisor") - radiation_material_resistance_divisor = text2num(value) - - if("radiation_decay_rate") - radiation_decay_rate = text2num(value) - - if ("panic_bunker") - config.panic_bunker = 1 - - if ("paranoia_logging") - config.paranoia_logging = 1 - - if("ip_reputation") - config.ip_reputation = 1 - - if("ipr_email") - config.ipr_email = value - - if("ipr_block_bad_ips") - config.ipr_block_bad_ips = 1 - - if("ipr_bad_score") - config.ipr_bad_score = text2num(value) - - if("ipr_allow_existing") - config.ipr_allow_existing = 1 - - if("ipr_minimum_age") - config.ipr_minimum_age = text2num(value) - - if("autostart_solars") - config.autostart_solars = TRUE - - if("sqlite_enabled") - config.sqlite_enabled = TRUE - - if("sqlite_feedback") - config.sqlite_feedback = TRUE - - if("sqlite_feedback_topics") - config.sqlite_feedback_topics = splittext(value, ";") - if(!config.sqlite_feedback_topics.len) - config.sqlite_feedback_topics += "General" - - if("sqlite_feedback_privacy") - config.sqlite_feedback_privacy = TRUE - - if("sqlite_feedback_cooldown") - config.sqlite_feedback_cooldown = text2num(value) - - if("defib_timer") - config.defib_timer = text2num(value) - - if("defib_braindamage_timer") - config.defib_braindamage_timer = text2num(value) - - if("disable_cid_warn_popup") - config.disable_cid_warn_popup = TRUE - - if("enable_night_shifts") - config.enable_night_shifts = TRUE - - if("jukebox_track_files") - config.jukebox_track_files = splittext(value, ";") - - if("suggested_byond_version") - config.suggested_byond_version = text2num(value) - - if("suggested_byond_build") - config.suggested_byond_build = text2num(value) - - // VOREStation Edit Start - Can't be in _vr file because it is loaded too late. - if("vgs_access_identifier") - config.vgs_access_identifier = value - if("vgs_server_port") - config.vgs_server_port = text2num(value) - // VOREStation Edit End - - if("invoke_youtubedl") - config.invoke_youtubedl = value - - if("asset_transport") - config.asset_transport = value - - if("cache_assets") - config.cache_assets = TRUE - - if("save_spritesheets") - config.save_spritesheets = TRUE - - if("asset_simple_preload") - config.asset_simple_preload = TRUE - - if("asset_cdn_webroot") - config.asset_cdn_webroot = value - - if("asset_cdn_url") - config.asset_cdn_url = value - - if("allow_robot_recolor") - config.allow_robot_recolor = TRUE - - if("allow_simple_mob_recolor") - config.allow_simple_mob_recolor = TRUE - - else - log_misc("Unknown setting in configuration: '[name]'") - - else if(type == "game_options") - if(!value) - log_misc("Unknown value for setting [name] in [filename].") - value = text2num(value) - - switch(name) - if("health_threshold_crit") - config.health_threshold_crit = value - if("health_threshold_softcrit") - config.health_threshold_softcrit = value - if("health_threshold_dead") - config.health_threshold_dead = value - if("show_human_death_message") - config.show_human_death_message = 1 - if("revival_pod_plants") - config.revival_pod_plants = value - if("revival_cloning") - config.revival_cloning = value - if("revival_brain_life") - config.revival_brain_life = value - if("organ_health_multiplier") - config.organ_health_multiplier = value / 100 - if("organ_regeneration_multiplier") - config.organ_regeneration_multiplier = value / 100 - if("organ_damage_spillover_multiplier") - config.organ_damage_spillover_multiplier = value / 100 - if("organs_can_decay") - config.organs_decay = 1 - if("default_brain_health") - config.default_brain_health = text2num(value) - if(!config.default_brain_health || config.default_brain_health < 1) - config.default_brain_health = initial(config.default_brain_health) - if("bones_can_break") - config.bones_can_break = value - if("limbs_can_break") - config.limbs_can_break = value - if("allow_headgibs") - config.allow_headgibs = TRUE - - if("run_speed") - config.run_speed = value - if("walk_speed") - config.walk_speed = value - - if("human_delay") - config.human_delay = value - if("robot_delay") - config.robot_delay = value - if("monkey_delay") - config.monkey_delay = value - if("alien_delay") - config.alien_delay = value - if("slime_delay") - config.slime_delay = value - if("animal_delay") - config.animal_delay = value - - if("footstep_volume") - config.footstep_volume = text2num(value) - - if("use_loyalty_implants") - config.use_loyalty_implants = 1 - - if("loadout_whitelist") - config.loadout_whitelist = text2num(value) - - else - log_misc("Unknown setting in configuration: '[name]'") - -/datum/configuration/proc/loadsql(filename) // -- TLE - var/list/Lines = file2list(filename) - for(var/t in Lines) - if(!t) continue - - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - - var/pos = findtext(t, " ") - var/name = null - var/value = null - - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - - if (!name) - continue - - switch (name) - if ("address") - sqladdress = value - if ("port") - sqlport = value - if ("database") - sqldb = value - if ("login") - sqllogin = value - if ("password") - sqlpass = value - if ("feedback_database") - sqlfdbkdb = value - if ("feedback_login") - sqlfdbklogin = value - if ("feedback_password") - sqlfdbkpass = value - if ("enable_stat_tracking") - sqllogging = 1 - else - log_misc("Unknown setting in configuration: '[name]'") - -/datum/configuration/proc/loadforumsql(filename) // -- TLE - var/list/Lines = file2list(filename) - for(var/t in Lines) - if(!t) continue - - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - - var/pos = findtext(t, " ") - var/name = null - var/value = null - - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - - if (!name) - continue - - switch (name) - if ("address") - forumsqladdress = value - if ("port") - forumsqlport = value - if ("database") - forumsqldb = value - if ("login") - forumsqllogin = value - if ("password") - forumsqlpass = value - if ("activatedgroup") - forum_activated_group = value - if ("authenticatedgroup") - forum_authenticated_group = value - else - log_misc("Unknown setting in configuration: '[name]'") - -/datum/configuration/proc/pick_mode(mode_name) - // I wish I didn't have to instance the game modes in order to look up - // their information, but it is the only way (at least that I know of). - for (var/game_mode in gamemode_cache) - var/datum/game_mode/M = gamemode_cache[game_mode] - if (M.config_tag && M.config_tag == mode_name) - return M - return gamemode_cache["extended"] - -/datum/configuration/proc/get_runnable_modes() - var/list/runnable_modes = list() - for(var/game_mode in gamemode_cache) - var/datum/game_mode/M = gamemode_cache[game_mode] - if(M && M.can_start() && !isnull(config.probabilities[M.config_tag]) && config.probabilities[M.config_tag] > 0) - runnable_modes |= M - return runnable_modes - -/datum/configuration/proc/post_load() - //apply a default value to config.python_path, if needed - if (!config.python_path) - if(world.system_type == UNIX) - config.python_path = "/usr/bin/env python2" - else //probably windows, if not this should work anyway - config.python_path = "python" diff --git a/code/controllers/configuration_vr.dm b/code/controllers/configuration_vr.dm deleted file mode 100644 index a1740212f0f..00000000000 --- a/code/controllers/configuration_vr.dm +++ /dev/null @@ -1,64 +0,0 @@ -// -// Lets read our settings from the configuration file on startup too! -// - -/datum/configuration - var/static/time_off = FALSE - var/static/pto_job_change = FALSE - var/static/limit_interns = -1 //Unlimited by default - var/static/limit_visitors = -1 //Unlimited by default - var/static/pto_cap = 100 //Hours - var/static/require_flavor = FALSE - var/static/ipqualityscore_apikey //API key for ipqualityscore.com - var/static/use_playtime_restriction_for_jobs = FALSE - -/hook/startup/proc/read_vs_config() - var/list/Lines = file2list("config/config.txt") - for(var/t in Lines) - if(!t) continue - - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - - var/pos = findtext(t, " ") - var/name = null - var/value = null - - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - - if (!name) - continue - - switch (name) - if ("chat_webhook_url") - config.chat_webhook_url = value - if ("chat_webhook_key") - config.chat_webhook_key = value - if ("fax_export_dir") - config.fax_export_dir = value - if ("items_survive_digestion") - config.items_survive_digestion = 1 - if ("limit_interns") - config.limit_interns = text2num(value) - if ("limit_visitors") - config.limit_visitors = text2num(value) - if ("pto_cap") - config.pto_cap = text2num(value) - if ("time_off") - config.time_off = TRUE - if ("pto_job_change") - config.pto_job_change = TRUE - if ("require_flavor") - config.require_flavor = TRUE - if ("ipqualityscore_apikey") - config.ipqualityscore_apikey = value - if ("use_playtime_restriction_for_jobs") - config.use_playtime_restriction_for_jobs = TRUE - return 1 diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm index dfe8bc7234d..e92e30079b8 100644 --- a/code/controllers/failsafe.dm +++ b/code/controllers/failsafe.dm @@ -1,10 +1,11 @@ - /** - * Failsafe - * - * Pretty much pokes the MC to make sure it's still alive. +/** + * Failsafe + * + * Pretty much pokes the MC to make sure it's still alive. **/ -var/datum/controller/failsafe/Failsafe +// See initialization order in /code/game/world.dm +GLOBAL_REAL(Failsafe, /datum/controller/failsafe) /datum/controller/failsafe // This thing pretty much just keeps poking the master controller name = "Failsafe" @@ -15,7 +16,7 @@ var/datum/controller/failsafe/Failsafe // The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC. var/defcon = 5 //the world.time of the last check, so the mc can restart US if we hang. - // (Real friends look out for *eachother*) + // (Real friends look out for *each other*) var/lasttick = 0 // Track the MC iteration to make sure its still on track. @@ -31,8 +32,24 @@ var/datum/controller/failsafe/Failsafe Initialize() /datum/controller/failsafe/Initialize() - set waitfor = 0 + set waitfor = FALSE Failsafe.Loop() + if (!Master || defcon == 0) //Master is gone/not responding and Failsafe just exited its loop + defcon = 3 //Reset defcon level as its used inside the emergency loop + while (defcon > 0) + var/recovery_result = emergency_loop() + if (recovery_result == 1) //Exit emergency loop and delete self if it was able to recover MC + break + else if (defcon == 1) //Exit Failsafe if we weren't able to recover the MC in the last stage + log_game("FailSafe: Failed to recover MC while in emergency state. Failsafe exiting.") + message_admins(span_boldannounce("Failsafe failed critically while trying to recreate broken MC. Please manually fix the MC or reboot the server. Failsafe exiting now.")) + message_admins(span_boldannounce("You can try manually calling these two procs:.")) + message_admins(span_boldannounce("/proc/recover_all_SS_and_recreate_master: Most stuff should still function but expect instability/runtimes/broken stuff.")) + message_admins(span_boldannounce("/proc/delete_all_SS_and_recreate_master: Most stuff will be broken but basic stuff like movement and chat should still work.")) + else if (recovery_result == -1) //Failed to recreate MC + defcon-- + sleep(initial(processing_interval)) //Wait a bit until the next try + if(!QDELETED(src)) qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us @@ -45,43 +62,56 @@ var/datum/controller/failsafe/Failsafe while(running) lasttick = world.time if(!Master) - // Replace the missing Master! This should never, ever happen. - new /datum/controller/master() + // Break out of the main loop so we go into emergency state + break // Only poke it if overrides are not in effect. if(processing_interval > 0) if(Master.processing && Master.iteration) + if (defcon > 1 && (!Master.stack_end_detector || !Master.stack_end_detector.check())) + + to_chat(GLOB.admins, span_boldannounce("ERROR: The Master Controller code stack has exited unexpectedly, Restarting...")) + defcon = 0 + var/rtn = Recreate_MC() + if(rtn > 0) + master_iteration = 0 + to_chat(GLOB.admins, span_adminnotice("MC restarted successfully")) + else if(rtn < 0) + log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0") + to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.")) // Check if processing is done yet. if(Master.iteration == master_iteration) - log_debug("DEFCON [defcon]: Master.iteration=[Master.iteration] Master.last_run=[Master.last_run] world.time=[world.time]") switch(defcon) if(4,5) --defcon - if(3) - log_and_message_admins(span_adminnotice("SSfailsafe Notice: DEFCON [defcon_pretty()]. The Master Controller (\ref[Master]) has not fired in the last [(5-defcon) * processing_interval] ticks.")) - --defcon - if(2) - log_and_message_admins(span_boldannounce("SSfailsafe Warning: DEFCON [defcon_pretty()]. The Master Controller (\ref[Master]) has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.")) - --defcon - if(1) - log_and_message_admins(span_boldannounce("SSfailsafe Warning: DEFCON [defcon_pretty()]. The Master Controller (\ref[Master]) has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...")) + if(3) + message_admins(span_adminnotice("Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.")) + --defcon + + if(2) + to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.")) + --defcon + + if(1) + to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...")) --defcon var/rtn = Recreate_MC() if(rtn > 0) defcon = 4 master_iteration = 0 - log_and_message_admins(span_adminnotice("SSfailsafe Notice: MC (New:\ref[Master]) restarted successfully")) + to_chat(GLOB.admins, span_adminnotice("MC restarted successfully")) else if(rtn < 0) - log_game("SSfailsafe Notice: Could not restart MC (\ref[Master]), runtime encountered. Entering defcon 0") - log_and_message_admins(span_boldannounce("SSFAILSAFE ERROR: DEFCON [defcon_pretty()]. Could not restart MC (\ref[Master]), runtime encountered. I will silently keep retrying.")) + log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0") + to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.")) //if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again //no need to handle that specially when defcon 0 can handle it + if(0) //DEFCON 0! (mc failed to restart) var/rtn = Recreate_MC() if(rtn > 0) defcon = 4 master_iteration = 0 - log_and_message_admins(span_adminnotice("SSfailsafe Notice: MC (New:\ref[Master]) restarted successfully")) + to_chat(GLOB.admins, span_adminnotice("MC restarted successfully")) else defcon = min(defcon + 1,5) master_iteration = Master.iteration @@ -93,12 +123,60 @@ var/datum/controller/failsafe/Failsafe defcon = 5 sleep(initial(processing_interval)) +//Emergency loop used when Master got deleted or the main loop exited while Defcon == 0 +//Loop is driven externally so runtimes only cancel the current recovery attempt +/datum/controller/failsafe/proc/emergency_loop() + //The code in this proc should be kept as simple as possible, anything complicated like to_chat might rely on master existing and runtime + //The goal should always be to get a new Master up and running before anything else + . = -1 + switch (defcon) //The lower defcon goes the harder we try to fix the MC + if (2 to 3) //Try to normally recreate the MC two times + . = Recreate_MC() + if (1) //Delete the old MC first so we don't transfer any info, in case that caused any issues + del(Master) + . = Recreate_MC() + + if (. == 1) //We were able to create a new master + master_iteration = 0 + SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set + Master.Initialize(10, FALSE, FALSE) //Need to manually start the MC, normally world.new would do this + to_chat(GLOB.admins, span_adminnotice("Failsafe recovered MC while in emergency state [defcon_pretty()]")) + else + log_game("FailSafe: Failsafe in emergency state and was unable to recreate MC while in defcon state [defcon_pretty()].") + message_admins(span_boldannounce("Failsafe in emergency state and master down, trying to recreate MC while in defcon level [defcon_pretty()] failed.")) + +///Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars +/proc/recover_all_SS_and_recreate_master() + del(Master) + var/list/subsytem_types = subtypesof(/datum/controller/subsystem) + sortTim(subsytem_types, GLOBAL_PROC_REF(cmp_subsystem_init)) + for(var/I in subsytem_types) + new I + . = Recreate_MC() + if (. == 1) //We were able to create a new master + SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set + Master.Initialize(10, FALSE, FALSE) //Need to manually start the MC, normally world.new would do this + to_chat(GLOB.admins, span_adminnotice("MC successfully recreated after recovering all subsystems!")) + else + message_admins(span_boldannounce("Failed to create new MC!")) + +///Delete all existing SS to basically start over +/proc/delete_all_SS_and_recreate_master() + del(Master) + for(var/global_var in global.vars) + if (istype(global.vars[global_var], /datum/controller/subsystem)) + del(global.vars[global_var]) + . = Recreate_MC() + if (. == 1) //We were able to create a new master + SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set + Master.Initialize(10, FALSE, FALSE) //Need to manually start the MC, normally world.new would do this + to_chat(GLOB.admins, span_adminnotice("MC successfully recreated after deleting and recreating all subsystems!")) + else + message_admins(span_boldannounce("Failed to create new MC!")) + /datum/controller/failsafe/proc/defcon_pretty() return defcon /datum/controller/failsafe/stat_entry(msg) - if(!statclick) - statclick = new/obj/effect/statclick/debug(null, "Initializing...", src) - - msg = "Failsafe Controller: [statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])")]" + msg = "Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])" return msg diff --git a/code/controllers/master.dm b/code/controllers/master.dm index b68b4e01c04..35145d5a624 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -1,26 +1,23 @@ - /** - * StonedMC - * - * Designed to properly split up a given tick among subsystems - * Note: if you read parts of this code and think "why is it doing it that way" - * Odds are, there is a reason - * +/** + * StonedMC + * + * Designed to properly split up a given tick among subsystems + * Note: if you read parts of this code and think "why is it doing it that way" + * Odds are, there is a reason + * **/ -//This is the ABSOLUTE ONLY THING that should init globally like this +// See initialization order in /code/game/world.dm GLOBAL_REAL(Master, /datum/controller/master) = new - -//THIS IS THE INIT ORDER -//Master -> SSPreInit -> GLOB -> world -> config -> SSInit -> Failsafe -//GOT IT MEMORIZED? - /datum/controller/master name = "Master" - // Are we processing (higher values increase the processing delay by n ticks) + /// Are we processing (higher values increase the processing delay by n ticks) var/processing = TRUE - // How many times have we ran + /// How many times have we ran var/iteration = 0 + /// Stack end detector to detect stack overflows that kill the mc's main loop + var/datum/stack_end_detector/stack_end_detector // world.time of last fire, for tracking lag outside of the mc var/last_run @@ -291,8 +288,12 @@ GLOBAL_REAL(Master, /datum/controller/master) = new var/error_level = 0 var/sleep_delta = 1 var/list/subsystems_to_check - //the actual loop. + //setup the stack overflow detector + stack_end_detector = new() + var/datum/stack_canary/canary = stack_end_detector.prime_canary() + canary.use_variable() + //the actual loop. while (1) tickdrift = max(0, MC_AVERAGE_FAST(tickdrift, (((REALTIMEOFDAY - init_timeofday) - (world.time - init_time)) / world.tick_lag))) var/starting_tick_usage = TICK_USAGE diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 857ce225f62..2955d9d7213 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -11,8 +11,6 @@ var/global/datum/controller/game_controller/master_controller //Set in world.New var/global/controller_iteration = 0 var/global/last_tick_duration = 0 -var/global/pipe_processing_killed = 0 - /datum/controller/game_controller var/list/shuttle_list // For debugging and VV diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm index 1e5f1506ec6..e008086d04b 100644 --- a/code/controllers/subsystems/air.dm +++ b/code/controllers/subsystems/air.dm @@ -1,3 +1,60 @@ +/* +Overview: + SSair does everything. There are tons of procs in here. + +Class Vars: + zones - All zones currently holding one or more turfs. + edges - All processing edges. + + tiles_to_update - Tiles scheduled to update next tick. + zones_to_update - Zones which have had their air changed and need air archival. + active_hotspots - All processing fire objects. + + active_zones - The number of zones which were archived last tick. Used in debug verbs. + next_id - The next UID to be applied to a zone. Mostly useful for debugging purposes as zones do not need UIDs to function. + +Class Procs: + + mark_for_update(turf/T) + Adds the turf to the update list. When updated, update_air_properties() will be called. + When stuff changes that might affect airflow, call this. It's basically the only thing you need. + + add_zone(zone/Z) and remove_zone(zone/Z) + Adds zones to the zones list. Does not mark them for update. + + air_blocked(turf/A, turf/B) + Returns a bitflag consisting of: + AIR_BLOCKED - The connection between turfs is physically blocked. No air can pass. + ZONE_BLOCKED - There is a door between the turfs, so zones cannot cross. Air may or may not be permeable. + + merge(zone/A, zone/B) + Called when zones have a direct connection and equivalent pressure and temperature. + Merges the zones to create a single zone. + + connect(turf/simulated/A, turf/B) + Called by turf/update_air_properties(). The first argument must be simulated. + Creates a connection between A and B. + + mark_zone_update(zone/Z) + Adds zone to the update list. Unlike mark_for_update(), this one is called automatically whenever + air is returned from a simulated turf. + + equivalent_pressure(zone/A, zone/B) + Currently identical to A.air.compare(B.air). Returns 1 when directly connected zones are ready to be merged. + + get_edge(zone/A, zone/B) + get_edge(zone/A, turf/B) + Gets a valid connection_edge between A and B, creating a new one if necessary. + + has_same_air(turf/A, turf/B) + Used to determine if an unsimulated edge represents a specific turf. + Simulated edges use connection_edge/contains_zone() for the same purpose. + Returns 1 if A has identical gases and temperature to B. + + remove_edge(connection_edge/edge) + Called when an edge is erased. Removes it from processing. +*/ + // Air update stages #define SSAIR_TURFS 1 #define SSAIR_EDGES 2 @@ -30,8 +87,19 @@ SUBSYSTEM_DEF(air) // This is used to tell CI WHERE the edges are. var/list/startup_active_edge_log = list() -/datum/controller/subsystem/air/PreInit() - air_master = src + //Geometry lists + var/list/zones = list() + var/list/edges = list() + //Geometry updates lists + var/list/tiles_to_update = list() + var/list/zones_to_update = list() + var/list/active_fire_zones = list() + var/list/active_hotspots = list() + var/list/active_edges = list() + + var/active_zones = 0 + var/current_cycle = 0 + var/next_id = 1 //Used to keep track of zone UIDs. /datum/controller/subsystem/air/Initialize(timeofday) report_progress("Processing Geometry...") @@ -109,7 +177,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun log_and_message_admins("SSair: Was told to start a new run, but the previous run wasn't finished! currentrun.len=[currentrun.len], current_step=[current_step]") resumed = TRUE else - current_cycle++ // Begin a new air_master cycle! + current_cycle++ // Begin a new SSair cycle! current_step = SSAIR_TURFS // Start with Step 1 of course INTERNAL_PROCESS_STEP(SSAIR_TURFS, TRUE, process_tiles_to_update, cost_turfs, SSAIR_EDGES) @@ -118,7 +186,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun INTERNAL_PROCESS_STEP(SSAIR_HOTSPOTS, FALSE, process_active_hotspots, cost_hotspots, SSAIR_ZONES) INTERNAL_PROCESS_STEP(SSAIR_ZONES, FALSE, process_zones_to_update, cost_zones, SSAIR_DONE) - // Okay, we're done! Woo! Got thru a whole air_master cycle! + // Okay, we're done! Woo! Got thru a whole SSair cycle! if(LAZYLEN(currentrun) || current_step != SSAIR_DONE) log_and_message_admins("SSair: Was not able to complete a full air cycle despite reaching the end of fire(). This shouldn't happen.") else @@ -305,9 +373,162 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun next_fire = world.time + wait can_fire = TRUE // Unpause -// -// The procs from the ZAS Air Controller are in ZAS/Controller.dm -// +/datum/controller/subsystem/air/proc/add_zone(zone/z) + zones.Add(z) + z.name = "Zone [next_id++]" + mark_zone_update(z) + +/datum/controller/subsystem/air/proc/remove_zone(zone/z) + zones.Remove(z) + zones_to_update.Remove(z) + +/datum/controller/subsystem/air/proc/air_blocked(turf/A, turf/B) + #ifdef ZASDBG + ASSERT(isturf(A)) + ASSERT(isturf(B)) + #endif + var/ablock = A.c_airblock(B) + if(ablock == BLOCKED) + return BLOCKED + return ablock | B.c_airblock(A) + +/datum/controller/subsystem/air/proc/merge(zone/A, zone/B) + #ifdef ZASDBG + ASSERT(istype(A)) + ASSERT(istype(B)) + ASSERT(!A.invalid) + ASSERT(!B.invalid) + ASSERT(A != B) + #endif + if(A.contents.len < B.contents.len) + A.c_merge(B) + mark_zone_update(B) + else + B.c_merge(A) + mark_zone_update(A) + +/datum/controller/subsystem/air/proc/connect(turf/simulated/A, turf/simulated/B) + #ifdef ZASDBG + ASSERT(istype(A)) + ASSERT(isturf(B)) + ASSERT(A.zone) + ASSERT(!A.zone.invalid) + //ASSERT(B.zone) + ASSERT(A != B) + #endif + + var/block = SSair.air_blocked(A,B) + if(block & AIR_BLOCKED) return + + var/direct = !(block & ZONE_BLOCKED) + var/space = !istype(B) + + if(!space) + if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0))) + merge(A.zone,B.zone) + return + + var/a_to_b = get_dir(A,B) + var/b_to_a = get_dir(B,A) + + if(!A.connections) + A.connections = new + if(!B.connections) + B.connections = new + + if(A.connections.get(a_to_b)) + return + if(B.connections.get(b_to_a)) + return + if(!space) + if(A.zone == B.zone) + return + + + var/connection/c = new /connection(A,B) + + A.connections.place(c, a_to_b) + B.connections.place(c, b_to_a) + + if(direct) c.mark_direct() + +/datum/controller/subsystem/air/proc/mark_for_update(turf/T) + #ifdef ZASDBG + ASSERT(isturf(T)) + #endif + if(T.needs_air_update) + return + tiles_to_update |= T + #ifdef ZASDBG + T.add_overlay(mark) + #endif + T.needs_air_update = 1 + +/datum/controller/subsystem/air/proc/mark_zone_update(zone/Z) + #ifdef ZASDBG + ASSERT(istype(Z)) + #endif + if(Z.needs_update) + return + zones_to_update.Add(Z) + Z.needs_update = 1 + +/datum/controller/subsystem/air/proc/mark_edge_sleeping(connection_edge/E) + #ifdef ZASDBG + ASSERT(istype(E)) + #endif + if(E.sleeping) + return + active_edges.Remove(E) + E.sleeping = 1 + +/datum/controller/subsystem/air/proc/mark_edge_active(connection_edge/E) + #ifdef ZASDBG + ASSERT(istype(E)) + #endif + if(!E.sleeping) + return + active_edges.Add(E) + E.sleeping = 0 + +/datum/controller/subsystem/air/proc/equivalent_pressure(zone/A, zone/B) + return A.air.compare(B.air) + +/datum/controller/subsystem/air/proc/get_edge(zone/A, zone/B) + if(istype(B)) + for(var/connection_edge/zone/edge in A.edges) + if(edge.contains_zone(B)) + return edge + var/connection_edge/edge = new /connection_edge/zone(A,B) + edges.Add(edge) + edge.recheck() + return edge + else + for(var/connection_edge/unsimulated/edge in A.edges) + if(has_same_air(edge.B,B)) + return edge + var/connection_edge/edge = new /connection_edge/unsimulated(A,B) + edges.Add(edge) + edge.recheck() + return edge + +/datum/controller/subsystem/air/proc/has_same_air(turf/A, turf/B) + if(A.oxygen != B.oxygen) + return FALSE + if(A.nitrogen != B.nitrogen) + return FALSE + if(A.phoron != B.phoron) + return FALSE + if(A.carbon_dioxide != B.carbon_dioxide) + return FALSE + if(A.temperature != B.temperature) + return FALSE + return TRUE + +/datum/controller/subsystem/air/proc/remove_edge(connection_edge/E) + edges.Remove(E) + if(!E.sleeping) + active_edges.Remove(E) #undef SSAIR_TURFS #undef SSAIR_EDGES diff --git a/code/controllers/subsystems/speech_controller.dm b/code/controllers/subsystems/speech_controller.dm new file mode 100644 index 00000000000..e293c89a9bb --- /dev/null +++ b/code/controllers/subsystems/speech_controller.dm @@ -0,0 +1,5 @@ +/// verb_manager subsystem just for handling say's +VERB_MANAGER_SUBSYSTEM_DEF(speech_controller) + name = "Speech Controller" + wait = 1 + priority = FIRE_PRIORITY_SPEECH_CONTROLLER//has to be high priority, second in priority ONLY to SSinput diff --git a/code/controllers/subsystems/verb_manager.dm b/code/controllers/subsystems/verb_manager.dm new file mode 100644 index 00000000000..1e3cce0a9af --- /dev/null +++ b/code/controllers/subsystems/verb_manager.dm @@ -0,0 +1,167 @@ +/** + * SSverb_manager, a subsystem that runs every tick and runs through its entire queue without yielding like SSinput. + * this exists because of how the byond tick works and where user inputted verbs are put within it. + * + * see TICK_ORDER.md for more info on how the byond tick is structured. + * + * The way the MC allots its time is via TICK_LIMIT_RUNNING, it simply subtracts the cost of SendMaps (MAPTICK_LAST_INTERNAL_TICK_USAGE) + * plus TICK_BYOND_RESERVE from the tick and uses up to that amount of time (minus the percentage of the tick used by the time it executes subsystems) + * on subsystems running cool things like atmospherics or Life or SSInput or whatever. + * + * Without this subsystem, verbs are likely to cause overtime if the MC uses all of the time it has allotted for itself in the tick, and SendMaps + * uses as much as its expected to, and an expensive verb ends up executing that tick. This is because the MC is completely blind to the cost of + * verbs, it can't account for it at all. The only chance for verbs to not cause overtime in a tick where the MC used as much of the tick + * as it allotted itself and where SendMaps costed as much as it was expected to is if the verb(s) take less than TICK_BYOND_RESERVE percent of + * the tick, which isn't much. Not to mention if SendMaps takes more than 30% of the tick and the MC forces itself to take at least 70% of the + * normal tick duration which causes ticks to naturally overrun even in the absence of verbs. + * + * With this subsystem, the MC can account for the cost of verbs and thus stop major overruns of ticks. This means that the most important subsystems + * like SSinput can start at the same time they were supposed to, leading to a smoother experience for the player since ticks aren't riddled with + * minor hangs over and over again. + */ +SUBSYSTEM_DEF(verb_manager) + name = "Verb Manager" + wait = 1 + flags = SS_TICKER | SS_NO_INIT + priority = FIRE_PRIORITY_DELAYED_VERBS + runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + + ///list of callbacks to procs called from verbs or verblike procs that were executed when the server was overloaded and had to delay to the next tick. + ///this list is ran through every tick, and the subsystem does not yield until this queue is finished. + var/list/datum/callback/verb_callback/verb_queue = list() + + ///running average of how many verb callbacks are executed every second. used for the stat entry + var/verbs_executed_per_second = 0 + + ///if TRUE we treat usr's with holders just like usr's without holders. otherwise they always execute immediately + var/can_queue_admin_verbs = FALSE + + ///if this is true all verbs immediately execute and don't queue. in case the mc is fucked or something + var/FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs = FALSE + + ///used for subtypes to determine if they use their own stats for the stat entry + var/use_default_stats = TRUE + + ///if TRUE this will... message admins every time a verb is queued to this subsystem for the next tick with stats. + ///for obvious reasons don't make this be TRUE on the code level this is for admins to turn on + var/message_admins_on_queue = FALSE + + ///always queue if possible. overrides can_queue_admin_verbs but not FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs + var/always_queue = FALSE + +/** + * queue a callback for the given verb/verblike proc and any given arguments to the specified verb subsystem, so that they process in the next tick. + * intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB() and co. + * + * returns TRUE if the queuing was successful, FALSE otherwise. + */ +/proc/_queue_verb(datum/callback/verb_callback/incoming_callback, tick_check, datum/controller/subsystem/verb_manager/subsystem_to_use = SSverb_manager, ...) + if(QDELETED(incoming_callback)) + var/destroyed_string + if(!incoming_callback) + destroyed_string = "callback is null." + else + destroyed_string = "callback was deleted [DS2TICKS(world.time - incoming_callback.gc_destroyed)] ticks ago. callback was created [DS2TICKS(world.time) - incoming_callback.creation_time] ticks ago." + + stack_trace("_queue_verb() returned false because it was given a deleted callback! [destroyed_string]") + return FALSE + + if(!istext(incoming_callback.object) && QDELETED(incoming_callback.object)) //just in case the object is GLOBAL_PROC + var/destroyed_string + if(!incoming_callback.object) + destroyed_string = "callback.object is null." + else + destroyed_string = "callback.object was deleted [DS2TICKS(world.time - incoming_callback.object.gc_destroyed)] ticks ago. callback was created [DS2TICKS(world.time) - incoming_callback.creation_time] ticks ago." + + stack_trace("_queue_verb() returned false because it was given a callback acting on a qdeleted object! [destroyed_string]") + return FALSE + + //we want unit tests to be able to directly call verbs that attempt to queue, and since unit tests should test internal behavior, we want the queue + //to happen as if it was actually from player input if its called on a mob. +#ifdef UNIT_TESTS + if(QDELETED(usr) && ismob(incoming_callback.object)) + incoming_callback.user = WEAKREF(incoming_callback.object) + var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, GLOBAL_PROC_REF(_queue_verb)) + args.Copy())) + return world.push_usr(incoming_callback.object, new_us) + +#else + + if(QDELETED(usr) || isnull(usr.client)) + stack_trace("_queue_verb() returned false because it wasn't called from player input!") + return FALSE + +#endif + + if(!istype(subsystem_to_use)) + stack_trace("_queue_verb() returned false because it was given an invalid subsystem to queue for!") + return FALSE + + if((TICK_USAGE < tick_check) && !subsystem_to_use.always_queue) + return FALSE + + var/list/args_to_check = args.Copy() + args_to_check.Cut(2, 4)//cut out tick_check and subsystem_to_use + + //any subsystem can use the additional arguments to refuse queuing + if(!subsystem_to_use.can_queue_verb(arglist(args_to_check))) + return FALSE + + return subsystem_to_use.queue_verb(incoming_callback) + +/** + * subsystem-specific check for whether a callback can be queued. + * intended so that subsystem subtypes can verify whether + * + * subtypes may include additional arguments here if they need them! you just need to include them properly + * in TRY_QUEUE_VERB() and co. + */ +/datum/controller/subsystem/verb_manager/proc/can_queue_verb(datum/callback/verb_callback/incoming_callback) + if(always_queue && !FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs) + return TRUE + + if((usr.client?.holder && !can_queue_admin_verbs) \ + || (!subsystem_initialized && !(flags & SS_NO_INIT)) \ + || FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs \ + || !(runlevels & Master.current_runlevel)) + return FALSE + + return TRUE + +/** + * queue a callback for the given proc, so that it is invoked in the next tick. + * intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB() + * + * returns TRUE if the queuing was successful, FALSE otherwise. + */ +/datum/controller/subsystem/verb_manager/proc/queue_verb(datum/callback/verb_callback/incoming_callback) + . = FALSE //errored + if(message_admins_on_queue) + message_admins("[name] verb queuing: tick usage: [TICK_USAGE]%, proc: [incoming_callback.delegate], object: [incoming_callback.object], usr: [usr]") + verb_queue += incoming_callback + return TRUE + +/datum/controller/subsystem/verb_manager/fire(resumed) + run_verb_queue() + +/// runs through all of this subsystems queue of verb callbacks. +/// goes through the entire verb queue without yielding. +/// used so you can flush the queue outside of fire() without interfering with anything else subtype subsystems might do in fire(). +/datum/controller/subsystem/verb_manager/proc/run_verb_queue() + var/executed_verbs = 0 + + for(var/datum/callback/verb_callback/verb_callback as anything in verb_queue) + if(!istype(verb_callback)) + stack_trace("non /datum/callback/verb_callback inside [name]'s verb_queue!") + continue + + verb_callback.InvokeAsync() + executed_verbs++ + + verb_queue.Cut() + verbs_executed_per_second = MC_AVG_SECONDS(verbs_executed_per_second, executed_verbs, wait SECONDS) + //note that wait SECONDS is incorrect if this is called outside of fire() but because byond is garbage i need to add a timer to rustg to find a valid solution + +/datum/controller/subsystem/verb_manager/stat_entry(msg) + . = ..() + if(use_default_stats) + . += "V/S: [round(verbs_executed_per_second, 0.01)]" diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 702dbfddaeb..165748c64b1 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -89,7 +89,6 @@ //Goon PS stuff, and other yet-to-be-subsystem things. options["LEGACY: master_controller"] = master_controller - options["LEGACY: air_master"] = air_master options["LEGACY: job_master"] = job_master options["LEGACY: radio_controller"] = radio_controller options["LEGACY: emergency_shuttle"] = emergency_shuttle diff --git a/code/datums/autolathe/arms.dm b/code/datums/autolathe/arms.dm index 9bceaf27e6d..41caf5a74d9 100644 --- a/code/datums/autolathe/arms.dm +++ b/code/datums/autolathe/arms.dm @@ -443,7 +443,7 @@ /datum/category_item/autolathe/arms/knuckledusters name = "knuckle dusters" - path =/obj/item/clothing/gloves/knuckledusters + path =/obj/item/clothing/accessory/knuckledusters hidden = 1 /datum/category_item/autolathe/arms/tacknife diff --git a/code/datums/colormate.dm b/code/datums/colormate.dm index 49c7a88542f..3bb625b7b16 100644 --- a/code/datums/colormate.dm +++ b/code/datums/colormate.dm @@ -43,7 +43,7 @@ /datum/ColorMate/tgui_state(mob/user) return GLOB.tgui_conscious_state -/datum/ColorMate/tgui_data() +/datum/ColorMate/tgui_data(mob/user) . = list() .["activemode"] = active_mode .["matrixcolors"] = list( @@ -69,7 +69,7 @@ .["item"] = list() .["item"]["name"] = inserted.name .["item"]["sprite"] = icon2base64(get_flat_icon(inserted,dir=SOUTH,no_anim=TRUE)) - .["item"]["preview"] = icon2base64(build_preview()) + .["item"]["preview"] = icon2base64(build_preview(user)) else .["item"] = null @@ -159,7 +159,7 @@ return TRUE /// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin. -/datum/ColorMate/proc/build_preview() +/datum/ColorMate/proc/build_preview(mob/user) if(inserted) //sanity var/list/cm switch(active_mode) @@ -178,17 +178,17 @@ text2num(color_matrix_last[11]), text2num(color_matrix_last[12]), ) - if(!check_valid_color(cm, usr)) + if(!check_valid_color(cm, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) if(COLORMATE_TINT) - if(!check_valid_color(activecolor, usr)) + if(!check_valid_color(activecolor, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) if(COLORMATE_HSV) cm = color_matrix_hsv(build_hue, build_sat, build_val) color_matrix_last = cm - if(!check_valid_color(cm, usr)) + if(!check_valid_color(cm, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) var/cur_color = inserted.color diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index edda32de873..3f482ea72e2 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -452,26 +452,25 @@ data["crafting_recipes"] = crafting_recipes return data -/datum/component/personal_crafting/tgui_act(action, params) +/datum/component/personal_crafting/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return switch(action) if("make") - var/mob/user = usr var/datum/crafting_recipe/TR = locate(params["recipe"]) in GLOB.crafting_recipes busy = TRUE - tgui_interact(user) - var/atom/movable/result = construct_item(user, TR) + tgui_interact(ui.user) + var/atom/movable/result = construct_item(ui.user, TR) if(!istext(result)) //We made an item and didn't get a fail message - if(ismob(user) && isitem(result)) //In case the user is actually possessing a non mob like a machine - user.put_in_hands(result) + if(ismob(ui.user) && isitem(result)) //In case the user is actually possessing a non mob like a machine + ui.user.put_in_hands(result) else - result.forceMove(user.drop_location()) - to_chat(user, span_notice("[TR.name] constructed.")) - TR.on_craft_completion(user, result) + result.forceMove(ui.user.drop_location()) + to_chat(ui.user, span_notice("[TR.name] constructed.")) + TR.on_craft_completion(ui.user, result) else - to_chat(user, span_warning("Construction failed[result]")) + to_chat(ui.user, span_warning("Construction failed[result]")) busy = FALSE if("toggle_recipes") display_craftable_only = !display_craftable_only diff --git a/code/datums/components/gargoyle.dm b/code/datums/components/gargoyle.dm new file mode 100644 index 00000000000..618c2e97e03 --- /dev/null +++ b/code/datums/components/gargoyle.dm @@ -0,0 +1,101 @@ +/datum/component/gargoyle + var/energy = 100 + var/transformed = FALSE + var/paused = FALSE + var/paused_loc + var/cooldown + + var/mob/living/carbon/human/gargoyle //easy reference + var/obj/structure/gargoyle/statue //another easy ref + + //Adjustable mod + var/identifier = "statue" + var/adjective = "hardens" + var/material = "stone" + var/tint = "#FFFFFF" + +/datum/component/gargoyle/Initialize() + if (!ishuman(parent)) + return COMPONENT_INCOMPATIBLE + gargoyle = parent + add_verb(gargoyle,/mob/living/carbon/human/proc/gargoyle_transformation) + add_verb(gargoyle,/mob/living/carbon/human/proc/gargoyle_pause) + add_verb(gargoyle,/mob/living/carbon/human/proc/gargoyle_checkenergy) + + START_PROCESSING(SSprocessing, src) + +/datum/component/gargoyle/process() + if (QDELETED(gargoyle)) + return + if (paused && gargoyle.loc != paused_loc) + unpause() + if (energy > 0) + if (!transformed && !paused) + energy = max(0,energy-0.05) + else if (!transformed && isturf(gargoyle.loc)) + gargoyle.gargoyle_transformation() + if (transformed) + if (!statue) + transformed = FALSE + statue.damage(-0.5) + energy = min(energy+0.3, 100) + +/datum/component/gargoyle/proc/unpause() + if (!paused || transformed) + paused = FALSE + paused_loc = null + UnregisterSignal(gargoyle, COMSIG_ATOM_ENTERING) + return + if (gargoyle?.loc != paused_loc) + paused = FALSE + paused_loc = null + energy = max(energy - 5, 0) + if (energy == 0) + gargoyle.gargoyle_transformation() + UnregisterSignal(gargoyle, COMSIG_ATOM_ENTERING) + +//verbs or action buttons...? +/mob/living/carbon/human/proc/gargoyle_transformation() + set name = "Gargoyle - Petrification" + set category = "Abilities.Gargoyle" + set desc = "Turn yourself into (or back from) being a gargoyle." + + if (stat == DEAD) + return + + var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle) + if (comp) + if (comp.energy <= 0 && isturf(loc)) + to_chat(src, span_danger("You suddenly turn into a [comp.identifier] as you run out of energy!")) + else if (comp.cooldown > world.time) + var/time_to_wait = (comp.cooldown - world.time) / (1 SECONDS) + to_chat(src, span_warning("You can't transform just yet again! Wait for another [round(time_to_wait,0.1)] seconds!")) + return + if (istype(loc, /obj/structure/gargoyle)) + qdel(loc) + else if (isturf(loc)) + new /obj/structure/gargoyle(loc, src) + +/mob/living/carbon/human/proc/gargoyle_pause() + set name = "Gargoyle - Pause" + set category = "Abilities.Gargoyle" + set desc = "Pause your energy while standing still, so you don't use up any more, though you will lose a small amount upon moving again." + + if (stat) + return + + var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle) + if (comp && !comp.transformed && !comp.paused) + comp.paused = TRUE + comp.paused_loc = loc + comp.RegisterSignal(src, COMSIG_ATOM_ENTERING, /datum/component/gargoyle/proc/unpause) + to_chat(src, span_notice("You start conserving your energy.")) + +/mob/living/carbon/human/proc/gargoyle_checkenergy() + set name = "Gargoyle - Check Energy" + set category = "Abilities.Gargoyle" + set desc = "Check how much energy you have remaining as a gargoyle." + + var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle) + if (comp) + to_chat(src, span_notice("You have [round(comp.energy,0.01)] energy remaining. It is currently [comp.paused ? "stable" : (comp.transformed ? "increasing" : "decreasing")].")) diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index a24fa9264f8..6505817fb55 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -80,7 +80,7 @@ if(prob(15/D.permeability_mod)) return - if(nutrition > 300 && prob(nutrition/10)) + if(nutrition > 300 && prob(nutrition/50)) return var/list/zone_weights = list( @@ -177,19 +177,18 @@ if(!is_admin()) return FALSE - var/datum/disease/D = tgui_input_list(usr, "Choose virus", "Viruses", subtypesof(/datum/disease), subtypesof(/datum/disease)) - var/mob/living/carbon/human/H = null + var/disease = tgui_input_list(usr, "Choose virus", "Viruses", subtypesof(/datum/disease), subtypesof(/datum/disease)) + var/mob/living/carbon/human/H = tgui_input_list(usr, "Choose infectee", "Characters", human_mob_list) - if(isnull(D)) + var/datum/disease/D = new disease + + if(isnull(D) || isnull(H)) return FALSE - for(var/thing in shuffle(human_mob_list)) - H = thing - if(H.stat == DEAD) - continue - if(!H.HasDisease(D)) - H.ForceContractDisease(D) - break + if(!H.HasDisease(D)) + H.ForceContractDisease(D) - message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [D.name]! Affected mob: [key_name_admin(H)]") - log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]") + message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [D.name]! Affected mob: [key_name_admin(H)]") + log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]") + + return TRUE diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 6ae5cdbb9e0..22cdabb1dd6 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -91,7 +91,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease)) var/cures_found = 0 for(var/C_id in cures) - if(affected_mob.reagents.has_reagent(C_id)) + if(affected_mob.bloodstr.has_reagent(C_id) || affected_mob.ingested.has_reagent(C_id)) cures_found++ if(needs_all_cures && cures_found < length(cures)) @@ -106,7 +106,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease)) if((spread_flags & SPECIAL || spread_flags & NON_CONTAGIOUS || spread_flags & BLOOD) && !force_spread) return - if(affected_mob.reagents.has_reagent("spaceacilin") || (affected_mob.nutrition > 300 && prob(affected_mob.nutrition/10))) + if(affected_mob.bloodstr.has_reagent("spaceacillin") || (affected_mob.nutrition > 300 && prob(affected_mob.nutrition/50))) return var/spread_range = 1 diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 73ef6649988..6eda375458b 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -2,7 +2,7 @@ GLOBAL_LIST_EMPTY(archive_diseases) GLOBAL_LIST_INIT(advance_cures, list( "sodiumchloride", "sugar", "orangejuice", - "spaceacilin", "glucose", "ethanol", + "spaceacillin", "glucose", "ethanol", "dyloteane", "impedrezene", "hepanephrodaxon", "gold", "silver" )) @@ -16,6 +16,7 @@ GLOBAL_LIST_INIT(advance_cures, list( spread_text = "Unknown" viable_mobtypes = list(/mob/living/carbon/human) + var/s_processing = FALSE var/list/symptoms = list() var/id = "" @@ -36,7 +37,7 @@ GLOBAL_LIST_INIT(advance_cures, list( return /datum/disease/advance/Destroy() - if(processing) + if(s_processing) for(var/datum/symptom/S in symptoms) S.End(src) return ..() @@ -46,8 +47,8 @@ GLOBAL_LIST_INIT(advance_cures, list( return FALSE if(symptoms && length(symptoms)) - if(!processing) - processing = TRUE + if(!s_processing) + s_processing = TRUE for(var/datum/symptom/S in symptoms) S.Start(src) @@ -354,20 +355,20 @@ GLOBAL_LIST_INIT(advance_cures, list( var/new_name = tgui_input_text(usr, "Name your new disease.", "New Name") if(!new_name) - return + return FALSE D.AssignName(new_name) D.Refresh() for(var/datum/disease/advance/AD in active_diseases) AD.Refresh() - for(var/thing in shuffle(human_mob_list)) - H = thing - if(H.stat == DEAD) - continue - if(!H.HasDisease(D)) - H.ForceContractDisease(D) - break + H = tgui_input_list(usr, "Choose infectee", "Infectees", human_mob_list) + + if(isnull(H)) + return FALSE + + if(!H.HasDisease(D)) + H.ForceContractDisease(D) var/list/name_symptoms = list() for(var/datum/symptom/S in D.symptoms) @@ -375,6 +376,8 @@ GLOBAL_LIST_INIT(advance_cures, list( message_admins("[key_name_admin(usr)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]") log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]. It has these symptoms: [english_list(name_symptoms)]") + return TRUE + /datum/disease/advance/proc/totalStageSpeed() var/total_stage_speed = 0 for(var/i in symptoms) diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index bdf04a9fdf4..00a33e9ce64 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -10,7 +10,8 @@ Coughing Low Level. BONUS - Will force the affected mob to drop small items! + Will force the affected mob to drop small items. + Small spread if not wearing a mask ////////////////////////////////////// */ @@ -36,4 +37,6 @@ BONUS var/obj/item/I = M.get_active_hand() if(I && I.w_class == ITEMSIZE_SMALL) M.drop_item() + if(!M.wear_mask) // Small spread if not wearing a mask + A.spread(2) return diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index a9e027da9cd..6e252e56cd9 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -35,6 +35,6 @@ Bonus return /datum/symptom/fever/proc/Heat(var/mob/living/M, var/datum/disease/advance/A) - var/get_heat = (sqrt(21+A.totalTransmittable()*2))+(sqrt(20+A.totalStageSpeed()*3)) + var/get_heat = (sqrtor0(21+A.totalTransmittable()*2))+(sqrtor0(20+A.totalStageSpeed()*3)) M.bodytemperature = min(M.bodytemperature + (get_heat * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1) return TRUE diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm index 28c9002c3a1..e91efab1c7c 100644 --- a/code/datums/diseases/advance/symptoms/flesh_eating.dm +++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm @@ -37,6 +37,6 @@ Bonus return /datum/symptom/flesh_eating/proc/Flesheat(mob/living/M, datum/disease/advance/A) - var/get_damage = ((sqrt(16-A.totalStealth()))*5) + var/get_damage = ((sqrtor0(16-A.totalStealth()))*5) M.adjustBruteLoss(get_damage) return 1 diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 1c219598722..1138d4adba9 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -33,7 +33,7 @@ Bonus return /datum/symptom/heal/proc/Heal(mob/living/M, datum/disease/advance/A) - var/get_damage = (sqrt(20+A.totalStageSpeed())*(1+rand())) + var/get_damage = max(0, (sqrtor0(20+A.totalStageSpeed())*(1+rand()))) M.adjustToxLoss(-get_damage) return TRUE @@ -144,7 +144,7 @@ Bonus level = 5 /datum/symptom/heal/dna/Heal(var/mob/living/carbon/M, var/datum/disease/advance/A) - var/amt_healed = (sqrt(20+A.totalStageSpeed()*(3+rand())))-(sqrt(16+A.totalStealth()*rand())) + var/amt_healed = max(0, (sqrtor0(20+A.totalStageSpeed()*(3+rand())))-(sqrtor0(16+A.totalStealth()*rand()))) M.adjustBrainLoss(-amt_healed) M.radiation = max(M.radiation - 3, 0) return TRUE diff --git a/code/datums/diseases/advance/symptoms/macrophage.dm b/code/datums/diseases/advance/symptoms/macrophage.dm index 5769fadaa6c..a04a3fc50fe 100644 --- a/code/datums/diseases/advance/symptoms/macrophage.dm +++ b/code/datums/diseases/advance/symptoms/macrophage.dm @@ -70,4 +70,4 @@ BONUS phage.viruses += D M.visible_message(span_danger("A strange crearure bursts out of [M]!"), span_userdanger("A slimy creature bursts forth from your flesh!")) - addtimer(CALLBACK(phage, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, dust)), 3000) + addtimer(CALLBACK(phage, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, deathcheck)), 3000) diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index 6f1f3ac9d36..8e19382f94e 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -30,14 +30,14 @@ Bonus var/mob/living/M = A.affected_mob if(A.stage >= 3) - M.slurring = min(0, M.slurring-4) - M.druggy = min(0, M.druggy-4) + M.slurring = max(0, M.slurring-4) + M.druggy = max(0, M.druggy-4) M.reagents.remove_reagent("ethanol", 3) if(A.stage >= 4) - M.drowsyness = min(0, M.drowsyness-4) + M.drowsyness = max(0, M.drowsyness-4) if(M.reagents.has_reagent("bliss")) M.reagents.del_reagent("bliss") - M.hallucination = min(0, M.hallucination-4) + M.hallucination = max(0, M.hallucination-4) if(A.stage >= 5) if(M.reagents.get_reagent_amount("alkysine") < 10) M.reagents.add_reagent("alkysine", 5) diff --git a/code/datums/diseases/advance/symptoms/shivering.dm b/code/datums/diseases/advance/symptoms/shivering.dm index 375850ef40f..f4a3059d7c9 100644 --- a/code/datums/diseases/advance/symptoms/shivering.dm +++ b/code/datums/diseases/advance/symptoms/shivering.dm @@ -34,6 +34,6 @@ Bonus return /datum/symptom/shivering/proc/Chill(mob/living/M, datum/disease/advance/A) - var/get_cold = (sqrt(16+A.totalStealth()*2))+(sqrt(21+A.totalResistance()*2)) + var/get_cold = (sqrtor0(16+A.totalStealth()*2))+(sqrtor0(21+A.totalResistance()*2)) M.bodytemperature = max(M.bodytemperature - (get_cold * A.stage), BODYTEMP_COLD_DAMAGE_LIMIT + 1) return 1 diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index d60baaa11a2..63f2ab00e19 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -34,8 +34,10 @@ Bonus M.emote("sniff") else M.emote("sneeze") - A.spread(5) - if(prob(30)) + if(!M.wear_mask) // Spread only if they're not covering their face + A.spread(5) + + if(prob(30) && !M.wear_mask) // Same for mucus var/obj/effect/decal/cleanable/mucus/icky = new(get_turf(M)) icky.viruses |= A.Copy() diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm index c6b6cf0f17e..487f466761c 100644 --- a/code/datums/diseases/cold.dm +++ b/code/datums/diseases/cold.dm @@ -3,8 +3,9 @@ max_stages = 3 spread_text = "Airborne" spread_flags = AIRBORNE - cure_text = "Rest & Spaceacilin" - cures = list("spaceacilin") + cure_text = "Rest & Spaceacillin" + cures = list("spaceacillin", "chicken_soup") + needs_all_cures = FALSE agent = "XY-rhinovirus" viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey) permeability_mod = 0.5 diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm index 6a30af6f859..2962f48e9b4 100644 --- a/code/datums/diseases/flu.dm +++ b/code/datums/diseases/flu.dm @@ -2,8 +2,9 @@ name = "The Flu" max_stages = 3 spread_text = "Airborne" - cure_text = "Spaceacilin" - cures = list("spaceacilin") + cure_text = "Spaceacillin" + cures = list("spaceacillin", "chicken_soup") + needs_all_cures = FALSE cure_chance = 10 agent = "H13N1 flu virion" viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey) diff --git a/code/datums/diseases/roanoake.dm b/code/datums/diseases/roanoake.dm index 91d476b3c74..412ff16ae75 100644 --- a/code/datums/diseases/roanoake.dm +++ b/code/datums/diseases/roanoake.dm @@ -4,9 +4,9 @@ stage_prob = 2 spread_text = "Blood and close contact" spread_flags = BLOOD - cure_text = "Spaceacilin" + cure_text = "Spaceacillin" agent = "Chimera cells" - cures = list("spaceacilin") + cures = list("spaceacillin") cure_chance = 10 viable_mobtypes = list(/mob/living/carbon/human) desc = "If left untreated, subject will become a xenochimera upon perishing." diff --git a/code/datums/helper_datums/stack_end_detector.dm b/code/datums/helper_datums/stack_end_detector.dm new file mode 100644 index 00000000000..0d621f51b36 --- /dev/null +++ b/code/datums/helper_datums/stack_end_detector.dm @@ -0,0 +1,32 @@ +/** + Stack End Detector. + Can detect if a given code stack has exited, used by the mc for stack overflow detection. + + **/ +/datum/stack_end_detector + var/datum/weakref/_WF + var/datum/stack_canary/_canary + +/datum/stack_end_detector/New() + _canary = new() + _WF = WEAKREF(_canary) + +/** Prime the stack overflow detector. + Store the return value of this proc call in a proc level var. + Can only be called once. +**/ +/datum/stack_end_detector/proc/prime_canary() + if (!_canary) + CRASH("Prime_canary called twice") + . = _canary + _canary = null + +/// Returns true if the stack is still going. Calling before the canary has been primed also returns true +/datum/stack_end_detector/proc/check() + return !!_WF.resolve() + +/// Stack canary. Will go away if the stack it was primed by is ended by byond for return or stack overflow reasons. +/datum/stack_canary + +/// empty proc to avoid warnings about unused variables. Call this proc on your canary in the stack it's watching. +/datum/stack_canary/proc/use_variable() diff --git a/code/datums/outfits/horror_killers.dm b/code/datums/outfits/horror_killers.dm index aa45f4e23d8..6f38c18df0e 100644 --- a/code/datums/outfits/horror_killers.dm +++ b/code/datums/outfits/horror_killers.dm @@ -5,7 +5,6 @@ gloves = /obj/item/clothing/gloves/black mask = /obj/item/clothing/mask/gas/clown_hat head = /obj/item/clothing/head/chaplain_hood - l_ear = /obj/item/radio/headset glasses = /obj/item/clothing/glasses/thermal/plain/monocle suit = /obj/item/clothing/suit/storage/hooded/chaplain_hoodie r_pocket = /obj/item/bikehorn @@ -15,6 +14,10 @@ id_type = /obj/item/card/id/syndicate/station_access id_pda_assignment = "Tunnel Clown!" + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset/alt + headset_earbud = /obj/item/radio/headset/earbud + /decl/hierarchy/outfit/masked_killer name = "Masked Killer" uniform = /obj/item/clothing/under/overalls @@ -22,13 +25,16 @@ gloves = /obj/item/clothing/gloves/sterile/latex mask = /obj/item/clothing/mask/surgical head = /obj/item/clothing/head/welding - l_ear = /obj/item/radio/headset glasses = /obj/item/clothing/glasses/thermal/plain/monocle suit = /obj/item/clothing/suit/storage/apron l_pocket = /obj/item/material/knife/tacknife r_pocket = /obj/item/surgical/scalpel r_hand = /obj/item/material/twohanded/fireaxe + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset/alt + headset_earbud = /obj/item/radio/headset/earbud + /decl/hierarchy/outfit/masked_killer/post_equip(var/mob/living/carbon/human/H) var/victim = get_mannequin(H.ckey) for(var/obj/item/carried_item in H.get_equipped_items(TRUE)) @@ -39,7 +45,6 @@ uniform = /obj/item/clothing/under/suit_jacket{ starting_accessories=list(/obj/item/clothing/accessory/wcoat) } shoes = /obj/item/clothing/shoes/black gloves = /obj/item/clothing/gloves/black - l_ear = /obj/item/radio/headset glasses = /obj/item/clothing/glasses/sunglasses l_pocket = /obj/item/melee/energy/sword mask = /obj/item/clothing/mask/gas/clown_hat @@ -49,6 +54,10 @@ pda_slot = slot_belt pda_type = /obj/item/pda/heads + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset/alt + headset_earbud = /obj/item/radio/headset/earbud + /decl/hierarchy/outfit/professional/post_equip(var/mob/living/carbon/human/H) var/obj/item/storage/secure/briefcase/sec_briefcase = new(H) for(var/obj/item/briefcase_item in sec_briefcase) diff --git a/code/datums/outfits/jobs/cargo.dm b/code/datums/outfits/jobs/cargo.dm index 30955983df4..bed1308f398 100644 --- a/code/datums/outfits/jobs/cargo.dm +++ b/code/datums/outfits/jobs/cargo.dm @@ -1,17 +1,23 @@ /decl/hierarchy/outfit/job/cargo - l_ear = /obj/item/radio/headset/headset_cargo hierarchy_type = /decl/hierarchy/outfit/job/cargo + headset = /obj/item/radio/headset/cargo + headset_alt = /obj/item/radio/headset/alt/cargo + headset_earbud = /obj/item/radio/headset/earbud/cargo + /decl/hierarchy/outfit/job/cargo/qm name = OUTFIT_JOB_NAME("Cargo") uniform = /obj/item/clothing/under/rank/cargo - l_ear = /obj/item/radio/headset/headset_qm //VOREStation Add shoes = /obj/item/clothing/shoes/brown glasses = /obj/item/clothing/glasses/sunglasses l_hand = /obj/item/clipboard id_type = /obj/item/card/id/cargo/head pda_type = /obj/item/pda/quartermaster + headset = /obj/item/radio/headset/qm + headset_alt = /obj/item/radio/headset/alt/qm + headset_earbud = /obj/item/radio/headset/earbud/qm + /decl/hierarchy/outfit/job/cargo/cargo_tech name = OUTFIT_JOB_NAME("Cargo technician") uniform = /obj/item/clothing/under/rank/cargotech @@ -21,10 +27,13 @@ /decl/hierarchy/outfit/job/cargo/mining name = OUTFIT_JOB_NAME("Shaft miner") uniform = /obj/item/clothing/under/rank/miner - l_ear = /obj/item/radio/headset/headset_mine backpack = /obj/item/storage/backpack/industrial satchel_one = /obj/item/storage/backpack/satchel/eng id_type = /obj/item/card/id/cargo/miner pda_type = /obj/item/pda/shaftminer backpack_contents = list(/obj/item/tool/crowbar = 1, /obj/item/storage/bag/ore = 1) flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL + + headset = /obj/item/radio/headset/miner + headset_alt = /obj/item/radio/headset/miner + headset_earbud = /obj/item/radio/headset/miner diff --git a/code/datums/outfits/jobs/civilian.dm b/code/datums/outfits/jobs/civilian.dm index a62600a6eef..829e6f9c649 100644 --- a/code/datums/outfits/jobs/civilian.dm +++ b/code/datums/outfits/jobs/civilian.dm @@ -19,9 +19,12 @@ uniform = /obj/item/clothing/under/color/white /decl/hierarchy/outfit/job/service - l_ear = /obj/item/radio/headset/headset_service hierarchy_type = /decl/hierarchy/outfit/job/service + headset = /obj/item/radio/headset/service + headset_alt = /obj/item/radio/headset/alt/service + headset_earbud = /obj/item/radio/headset/earbud/service + /decl/hierarchy/outfit/job/service/bartender name = OUTFIT_JOB_NAME(JOB_BARTENDER) uniform = /obj/item/clothing/under/rank/bartender @@ -91,7 +94,6 @@ /decl/hierarchy/outfit/job/internal_affairs_agent name = OUTFIT_JOB_NAME("Internal affairs agent") - l_ear = /obj/item/radio/headset/ia uniform = /obj/item/clothing/under/rank/internalaffairs suit = /obj/item/clothing/suit/storage/toggle/internalaffairs shoes = /obj/item/clothing/shoes/brown @@ -100,6 +102,10 @@ id_type = /obj/item/card/id/civilian/internal_affairs pda_type = /obj/item/pda/lawyer + headset = /obj/item/radio/headset/ia + headset_alt = /obj/item/radio/headset/alt/ia + headset_earbud = /obj/item/radio/headset/earbud/ia + /decl/hierarchy/outfit/job/chaplain name = OUTFIT_JOB_NAME(JOB_CHAPLAIN) uniform = /obj/item/clothing/under/rank/chaplain @@ -114,10 +120,13 @@ mask = /obj/item/clothing/mask/gas/explorer suit = /obj/item/clothing/suit/storage/hooded/explorer gloves = /obj/item/clothing/gloves/black - l_ear = /obj/item/radio/headset id_slot = slot_wear_id id_type = /obj/item/card/id/exploration //VOREStation Edit pda_slot = slot_belt pda_type = /obj/item/pda/cargo // Brown looks more rugged r_pocket = /obj/item/gps/explorer id_pda_assignment = JOB_EXPLORER + + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset/alt + headset_earbud = /obj/item/radio/headset/earbud diff --git a/code/datums/outfits/jobs/command.dm b/code/datums/outfits/jobs/command.dm index 149020e4fed..e5a869d9ddf 100644 --- a/code/datums/outfits/jobs/command.dm +++ b/code/datums/outfits/jobs/command.dm @@ -2,7 +2,7 @@ name = OUTFIT_JOB_NAME(JOB_ALT_CAPTAIN) // Keep Captain for now, not JOB_SITE_MANAGER glasses = /obj/item/clothing/glasses/sunglasses uniform = /obj/item/clothing/under/rank/captain - l_ear = /obj/item/radio/headset/heads/captain + shoes = /obj/item/clothing/shoes/brown backpack = /obj/item/storage/backpack/captain satchel_one = /obj/item/storage/backpack/satchel/cap @@ -10,6 +10,10 @@ id_type = /obj/item/card/id/gold pda_type = /obj/item/pda/captain + headset = /obj/item/radio/headset/heads/captain + headset_alt = /obj/item/radio/headset/alt/heads/captain + headset_earbud = /obj/item/radio/headset/earbud/heads/captain + /decl/hierarchy/outfit/job/captain/post_equip(var/mob/living/carbon/human/H) ..() if(H.age>49) @@ -26,19 +30,25 @@ /decl/hierarchy/outfit/job/hop name = OUTFIT_JOB_NAME(JOB_HEAD_OF_PERSONNEL) uniform = /obj/item/clothing/under/rank/head_of_personnel - l_ear = /obj/item/radio/headset/heads/hop shoes = /obj/item/clothing/shoes/brown id_type = /obj/item/card/id/silver/hop pda_type = /obj/item/pda/heads/hop + headset = /obj/item/radio/headset/heads/hop + headset_alt = /obj/item/radio/headset/alt/heads/hop + headset_earbud = /obj/item/radio/headset/earbud/heads/hop + /decl/hierarchy/outfit/job/secretary name = OUTFIT_JOB_NAME(JOB_COMMAND_SECRETARY) - l_ear = /obj/item/radio/headset/headset_com shoes = /obj/item/clothing/shoes/brown id_type = /obj/item/card/id/silver/secretary pda_type = /obj/item/pda/heads r_hand = /obj/item/clipboard + headset = /obj/item/radio/headset/headset_com + headset_alt = /obj/item/radio/headset/alt/headset_com + headset_earbud = /obj/item/radio/headset/earbud/headset_com + /decl/hierarchy/outfit/job/secretary/pre_equip(mob/living/carbon/human/H) ..() if(H.gender == FEMALE) diff --git a/code/datums/outfits/jobs/engineering.dm b/code/datums/outfits/jobs/engineering.dm index 16de1539c3d..11c4a4cd3ce 100644 --- a/code/datums/outfits/jobs/engineering.dm +++ b/code/datums/outfits/jobs/engineering.dm @@ -1,7 +1,6 @@ /decl/hierarchy/outfit/job/engineering hierarchy_type = /decl/hierarchy/outfit/job/engineering belt = /obj/item/storage/belt/utility/full/multitool - l_ear = /obj/item/radio/headset/headset_eng shoes = /obj/item/clothing/shoes/boots/workboots r_pocket = /obj/item/t_scanner backpack = /obj/item/storage/backpack/industrial @@ -10,15 +9,23 @@ pda_slot = slot_l_store flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL + headset = /obj/item/radio/headset/headset_eng + headset_alt = /obj/item/radio/headset/alt/headset_eng + headset_earbud = /obj/item/radio/headset/earbud/headset_eng + /decl/hierarchy/outfit/job/engineering/chief_engineer name = OUTFIT_JOB_NAME(JOB_CHIEF_ENGINEER) head = /obj/item/clothing/head/hardhat/white uniform = /obj/item/clothing/under/rank/chief_engineer - l_ear = /obj/item/radio/headset/heads/ce + gloves = /obj/item/clothing/gloves/black id_type = /obj/item/card/id/engineering/head pda_type = /obj/item/pda/heads/ce + headset = /obj/item/radio/headset/heads/ce + headset_alt = /obj/item/radio/headset/alt/heads/ce + headset_earbud = /obj/item/radio/headset/earbud/heads/ce + /decl/hierarchy/outfit/job/engineering/engineer name = OUTFIT_JOB_NAME(JOB_ENGINEER) head = /obj/item/clothing/head/hardhat diff --git a/code/datums/outfits/jobs/job.dm b/code/datums/outfits/jobs/job.dm index adfa938bf33..fdb7af5dbed 100644 --- a/code/datums/outfits/jobs/job.dm +++ b/code/datums/outfits/jobs/job.dm @@ -3,7 +3,6 @@ hierarchy_type = /decl/hierarchy/outfit/job uniform = /obj/item/clothing/under/color/grey - l_ear = /obj/item/radio/headset shoes = /obj/item/clothing/shoes/black id_slot = slot_wear_id @@ -13,6 +12,10 @@ flags = OUTFIT_HAS_BACKPACK + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset/alt + headset_earbud = /obj/item/radio/headset/earbud + /decl/hierarchy/outfit/job/equip_id(mob/living/carbon/human/H, rank, assignment) var/obj/item/card/id/C = ..() var/datum/job/J = job_master.GetJob(rank) diff --git a/code/datums/outfits/jobs/medical.dm b/code/datums/outfits/jobs/medical.dm index a78636ea630..6a4d120d37d 100644 --- a/code/datums/outfits/jobs/medical.dm +++ b/code/datums/outfits/jobs/medical.dm @@ -1,16 +1,19 @@ /decl/hierarchy/outfit/job/medical hierarchy_type = /decl/hierarchy/outfit/job/medical - l_ear = /obj/item/radio/headset/headset_med shoes = /obj/item/clothing/shoes/white pda_type = /obj/item/pda/medical pda_slot = slot_l_store + backpack = /obj/item/storage/backpack/medic satchel_one = /obj/item/storage/backpack/satchel/med messenger_bag = /obj/item/storage/backpack/messenger/med + headset = /obj/item/radio/headset/headset_med + headset_alt = /obj/item/radio/headset/alt/headset_med + headset_earbud = /obj/item/radio/headset/earbud/headset_med + /decl/hierarchy/outfit/job/medical/cmo name = OUTFIT_JOB_NAME(JOB_CHIEF_MEDICAL_OFFICER) - l_ear =/obj/item/radio/headset/heads/cmo uniform = /obj/item/clothing/under/rank/chief_medical_officer suit = /obj/item/clothing/suit/storage/toggle/labcoat/cmo shoes = /obj/item/clothing/shoes/brown @@ -19,6 +22,10 @@ id_type = /obj/item/card/id/medical/head pda_type = /obj/item/pda/heads/cmo + headset = /obj/item/radio/headset/heads/cmo + headset_alt = /obj/item/radio/headset/alt/heads/cmo + headset_earbud = /obj/item/radio/headset/earbud/heads/cmo + /decl/hierarchy/outfit/job/medical/doctor name = OUTFIT_JOB_NAME(JOB_MEDICAL_DOCTOR) uniform = /obj/item/clothing/under/rank/medical diff --git a/code/datums/outfits/jobs/science.dm b/code/datums/outfits/jobs/science.dm index a9fe8a44370..eeeb84951d0 100644 --- a/code/datums/outfits/jobs/science.dm +++ b/code/datums/outfits/jobs/science.dm @@ -1,23 +1,30 @@ /decl/hierarchy/outfit/job/science hierarchy_type = /decl/hierarchy/outfit/job/science - l_ear = /obj/item/radio/headset/headset_sci suit = /obj/item/clothing/suit/storage/toggle/labcoat shoes = /obj/item/clothing/shoes/white pda_type = /obj/item/pda/science + backpack = /obj/item/storage/backpack/toxins satchel_one = /obj/item/storage/backpack/satchel/tox messenger_bag = /obj/item/storage/backpack/messenger/tox sports_bag = /obj/item/storage/backpack/sport/tox + headset = /obj/item/radio/headset/headset_sci + headset_alt = /obj/item/radio/headset/alt/headset_sci + headset_earbud = /obj/item/radio/headset/earbud/headset_sci + /decl/hierarchy/outfit/job/science/rd name = OUTFIT_JOB_NAME("Research Director") - l_ear = /obj/item/radio/headset/heads/rd uniform = /obj/item/clothing/under/rank/research_director shoes = /obj/item/clothing/shoes/brown l_hand = /obj/item/clipboard id_type = /obj/item/card/id/science/head pda_type = /obj/item/pda/heads/rd + headset = /obj/item/radio/headset/heads/rd + headset_alt = /obj/item/radio/headset/alt/heads/rd + headset_earbud = /obj/item/radio/headset/earbud/heads/rd + /decl/hierarchy/outfit/job/science/scientist name = OUTFIT_JOB_NAME(JOB_SCIENTIST) uniform = /obj/item/clothing/under/rank/scientist diff --git a/code/datums/outfits/jobs/security.dm b/code/datums/outfits/jobs/security.dm index e73b45e06bf..595601bbcdd 100644 --- a/code/datums/outfits/jobs/security.dm +++ b/code/datums/outfits/jobs/security.dm @@ -1,22 +1,29 @@ /decl/hierarchy/outfit/job/security hierarchy_type = /decl/hierarchy/outfit/job/security glasses = /obj/item/clothing/glasses/sunglasses/sechud - l_ear = /obj/item/radio/headset/headset_sec gloves = /obj/item/clothing/gloves/black shoes = /obj/item/clothing/shoes/boots/jackboots + backpack = /obj/item/storage/backpack/security satchel_one = /obj/item/storage/backpack/satchel/sec backpack_contents = list(/obj/item/handcuffs = 1) messenger_bag = /obj/item/storage/backpack/messenger/sec sports_bag = /obj/item/storage/backpack/sport/sec + headset = /obj/item/radio/headset/headset_sec + headset_alt = /obj/item/radio/headset/alt/headset_sec + headset_earbud = /obj/item/radio/headset/earbud/headset_sec + /decl/hierarchy/outfit/job/security/hos name = OUTFIT_JOB_NAME(JOB_HEAD_OF_SECURITY) - l_ear = /obj/item/radio/headset/heads/hos uniform = /obj/item/clothing/under/rank/head_of_security id_type = /obj/item/card/id/security/head pda_type = /obj/item/pda/heads/hos + headset = /obj/item/radio/headset/heads/hos + headset_alt = /obj/item/radio/headset/alt/heads/hos + headset_earbud = /obj/item/radio/headset/earbud/heads/hos + /decl/hierarchy/outfit/job/security/warden name = OUTFIT_JOB_NAME(JOB_WARDEN) uniform = /obj/item/clothing/under/rank/warden diff --git a/code/datums/outfits/jobs/special_vr.dm b/code/datums/outfits/jobs/special_vr.dm index bc88232d130..0e1fcf2a70e 100644 --- a/code/datums/outfits/jobs/special_vr.dm +++ b/code/datums/outfits/jobs/special_vr.dm @@ -4,24 +4,30 @@ gloves = /obj/item/clothing/gloves/white shoes = /obj/item/clothing/shoes/laceup head = /obj/item/clothing/head/beret/centcom/officer - l_ear = /obj/item/radio/headset/centcom glasses = /obj/item/clothing/glasses/omnihud/all id_type = /obj/item/card/id/centcom pda_type = /obj/item/pda/centcom flags = OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/centcom + headset_alt = /obj/item/radio/headset/centcom + headset_earbud = /obj/item/radio/headset/centcom + /decl/hierarchy/outfit/job/emergency_responder name = OUTFIT_JOB_NAME("Emergency Responder") uniform = /obj/item/clothing/under/ert shoes = /obj/item/clothing/shoes/boots/swat gloves = /obj/item/clothing/gloves/swat - l_ear = /obj/item/radio/headset/ert glasses = /obj/item/clothing/glasses/sunglasses back = /obj/item/storage/backpack/satchel id_type = /obj/item/card/id/centcom/ERT pda_type = /obj/item/pda/centcom flags = OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/ert + headset_alt = /obj/item/radio/headset/ert + headset_earbud = /obj/item/radio/headset/ert + /decl/hierarchy/outfit/job/emergency_responder/post_equip(var/mob/living/carbon/human/H) ..() ert.add_antagonist(H.mind) diff --git a/code/datums/outfits/military/military.dm b/code/datums/outfits/military/military.dm index d3f95557945..fb47db35f5a 100644 --- a/code/datums/outfits/military/military.dm +++ b/code/datums/outfits/military/military.dm @@ -2,4 +2,6 @@ name = "Military Uniform" hierarchy_type = /decl/hierarchy/outfit/military - l_ear = /obj/item/radio/headset \ No newline at end of file + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset + headset_earbud = /obj/item/radio/headset \ No newline at end of file diff --git a/code/datums/outfits/misc.dm b/code/datums/outfits/misc.dm index 556bf1d0521..ef36b85038f 100644 --- a/code/datums/outfits/misc.dm +++ b/code/datums/outfits/misc.dm @@ -29,7 +29,6 @@ /decl/hierarchy/outfit/soviet_soldier/admiral name = "Soviet admiral" head = /obj/item/clothing/head/hgpiratecap - l_ear = /obj/item/radio/headset/heads/captain glasses = /obj/item/clothing/glasses/thermal/plain/eyepatch suit = /obj/item/clothing/suit/hgpirate @@ -37,10 +36,13 @@ id_type = /obj/item/card/id/centcom //station id_pda_assignment = "Admiral" + headset = /obj/item/radio/headset/heads/captain + headset_alt = /obj/item/radio/headset/heads/captain + headset_earbud = /obj/item/radio/headset/heads/captain + /decl/hierarchy/outfit/merchant name = "Merchant" shoes = /obj/item/clothing/shoes/black - l_ear = /obj/item/radio/headset uniform = /obj/item/clothing/under/color/grey id_slot = slot_wear_id id_type = /obj/item/card/id/civilian //merchant @@ -48,6 +50,10 @@ pda_type = /obj/item/pda/chef //cause I like the look id_pda_assignment = "Merchant" + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset + headset_earbud = /obj/item/radio/headset + /decl/hierarchy/outfit/merchant/vox name = "Merchant - Vox" shoes = /obj/item/clothing/shoes/boots/jackboots/toeless diff --git a/code/datums/outfits/nanotrasen.dm b/code/datums/outfits/nanotrasen.dm index 4bf6c4f8615..3fde80dd0bb 100644 --- a/code/datums/outfits/nanotrasen.dm +++ b/code/datums/outfits/nanotrasen.dm @@ -3,7 +3,6 @@ uniform = /obj/item/clothing/under/rank/centcom shoes = /obj/item/clothing/shoes/laceup gloves = /obj/item/clothing/gloves/white - l_ear = /obj/item/radio/headset/heads/hop glasses = /obj/item/clothing/glasses/sunglasses id_slot = slot_wear_id @@ -11,6 +10,10 @@ pda_slot = slot_r_store pda_type = /obj/item/pda/heads + headset = /obj/item/radio/headset/heads/hop + headset_alt = /obj/item/radio/headset/heads/hop + headset_earbud = /obj/item/radio/headset/heads/hop + /decl/hierarchy/outfit/nanotrasen/representative name = "Nanotrasen representative" belt = /obj/item/clipboard @@ -19,14 +22,20 @@ /decl/hierarchy/outfit/nanotrasen/officer name = "Nanotrasen officer" head = /obj/item/clothing/head/beret/centcom/officer - l_ear = /obj/item/radio/headset/heads/captain belt = /obj/item/gun/energy id_pda_assignment = "NanoTrasen Navy Officer" + headset = /obj/item/radio/headset/heads/captain + headset_alt = /obj/item/radio/headset/heads/captain + headset_earbud = /obj/item/radio/headset/heads/captain + /decl/hierarchy/outfit/nanotrasen/captain name = "Nanotrasen captain" uniform = /obj/item/clothing/under/rank/centcom_captain - l_ear = /obj/item/radio/headset/heads/captain head = /obj/item/clothing/head/beret/centcom/captain belt = /obj/item/gun/energy id_pda_assignment = "NanoTrasen Navy Captain" + + headset = /obj/item/radio/headset/heads/captain + headset_alt = /obj/item/radio/headset/heads/captain + headset_earbud = /obj/item/radio/headset/heads/captain diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index ed8e81f9928..43fe69f0f22 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -52,6 +52,10 @@ var/list/outfits_decls_by_type_ var/id_pda_assignment + var/headset = /obj/item/radio/headset + var/headset_alt = /obj/item/radio/headset/alt + var/headset_earbud = /obj/item/radio/headset/earbud + var/backpack = /obj/item/storage/backpack var/satchel_one = /obj/item/storage/backpack/satchel/norm var/satchel_two = /obj/item/storage/backpack/satchel @@ -72,7 +76,11 @@ var/list/outfits_decls_by_type_ dd_insertObjectList(outfits_decls_, src) /decl/hierarchy/outfit/proc/pre_equip(mob/living/carbon/human/H) - if(flags & OUTFIT_HAS_BACKPACK) + switch(H.headset) + if(1) l_ear = headset + if(2) l_ear = headset_alt + if(3) l_ear = headset_earbud + if(flags && OUTFIT_HAS_BACKPACK) switch(H.backbag) if(2) back = backpack if(3) back = satchel_one diff --git a/code/datums/outfits/outfit_vr.dm b/code/datums/outfits/outfit_vr.dm index 97281f1a560..c343a36964c 100644 --- a/code/datums/outfits/outfit_vr.dm +++ b/code/datums/outfits/outfit_vr.dm @@ -3,7 +3,6 @@ uniform = /obj/item/clothing/under/solgov/utility/army/urban shoes = /obj/item/clothing/shoes/boots/jackboots gloves = /obj/item/clothing/gloves/combat - l_ear = /obj/item/radio/headset/centcom r_pocket = /obj/item/ammo_magazine/m95 l_pocket = /obj/item/ammo_magazine/m95 l_hand = /obj/item/ammo_magazine/m95 @@ -15,6 +14,10 @@ suit = /obj/item/clothing/suit/armor/combat/USDF belt = /obj/item/storage/belt/security/tactical + headset = /obj/item/radio/headset/centcom + headset_alt = /obj/item/radio/headset/centcom + headset_earbud = /obj/item/radio/headset/centcom + /decl/hierarchy/outfit/USDF/Marine/equip_id(mob/living/carbon/human/H) var/obj/item/card/id/C = ..() C.name = "[H.real_name]'s military ID Card" @@ -29,7 +32,6 @@ name = "USDF officer" head = /obj/item/clothing/head/dress/army/command shoes = /obj/item/clothing/shoes/boots/jackboots - l_ear = /obj/item/radio/headset/centcom uniform = /obj/item/clothing/under/solgov/mildress/army/command back = /obj/item/storage/backpack/satchel belt = /obj/item/gun/projectile/revolver/consul @@ -38,6 +40,10 @@ r_hand = /obj/item/clothing/accessory/holster/hip l_hand = /obj/item/clothing/accessory/tie/black + headset = /obj/item/radio/headset/centcom + headset_alt = /obj/item/radio/headset/centcom + headset_earbud = /obj/item/radio/headset/centcom + /decl/hierarchy/outfit/USDF/Officer/equip_id(mob/living/carbon/human/H) var/obj/item/card/id/C = ..() C.name = "[H.real_name]'s military ID Card" @@ -51,7 +57,6 @@ /decl/hierarchy/outfit/solcom/representative name = "SolCom Representative" shoes = /obj/item/clothing/shoes/laceup - l_ear = /obj/item/radio/headset/centcom uniform = /obj/item/clothing/under/suit_jacket/navy back = /obj/item/storage/backpack/satchel l_pocket = /obj/item/pen/blue @@ -59,6 +64,10 @@ r_hand = /obj/item/pda/centcom l_hand = /obj/item/clipboard + headset = /obj/item/radio/headset/centcom + headset_alt = /obj/item/radio/headset/centcom + headset_earbud = /obj/item/radio/headset/centcom + /decl/hierarchy/outfit/solcom/representative/equip_id(mob/living/carbon/human/H) var/obj/item/card/id/C = ..() C.name = "[H.real_name]'s SolCom ID Card" @@ -74,7 +83,6 @@ head = /obj/item/clothing/head/helmet/combat/imperial shoes =/obj/item/clothing/shoes/leg_guard/combat/imperial gloves = /obj/item/clothing/gloves/arm_guard/combat/imperial - l_ear = /obj/item/radio/headset/syndicate uniform = /obj/item/clothing/under/imperial mask = /obj/item/clothing/mask/gas/imperial suit = /obj/item/clothing/suit/armor/combat/imperial @@ -86,12 +94,15 @@ l_hand = /obj/item/shield/energy/imperial suit_store = /obj/item/gun/energy/imperial + headset = /obj/item/radio/headset/syndicate + headset_alt = /obj/item/radio/headset/syndicate + headset_earbud = /obj/item/radio/headset/syndicate + /decl/hierarchy/outfit/imperial/officer name = "Imperial officer" head = /obj/item/clothing/head/helmet/combat/imperial/centurion shoes = /obj/item/clothing/shoes/leg_guard/combat/imperial gloves = /obj/item/clothing/gloves/arm_guard/combat/imperial - l_ear = /obj/item/radio/headset/syndicate uniform = /obj/item/clothing/under/imperial mask = /obj/item/clothing/mask/gas/imperial suit = /obj/item/clothing/suit/armor/combat/imperial/centurion @@ -102,6 +113,10 @@ l_hand = /obj/item/shield/energy/imperial suit_store = /obj/item/gun/energy/imperial + headset = /obj/item/radio/headset/syndicate + headset_alt = /obj/item/radio/headset/syndicate + headset_earbud = /obj/item/radio/headset/syndicate + /* SOUTHERN CROSS OUTFITS Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead goes in lockers. Keep this in mind if editing. @@ -112,7 +127,6 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go name = OUTFIT_JOB_NAME(JOB_EXPLORER) shoes = /obj/item/clothing/shoes/boots/winter/explorer uniform = /obj/item/clothing/under/explorer - l_ear = /obj/item/radio/headset/explorer id_slot = slot_wear_id pda_slot = slot_l_store pda_type = /obj/item/pda/explorer @@ -123,6 +137,10 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go messenger_bag = /obj/item/storage/backpack/messenger/explorer flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/explorer + headset_alt = /obj/item/radio/headset/alt/explorer + headset_earbud = /obj/item/radio/headset/explorer + /decl/hierarchy/outfit/job/pilot name = OUTFIT_JOB_NAME(JOB_PILOT) shoes = /obj/item/clothing/shoes/black @@ -130,7 +148,6 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go suit = /obj/item/clothing/suit/storage/toggle/bomber/pilot gloves = /obj/item/clothing/gloves/fingerless glasses = /obj/item/clothing/glasses/fakesunglasses/aviator - l_ear = /obj/item/radio/headset/pilot/alt uniform_accessories = list(/obj/item/clothing/accessory/storage/webbing/pilot1 = 1) id_slot = slot_wear_id pda_slot = slot_belt @@ -139,12 +156,15 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go id_pda_assignment = JOB_PILOT flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/pilot + headset_alt = /obj/item/radio/headset/alt/pilot + headset_earbud = /obj/item/radio/headset/alt/pilot + /decl/hierarchy/outfit/job/medical/sar name = OUTFIT_JOB_NAME(JOB_FIELD_MEDIC) uniform = /obj/item/clothing/under/utility/blue //suit = /obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar shoes = /obj/item/clothing/shoes/boots/winter/explorer - l_ear = /obj/item/radio/headset/sar l_hand = /obj/item/storage/firstaid/regular belt = /obj/item/storage/belt/medical/emt pda_slot = slot_l_store @@ -156,11 +176,14 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go messenger_bag = /obj/item/storage/backpack/messenger/explorer flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/sar + headset_alt = /obj/item/radio/headset/alt/sar + headset_earbud = /obj/item/radio/headset/sar + /decl/hierarchy/outfit/job/pathfinder name = OUTFIT_JOB_NAME(JOB_PATHFINDER) shoes = /obj/item/clothing/shoes/boots/winter/explorer uniform = /obj/item/clothing/under/explorer //TODO: Uniforms. - l_ear = /obj/item/radio/headset/pathfinder id_slot = slot_wear_id pda_slot = slot_l_store pda_type = /obj/item/pda/pathfinder @@ -168,6 +191,10 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go id_pda_assignment = JOB_PATHFINDER flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/pathfinder + headset_alt = /obj/item/radio/headset/alt/pathfinder + headset_earbud = /obj/item/radio/headset/pathfinder + /decl/hierarchy/outfit/job/assistant/explorer id_type = /obj/item/card/id/exploration flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL diff --git a/code/datums/outfits/spec_op.dm b/code/datums/outfits/spec_op.dm index 8fd2cb6ae4c..22da415b98b 100644 --- a/code/datums/outfits/spec_op.dm +++ b/code/datums/outfits/spec_op.dm @@ -2,7 +2,6 @@ name = "Special ops - Officer" uniform = /obj/item/clothing/under/syndicate/combat suit = /obj/item/clothing/suit/armor/swat/officer - l_ear = /obj/item/radio/headset/ert glasses = /obj/item/clothing/glasses/thermal/plain/eyepatch mask = /obj/item/clothing/mask/smokable/cigarette/cigar/havana head = /obj/item/clothing/head/beret //deathsquad @@ -16,6 +15,10 @@ id_desc = "Special operations ID." id_pda_assignment = "Special Operations Officer" + headset = /obj/item/radio/headset/ert + headset_alt = /obj/item/radio/headset/ert + headset_earbud = /obj/item/radio/headset/ert + /decl/hierarchy/outfit/spec_op_officer/space name = "Special ops - Officer in space" suit = /obj/item/clothing/suit/armor/swat //obj/item/clothing/suit/space/void/swat @@ -29,7 +32,6 @@ uniform = /obj/item/clothing/under/ert shoes = /obj/item/clothing/shoes/boots/swat gloves = /obj/item/clothing/gloves/swat - l_ear = /obj/item/radio/headset/ert belt = /obj/item/gun/energy/gun glasses = /obj/item/clothing/glasses/sunglasses back = /obj/item/storage/backpack/satchel @@ -37,6 +39,10 @@ id_slot = slot_wear_id id_type = /obj/item/card/id/centcom/ERT + headset = /obj/item/radio/headset/ert + headset_alt = /obj/item/radio/headset/ert + headset_earbud = /obj/item/radio/headset/ert + /decl/hierarchy/outfit/death_command name = "Spec ops - Death commando" @@ -55,7 +61,6 @@ name = "Spec ops - Mercenary" uniform = /obj/item/clothing/under/syndicate shoes = /obj/item/clothing/shoes/boots/combat - l_ear = /obj/item/radio/headset/syndicate belt = /obj/item/storage/belt/security glasses = /obj/item/clothing/glasses/sunglasses gloves = /obj/item/clothing/gloves/swat @@ -66,4 +71,8 @@ id_type = /obj/item/card/id/syndicate id_pda_assignment = "Mercenary" + headset = /obj/item/radio/headset/syndicate + headset_alt = /obj/item/radio/headset/alt/syndicate + headset_earbud = /obj/item/radio/headset/earbud/syndicate + flags = OUTFIT_HAS_BACKPACK diff --git a/code/datums/outfits/wizardry.dm b/code/datums/outfits/wizardry.dm index 96836b3edc2..0cb82f75f28 100644 --- a/code/datums/outfits/wizardry.dm +++ b/code/datums/outfits/wizardry.dm @@ -1,7 +1,6 @@ /decl/hierarchy/outfit/wizard uniform = /obj/item/clothing/under/color/lightpurple shoes = /obj/item/clothing/shoes/sandal - l_ear = /obj/item/radio/headset r_pocket = /obj/item/teleportation_scroll l_hand = /obj/item/staff r_hand = /obj/item/spellbook @@ -9,6 +8,10 @@ backpack_contents = list(/obj/item/storage/box = 1) hierarchy_type = /decl/hierarchy/outfit/wizard + headset = /obj/item/radio/headset + headset_alt = /obj/item/radio/headset + headset_earbud = /obj/item/radio/headset + /decl/hierarchy/outfit/wizard/blue name = "Wizard - Blue" head = /obj/item/clothing/head/wizard diff --git a/code/datums/supplypacks/contraband.dm b/code/datums/supplypacks/contraband.dm index bf763f33ec5..8bc4a190fae 100644 --- a/code/datums/supplypacks/contraband.dm +++ b/code/datums/supplypacks/contraband.dm @@ -97,7 +97,7 @@ /obj/item/clothing/glasses/thermal/syndi, /obj/item/ammo_magazine/m45/ap, /obj/item/material/knife/tacknife/combatknife, - /obj/item/multitool/hacktool + /obj/item/multitool/hacktool/modified ), list( //the professional, /obj/item/gun/projectile/silenced, diff --git a/code/datums/supplypacks/hydroponics.dm b/code/datums/supplypacks/hydroponics.dm index 84712a9f74b..fad0054a36f 100644 --- a/code/datums/supplypacks/hydroponics.dm +++ b/code/datums/supplypacks/hydroponics.dm @@ -95,6 +95,13 @@ containername = "Chicken crate" access = access_hydroponics +/datum/supply_pack/hydro/turkey + name = "Turkey crate" + cost = 25 + containertype = /obj/structure/largecrate/animal/turkey + containername = "Turkey crate" + access = access_hydroponics + /datum/supply_pack/hydro/seeds name = "Seeds crate" contains = list( diff --git a/code/datums/supplypacks/medical.dm b/code/datums/supplypacks/medical.dm index 0c099b32318..2e498c92f10 100644 --- a/code/datums/supplypacks/medical.dm +++ b/code/datums/supplypacks/medical.dm @@ -112,7 +112,7 @@ contains = list( /obj/item/storage/belt/medical = 3, /obj/item/clothing/glasses/hud/health = 3, - /obj/item/radio/headset/headset_med/alt = 3, + /obj/item/radio/headset/alt/headset_med = 3, /obj/item/clothing/suit/storage/hooded/wintercoat/medical = 3 ) cost = 10 diff --git a/code/datums/supplypacks/misc.dm b/code/datums/supplypacks/misc.dm index d03ab2b6207..bc1690c7d8c 100644 --- a/code/datums/supplypacks/misc.dm +++ b/code/datums/supplypacks/misc.dm @@ -80,6 +80,7 @@ /obj/item/toy/plushie/slimeplushie, /obj/item/toy/plushie/box, /obj/item/toy/plushie/borgplushie, + /obj/item/toy/plushie/borgplushie/drake/eng, /obj/item/toy/plushie/borgplushie/medihound, /obj/item/toy/plushie/borgplushie/scrubpuppy, /obj/item/toy/plushie/foxbear, diff --git a/code/datums/supplypacks/security.dm b/code/datums/supplypacks/security.dm index 1404b06e420..1f2cf06f89e 100644 --- a/code/datums/supplypacks/security.dm +++ b/code/datums/supplypacks/security.dm @@ -444,7 +444,7 @@ contains = list( /obj/item/storage/belt/security = 3, /obj/item/clothing/glasses/sunglasses/sechud = 3, - /obj/item/radio/headset/headset_sec/alt = 3, + /obj/item/radio/headset/alt/headset_sec = 3, /obj/item/clothing/suit/storage/hooded/wintercoat/security = 3, /obj/item/clothing/glasses/sunglasses/sechud/tactical_sec_vis = 3 ) diff --git a/code/datums/supplypacks/supply.dm b/code/datums/supplypacks/supply.dm index 0629a55d8ed..b8bcd3f7ba5 100644 --- a/code/datums/supplypacks/supply.dm +++ b/code/datums/supplypacks/supply.dm @@ -118,7 +118,7 @@ /obj/item/storage/backpack/industrial, /obj/item/storage/backpack/satchel/eng, /obj/item/clothing/suit/storage/hooded/wintercoat/miner, - /obj/item/radio/headset/headset_cargo, + /obj/item/radio/headset/miner, /obj/item/clothing/under/rank/miner, /obj/item/clothing/gloves/black, /obj/item/clothing/shoes/black, @@ -175,7 +175,7 @@ /obj/item/material/knife/tacknife/survival, /obj/item/material/knife/machete, /obj/item/clothing/accessory/holster/machete, - /obj/item/clothing/gloves/watch/survival + /obj/item/clothing/accessory/watch/survival ) cost=25 containertype = /obj/structure/closet/crate/secure/xion @@ -187,7 +187,7 @@ contains = list ( /obj/item/storage/backpack/parachute, /obj/item/radio/headset/pilot, - /obj/item/radio/headset/pilot/alt, + /obj/item/radio/headset/alt/pilot, /obj/item/clothing/mask/gas/half, /obj/item/flashlight/glowstick, /obj/item/stack/marker_beacon/thirty, @@ -200,7 +200,7 @@ /obj/item/clothing/head/pilot_vr, /obj/item/clothing/under/rank/pilot1, /obj/item/gun/energy/gun/protector/pilotgun/locked, - /obj/item/clothing/gloves/watch/survival + /obj/item/clothing/accessory/watch/survival ) cost=20 containertype = /obj/structure/closet/crate/secure/xion @@ -236,7 +236,7 @@ /obj/item/clothing/accessory/holster/machete, /obj/item/storage/box/explorerkeys, /obj/item/mapping_unit, - /obj/item/clothing/gloves/watch/survival + /obj/item/clothing/accessory/watch/survival ) cost = 75 containertype = /obj/structure/closet/crate/secure/xion diff --git a/code/datums/uplink/stealthy_weapons.dm b/code/datums/uplink/stealthy_weapons.dm index 29c80092113..39cc3bf9ae2 100644 --- a/code/datums/uplink/stealthy_weapons.dm +++ b/code/datums/uplink/stealthy_weapons.dm @@ -58,12 +58,6 @@ item_cost = 20 path = /obj/item/pen/blade/fountain -/datum/uplink_item/item/stealthy_weapons/angrybuzzer - name = "Morphium Shock Ring" - desc = "An enigmatic ring used to create powerful electric shocks when punching. Can be used as a brute-force method of defibrillation." - item_cost = 40 - path = /obj/item/clothing/gloves/ring/buzzer - /datum/uplink_item/item/stealthy_weapons/huntingtrap name = "Camonetted Beartraps" desc = "A box of unique beartraps which will partially cloak when deployed, allowing for more effective hunting." diff --git a/code/datums/verb_callbacks.dm b/code/datums/verb_callbacks.dm new file mode 100644 index 00000000000..77f817017d2 --- /dev/null +++ b/code/datums/verb_callbacks.dm @@ -0,0 +1,27 @@ +///like normal callbacks but they also record their creation time for measurement purposes +///they also require the same usr/user that made the callback to both still exist and to still have a client in order to execute +/datum/callback/verb_callback + ///the tick this callback datum was created in. used for testing latency + var/creation_time = 0 + +/datum/callback/verb_callback/New(thingtocall, proctocall, ...) + creation_time = DS2TICKS(world.time) + . = ..() + +#ifndef UNIT_TEST +/datum/callback/verb_callback/Invoke(...) + var/mob/our_user = user?.resolve() + if(QDELETED(our_user) || isnull(our_user.client)) + return + var/mob/temp = usr + . = ..() + usr = temp + +/datum/callback/verb_callback/InvokeAsync(...) + var/mob/our_user = user?.resolve() + if(QDELETED(our_user) || isnull(our_user.client)) + return + var/mob/temp = usr + . = ..() + usr = temp +#endif diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 4e71b946309..03ffdb8ecbf 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -153,24 +153,23 @@ data["status"] = status return data -/datum/wires/tgui_act(action, list/params) +/datum/wires/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE - var/mob/user = usr - if(!interactable(user)) + if(!interactable(ui.user)) return - var/obj/item/I = user.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() var/color = lowertext(params["wire"]) - holder.add_hiddenprint(user) + holder.add_hiddenprint(ui.user) switch(action) // Toggles the cut/mend status. if("cut") // if(!I.has_tool_quality(TOOL_WIRECUTTER) && !user.can_admin_interact()) if(!istype(I) || !I.has_tool_quality(TOOL_WIRECUTTER)) - to_chat(user, span_warning("You need wirecutters!")) + to_chat(ui.user, span_warning("You need wirecutters!")) return playsound(holder, I.usesound, 20, 1) @@ -181,7 +180,7 @@ if("pulse") // if(!I.has_tool_quality(TOOL_MULTITOOL) && !user.can_admin_interact()) if(!istype(I) || !I.has_tool_quality(TOOL_MULTITOOL)) - to_chat(user, span_warning("You need a multitool!")) + to_chat(ui.user, span_warning("You need a multitool!")) return playsound(holder, 'sound/weapons/empty.ogg', 20, 1) @@ -189,7 +188,7 @@ // If they pulse the electrify wire, call interactable() and try to shock them. if(get_wire(color) == WIRE_ELECTRIFY) - interactable(user) + interactable(ui.user) return TRUE @@ -198,18 +197,18 @@ if(is_attached(color)) var/obj/item/O = detach_assembly(color) if(O) - user.put_in_hands(O) + ui.user.put_in_hands(O) return TRUE if(!istype(I, /obj/item/assembly/signaler)) - to_chat(user, span_warning("You need a remote signaller!")) + to_chat(ui.user, span_warning("You need a remote signaller!")) return - if(user.unEquip(I)) + if(ui.user.unEquip(I)) attach_assembly(color, I) return TRUE else - to_chat(user, span_warning("[I] is stuck to your hand!")) + to_chat(ui.user, span_warning("[I] is stuck to your hand!")) /** * Proc called to determine if the user can see wire define information, such as "Contraband", "Door Bolts", etc. diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 75855cec648..5a7f00f4a6b 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -325,13 +325,13 @@ throw_speed = 4 throw_range = 20 -/obj/item/camera_bug/attack_self(mob/usr as mob) +/obj/item/camera_bug/attack_self(mob/user as mob) var/list/cameras = new/list() for (var/obj/machinery/camera/C in cameranet.cameras) if (C.bugged && C.status) cameras.Add(C) if (length(cameras) == 0) - to_chat(usr, span_warning("No bugged functioning cameras found.")) + to_chat(user, span_warning("No bugged functioning cameras found.")) return var/list/friendly_cameras = new/list() @@ -339,16 +339,16 @@ for (var/obj/machinery/camera/C in cameras) friendly_cameras.Add(C.c_tag) - var/target = tgui_input_list(usr, "Select the camera to observe", "Select Camera", friendly_cameras) + var/target = tgui_input_list(user, "Select the camera to observe", "Select Camera", friendly_cameras) if (!target) return for (var/obj/machinery/camera/C in cameras) if (C.c_tag == target) target = C break - if (usr.stat == 2) return + if (user.stat == 2) return - usr.client.eye = target + user.client.eye = target /* /obj/item/cigarpacket diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 7a0515abfc7..47b29898af2 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -56,6 +56,8 @@ GLOBAL_LIST_EMPTY(areas_by_type) var/forbid_singulo = FALSE // If true singulo will not move in. var/no_spoilers = FALSE // If true, makes it much more difficult to see what is inside an area with things like mesons. var/soundproofed = FALSE // If true, blocks sounds from other areas and prevents hearers on other areas from hearing the sounds within. + var/block_phase_shift = FALSE //Stops phase shifted mobs from entering // RS Port #658 + var/block_ghosts = FALSE //Stops ghosts from entering //RS Port #658 /area/New() // Used by the maploader, this must be done in New, not init @@ -398,6 +400,7 @@ var/list/mob/living/forced_ambiance_list = new play_ambience(L, initial = TRUE) if(no_spoilers) L.disable_spoiler_vision() + check_phase_shift(M) //RS Port #658 /area/proc/play_ambience(var/mob/living/L, initial = TRUE) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch @@ -554,3 +557,19 @@ GLOBAL_DATUM(spoiler_obfuscation_image, /image) add_overlay(GLOB.spoiler_obfuscation_image) else cut_overlay(GLOB.spoiler_obfuscation_image) + +// RS Port #658 Start +/area/proc/check_phase_shift(var/mob/ourmob) + if(!block_phase_shift || !ourmob.incorporeal_move) + return + if(!isliving(ourmob)) + return + if(isanimal(ourmob)) + var/mob/living/simple_mob/shadekin/SK = ourmob + if(SK.ability_flags & AB_PHASE_SHIFTED) + SK.phase_in(SK.loc) + if(ishuman(ourmob)) + var/mob/living/carbon/human/SK = ourmob + if(SK.ability_flags & AB_PHASE_SHIFTED) + SK.phase_in(SK.loc) +// RS Port #658 End diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 614eb7e981c..0d0c0a9bbdd 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -449,17 +449,17 @@ return data -/obj/machinery/computer/scan_consolenew/tgui_act(action, params) +/obj/machinery/computer/scan_consolenew/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!istype(usr.loc, /turf)) + if(!istype(ui.user.loc, /turf)) return TRUE if(!src || !src.connected) return TRUE if(irradiating) // Make sure that it isn't already irradiating someone... return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) if(tgui_act_modal(action, params)) return TRUE diff --git a/code/game/gamemodes/changeling/powers/mimic_voice.dm b/code/game/gamemodes/changeling/powers/mimic_voice.dm index b8a18ac6fc0..f5d65b8ec2e 100644 --- a/code/game/gamemodes/changeling/powers/mimic_voice.dm +++ b/code/game/gamemodes/changeling/powers/mimic_voice.dm @@ -22,7 +22,7 @@ to_chat(src, span_notice("We return our vocal glands to their original location.")) return - var/mimic_voice = sanitize(tgui_input_text(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN), MAX_NAME_LEN) + var/mimic_voice = sanitize(tgui_input_text(src, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN), MAX_NAME_LEN) if(!mimic_voice) return diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 6883220bac6..27c09411449 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -315,8 +315,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," /obj/item/book/tome/attack_self(mob/living/user as mob) - usr = user - if(!usr.canmove || usr.stat || usr.restrained()) + if(!user.canmove || user.stat || user.restrained()) return if(!cultwords["travel"]) @@ -337,11 +336,11 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if("Cancel", null) return if("Read it") - if(usr.get_active_hand() != src) + if(user.get_active_hand() != src) return user << browse("[tomedat]", "window=Arcane Tome") return - if(usr.get_active_hand() != src) + if(user.get_active_hand() != src) return var/list/dictionary = list ( @@ -386,7 +385,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," var/chosen_rune = null - if(usr) + if(user) chosen_rune = input ("Choose a rune to scribe.") in scribewords if (!chosen_rune) return @@ -398,7 +397,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if (chosen_rune == "teleport other") dictionary[chosen_rune] += input ("Choose a destination word") in english - if(usr.get_active_hand() != src) + if(user.get_active_hand() != src) return for (var/mob/V in viewers(src)) @@ -408,7 +407,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if(do_after(user, 50)) var/area/A = get_area(user) log_and_message_admins("created \an [chosen_rune] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].") - if(usr.get_active_hand() != src) + if(user.get_active_hand() != src) return var/mob/living/carbon/human/H = user var/obj/effect/rune/R = new /obj/effect/rune(user.loc) @@ -439,7 +438,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," w_class = ITEMSIZE_SMALL var/cultistsonly = 1 /obj/item/book/tome/imbued/attack_self(mob/user as mob) - if(src.cultistsonly && !iscultist(usr)) + if(src.cultistsonly && !iscultist(user)) return if(!cultwords["travel"]) runerandom() @@ -448,7 +447,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if (!istype(user.loc,/turf)) to_chat(user, span_notice("You do not have enough space to write a proper rune.")) var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun") - r = input(usr, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking + r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking var/obj/effect/rune/R = new /obj/effect/rune if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -460,8 +459,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if("teleport") var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") var/beacon - if(usr) - beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking + if(user) + beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking R.word1=cultwords["travel"] R.word2=cultwords["self"] R.word3=beacon @@ -470,8 +469,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if("itemport") var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") var/beacon - if(usr) - beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking + if(user) + beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking R.word1=cultwords["travel"] R.word2=cultwords["other"] R.word3=beacon diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 47add9a0ea6..9b5c9968a62 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -14,7 +14,7 @@ if("armor") call(/obj/effect/rune/proc/armor)() if("emp") - call(/obj/effect/rune/proc/emp)(usr.loc,3) + call(/obj/effect/rune/proc/emp)(user.loc,3) if("conceal") call(/obj/effect/rune/proc/obscure)(2) if("revealrunes") diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm index 8f32c6cc5b3..1d1e90fb355 100644 --- a/code/game/gamemodes/technomancer/spells/audible_deception.dm +++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm @@ -68,7 +68,7 @@ var/list/sound_options = available_sounds if(check_for_scepter()) sound_options["!!AIR HORN!!"] = 'sound/items/AirHorn.ogg' - var/new_sound = tgui_input_list(usr, "Select the sound you want to make.", "Sounds", sound_options) + var/new_sound = tgui_input_list(user, "Select the sound you want to make.", "Sounds", sound_options) if(new_sound) selected_sound = sound_options[new_sound] diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index 6aa97533523..e3eca95cd38 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -57,3 +57,118 @@ title_blurb = "A " + JOB_ALT_RESIDENT + " is an individual who resides on the station, frequently in a different part of the station than what is seen. \ They are considered to be part of the crew for most purposes, but have no real authority." title_outfit = /decl/hierarchy/outfit/job/assistant/resident + +////////////////////////////////// +// Intern +////////////////////////////////// + +/datum/job/intern + title = JOB_INTERN + flag = INTERN + departments = list(DEPARTMENT_CIVILIAN) + department_flag = ENGSEC // Ran out of bits + faction = FACTION_STATION + total_positions = -1 + spawn_positions = -1 + supervisors = "the staff from the department you're interning in" + selection_color = "#555555" + economic_modifier = 2 + access = list() //See /datum/job/intern/get_access() + minimal_access = list() //See /datum/job/intern/get_access() + outfit_type = /decl/hierarchy/outfit/job/assistant/intern + alt_titles = list(JOB_ALT_APPRENTICE_ENGINEER = /datum/alt_title/intern_eng, + JOB_ALT_MEDICAL_INTERN = /datum/alt_title/intern_med, + JOB_ALT_RESEARCH_INTERN = /datum/alt_title/intern_sci, + JOB_ALT_SECURITY_CADET = /datum/alt_title/intern_sec, + JOB_ALT_JR_CARGO_TECH = /datum/alt_title/intern_crg, + JOB_ALT_SERVER = /datum/alt_title/server, + JOB_ALT_ASSISTANT = /datum/alt_title/assistant) + job_description = "An " + JOB_INTERN + " does whatever is requested of them, often doing so in process of learning \ + another job. Though they are part of the crew, they have no real authority." + timeoff_factor = 0 // Interns, noh + requestable = FALSE + +/datum/alt_title/intern_eng + title = JOB_ALT_APPRENTICE_ENGINEER + title_blurb = "An " + JOB_ALT_APPRENTICE_ENGINEER + " attempts to provide whatever the Engineering department needs. They are not proper Engineers, and are \ + often in training to become an Engineer. An " + JOB_ALT_APPRENTICE_ENGINEER + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/engineer + +/datum/alt_title/intern_med + title = JOB_ALT_MEDICAL_INTERN + title_blurb = "A " + JOB_ALT_MEDICAL_INTERN + " attempts to provide whatever the Medical department needs. They are not proper Doctors, and are \ + often in training to become a Doctor. A " + JOB_ALT_MEDICAL_INTERN + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/medic + +/datum/alt_title/intern_sci + title = JOB_ALT_RESEARCH_INTERN + title_blurb = "A " + JOB_ALT_RESEARCH_INTERN + " attempts to provide whatever the Research department needs. They are not proper " + JOB_SCIENTIST + "s, and are \ + often in training to become a " + JOB_SCIENTIST + ". A " + JOB_ALT_RESEARCH_INTERN + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/scientist + +/datum/alt_title/intern_sec + title = JOB_ALT_SECURITY_CADET + title_blurb = "A " + JOB_ALT_SECURITY_CADET + " attempts to provide whatever the Security department needs. They are not proper Officers, and are \ + often in training to become an Officer. A " + JOB_ALT_SECURITY_CADET + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/officer + +/datum/alt_title/intern_crg + title = JOB_ALT_JR_CARGO_TECH + title_blurb = "A " + JOB_ALT_JR_CARGO_TECH + " attempts to provide whatever the Cargo department needs. They are not proper Cargo Technicians, and are \ + often in training to become a " + JOB_CARGO_TECHNICIAN + ". A " + JOB_ALT_JR_CARGO_TECH + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/cargo +/* +/datum/alt_title/intern_exp + title = "Jr. " + JOB_EXPLORER + "" + title_blurb = "A Jr. " + JOB_EXPLORER + " attempts to provide whatever the Exploration department needs. They are not proper " + JOB_EXPLORER + "s, and are \ + often in training to become an " + JOB_EXPLORER + ". A Jr. " + JOB_EXPLORER + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/assistant/explorer +*/ +/datum/alt_title/server + title = JOB_ALT_SERVER + title_blurb = "A " + JOB_ALT_SERVER + " helps out kitchen and diner staff with various tasks, primarily food delivery. A " + JOB_ALT_SERVER + " has no real authority." + title_outfit = /decl/hierarchy/outfit/job/service/server + +/datum/alt_title/assistant + title = JOB_ALT_ASSISTANT + title_blurb = "An " + JOB_ALT_ASSISTANT + " helps out wherever they might be needed. They have no authority, but can volunteer to help if help is needed." + title_outfit = /decl/hierarchy/outfit/job/service/server + +/datum/job/intern/New() + ..() + if(config) + total_positions = CONFIG_GET(number/limit_interns) + spawn_positions = CONFIG_GET(number/limit_interns) + +/datum/job/intern/get_access() + if(CONFIG_GET(flag/assistant_maint)) + return list(access_maint_tunnels) + else + return list() + +////////////////////////////////// +// Visitor +////////////////////////////////// + +/datum/job/assistant // Visitor + title = JOB_ALT_VISITOR + supervisors = "nobody! You don't work here" + job_description = "A " + JOB_ALT_VISITOR + " is just there to visit the place. They have no real authority or responsibility." + timeoff_factor = 0 + requestable = FALSE + alt_titles = list("Guest" = /datum/alt_title/guest, "Traveler" = /datum/alt_title/traveler) + +/datum/job/assistant/New() + ..() + if(config) + total_positions = CONFIG_GET(number/limit_visitors) + spawn_positions = CONFIG_GET(number/limit_visitors) + +/datum/job/assistant/get_access() + return list() + +/datum/alt_title/guest + title = "Guest" + +/datum/alt_title/traveler + title = "Traveler" diff --git a/code/game/jobs/job/assistant_vr.dm b/code/game/jobs/job/assistant_vr.dm deleted file mode 100644 index c28d801acbd..00000000000 --- a/code/game/jobs/job/assistant_vr.dm +++ /dev/null @@ -1,115 +0,0 @@ -////////////////////////////////// -// Intern -////////////////////////////////// - -/datum/job/intern - title = JOB_INTERN - flag = INTERN - departments = list(DEPARTMENT_CIVILIAN) - department_flag = ENGSEC // Ran out of bits - faction = FACTION_STATION - total_positions = -1 - spawn_positions = -1 - supervisors = "the staff from the department you're interning in" - selection_color = "#555555" - economic_modifier = 2 - access = list() //See /datum/job/intern/get_access() - minimal_access = list() //See /datum/job/intern/get_access() - outfit_type = /decl/hierarchy/outfit/job/assistant/intern - alt_titles = list(JOB_ALT_APPRENTICE_ENGINEER = /datum/alt_title/intern_eng, - JOB_ALT_MEDICAL_INTERN = /datum/alt_title/intern_med, - JOB_ALT_RESEARCH_INTERN = /datum/alt_title/intern_sci, - JOB_ALT_SECURITY_CADET = /datum/alt_title/intern_sec, - JOB_ALT_JR_CARGO_TECH = /datum/alt_title/intern_crg, - JOB_ALT_SERVER = /datum/alt_title/server, - JOB_ALT_ASSISTANT = /datum/alt_title/assistant) - job_description = "An " + JOB_INTERN + " does whatever is requested of them, often doing so in process of learning \ - another job. Though they are part of the crew, they have no real authority." - timeoff_factor = 0 // Interns, noh - requestable = FALSE - -/datum/alt_title/intern_eng - title = JOB_ALT_APPRENTICE_ENGINEER - title_blurb = "An " + JOB_ALT_APPRENTICE_ENGINEER + " attempts to provide whatever the Engineering department needs. They are not proper Engineers, and are \ - often in training to become an Engineer. An " + JOB_ALT_APPRENTICE_ENGINEER + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/engineer - -/datum/alt_title/intern_med - title = JOB_ALT_MEDICAL_INTERN - title_blurb = "A " + JOB_ALT_MEDICAL_INTERN + " attempts to provide whatever the Medical department needs. They are not proper Doctors, and are \ - often in training to become a Doctor. A " + JOB_ALT_MEDICAL_INTERN + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/medic - -/datum/alt_title/intern_sci - title = JOB_ALT_RESEARCH_INTERN - title_blurb = "A " + JOB_ALT_RESEARCH_INTERN + " attempts to provide whatever the Research department needs. They are not proper " + JOB_SCIENTIST + "s, and are \ - often in training to become a " + JOB_SCIENTIST + ". A " + JOB_ALT_RESEARCH_INTERN + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/scientist - -/datum/alt_title/intern_sec - title = JOB_ALT_SECURITY_CADET - title_blurb = "A " + JOB_ALT_SECURITY_CADET + " attempts to provide whatever the Security department needs. They are not proper Officers, and are \ - often in training to become an Officer. A " + JOB_ALT_SECURITY_CADET + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/officer - -/datum/alt_title/intern_crg - title = JOB_ALT_JR_CARGO_TECH - title_blurb = "A " + JOB_ALT_JR_CARGO_TECH + " attempts to provide whatever the Cargo department needs. They are not proper Cargo Technicians, and are \ - often in training to become a " + JOB_CARGO_TECHNICIAN + ". A " + JOB_ALT_JR_CARGO_TECH + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/cargo -/* -/datum/alt_title/intern_exp - title = "Jr. " + JOB_EXPLORER + "" - title_blurb = "A Jr. " + JOB_EXPLORER + " attempts to provide whatever the Exploration department needs. They are not proper " + JOB_EXPLORER + "s, and are \ - often in training to become an " + JOB_EXPLORER + ". A Jr. " + JOB_EXPLORER + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/assistant/explorer -*/ -/datum/alt_title/server - title = JOB_ALT_SERVER - title_blurb = "A " + JOB_ALT_SERVER + " helps out kitchen and diner staff with various tasks, primarily food delivery. A " + JOB_ALT_SERVER + " has no real authority." - title_outfit = /decl/hierarchy/outfit/job/service/server - -/datum/alt_title/assistant - title = JOB_ALT_ASSISTANT - title_blurb = "An " + JOB_ALT_ASSISTANT + " helps out wherever they might be needed. They have no authority, but can volunteer to help if help is needed." - title_outfit = /decl/hierarchy/outfit/job/service/server - -/datum/job/intern/New() - ..() - if(config) - total_positions = CONFIG_GET(number/limit_interns) - spawn_positions = CONFIG_GET(number/limit_interns) - -/datum/job/intern/get_access() - if(CONFIG_GET(flag/assistant_maint)) - return list(access_maint_tunnels) - else - return list() - - -////////////////////////////////// -// Visitor -////////////////////////////////// - -/datum/job/assistant // Visitor - title = JOB_ALT_VISITOR - supervisors = "nobody! You don't work here" - job_description = "A " + JOB_ALT_VISITOR + " is just there to visit the place. They have no real authority or responsibility." - timeoff_factor = 0 - requestable = FALSE - alt_titles = list("Guest" = /datum/alt_title/guest, "Traveler" = /datum/alt_title/traveler) - -/datum/job/assistant/New() - ..() - if(config) - total_positions = CONFIG_GET(number/limit_visitors) - spawn_positions = CONFIG_GET(number/limit_visitors) - -/datum/job/assistant/get_access() - return list() - -/datum/alt_title/guest - title = "Guest" - -/datum/alt_title/traveler - title = "Traveler" diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 6c16ac43760..767ac329236 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -28,11 +28,16 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) ideal_age_by_species = list(SPECIES_HUMAN_VATBORN = 55) /// Vatborn live shorter, no other race eligible for captain besides human/skrell banned_job_species = list(SPECIES_UNATHI, SPECIES_TAJ, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "mechanical", "digital") + disallow_jobhop = TRUE + pto_type = PTO_CIVILIAN + dept_time_required = 80 //Pending something more complicated + outfit_type = /decl/hierarchy/outfit/job/captain job_description = "The " + JOB_SITE_MANAGER + " manages the other Command Staff, and through them the rest of the station. Though they have access to everything, \ they do not understand everything, and are expected to delegate tasks to the appropriate crew member. The " + JOB_SITE_MANAGER + " is expected to \ have an understanding of Standard Operating Procedure, and is subject to it, and legal action, in the same way as every other crew member." - alt_titles = list(JOB_ALT_OVERSEER= /datum/alt_title/overseer) + alt_titles = list(JOB_ALT_OVERSEER= /datum/alt_title/overseer, JOB_ALT_FACILITY_DIRECTOR = /datum/alt_title/facility_director, JOB_ALT_CHIEF_SUPERVISOR = /datum/alt_title/chief_supervisor, + JOB_ALT_CAPTAIN = /datum/alt_title/captain) /* @@ -45,11 +50,22 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) /datum/job/captain/get_access() return get_all_station_access().Copy() +/datum/job/captain/get_request_reasons() + return list("Training crew", "Assembling expedition team") // Captain Alt Titles /datum/alt_title/overseer title = JOB_ALT_OVERSEER +/datum/alt_title/facility_director + title = JOB_ALT_FACILITY_DIRECTOR + +/datum/alt_title/chief_supervisor + title = JOB_ALT_CHIEF_SUPERVISOR + +/datum/alt_title/captain + title = JOB_ALT_CAPTAIN + ////////////////////////////////// // Head of Personnel ////////////////////////////////// @@ -75,29 +91,42 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) ideal_age_by_species = list(SPECIES_UNATHI = 140, SPECIES_TESHARI = 27, "mechanical" = 20, SPECIES_HUMAN_VATBORN = 20) banned_job_species = list(SPECIES_PROMETHEAN, SPECIES_ZADDAT, "digital", SPECIES_DIONA) + disallow_jobhop = TRUE + pto_type = PTO_CIVILIAN + departments = list(DEPARTMENT_COMMAND, DEPARTMENT_CIVILIAN) + departments_managed = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_PLANET) + dept_time_required = 60 + outfit_type = /decl/hierarchy/outfit/job/hop job_description = "The " + JOB_HEAD_OF_PERSONNEL + " manages the Service department, the Exploration team, and most other civilians. They also \ manage the Supply department, through the " + JOB_QUARTERMASTER + ". In addition, the " + JOB_HEAD_OF_PERSONNEL + " oversees the personal accounts \ of the crew, including their money and access. If necessary, the " + JOB_HEAD_OF_PERSONNEL + " is first in line to assume Acting Command." - alt_titles = list(JOB_ALT_CREW_RESOURCE_OFFICER = /datum/alt_title/cro) - access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, - access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, - access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, - access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, - access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_keycard_auth, access_gateway) - minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, - access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, - access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, - access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, - access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_keycard_auth, access_gateway) + access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway, access_entertainment) + minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway, access_entertainment) + + alt_titles = list(JOB_ALT_CREW_RESOURCE_OFFICER = /datum/alt_title/cro, JOB_ALT_DEPUTY_MANAGER = /datum/alt_title/deputy_manager, JOB_ALT_STAFF_MANAGER = /datum/alt_title/staff_manager, + JOB_ALT_FACILITY_STEWARD = /datum/alt_title/facility_steward, JOB_ALT_FIRST_MATE = /datum/alt_title/first_mate) + +/datum/job/hop/get_request_reasons() + return list("ID modification", "Training crew", "Assembling expedition team") // HOP Alt Titles /datum/alt_title/cro title = JOB_ALT_CREW_RESOURCE_OFFICER +/datum/alt_title/deputy_manager + title = JOB_ALT_DEPUTY_MANAGER + +/datum/alt_title/staff_manager + title = JOB_ALT_STAFF_MANAGER + +/datum/alt_title/facility_steward + title = JOB_ALT_FACILITY_STEWARD + +/datum/alt_title/first_mate + title = JOB_ALT_FIRST_MATE + ////////////////////////////////// // Command Secretary ////////////////////////////////// @@ -116,9 +145,29 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) minimal_player_age = 5 economic_modifier = 7 + disallow_jobhop = TRUE + pto_type = PTO_CIVILIAN + alt_titles = list(JOB_ALT_COMMAND_LIAISON = /datum/alt_title/command_liaison, JOB_ALT_COMMAND_ASSISTANT = /datum/alt_title/command_assistant, JOB_ALT_COMMAND_INTERN = /datum/alt_title/command_intern, + JOB_ALT_BRIDGE_SECRETARY = /datum/alt_title/bridge_secretary, JOB_ALT_BRIDGE_ASSISTANT = /datum/alt_title/bridge_assistant) + access = list(access_heads, access_keycard_auth) minimal_access = list(access_heads, access_keycard_auth) outfit_type = /decl/hierarchy/outfit/job/secretary job_description = "A " + JOB_COMMAND_SECRETARY + " handles paperwork duty for the Heads of Staff, so they can better focus on managing their departments. \ They are not Heads of Staff, and have no real authority." + +/datum/alt_title/command_liaison + title = JOB_ALT_COMMAND_LIAISON + +/datum/alt_title/command_assistant + title = JOB_ALT_COMMAND_ASSISTANT + +/datum/alt_title/command_intern + title = JOB_ALT_COMMAND_INTERN + +/datum/alt_title/bridge_secretary + title = JOB_ALT_BRIDGE_SECRETARY + +/datum/alt_title/bridge_assistant + title = JOB_ALT_BRIDGE_ASSISTANT diff --git a/code/game/jobs/job/captain_vr.dm b/code/game/jobs/job/captain_vr.dm deleted file mode 100644 index c127d8dfd43..00000000000 --- a/code/game/jobs/job/captain_vr.dm +++ /dev/null @@ -1,78 +0,0 @@ -/datum/job/captain - disallow_jobhop = TRUE - pto_type = PTO_CIVILIAN - dept_time_required = 80 //Pending something more complicated - alt_titles = list(JOB_ALT_OVERSEER= /datum/alt_title/overseer, JOB_ALT_FACILITY_DIRECTOR = /datum/alt_title/facility_director, JOB_ALT_CHIEF_SUPERVISOR = /datum/alt_title/chief_supervisor, - JOB_ALT_CAPTAIN = /datum/alt_title/captain) - -/datum/alt_title/facility_director - title = JOB_ALT_FACILITY_DIRECTOR - -/datum/alt_title/chief_supervisor - title = JOB_ALT_CHIEF_SUPERVISOR - -/datum/alt_title/captain - title = JOB_ALT_CAPTAIN - -/datum/job/captain/get_request_reasons() - return list("Training crew", "Assembling expedition team") - -/datum/job/hop - disallow_jobhop = TRUE - pto_type = PTO_CIVILIAN - departments = list(DEPARTMENT_COMMAND, DEPARTMENT_CIVILIAN) - departments_managed = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_PLANET) - dept_time_required = 60 - - alt_titles = list(JOB_ALT_CREW_RESOURCE_OFFICER = /datum/alt_title/cro, JOB_ALT_DEPUTY_MANAGER = /datum/alt_title/deputy_manager, JOB_ALT_STAFF_MANAGER = /datum/alt_title/staff_manager, - JOB_ALT_FACILITY_STEWARD = /datum/alt_title/facility_steward, JOB_ALT_FIRST_MATE = /datum/alt_title/first_mate) - - access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, - access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, - access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, - access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, - access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway, access_entertainment) - minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, - access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, - access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, - access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, - access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway, access_entertainment) - -/datum/alt_title/deputy_manager - title = JOB_ALT_DEPUTY_MANAGER - -/datum/alt_title/staff_manager - title = JOB_ALT_STAFF_MANAGER - -/datum/alt_title/facility_steward - title = JOB_ALT_FACILITY_STEWARD - -/datum/alt_title/first_mate - title = JOB_ALT_FIRST_MATE - -/datum/job/hop/get_request_reasons() - return list("ID modification", "Training crew", "Assembling expedition team") - - -/datum/job/secretary - disallow_jobhop = TRUE - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_COMMAND_LIAISON = /datum/alt_title/command_liaison, JOB_ALT_COMMAND_ASSISTANT = /datum/alt_title/command_assistant, JOB_ALT_COMMAND_INTERN = /datum/alt_title/command_intern, - JOB_ALT_BRIDGE_SECRETARY = /datum/alt_title/bridge_secretary, JOB_ALT_BRIDGE_ASSISTANT = /datum/alt_title/bridge_assistant) - -/datum/alt_title/command_liaison - title = JOB_ALT_COMMAND_LIAISON - -/datum/alt_title/command_assistant - title = JOB_ALT_COMMAND_ASSISTANT - -/datum/alt_title/command_intern - title = JOB_ALT_COMMAND_INTERN - -/datum/alt_title/bridge_secretary - title = JOB_ALT_BRIDGE_SECRETARY - -/datum/alt_title/bridge_assistant - title = JOB_ALT_BRIDGE_ASSISTANT diff --git a/code/game/jobs/job/cargo.dm b/code/game/jobs/job/cargo.dm new file mode 100644 index 00000000000..ad56749de66 --- /dev/null +++ b/code/game/jobs/job/cargo.dm @@ -0,0 +1,122 @@ +//Cargo +////////////////////////////////// +// Quartermaster +////////////////////////////////// +/datum/job/qm + title = JOB_QUARTERMASTER + flag = QUARTERMASTER + departments = list(DEPARTMENT_CARGO) + sorting_order = 1 // QM is above the cargo techs, but below the HoP. + departments_managed = list(DEPARTMENT_CARGO) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 1 + spawn_positions = 1 + pto_type = PTO_CARGO + supervisors = "the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#9b633e" + economic_modifier = 5 + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce) + minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce) + banned_job_species = list("digital", SPECIES_PROMETHEAN) + + ideal_character_age = 40 + dept_time_required = 20 + + outfit_type = /decl/hierarchy/outfit/job/cargo/qm + job_description = "The " + JOB_QUARTERMASTER + " manages the Supply department, checking cargo orders and ensuring supplies get to where they are needed." + alt_titles = list(JOB_ALT_SUPPLY_CHIEF = /datum/alt_title/supply_chief, JOB_ALT_LOGISTICS_MANAGER = /datum/alt_title/logistics_manager, JOB_ALT_CARGO_SUPERVISOR = /datum/alt_title/cargo_supervisor) + +/datum/job/qm/get_request_reasons() + return list("Training crew") + +// Quartermaster Alt Titles +/datum/alt_title/supply_chief + title = JOB_ALT_SUPPLY_CHIEF + +/datum/alt_title/logistics_manager + title = JOB_ALT_LOGISTICS_MANAGER + +/datum/alt_title/cargo_supervisor + title = JOB_ALT_CARGO_SUPERVISOR + +////////////////////////////////// +// Cargo Tech +////////////////////////////////// +/datum/job/cargo_tech + title = JOB_CARGO_TECHNICIAN + flag = CARGOTECH + departments = list(DEPARTMENT_CARGO) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 3 + spawn_positions = 3 + pto_type = PTO_CARGO + supervisors = "the " + JOB_QUARTERMASTER + " and the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#7a4f33" + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station) + minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) + + outfit_type = /decl/hierarchy/outfit/job/cargo/cargo_tech + job_description = "A " + JOB_CARGO_TECHNICIAN + " fills and delivers cargo orders. They are encouraged to return delivered crates to the Cargo Shuttle, \ + because Central Command gives a partial refund." + + alt_titles = list(JOB_ALT_CARGO_LOADER = /datum/alt_title/cargo_loader, JOB_ALT_CARGO_HANDLER = /datum/alt_title/cargo_handler, JOB_ALT_SUPPLY_COURIER = /datum/alt_title/supply_courier, + JOB_ALT_DISPOSALS_SORTER = /datum/alt_title/disposal_sorter) + +/datum/alt_title/supply_courier + title = JOB_ALT_SUPPLY_COURIER + title_blurb = "A " + JOB_ALT_SUPPLY_COURIER + " is usually tasked with delivering packages or cargo directly to whoever requires it." + +/datum/alt_title/cargo_loader + title = JOB_ALT_CARGO_LOADER + title_blurb = "A " + JOB_ALT_CARGO_LOADER + " is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle." + +/datum/alt_title/cargo_handler + title = JOB_ALT_CARGO_HANDLER + title_blurb = "A " + JOB_ALT_CARGO_HANDLER + " is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle." + +/datum/alt_title/disposal_sorter + title = JOB_ALT_DISPOSALS_SORTER + title_blurb = "A " + JOB_ALT_DISPOSALS_SORTER + " is usually tasked with operating disposals delivery system, sorting the trash and tagging parcels for delivery." + +////////////////////////////////// +// Shaft Miner +////////////////////////////////// + +/datum/job/mining + title = JOB_SHAFT_MINER + flag = MINER + departments = list(DEPARTMENT_CARGO) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 4 + spawn_positions = 4 + pto_type = PTO_CARGO + supervisors = "the " + JOB_QUARTERMASTER + " and the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#7a4f33" + economic_modifier = 5 + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station) + minimal_access = list(access_mining, access_mining_station, access_mailsorting) + + outfit_type = /decl/hierarchy/outfit/job/cargo/mining + job_description = "A " + JOB_SHAFT_MINER + " mines and processes minerals to be delivered to departments that need them." + alt_titles = list(JOB_ALT_DEEP_SPACE_MINER = /datum/alt_title/deep_space_miner, JOB_ALT_DRILL_TECHNICIAN = /datum/alt_title/drill_tech, JOB_ALT_PROSPECTOR = /datum/alt_title/prospector, + JOB_ALT_EXCAVATOR = /datum/alt_title/excavator) + +/datum/job/mining/get_request_reasons() + return list("Assembling expedition team") + +/datum/alt_title/drill_tech + title = JOB_ALT_DRILL_TECHNICIAN + title_blurb = "A " + JOB_ALT_DRILL_TECHNICIAN + " specializes in operating and maintaining the machinery needed to extract ore from veins deep below the surface." + +/datum/alt_title/deep_space_miner + title = JOB_ALT_DEEP_SPACE_MINER + title_blurb = "A " + JOB_ALT_DEEP_SPACE_MINER + " specializes primarily in mining operations in zero-g environments, mostly in asteroid and debris fields." + +/datum/alt_title/prospector + title = JOB_ALT_PROSPECTOR + +/datum/alt_title/excavator + title = JOB_ALT_EXCAVATOR diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 663edab0a45..0604b872e4e 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -12,6 +12,7 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_CIVILIAN supervisors = "the " + JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) @@ -19,7 +20,7 @@ outfit_type = /decl/hierarchy/outfit/job/service/bartender job_description = "A " + JOB_BARTENDER + " mixes drinks for the crew. They generally have permission to charge for drinks or deny service to unruly patrons." - alt_titles = list(JOB_ALT_BARISTA = /datum/alt_title/barista) + alt_titles = list(JOB_ALT_BARKEEPR = /datum/alt_title/barkeeper, JOB_ALT_BARMAID = /datum/alt_title/barmaid, JOB_ALT_BARISTA = /datum/alt_title/barista, JOB_ALT_MIXOLOGIST = /datum/alt_title/mixologist) // Bartender Alt Titles /datum/alt_title/barista @@ -28,6 +29,15 @@ or deny service to unruly patrons." title_outfit = /decl/hierarchy/outfit/job/service/bartender/barista +/datum/alt_title/barkeeper + title = JOB_ALT_BARKEEPR + +/datum/alt_title/barmaid + title = JOB_ALT_BARMAID + +/datum/alt_title/mixologist + title = JOB_ALT_MIXOLOGIST + ////////////////////////////////// // Chef ////////////////////////////////// @@ -40,6 +50,7 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_CIVILIAN supervisors = "the "+ JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) @@ -47,13 +58,20 @@ outfit_type = /decl/hierarchy/outfit/job/service/chef job_description = "A " + JOB_CHEF + " cooks food for the crew. They generally have permission to charge for food or deny service to unruly diners." - alt_titles = list(JOB_ALT_COOK = /datum/alt_title/cook) + alt_titles = list(JOB_ALT_SOUSCHEF = /datum/alt_title/souschef, JOB_ALT_COOK = /datum/alt_title/cook, JOB_ALT_KITCHEN_WORKER = /datum/alt_title/kitchen_worker) // Chef Alt Titles /datum/alt_title/cook title = JOB_ALT_COOK title_blurb = "A " + JOB_ALT_COOK + " has the same duties, though they may be less experienced." +/datum/alt_title/souschef + title = JOB_ALT_SOUSCHEF + +/datum/alt_title/kitchen_worker + title = JOB_ALT_KITCHEN_WORKER + title_blurb = "A " + JOB_ALT_KITCHEN_WORKER + " has the same duties, though they may be less experienced." + ////////////////////////////////// // Botanist ////////////////////////////////// @@ -66,6 +84,7 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_CIVILIAN supervisors = "the " + JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) @@ -73,89 +92,30 @@ outfit_type = /decl/hierarchy/outfit/job/service/gardener job_description = "A " + JOB_BOTANIST+ " grows plants for the " + JOB_CHEF + " and " + JOB_BARTENDER + "." - alt_titles = list(JOB_ALT_GARDENER = /datum/alt_title/gardener) + alt_titles = list(JOB_ALT_HYDROPONICIST = /datum/alt_title/hydroponicist, JOB_ALT_CULTIVATOR = /datum/alt_title/cultivator, JOB_ALT_FARMER = /datum/alt_title/farmer, + JOB_ALT_GARDENER = /datum/alt_title/gardener, JOB_ALT_FLORIST = /datum/alt_title/florsit, JOB_ALT_RANCHER = /datum/alt_title/rancher) //Botanist Alt Titles /datum/alt_title/gardener title = JOB_ALT_GARDENER title_blurb = "A " + JOB_ALT_GARDENER + " may be less professional than their counterparts, and are more likely to tend to the public gardens if they aren't needed elsewhere." -//Cargo -////////////////////////////////// -// Quartermaster -////////////////////////////////// -/datum/job/qm - title = JOB_QUARTERMASTER - flag = QUARTERMASTER - departments = list(DEPARTMENT_CARGO) - sorting_order = 1 // QM is above the cargo techs, but below the HoP. - departments_managed = list(DEPARTMENT_CARGO) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 1 - spawn_positions = 1 - supervisors = "the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#9b633e" - economic_modifier = 5 - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce) - minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce) - banned_job_species = list("digital", SPECIES_PROMETHEAN) +/datum/alt_title/hydroponicist + title = JOB_ALT_HYDROPONICIST - ideal_character_age = 40 +/datum/alt_title/cultivator + title = JOB_ALT_CULTIVATOR - outfit_type = /decl/hierarchy/outfit/job/cargo/qm - job_description = "The " + JOB_QUARTERMASTER + " manages the Supply department, checking cargo orders and ensuring supplies get to where they are needed." - alt_titles = list(JOB_ALT_SUPPLY_CHIEF = /datum/alt_title/supply_chief) +/datum/alt_title/farmer + title = JOB_ALT_FARMER -// Quartermaster Alt Titles -/datum/alt_title/supply_chief - title = JOB_ALT_SUPPLY_CHIEF +/datum/alt_title/florsit + title = JOB_ALT_FLORIST + title_blurb = "A " + JOB_ALT_FLORIST + " may be less professional than their counterparts, and are more likely to tend to the public gardens if they aren't needed elsewhere." -////////////////////////////////// -// Cargo Tech -////////////////////////////////// -/datum/job/cargo_tech - title = JOB_CARGO_TECHNICIAN - flag = CARGOTECH - departments = list(DEPARTMENT_CARGO) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 - supervisors = "the " + JOB_QUARTERMASTER + " and the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#7a4f33" - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station) - minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) - - outfit_type = /decl/hierarchy/outfit/job/cargo/cargo_tech - job_description = "A " + JOB_CARGO_TECHNICIAN + " fills and delivers cargo orders. They are encouraged to return delivered crates to the Cargo Shuttle, \ - because Central Command gives a partial refund." - -////////////////////////////////// -// Shaft Miner -////////////////////////////////// - -/datum/job/mining - title = JOB_SHAFT_MINER - flag = MINER - departments = list(DEPARTMENT_CARGO) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 3 - spawn_positions = 3 - supervisors = "the " + JOB_QUARTERMASTER + " and the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#7a4f33" - economic_modifier = 5 - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station) - minimal_access = list(access_mining, access_mining_station, access_mailsorting) - - outfit_type = /decl/hierarchy/outfit/job/cargo/mining - job_description = "A " + JOB_SHAFT_MINER + " mines and processes minerals to be delivered to departments that need them." - alt_titles = list(JOB_ALT_DRILL_TECHNICIAN = /datum/alt_title/drill_tech) - -/datum/alt_title/drill_tech - title = JOB_ALT_DRILL_TECHNICIAN - title_blurb = "A " + JOB_ALT_DRILL_TECHNICIAN + " specializes in operating and maintaining the machinery needed to extract ore from veins deep below the surface." +/datum/alt_title/rancher + title = JOB_ALT_RANCHER + title_blurb = "A " + JOB_ALT_RANCHER + " is tasked with the care, feeding, raising, and harvesting of livestock." //Service ////////////////////////////////// @@ -167,8 +127,9 @@ departments = list(DEPARTMENT_CIVILIAN) department_flag = CIVILIAN faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 + total_positions = 3 + spawn_positions = 3 + pto_type = PTO_CIVILIAN supervisors = "the " + JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_janitor, access_maint_tunnels) @@ -176,12 +137,23 @@ outfit_type = /decl/hierarchy/outfit/job/service/janitor job_description = "A " + JOB_JANITOR + " keeps the station clean, as long as it doesn't interfere with active crime scenes." - alt_titles = list(JOB_ALT_CUSTODIAN = /datum/alt_title/custodian) + alt_titles = list(JOB_ALT_CUSTODIAN = /datum/alt_title/custodian, JOB_ALT_SANITATION_TECHNICIAN = /datum/alt_title/sanitation_tech, + JOB_ALT_MAID = /datum/alt_title/maid, JOB_ALT_GARBAGE_COLLECTOR = /datum/alt_title/garbage_collector) // Janitor Alt Titles /datum/alt_title/custodian title = JOB_ALT_CUSTODIAN +/datum/alt_title/sanitation_tech + title = JOB_ALT_SANITATION_TECHNICIAN + +/datum/alt_title/maid + title = JOB_ALT_MAID + +/datum/alt_title/garbage_collector + title = JOB_ALT_GARBAGE_COLLECTOR + title_blurb = "A " + JOB_ALT_GARBAGE_COLLECTOR + " keeps the station clean, though focuses moreso on collecting larger trash, with wet cleaning being secondary task." + //More or less assistants ////////////////////////////////// // Librarian @@ -192,8 +164,9 @@ departments = list(DEPARTMENT_CIVILIAN) department_flag = CIVILIAN faction = FACTION_STATION - total_positions = 1 - spawn_positions = 1 + total_positions = 2 + spawn_positions = 2 + pto_type = PTO_CIVILIAN supervisors = "the " + JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_library, access_maint_tunnels) @@ -201,7 +174,9 @@ outfit_type = /decl/hierarchy/outfit/job/librarian job_description = "The " + JOB_LIBRARIAN + " curates the book selection in the Library, so the crew might enjoy it." - alt_titles = list(JOB_ALT_JOURNALIST = /datum/alt_title/journalist, JOB_ALT_WRITER = /datum/alt_title/writer) + alt_titles = list(JOB_ALT_JOURNALIST = /datum/alt_title/journalist, JOB_ALT_REPORTER = /datum/alt_title/reporter, JOB_ALT_WRITER = /datum/alt_title/writer, + JOB_ALT_HISTORIAN = /datum/alt_title/historian, JOB_ALT_ARCHIVIST = /datum/alt_title/archivist, JOB_ALT_PROFESSOR = /datum/alt_title/professor, + JOB_ALT_ACADEMIC = /datum/alt_title/academic, JOB_ALT_PHILOSOPHER = /datum/alt_title/philosopher, JOB_ALT_CURATOR = /datum/alt_title/curator) // Librarian Alt Titles /datum/alt_title/journalist @@ -213,6 +188,34 @@ title = JOB_ALT_WRITER title_blurb = "The " + JOB_ALT_WRITER + " uses the Library as a quiet place to write whatever it is they choose to write." +/datum/alt_title/reporter + title = JOB_ALT_REPORTER + title_blurb = "The " + JOB_ALT_REPORTER + " uses the Library as a base of operations, from which they can report the news and goings-on on the station with their camera." + +/datum/alt_title/historian + title = JOB_ALT_HISTORIAN + title_blurb = "The " + JOB_ALT_HISTORIAN + " uses the Library as a base of operation to record any important events occurring on station." + +/datum/alt_title/archivist + title = JOB_ALT_ARCHIVIST + title_blurb = "The " + JOB_ALT_ARCHIVIST + " uses the Library as a base of operation to record any important events occurring on station." + +/datum/alt_title/professor + title = JOB_ALT_PROFESSOR + title_blurb = "The " + JOB_ALT_PROFESSOR + " uses the Library as a base of operations to share their vast knowledge with the crew." + +/datum/alt_title/academic + title = JOB_ALT_ACADEMIC + title_blurb = "The " + JOB_ALT_ACADEMIC + " uses the Library as a base of operations to share their vast knowledge with the crew." + +/datum/alt_title/philosopher + title = JOB_ALT_PHILOSOPHER + title_blurb = "The " + JOB_ALT_PHILOSOPHER + " uses the Library as a base of operation to ruminate on nature of life and other great questions, and share their opinions with the crew." + +/datum/alt_title/curator + title = JOB_ALT_CURATOR + title_blurb = "The " + JOB_ALT_CURATOR + " uses the Library as a base of operation to gather the finest of art for display and preservation." + ////////////////////////////////// // Internal Affairs Agent ////////////////////////////////// @@ -226,6 +229,8 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_CIVILIAN + disallow_jobhop = TRUE supervisors = "company officials and Corporate Regulations" selection_color = "#515151" economic_modifier = 7 @@ -238,10 +243,233 @@ job_description = "An " + JOB_INTERNAL_AFFAIRS_AGENT + " makes sure that the crew is following Standard Operating Procedure. They also \ handle complaints against crew members, and can have issues brought to the attention of Central Command, \ assuming their paperwork is in order." + alt_titles = list(JOB_ALT_INTERNAL_AFFAIRS_LIAISON = /datum/alt_title/ia_liaison, JOB_ALT_INTERNAL_AFFAIRS_DELEGATE = /datum/alt_title/ia_delegate, + JOB_ALT_INTERNAL_AFFAIRS_INVESTIGATOR = /datum/alt_title/ia_investigator) -/* -/datum/job/lawyer/equip(var/mob/living/carbon/human/H) - . = ..() - if(.) - H.implant_loyalty(H) -*/ +/datum/alt_title/ia_liaison + title = JOB_ALT_INTERNAL_AFFAIRS_LIAISON + +/datum/alt_title/ia_delegate + title = JOB_ALT_INTERNAL_AFFAIRS_DELEGATE + +/datum/alt_title/ia_investigator + title = JOB_ALT_INTERNAL_AFFAIRS_INVESTIGATOR + +////////////////////////////////// +// Pilot +////////////////////////////////// + +/datum/job/pilot + title = JOB_PILOT + flag = PILOT + departments = list(DEPARTMENT_CIVILIAN) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 2 + spawn_positions = 2 + supervisors = "the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#515151" + economic_modifier = 5 + minimal_player_age = 3 + pto_type = PTO_CIVILIAN + access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot) + minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot) + outfit_type = /decl/hierarchy/outfit/job/pilot + job_description = "A " + JOB_PILOT + " flies the various shuttles in the Virgo-Erigone System." + alt_titles = list(JOB_ALT_COPILOT = /datum/alt_title/co_pilot, JOB_ALT_NAVIGATOR = /datum/alt_title/navigator, JOB_ALT_HELMSMAN = /datum/alt_title/helmsman) + +/datum/alt_title/co_pilot + title = JOB_ALT_COPILOT + title_blurb = "A Co-" + JOB_ALT_COPILOT + " is there primarily to assist main pilot as well as learn from them" + +/datum/alt_title/navigator + title = JOB_ALT_NAVIGATOR + +/datum/alt_title/helmsman + title = JOB_ALT_HELMSMAN + +/datum/job/pilot/get_request_reasons() + return list("Assembling expedition team") + +////////////////////////////////// +// Entertainer +////////////////////////////////// + +/datum/job/entertainer + title = JOB_ENTERTAINER + flag = ENTERTAINER + departments = list(DEPARTMENT_CIVILIAN) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 4 + spawn_positions = 4 + supervisors = "the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#515151" + access = list(access_entertainment) + minimal_access = list(access_entertainment) + pto_type = PTO_CIVILIAN + + outfit_type = /decl/hierarchy/outfit/job/assistant/entertainer + job_description = "An " + JOB_ENTERTAINER + " does just that, entertains! Put on plays, play music, sing songs, tell stories, or read your favorite fanfic." + alt_titles = list(JOB_ALT_PERFORMER = /datum/alt_title/performer, JOB_ALT_MUSICIAN = /datum/alt_title/musician, JOB_ALT_STAGEHAND = /datum/alt_title/stagehand, + JOB_ALT_ACTOR = /datum/alt_title/actor, JOB_ALT_DANCER = /datum/alt_title/dancer, JOB_ALT_SINGER = /datum/alt_title/singer, + JOB_ALT_MAGICIAN = /datum/alt_title/magician, JOB_ALT_COMEDIAN = /datum/alt_title/comedian, JOB_ALT_ARTIST = /datum/alt_title/tragedian, + JOB_ALT_ARTIST = /datum/alt_title/artist, JOB_ALT_GAME_MASTER = /datum/alt_title/game_master) + +// Entertainer Alt Titles +/datum/alt_title/actor + title = JOB_ALT_ACTOR + title_blurb = "An " + JOB_ALT_ACTOR + " is someone who acts out a role! Whatever sort of character it is, get into it and impress people with power of comedy and tragedy!" + +/datum/alt_title/performer + title = JOB_ALT_PERFORMER + title_blurb = "A " + JOB_ALT_PERFORMER + " is someone who performs! Whatever sort of performance will come to your mind, the world's a stage!" + +/datum/alt_title/musician + title = JOB_ALT_MUSICIAN + title_blurb = "A " + JOB_ALT_MUSICIAN + " is someone who makes music with a wide variety of musical instruments!" + +/datum/alt_title/stagehand + title = JOB_ALT_STAGEHAND + title_blurb = "A " + JOB_ALT_STAGEHAND + " typically performs everything the rest of the entertainers don't. Operate lights, shutters, windows, or narrate through your voicebox!" + +/datum/alt_title/dancer + title = JOB_ALT_DANCER + title_blurb = "A " + JOB_ALT_DANCER + " is someone who impresses people through power of their own body! From waltz to breakdance, as long as crowd as cheering!" + +/datum/alt_title/singer + title = JOB_ALT_SINGER + title_blurb = "A " + JOB_ALT_SINGER + " is someone with gift of melodious voice! Impress people with your vocal range!" + +/datum/alt_title/magician + title = JOB_ALT_MAGICIAN + title_blurb = "A " + JOB_ALT_MAGICIAN + " is someone who awes those around them with impossible! Show off your repertoire of magic tricks, while keeping the secret hidden!" + +/datum/alt_title/comedian + title = JOB_ALT_COMEDIAN + title_blurb = "A " + JOB_ALT_COMEDIAN + " will focus on making people laugh with the power of wit! Telling jokes, stand-up comedy, you are here to make others smile!" + +/datum/alt_title/tragedian + title = JOB_ALT_ARTIST + title_blurb = "A " + JOB_ALT_ARTIST + " will focus on making people think about life and world around them! Life is a tragedy, and who's better to convey its emotions than you?" + +/datum/alt_title/artist + title = JOB_ALT_ARTIST + title_blurb = "An " + JOB_ALT_ARTIST + "'s calling is to create beautiful arts! Whatever form may they take, create and have people astonished with your creativity." + +/datum/alt_title/game_master + title = JOB_ALT_GAME_MASTER + title_blurb = "A " + JOB_ALT_GAME_MASTER + " provides recreation for the crew by hosting variety of games. From cards to roleplaying to something more personalized." + +////////////////////////////////// +// Entrepreneur +////////////////////////////////// + +/datum/job/entrepreneur + title = JOB_ENTREPRENEUR + flag = ENTREPRENEUR + departments = list(DEPARTMENT_CIVILIAN) + department_flag = CIVILIAN + faction = FACTION_STATION + total_positions = 4 + spawn_positions = 4 + supervisors = "the " + JOB_HEAD_OF_PERSONNEL + selection_color = "#515151" + access = list() + minimal_access = list() + pto_type = PTO_CIVILIAN + + outfit_type = /decl/hierarchy/outfit/job/assistant/entrepreneur + job_description = "An " + JOB_ENTREPRENEUR + " is basically a visitor that obtained special permission to offer personal services to people on station. \ + They will offer people these services and, potentially, even demand payment!" + alt_titles = list(JOB_ALT_LAWYER = /datum/alt_title/lawyer, JOB_ALT_PRIVATE_EYE = /datum/alt_title/private_eye, JOB_ALT_BODYGUARD = /datum/alt_title/bodyguard, + JOB_ALT_PERSONAL_PHYSICIAN = /datum/alt_title/personal_physician, JOB_ALT_DENTIST = /datum/alt_title/dentist, JOB_ALT_FITNESS_INSTRUCTOR = /datum/alt_title/fitness_instructor, + JOB_ALT_YOGA_TEACHER = /datum/alt_title/yoga_teacher, JOB_ALT_MASSEUSE = /datum/alt_title/masseuse, JOB_ALT_TRADESPERSON = /datum/alt_title/tradesperson, + JOB_ALT_STREAMER = /datum/alt_title/streamer, JOB_ALT_INFLUENCER = /datum/alt_title/influencer, JOB_ALT_PARANORMAL_INVESTIGATOR = /datum/alt_title/paranormal_investigator, + JOB_ALT_PERSONAL_SECRETARY = /datum/alt_title/personal_secretary, JOB_ALT_STYLIST = /datum/alt_title/stylist, JOB_ALT_FISHER = /datum/alt_title/fisher, + JOB_ALT_FORTUNE_TELLER = /datum/alt_title/fortune_teller, JOB_ALT_SPIRIT_HEALER = /datum/alt_title/spirit_healer) + +/datum/alt_title/lawyer + title = JOB_ALT_LAWYER + title_blurb = "A " + JOB_ALT_LAWYER + " is knowledgable in various legal systems, including station's operations. They can try to offer their legal counsel, although nobody is really obliged to listen." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_secretary + +/datum/alt_title/private_eye + title = JOB_ALT_PRIVATE_EYE + title_blurb = "A " + JOB_ALT_PRIVATE_EYE + " is a detective that has no credentials or equipment. But if someone wants something found without security's knowledge, they are the one to go to." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/private_eye + +/datum/alt_title/bodyguard + title = JOB_ALT_BODYGUARD + title_blurb = "A " + JOB_ALT_BODYGUARD + " offers service of personal protection. They may not be allowed any weapons, but their own body is weapon enough." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/bodyguard + +/datum/alt_title/personal_physician + title = JOB_ALT_PERSONAL_PHYSICIAN + title_blurb = "A " + JOB_ALT_PERSONAL_PHYSICIAN + " is a doctor dedicated less to Hippocratic Oath and more to the moneymaking grind. Their license may be expired, but the grindset never will be." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_physician + +/datum/alt_title/dentist + title = JOB_ALT_DENTIST + title_blurb = "A " + JOB_ALT_DENTIST + " is a doctor that specializes in oral care. Company may not recognize them as a proper doctor, but surely their customers will." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/dentist + +/datum/alt_title/fitness_instructor + title = JOB_ALT_FITNESS_INSTRUCTOR + title_blurb = "A " + JOB_ALT_FITNESS_INSTRUCTOR + " dedicates themselves to improving the health of the crew through physical activity, and boy, do they need the help." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fitness_instructor + +/datum/alt_title/yoga_teacher + title = JOB_ALT_YOGA_TEACHER + title_blurb = "A " + JOB_ALT_YOGA_TEACHER + " is similar to a fitness instructor, but rather than turning the round bodies into firm ones, they focus on helping people find balance and harmony." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/yoga_teacher + +/datum/alt_title/masseuse + title = JOB_ALT_MASSEUSE + title_blurb = "A " + JOB_ALT_MASSEUSE + " is master of physical therapy and working others' bodies with their hands." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/masseuse + +/datum/alt_title/tradesperson + title = JOB_ALT_TRADESPERSON + title_blurb = "A " + JOB_ALT_TRADESPERSON + " is someone attempting to make money via the most obvious act of all - buying and selling. Now if only customs allowed you to bring your goods along..." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/tradesperson + +/datum/alt_title/streamer + title = JOB_ALT_STREAMER + title_blurb = "A " + JOB_ALT_STREAMER + " is here to entertain. Not the crew! Their audience across exonet!" + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/streamer + +/datum/alt_title/influencer + title = JOB_ALT_INFLUENCER + title_blurb = "An " + JOB_ALT_INFLUENCER + " has lucked out with some exonet following, and was given permission to go onstation to provide free exposure. Don't let it go to your head." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/influencer + +/datum/alt_title/paranormal_investigator + title = JOB_ALT_PARANORMAL_INVESTIGATOR + title_blurb = "A " + JOB_ALT_PARANORMAL_INVESTIGATOR + " looks beyond what is accepted by modern science, and searches for the true unknown. Aliens, alternate dimensions, ghosts... The truth is out there!" + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/paranormal_investigator + +/datum/alt_title/personal_secretary + title = JOB_ALT_PERSONAL_SECRETARY + title_blurb = "A " + JOB_ALT_PERSONAL_SECRETARY + " offers services of general assistance. Although it's doubtful anyone will ever actually need those." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_secretary + +/datum/alt_title/stylist + title = JOB_ALT_STYLIST + title_blurb = "A " + JOB_ALT_STYLIST + " offers fashion advice, as well as helps with adjusting appearance of the crew to better suit their beauty standards." + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/stylist + +/datum/alt_title/fisher + title = JOB_ALT_FISHER + title_blurb = "A " + JOB_ALT_FISHER + " is a capable angler, who is good at obtaining large amounts of marine goods. Whether you generously give them to station or attempt to make a quick thaler by selling, it's up to you!" + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fisher + +/datum/alt_title/fortune_teller + title = JOB_ALT_FORTUNE_TELLER + title_blurb = "A " + JOB_ALT_FORTUNE_TELLER + " peers into the future, and offers these visions to others. Occasionally those visions may even come true!" + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fortune_teller + +/datum/alt_title/spirit_healer + title = JOB_ALT_SPIRIT_HEALER + title_blurb = "A " + JOB_ALT_SPIRIT_HEALER + " offers alternative forms of medicine. Rituals, magic rocks, seances... It totally works. What's that about placebo?" + title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/spirit_healer diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index 1220e3ee88f..a980fd2325f 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -7,6 +7,7 @@ faction = FACTION_STATION total_positions = 1 spawn_positions = 1 + pto_type = PTO_CIVILIAN supervisors = "the " + JOB_HEAD_OF_PERSONNEL selection_color = "#515151" access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels) @@ -14,13 +15,34 @@ outfit_type = /decl/hierarchy/outfit/job/chaplain job_description = "The " + JOB_CHAPLAIN + " ministers to the spiritual needs of the crew." - alt_titles = list(JOB_ALT_COUNSELOR = /datum/alt_title/counselor) + alt_titles = list(JOB_ALT_MISSIONARY = /datum/alt_title/missionary, JOB_ALT_PREACHER = /datum/alt_title/preacher, JOB_ALT_PRIEST = /datum/alt_title/priest, + JOB_ALT_NUN = /datum/alt_title/nun, JOB_ALT_MONK = /datum/alt_title/monk, JOB_ALT_COUNSELOR = /datum/alt_title/counselor, + JOB_ALT_GURU = /datum/alt_title/guru) // Chaplain Alt Titles /datum/alt_title/counselor title = JOB_ALT_COUNSELOR title_blurb = "The " + JOB_ALT_COUNSELOR + " attends to the emotional needs of the crew, without a specific medicinal or spiritual focus." +/datum/alt_title/guru + title = JOB_ALT_GURU + title_blurb = "The " + JOB_ALT_GURU + " primarily tries to offer spiritual guidance to those who come seeking it." + +/datum/alt_title/missionary + title = JOB_ALT_MISSIONARY + +/datum/alt_title/preacher + title = JOB_ALT_PREACHER + +/datum/alt_title/priest + title = JOB_ALT_PRIEST + +/datum/alt_title/nun + title = JOB_ALT_NUN + +/datum/alt_title/monk + title = JOB_ALT_MONK + /datum/job/chaplain/equip(var/mob/living/carbon/human/H, var/alt_title, var/ask_questions = TRUE) . = ..() if(!.) diff --git a/code/game/jobs/job/civilian_vr.dm b/code/game/jobs/job/civilian_vr.dm deleted file mode 100644 index bd4093e4033..00000000000 --- a/code/game/jobs/job/civilian_vr.dm +++ /dev/null @@ -1,426 +0,0 @@ -/datum/job/bartender - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_BARKEEPR = /datum/alt_title/barkeeper, JOB_ALT_BARMAID = /datum/alt_title/barmaid, JOB_ALT_BARISTA = /datum/alt_title/barista, JOB_ALT_MIXOLOGIST = /datum/alt_title/mixologist) - -/datum/alt_title/barkeeper - title = JOB_ALT_BARKEEPR - -/datum/alt_title/barmaid - title = JOB_ALT_BARMAID - -/datum/alt_title/mixologist - title = JOB_ALT_MIXOLOGIST - - -/datum/job/chef - total_positions = 2 //IT TAKES A LOT TO MAKE A STEW - spawn_positions = 2 //A PINCH OF SALT AND LAUGHTER, TOO - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_SOUSCHEF = /datum/alt_title/souschef, JOB_ALT_COOK = /datum/alt_title/cook, JOB_ALT_KITCHEN_WORKER = /datum/alt_title/kitchen_worker) - -/datum/alt_title/souschef - title = JOB_ALT_SOUSCHEF - -/datum/alt_title/kitchen_worker - title = JOB_ALT_KITCHEN_WORKER - title_blurb = "A " + JOB_ALT_KITCHEN_WORKER + " has the same duties, though they may be less experienced." - - -/datum/job/hydro - spawn_positions = 2 - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_HYDROPONICIST = /datum/alt_title/hydroponicist, JOB_ALT_CULTIVATOR = /datum/alt_title/cultivator, JOB_ALT_FARMER = /datum/alt_title/farmer, - JOB_ALT_GARDENER = /datum/alt_title/gardener, JOB_ALT_FLORIST = /datum/alt_title/florsit, JOB_ALT_RANCHER = /datum/alt_title/rancher) - -/datum/alt_title/hydroponicist - title = JOB_ALT_HYDROPONICIST - -/datum/alt_title/cultivator - title = JOB_ALT_CULTIVATOR - -/datum/alt_title/farmer - title = JOB_ALT_FARMER - -/datum/alt_title/florsit - title = JOB_ALT_FLORIST - title_blurb = "A " + JOB_ALT_FLORIST + " may be less professional than their counterparts, and are more likely to tend to the public gardens if they aren't needed elsewhere." - -/datum/alt_title/rancher - title = JOB_ALT_RANCHER - title_blurb = "A " + JOB_ALT_RANCHER + " is tasked with the care, feeding, raising, and harvesting of livestock." - - -/datum/job/qm - pto_type = PTO_CARGO - dept_time_required = 20 - alt_titles = list(JOB_ALT_SUPPLY_CHIEF = /datum/alt_title/supply_chief, JOB_ALT_LOGISTICS_MANAGER = /datum/alt_title/logistics_manager, JOB_ALT_CARGO_SUPERVISOR = /datum/alt_title/cargo_supervisor) - -/datum/alt_title/logistics_manager - title = JOB_ALT_LOGISTICS_MANAGER - -/datum/alt_title/cargo_supervisor - title = JOB_ALT_CARGO_SUPERVISOR - -/datum/job/qm/get_request_reasons() - return list("Training crew") - - -/datum/job/cargo_tech - total_positions = 3 - spawn_positions = 3 - pto_type = PTO_CARGO - alt_titles = list(JOB_ALT_CARGO_LOADER = /datum/alt_title/cargo_loader, JOB_ALT_CARGO_HANDLER = /datum/alt_title/cargo_handler, JOB_ALT_SUPPLY_COURIER = /datum/alt_title/supply_courier, - JOB_ALT_DISPOSALS_SORTER = /datum/alt_title/disposal_sorter) - -/datum/alt_title/supply_courier - title = JOB_ALT_SUPPLY_COURIER - title_blurb = "A " + JOB_ALT_SUPPLY_COURIER + " is usually tasked with delivering packages or cargo directly to whoever requires it." - -/datum/alt_title/cargo_loader - title = JOB_ALT_CARGO_LOADER - title_blurb = "A " + JOB_ALT_CARGO_LOADER + " is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle." - -/datum/alt_title/cargo_handler - title = JOB_ALT_CARGO_HANDLER - title_blurb = "A " + JOB_ALT_CARGO_HANDLER + " is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle." - -/datum/alt_title/disposal_sorter - title = JOB_ALT_DISPOSALS_SORTER - title_blurb = "A " + JOB_ALT_DISPOSALS_SORTER + " is usually tasked with operating disposals delivery system, sorting the trash and tagging parcels for delivery." - - -/datum/job/mining - total_positions = 4 - spawn_positions = 4 - pto_type = PTO_CARGO - alt_titles = list(JOB_ALT_DEEP_SPACE_MINER = /datum/alt_title/deep_space_miner, JOB_ALT_DRILL_TECHNICIAN = /datum/alt_title/drill_tech, JOB_ALT_PROSPECTOR = /datum/alt_title/prospector, - JOB_ALT_EXCAVATOR = /datum/alt_title/excavator) - -/datum/alt_title/deep_space_miner - title = JOB_ALT_DEEP_SPACE_MINER - title_blurb = "A " + JOB_ALT_DEEP_SPACE_MINER + " specializes primarily in mining operations in zero-g environments, mostly in asteroid and debris fields." - -/datum/alt_title/prospector - title = JOB_ALT_PROSPECTOR - -/datum/alt_title/excavator - title = JOB_ALT_EXCAVATOR - -/datum/job/mining/get_request_reasons() - return list("Assembling expedition team") - - -/datum/job/janitor //Lots of janitor substations on station. - total_positions = 3 - spawn_positions = 3 - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_CUSTODIAN = /datum/alt_title/custodian, JOB_ALT_SANITATION_TECHNICIAN = /datum/alt_title/sanitation_tech, - JOB_ALT_MAID = /datum/alt_title/maid, JOB_ALT_GARBAGE_COLLECTOR = /datum/alt_title/garbage_collector) - -/datum/alt_title/sanitation_tech - title = JOB_ALT_SANITATION_TECHNICIAN - -/datum/alt_title/maid - title = JOB_ALT_MAID - -/datum/alt_title/garbage_collector - title = JOB_ALT_GARBAGE_COLLECTOR - title_blurb = "A " + JOB_ALT_GARBAGE_COLLECTOR + " keeps the station clean, though focuses moreso on collecting larger trash, with wet cleaning being secondary task." - - -/datum/job/librarian - total_positions = 2 - spawn_positions = 2 - alt_titles = list(JOB_ALT_JOURNALIST = /datum/alt_title/journalist, JOB_ALT_REPORTER = /datum/alt_title/reporter, JOB_ALT_WRITER = /datum/alt_title/writer, - JOB_ALT_HISTORIAN = /datum/alt_title/historian, JOB_ALT_ARCHIVIST = /datum/alt_title/archivist, JOB_ALT_PROFESSOR = /datum/alt_title/professor, - JOB_ALT_ACADEMIC = /datum/alt_title/academic, JOB_ALT_PHILOSOPHER = /datum/alt_title/philosopher, JOB_ALT_CURATOR = /datum/alt_title/curator) - pto_type = PTO_CIVILIAN - -/datum/alt_title/reporter - title = JOB_ALT_REPORTER - title_blurb = "The " + JOB_ALT_REPORTER + " uses the Library as a base of operations, from which they can report the news and goings-on on the station with their camera." - -/datum/alt_title/historian - title = JOB_ALT_HISTORIAN - title_blurb = "The " + JOB_ALT_HISTORIAN + " uses the Library as a base of operation to record any important events occurring on station." - -/datum/alt_title/archivist - title = JOB_ALT_ARCHIVIST - title_blurb = "The " + JOB_ALT_ARCHIVIST + " uses the Library as a base of operation to record any important events occurring on station." - -/datum/alt_title/professor - title = JOB_ALT_PROFESSOR - title_blurb = "The " + JOB_ALT_PROFESSOR + " uses the Library as a base of operations to share their vast knowledge with the crew." - -/datum/alt_title/academic - title = JOB_ALT_ACADEMIC - title_blurb = "The " + JOB_ALT_ACADEMIC + " uses the Library as a base of operations to share their vast knowledge with the crew." - -/datum/alt_title/philosopher - title = JOB_ALT_PHILOSOPHER - title_blurb = "The " + JOB_ALT_PHILOSOPHER + " uses the Library as a base of operation to ruminate on nature of life and other great questions, and share their opinions with the crew." - -/datum/alt_title/curator - title = JOB_ALT_CURATOR - title_blurb = "The " + JOB_ALT_CURATOR + " uses the Library as a base of operation to gather the finest of art for display and preservation." - -/datum/job/lawyer - disallow_jobhop = TRUE - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_INTERNAL_AFFAIRS_LIAISON = /datum/alt_title/ia_liaison, JOB_ALT_INTERNAL_AFFAIRS_DELEGATE = /datum/alt_title/ia_delegate, - JOB_ALT_INTERNAL_AFFAIRS_INVESTIGATOR = /datum/alt_title/ia_investigator) - -/datum/alt_title/ia_liaison - title = JOB_ALT_INTERNAL_AFFAIRS_LIAISON - -/datum/alt_title/ia_delegate - title = JOB_ALT_INTERNAL_AFFAIRS_DELEGATE - -/datum/alt_title/ia_investigator - title = JOB_ALT_INTERNAL_AFFAIRS_INVESTIGATOR - - -/datum/job/chaplain - pto_type = PTO_CIVILIAN - alt_titles = list(JOB_ALT_MISSIONARY = /datum/alt_title/missionary, JOB_ALT_PREACHER = /datum/alt_title/preacher, JOB_ALT_PRIEST = /datum/alt_title/priest, - JOB_ALT_NUN = /datum/alt_title/nun, JOB_ALT_MONK = /datum/alt_title/monk, JOB_ALT_COUNSELOR = /datum/alt_title/counselor, - JOB_ALT_GURU = /datum/alt_title/guru) - -/datum/alt_title/guru - title = JOB_ALT_GURU - title_blurb = "The " + JOB_ALT_GURU + " primarily tries to offer spiritual guidance to those who come seeking it." - -/datum/alt_title/missionary - title = JOB_ALT_MISSIONARY - -/datum/alt_title/preacher - title = JOB_ALT_PREACHER - -/datum/alt_title/priest - title = JOB_ALT_PRIEST - -/datum/alt_title/nun - title = JOB_ALT_NUN - -/datum/alt_title/monk - title = JOB_ALT_MONK - - -////////////////////////////////// -// Pilot -////////////////////////////////// - -/datum/job/pilot - title = JOB_PILOT - flag = PILOT - departments = list(DEPARTMENT_CIVILIAN) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 - supervisors = "the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#515151" - economic_modifier = 5 - minimal_player_age = 3 - pto_type = PTO_CIVILIAN - access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot) - minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot) - outfit_type = /decl/hierarchy/outfit/job/pilot - job_description = "A " + JOB_PILOT + " flies the various shuttles in the Virgo-Erigone System." - alt_titles = list(JOB_ALT_COPILOT = /datum/alt_title/co_pilot, JOB_ALT_NAVIGATOR = /datum/alt_title/navigator, JOB_ALT_HELMSMAN = /datum/alt_title/helmsman) - -/datum/alt_title/co_pilot - title = JOB_ALT_COPILOT - title_blurb = "A Co-" + JOB_ALT_COPILOT + " is there primarily to assist main pilot as well as learn from them" - -/datum/alt_title/navigator - title = JOB_ALT_NAVIGATOR - -/datum/alt_title/helmsman - title = JOB_ALT_HELMSMAN - -/datum/job/pilot/get_request_reasons() - return list("Assembling expedition team") - -////////////////////////////////// -// Entertainer -////////////////////////////////// - -/datum/job/entertainer - title = JOB_ENTERTAINER - flag = ENTERTAINER - departments = list(DEPARTMENT_CIVILIAN) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 4 - spawn_positions = 4 - supervisors = "the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#515151" - access = list(access_entertainment) - minimal_access = list(access_entertainment) - pto_type = PTO_CIVILIAN - - outfit_type = /decl/hierarchy/outfit/job/assistant/entertainer - job_description = "An " + JOB_ENTERTAINER + " does just that, entertains! Put on plays, play music, sing songs, tell stories, or read your favorite fanfic." - alt_titles = list(JOB_ALT_PERFORMER = /datum/alt_title/performer, JOB_ALT_MUSICIAN = /datum/alt_title/musician, JOB_ALT_STAGEHAND = /datum/alt_title/stagehand, - JOB_ALT_ACTOR = /datum/alt_title/actor, JOB_ALT_DANCER = /datum/alt_title/dancer, JOB_ALT_SINGER = /datum/alt_title/singer, - JOB_ALT_MAGICIAN = /datum/alt_title/magician, JOB_ALT_COMEDIAN = /datum/alt_title/comedian, JOB_ALT_ARTIST = /datum/alt_title/tragedian, - JOB_ALT_ARTIST = /datum/alt_title/artist, JOB_ALT_GAME_MASTER = /datum/alt_title/game_master) - -// Entertainer Alt Titles -/datum/alt_title/actor - title = JOB_ALT_ACTOR - title_blurb = "An " + JOB_ALT_ACTOR + " is someone who acts out a role! Whatever sort of character it is, get into it and impress people with power of comedy and tragedy!" - -/datum/alt_title/performer - title = JOB_ALT_PERFORMER - title_blurb = "A " + JOB_ALT_PERFORMER + " is someone who performs! Whatever sort of performance will come to your mind, the world's a stage!" - -/datum/alt_title/musician - title = JOB_ALT_MUSICIAN - title_blurb = "A " + JOB_ALT_MUSICIAN + " is someone who makes music with a wide variety of musical instruments!" - -/datum/alt_title/stagehand - title = JOB_ALT_STAGEHAND - title_blurb = "A " + JOB_ALT_STAGEHAND + " typically performs everything the rest of the entertainers don't. Operate lights, shutters, windows, or narrate through your voicebox!" - -/datum/alt_title/dancer - title = JOB_ALT_DANCER - title_blurb = "A " + JOB_ALT_DANCER + " is someone who impresses people through power of their own body! From waltz to breakdance, as long as crowd as cheering!" - -/datum/alt_title/singer - title = JOB_ALT_SINGER - title_blurb = "A " + JOB_ALT_SINGER + " is someone with gift of melodious voice! Impress people with your vocal range!" - -/datum/alt_title/magician - title = JOB_ALT_MAGICIAN - title_blurb = "A " + JOB_ALT_MAGICIAN + " is someone who awes those around them with impossible! Show off your repertoire of magic tricks, while keeping the secret hidden!" - -/datum/alt_title/comedian - title = JOB_ALT_COMEDIAN - title_blurb = "A " + JOB_ALT_COMEDIAN + " will focus on making people laugh with the power of wit! Telling jokes, stand-up comedy, you are here to make others smile!" - -/datum/alt_title/tragedian - title = JOB_ALT_ARTIST - title_blurb = "A " + JOB_ALT_ARTIST + " will focus on making people think about life and world around them! Life is a tragedy, and who's better to convey its emotions than you?" - -/datum/alt_title/artist - title = JOB_ALT_ARTIST - title_blurb = "An " + JOB_ALT_ARTIST + "'s calling is to create beautiful arts! Whatever form may they take, create and have people astonished with your creativity." - -/datum/alt_title/game_master - title = JOB_ALT_GAME_MASTER - title_blurb = "A " + JOB_ALT_GAME_MASTER + " provides recreation for the crew by hosting variety of games. From cards to roleplaying to something more personalized." - -////////////////////////////////// -// Entrepreneur -////////////////////////////////// - -/datum/job/entrepreneur - title = JOB_ENTREPRENEUR - flag = ENTREPRENEUR - departments = list(DEPARTMENT_CIVILIAN) - department_flag = CIVILIAN - faction = FACTION_STATION - total_positions = 4 - spawn_positions = 4 - supervisors = "the " + JOB_HEAD_OF_PERSONNEL - selection_color = "#515151" - access = list() - minimal_access = list() - pto_type = PTO_CIVILIAN - - outfit_type = /decl/hierarchy/outfit/job/assistant/entrepreneur - job_description = "An " + JOB_ENTREPRENEUR + " is basically a visitor that obtained special permission to offer personal services to people on station. \ - They will offer people these services and, potentially, even demand payment!" - alt_titles = list(JOB_ALT_LAWYER = /datum/alt_title/lawyer, JOB_ALT_PRIVATE_EYE = /datum/alt_title/private_eye, JOB_ALT_BODYGUARD = /datum/alt_title/bodyguard, - JOB_ALT_PERSONAL_PHYSICIAN = /datum/alt_title/personal_physician, JOB_ALT_DENTIST = /datum/alt_title/dentist, JOB_ALT_FITNESS_INSTRUCTOR = /datum/alt_title/fitness_instructor, - JOB_ALT_YOGA_TEACHER = /datum/alt_title/yoga_teacher, JOB_ALT_MASSEUSE = /datum/alt_title/masseuse, JOB_ALT_TRADESPERSON = /datum/alt_title/tradesperson, - JOB_ALT_STREAMER = /datum/alt_title/streamer, JOB_ALT_INFLUENCER = /datum/alt_title/influencer, JOB_ALT_PARANORMAL_INVESTIGATOR = /datum/alt_title/paranormal_investigator, - JOB_ALT_PERSONAL_SECRETARY = /datum/alt_title/personal_secretary, JOB_ALT_STYLIST = /datum/alt_title/stylist, JOB_ALT_FISHER = /datum/alt_title/fisher, - JOB_ALT_FORTUNE_TELLER = /datum/alt_title/fortune_teller, JOB_ALT_SPIRIT_HEALER = /datum/alt_title/spirit_healer) - -/datum/alt_title/lawyer - title = JOB_ALT_LAWYER - title_blurb = "A " + JOB_ALT_LAWYER + " is knowledgable in various legal systems, including station's operations. They can try to offer their legal counsel, although nobody is really obliged to listen." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_secretary - -/datum/alt_title/private_eye - title = JOB_ALT_PRIVATE_EYE - title_blurb = "A " + JOB_ALT_PRIVATE_EYE + " is a detective that has no credentials or equipment. But if someone wants something found without security's knowledge, they are the one to go to." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/private_eye - -/datum/alt_title/bodyguard - title = JOB_ALT_BODYGUARD - title_blurb = "A " + JOB_ALT_BODYGUARD + " offers service of personal protection. They may not be allowed any weapons, but their own body is weapon enough." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/bodyguard - -/datum/alt_title/personal_physician - title = JOB_ALT_PERSONAL_PHYSICIAN - title_blurb = "A " + JOB_ALT_PERSONAL_PHYSICIAN + " is a doctor dedicated less to Hippocratic Oath and more to the moneymaking grind. Their license may be expired, but the grindset never will be." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_physician - -/datum/alt_title/dentist - title = JOB_ALT_DENTIST - title_blurb = "A " + JOB_ALT_DENTIST + " is a doctor that specializes in oral care. Company may not recognize them as a proper doctor, but surely their customers will." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/dentist - -/datum/alt_title/fitness_instructor - title = JOB_ALT_FITNESS_INSTRUCTOR - title_blurb = "A " + JOB_ALT_FITNESS_INSTRUCTOR + " dedicates themselves to improving the health of the crew through physical activity, and boy, do they need the help." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fitness_instructor - -/datum/alt_title/yoga_teacher - title = JOB_ALT_YOGA_TEACHER - title_blurb = "A " + JOB_ALT_YOGA_TEACHER + " is similar to a fitness instructor, but rather than turning the round bodies into firm ones, they focus on helping people find balance and harmony." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/yoga_teacher - -/datum/alt_title/masseuse - title = JOB_ALT_MASSEUSE - title_blurb = "A " + JOB_ALT_MASSEUSE + " is master of physical therapy and working others' bodies with their hands." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/masseuse - -/datum/alt_title/tradesperson - title = JOB_ALT_TRADESPERSON - title_blurb = "A " + JOB_ALT_TRADESPERSON + " is someone attempting to make money via the most obvious act of all - buying and selling. Now if only customs allowed you to bring your goods along..." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/tradesperson - -/datum/alt_title/streamer - title = JOB_ALT_STREAMER - title_blurb = "A " + JOB_ALT_STREAMER + " is here to entertain. Not the crew! Their audience across exonet!" - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/streamer - -/datum/alt_title/influencer - title = JOB_ALT_INFLUENCER - title_blurb = "An " + JOB_ALT_INFLUENCER + " has lucked out with some exonet following, and was given permission to go onstation to provide free exposure. Don't let it go to your head." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/influencer - -/datum/alt_title/paranormal_investigator - title = JOB_ALT_PARANORMAL_INVESTIGATOR - title_blurb = "A " + JOB_ALT_PARANORMAL_INVESTIGATOR + " looks beyond what is accepted by modern science, and searches for the true unknown. Aliens, alternate dimensions, ghosts... The truth is out there!" - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/paranormal_investigator - -/datum/alt_title/personal_secretary - title = JOB_ALT_PERSONAL_SECRETARY - title_blurb = "A " + JOB_ALT_PERSONAL_SECRETARY + " offers services of general assistance. Although it's doubtful anyone will ever actually need those." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/personal_secretary - -/datum/alt_title/stylist - title = JOB_ALT_STYLIST - title_blurb = "A " + JOB_ALT_STYLIST + " offers fashion advice, as well as helps with adjusting appearance of the crew to better suit their beauty standards." - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/stylist - -/datum/alt_title/fisher - title = JOB_ALT_FISHER - title_blurb = "A " + JOB_ALT_FISHER + " is a capable angler, who is good at obtaining large amounts of marine goods. Whether you generously give them to station or attempt to make a quick thaler by selling, it's up to you!" - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fisher - -/datum/alt_title/fortune_teller - title = JOB_ALT_FORTUNE_TELLER - title_blurb = "A " + JOB_ALT_FORTUNE_TELLER + " peers into the future, and offers these visions to others. Occasionally those visions may even come true!" - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/fortune_teller - -/datum/alt_title/spirit_healer - title = JOB_ALT_SPIRIT_HEALER - title_blurb = "A " + JOB_ALT_SPIRIT_HEALER + " offers alternative forms of medicine. Rituals, magic rocks, seances... It totally works. What's that about placebo?" - title_outfit = /decl/hierarchy/outfit/job/assistant/entrepreneur/spirit_healer diff --git a/code/game/jobs/job/department.dm b/code/game/jobs/job/department.dm index 47d6de97ad1..87ad819e242 100644 --- a/code/game/jobs/job/department.dm +++ b/code/game/jobs/job/department.dm @@ -60,7 +60,7 @@ name = "Miscellaneous" short_name = "Misc" color = "#666666" - sorting_order = 0 + sorting_order = -5 assignable = FALSE /datum/department/synthetic diff --git a/code/game/jobs/job/department_vr.dm b/code/game/jobs/job/department_vr.dm deleted file mode 100644 index 2af1d8e94fe..00000000000 --- a/code/game/jobs/job/department_vr.dm +++ /dev/null @@ -1,6 +0,0 @@ -/datum/department/misc - name = "Off-Duty" - short_name = "Offduty" - color = "#666666" - sorting_order = -5 - assignable = FALSE \ No newline at end of file diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 576739d659b..ed05478e97d 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -22,15 +22,20 @@ ideal_age_by_species = list(SPECIES_UNATHI = 140, "mechanical" = 20, SPECIES_HUMAN_VATBORN = 20) banned_job_species = list(SPECIES_TESHARI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "digital") + disallow_jobhop = TRUE + pto_type = PTO_ENGINEERING + dept_time_required = 60 access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, - access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, - access_heads, access_construction, access_sec_doors, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload) + access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, + access_heads, access_construction, + access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) + minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, - access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, - access_heads, access_construction, access_sec_doors, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload) + access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, + access_heads, access_construction, + access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) + alt_titles = list(JOB_ALT_HEAD_ENGINEER = /datum/alt_title/head_engineer, JOB_ALT_FOREMAN = /datum/alt_title/foreman, JOB_ALT_MAINTENANCE_MANAGER = /datum/alt_title/maintenance_manager) minimal_player_age = 7 outfit_type = /decl/hierarchy/outfit/job/engineering/chief_engineer @@ -38,6 +43,18 @@ of manpower as much as they handle hands-on operations and repairs. They are also expected to keep the rest of the station informed of \ any structural threats to the station that may be hazardous to health or disruptive to work." +/datum/job/chief_engineer/get_request_reasons() + return list("Engine setup", "Construction project", "Repairs necessary", "Training crew", "Assembling expedition team") + +/datum/alt_title/head_engineer + title = JOB_ALT_HEAD_ENGINEER + +/datum/alt_title/foreman + title = JOB_ALT_FOREMAN + +/datum/alt_title/maintenance_manager + title = JOB_ALT_MAINTENANCE_MANAGER + ////////////////////////////////// // Engineer ////////////////////////////////// @@ -52,10 +69,12 @@ supervisors = "the "+ JOB_CHIEF_ENGINEER selection_color = "#5B4D20" economic_modifier = 5 + pto_type = PTO_ENGINEERING + access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics) minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction) - alt_titles = list(JOB_ALT_MAINTENANCE_TECHNICIAN = /datum/alt_title/maint_tech, - JOB_ALT_ENGINE_TECHNICIAN = /datum/alt_title/engine_tech, JOB_ALT_ELECTRICIAN = /datum/alt_title/electrician) + alt_titles = list(JOB_ALT_MAINTENANCE_TECHNICIAN = /datum/alt_title/maint_tech, JOB_ALT_ENGINE_TECHNICIAN = /datum/alt_title/engine_tech, + JOB_ALT_ELECTRICIAN = /datum/alt_title/electrician, JOB_ALT_CONSTRUCTION_ENGINEER = /datum/alt_title/construction_engi, JOB_ALT_ENGINEERING_CONTRACTOR = /datum/alt_title/engineering_contractor, JOB_ALT_COMPUTER_TECHNICIAN = /datum/alt_title/computer_tech, JOB_ALT_SALVAGE_TECHNICIAN = /datum/alt_title/salvage_tech) minimal_player_age = 3 min_age_by_species = list(SPECIES_PROMETHEAN = 2) @@ -64,6 +83,9 @@ job_description = "An " + JOB_ENGINEER + " keeps the station running. They repair damages, keep the atmosphere stable, and ensure that power is being \ generated and distributed. On quiet shifts, they may be called upon to make cosmetic alterations to the station." +/datum/job/engineer/get_request_reasons() + return list("Engine setup", "Construction project", "Repairs necessary", "Assembling expedition team") + // Engineer Alt Titles /datum/alt_title/maint_tech title = JOB_ALT_MAINTENANCE_TECHNICIAN @@ -80,6 +102,23 @@ title_blurb = "An " + JOB_ALT_ELECTRICIAN + "'s primary duty is making sure power is properly distributed thoughout the station, utilizing solars, substations, and other \ methods to ensure every department has power in an emergency." +/datum/alt_title/construction_engi + title = JOB_ALT_CONSTRUCTION_ENGINEER + title_blurb = "A " + JOB_ALT_CONSTRUCTION_ENGINEER + " fulfills similar duties to other engineers, but usually occupies spare time with construction of extra facilities in dedicated areas or \ + as additions to station layout." + +/datum/alt_title/engineering_contractor + title = JOB_ALT_ENGINEERING_CONTRACTOR + title_blurb = "An " + JOB_ALT_ENGINEERING_CONTRACTOR + " fulfills similar duties to other engineers, but isn't directly employed by NT proper." + +/datum/alt_title/computer_tech + title = JOB_ALT_COMPUTER_TECHNICIAN + title_blurb = "A " + JOB_ALT_COMPUTER_TECHNICIAN + " fulfills similar duties to other engineers, but specializes in working with software and computers. They also often deal with integrated circuits." + +/datum/alt_title/salvage_tech + title = JOB_ALT_SALVAGE_TECHNICIAN + title_blurb = "A " + JOB_ALT_SALVAGE_TECHNICIAN + " is responsible for breaking down debris and obsolete equipment to recover useful components and materials." + ////////////////////////////////// // Atmos Tech ////////////////////////////////// @@ -90,16 +129,36 @@ department_flag = ENGSEC faction = FACTION_STATION total_positions = 3 - spawn_positions = 2 + spawn_positions = 3 + pto_type = PTO_ENGINEERING supervisors = "the " + JOB_CHIEF_ENGINEER selection_color = "#5B4D20" economic_modifier = 5 access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_external_airlocks) minimal_access = list(access_eva, access_engine, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks) + alt_titles = list(JOB_ALT_ATMOSPHERIC_ENGINEER = /datum/alt_title/atmos_engi, JOB_ALT_ATMOSPHERIC_MAINTAINER = /datum/alt_title/atmos_maint, JOB_ALT_DISPOSALS_TECHNICIAN = /datum/alt_title/disposals_tech, + JOB_ALT_FUEL_TECHNICIAN = /datum/alt_title/refuel_tech) + minimal_player_age = 3 min_age_by_species = list(SPECIES_PROMETHEAN = 2) outfit_type = /decl/hierarchy/outfit/job/engineering/atmos job_description = "An " + JOB_ATMOSPHERIC_TECHNICIAN + " is primarily concerned with keeping the station's atmosphere breathable. They are expected to have a good \ understanding of the pipes, vents, and scrubbers that move gasses around the station, and to be familiar with proper firefighting procedure." + +/datum/job/atmos/get_request_reasons() + return list("Construction project", "Repairs necessary", "Assembling expedition team") + +/datum/alt_title/refuel_tech + title = JOB_ALT_FUEL_TECHNICIAN + +/datum/alt_title/atmos_maint + title = JOB_ALT_ATMOSPHERIC_MAINTAINER + +/datum/alt_title/atmos_engi + title = JOB_ALT_ATMOSPHERIC_ENGINEER + +/datum/alt_title/disposals_tech + title = JOB_ALT_DISPOSALS_TECHNICIAN + title_blurb = "A " + JOB_ALT_DISPOSALS_TECHNICIAN + " is an " + JOB_ATMOSPHERIC_TECHNICIAN + " still and can fulfill all the same duties, although specializes more in disposals delivery system's operations and configurations." diff --git a/code/game/jobs/job/engineering_vr.dm b/code/game/jobs/job/engineering_vr.dm deleted file mode 100644 index 17b70731dbd..00000000000 --- a/code/game/jobs/job/engineering_vr.dm +++ /dev/null @@ -1,71 +0,0 @@ -/datum/job/chief_engineer - disallow_jobhop = TRUE - pto_type = PTO_ENGINEERING - dept_time_required = 60 - - access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, - access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, - access_heads, access_construction, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) - - minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, - access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, - access_heads, access_construction, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) - alt_titles = list(JOB_ALT_HEAD_ENGINEER = /datum/alt_title/head_engineer, JOB_ALT_FOREMAN = /datum/alt_title/foreman, JOB_ALT_MAINTENANCE_MANAGER = /datum/alt_title/maintenance_manager) - -/datum/alt_title/head_engineer - title = JOB_ALT_HEAD_ENGINEER - -/datum/alt_title/foreman - title = JOB_ALT_FOREMAN - -/datum/alt_title/maintenance_manager - title = JOB_ALT_MAINTENANCE_MANAGER - -/datum/job/chief_engineer/get_request_reasons() - return list("Engine setup", "Construction project", "Repairs necessary", "Training crew", "Assembling expedition team") - - -/datum/job/engineer - pto_type = PTO_ENGINEERING - alt_titles = list(JOB_ALT_MAINTENANCE_TECHNICIAN = /datum/alt_title/maint_tech, JOB_ALT_ENGINE_TECHNICIAN = /datum/alt_title/engine_tech, - JOB_ALT_ELECTRICIAN = /datum/alt_title/electrician, JOB_ALT_CONSTRUCTION_ENGINEER = /datum/alt_title/construction_engi, JOB_ALT_ENGINEERING_CONTRACTOR = /datum/alt_title/engineering_contractor, JOB_ALT_COMPUTER_TECHNICIAN = /datum/alt_title/computer_tech) - -/datum/alt_title/construction_engi - title = JOB_ALT_CONSTRUCTION_ENGINEER - title_blurb = "A " + JOB_ALT_CONSTRUCTION_ENGINEER + " fulfills similar duties to other engineers, but usually occupies spare time with construction of extra facilities in dedicated areas or \ - as additions to station layout." - -/datum/alt_title/engineering_contractor - title = JOB_ALT_ENGINEERING_CONTRACTOR - title_blurb = "An " + JOB_ALT_ENGINEERING_CONTRACTOR + " fulfills similar duties to other engineers, but isn't directly employed by NT proper." - -/datum/job/engineer/get_request_reasons() - return list("Engine setup", "Construction project", "Repairs necessary", "Assembling expedition team") - -/datum/alt_title/computer_tech - title = JOB_ALT_COMPUTER_TECHNICIAN - title_blurb = "A " + JOB_ALT_COMPUTER_TECHNICIAN + " fulfills similar duties to other engineers, but specializes in working with software and computers. They also often deal with integrated circuits." - -/datum/job/atmos - spawn_positions = 3 - pto_type = PTO_ENGINEERING - alt_titles = list(JOB_ALT_ATMOSPHERIC_ENGINEER = /datum/alt_title/atmos_engi, JOB_ALT_ATMOSPHERIC_MAINTAINER = /datum/alt_title/atmos_maint, JOB_ALT_DISPOSALS_TECHNICIAN = /datum/alt_title/disposals_tech, - JOB_ALT_FUEL_TECHNICIAN = /datum/alt_title/refuel_tech) - -/datum/alt_title/atmos_maint - title = JOB_ALT_ATMOSPHERIC_MAINTAINER - -/datum/alt_title/atmos_engi - title = JOB_ALT_ATMOSPHERIC_ENGINEER - -/datum/alt_title/disposals_tech - title = JOB_ALT_DISPOSALS_TECHNICIAN - title_blurb = "A " + JOB_ALT_DISPOSALS_TECHNICIAN + " is an " + JOB_ATMOSPHERIC_TECHNICIAN + " still and can fulfill all the same duties, although specializes more in disposals delivery system's operations and configurations." - -/datum/alt_title/refuel_tech - title = JOB_ALT_FUEL_TECHNICIAN - -/datum/job/atmos/get_request_reasons() - return list("Construction project", "Repairs necessary", "Assembling expedition team") diff --git a/code/game/jobs/job/exploration_vr.dm b/code/game/jobs/job/exploration.dm similarity index 100% rename from code/game/jobs/job/exploration_vr.dm rename to code/game/jobs/job/exploration.dm diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index b191d670722..d01d60e4be9 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -39,6 +39,29 @@ // Description of the job's role and minimum responsibilities. var/job_description = "This Job doesn't have a description! Please report it!" + //Requires a ckey to be whitelisted in jobwhitelist.txt + var/whitelist_only = 0 + + //Does not display this job on the occupation setup screen + var/latejoin_only = 0 + + //Every hour playing this role gains this much time off. (Can be negative for off duty jobs!) + var/timeoff_factor = 3 + + //What type of PTO is that job earning? + var/pto_type + + //Disallow joining as this job midround from off-duty position via going on-duty + var/disallow_jobhop = FALSE + + //Time required in the department as other jobs before playing this one (in hours) + var/dept_time_required = 0 + + //Do we forbid ourselves from earning PTO? + var/playtime_only = FALSE + + var/requestable = TRUE + /datum/job/New() . = ..() department_accounts = department_accounts || departments_managed @@ -184,3 +207,47 @@ if(brain_type in banned_job_species) return TRUE */ + + +// Check client-specific availability rules. +/datum/job/proc/player_has_enough_pto(client/C) + return timeoff_factor >= 0 || (C && LAZYACCESS(C.department_hours, pto_type) > 0) + +/datum/job/proc/player_has_enough_playtime(client/C) + return (available_in_playhours(C) == 0) + +/datum/job/proc/available_in_playhours(client/C) + if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) + if(isnum(C.play_hours[pto_type])) // Has played that department before + return max(0, dept_time_required - C.play_hours[pto_type]) + else // List doesn't have that entry, maybe never played, maybe invalid PTO type (you should fix that...) + return dept_time_required // Could be 0, too, which is fine! They can play that + return 0 + +// Special treatment for some the more complicated heads + +// Captain gets every department combined +/datum/job/captain/available_in_playhours(client/C) + if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) + var/remaining_time_needed = dept_time_required + for(var/key in C.play_hours) + if(isnum(C.play_hours[key]) && !(key == PTO_TALON)) + remaining_time_needed = max(0, remaining_time_needed - C.play_hours[key]) + return remaining_time_needed + return 0 + +// HoP gets civilian, cargo, and exploration combined +/datum/job/hop/available_in_playhours(client/C) + if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) + var/remaining_time_needed = dept_time_required + if(isnum(C.play_hours[PTO_CIVILIAN])) + remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_CIVILIAN]) + if(isnum(C.play_hours[PTO_CARGO])) + remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_CARGO]) + if(isnum(C.play_hours[PTO_EXPLORATION])) + remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_EXPLORATION]) + return remaining_time_needed + return 0 + +/datum/job/proc/get_request_reasons() + return list() diff --git a/code/game/jobs/job/job_vr.dm b/code/game/jobs/job/job_vr.dm deleted file mode 100644 index 3796714b5ea..00000000000 --- a/code/game/jobs/job/job_vr.dm +++ /dev/null @@ -1,66 +0,0 @@ -/datum/job - //Requires a ckey to be whitelisted in jobwhitelist.txt - var/whitelist_only = 0 - - //Does not display this job on the occupation setup screen - var/latejoin_only = 0 - - //Every hour playing this role gains this much time off. (Can be negative for off duty jobs!) - var/timeoff_factor = 3 - - //What type of PTO is that job earning? - var/pto_type - - //Disallow joining as this job midround from off-duty position via going on-duty - var/disallow_jobhop = FALSE - - //Time required in the department as other jobs before playing this one (in hours) - var/dept_time_required = 0 - - //Do we forbid ourselves from earning PTO? - var/playtime_only = FALSE - - var/requestable = TRUE - -// Check client-specific availability rules. -/datum/job/proc/player_has_enough_pto(client/C) - return timeoff_factor >= 0 || (C && LAZYACCESS(C.department_hours, pto_type) > 0) - -/datum/job/proc/player_has_enough_playtime(client/C) - return (available_in_playhours(C) == 0) - -/datum/job/proc/available_in_playhours(client/C) - if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) - if(isnum(C.play_hours[pto_type])) // Has played that department before - return max(0, dept_time_required - C.play_hours[pto_type]) - else // List doesn't have that entry, maybe never played, maybe invalid PTO type (you should fix that...) - return dept_time_required // Could be 0, too, which is fine! They can play that - return 0 - -// Special treatment for some the more complicated heads - -// Captain gets every department combined -/datum/job/captain/available_in_playhours(client/C) - if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) - var/remaining_time_needed = dept_time_required - for(var/key in C.play_hours) - if(isnum(C.play_hours[key]) && !(key == PTO_TALON)) - remaining_time_needed = max(0, remaining_time_needed - C.play_hours[key]) - return remaining_time_needed - return 0 - -// HoP gets civilian, cargo, and exploration combined -/datum/job/hop/available_in_playhours(client/C) - if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) - var/remaining_time_needed = dept_time_required - if(isnum(C.play_hours[PTO_CIVILIAN])) - remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_CIVILIAN]) - if(isnum(C.play_hours[PTO_CARGO])) - remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_CARGO]) - if(isnum(C.play_hours[PTO_EXPLORATION])) - remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_EXPLORATION]) - return remaining_time_needed - return 0 - -/datum/job/proc/get_request_reasons() - return list() diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 9298028eb96..c8a96efad98 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -16,11 +16,13 @@ req_admin_notify = 1 economic_modifier = 10 access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, - access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels) + access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, + access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) + minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, - access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels) + access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, + access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) + alt_titles = list(JOB_ALT_CHIEF_PHYSICIAN = /datum/alt_title/chief_physician, JOB_ALT_MEDICAL_DIRECTOR = /datum/alt_title/medical_director, JOB_ALT_HEALTHCARE_MANAGER = /datum/alt_title/healthcare_manager) minimum_character_age = 25 min_age_by_species = list(SPECIES_UNATHI = 70, "mechanical" = 10, SPECIES_HUMAN_VATBORN = 14) @@ -29,12 +31,28 @@ ideal_age_by_species = list(SPECIES_UNATHI = 140, "mechanical" = 20, SPECIES_HUMAN_VATBORN = 20) banned_job_species = list(SPECIES_TESHARI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "digital") + disallow_jobhop = TRUE + pto_type = PTO_MEDICAL + dept_time_required = 60 + outfit_type = /decl/hierarchy/outfit/job/medical/cmo job_description = "The CMO manages the Medical department and is a position requiring experience and skill; their goal is to ensure that their \ staff keep the station's crew healthy and whole. They are primarily interested in making sure that patients are safely found and \ transported to Medical for treatment. They are expected to keep the crew informed about threats to their health and safety, and \ about the importance of Suit Sensors." +/datum/job/cmo/get_request_reasons() + return list("Surgery pending", "Viral outbreak", "Training crew", "Assembling expedition team") + +/datum/alt_title/chief_physician + title = JOB_ALT_CHIEF_PHYSICIAN + +/datum/alt_title/medical_director + title = JOB_ALT_MEDICAL_DIRECTOR + +/datum/alt_title/healthcare_manager + title = JOB_ALT_HEALTHCARE_MANAGER + ////////////////////////////////// // Medical Doctor ////////////////////////////////// @@ -45,7 +63,8 @@ department_flag = MEDSCI faction = FACTION_STATION total_positions = 5 - spawn_positions = 3 + spawn_positions = 5 + pto_type = PTO_MEDICAL supervisors = "the " + JOB_CHIEF_MEDICAL_OFFICER selection_color = "#013D3B" economic_modifier = 7 @@ -55,14 +74,15 @@ job_description = "A " + JOB_MEDICAL_DOCTOR + " is a Jack-of-All-Trades Medical title, covering a variety of skill levels and minor specializations. They are likely \ familiar with basic first aid, and a number of accompanying medications, and can generally save, if not cure, a majority of the \ patients they encounter." - alt_titles = list( - JOB_ALT_SURGEON = /datum/alt_title/surgeon, - JOB_ALT_EMERGENCY_PHYSICIAN = /datum/alt_title/emergency_physician, - JOB_ALT_NURSE = /datum/alt_title/nurse, - JOB_ALT_VIROLOGIST = /datum/alt_title/virologist) + alt_titles = list(JOB_ALT_PHYSICIAN = /datum/alt_title/physician, JOB_ALT_MEDICAL_PRACTITIONER = /datum/alt_title/medical_practitioner, JOB_ALT_SURGEON = /datum/alt_title/surgeon, + JOB_ALT_EMERGENCY_PHYSICIAN = /datum/alt_title/emergency_physician, JOB_ALT_NURSE = /datum/alt_title/nurse, JOB_ALT_ORDERLY = /datum/alt_title/orderly, + JOB_ALT_VIROLOGIST = /datum/alt_title/virologist, JOB_ALT_MEDICAL_CONTRACTOR = /datum/alt_title/medical_contractor) min_age_by_species = list(SPECIES_PROMETHEAN = 3) +/datum/job/doctor/get_request_reasons() + return list("Surgery pending", "Viral outbreak", "Assembling expedition team") + //Medical Doctor Alt Titles /datum/alt_title/surgeon title = JOB_ALT_SURGEON @@ -90,7 +110,22 @@ to produce the various types of virus foods or mutagens." title_outfit = /decl/hierarchy/outfit/job/medical/doctor/virologist -//Chemist is a medical job damnit //YEAH FUCK YOU SCIENCE -Pete //Guys, behave -Erro +/datum/alt_title/physician + title = JOB_ALT_PHYSICIAN + +/datum/alt_title/medical_practitioner + title = JOB_ALT_MEDICAL_PRACTITIONER + +/datum/alt_title/orderly + title = JOB_ALT_ORDERLY + title_blurb = "An " + JOB_ALT_ORDERLY + " acts as Medbay's general helping hand, assisting any doctor that might need some form of help, as well as handling manual \ + and dirty labor around the department." + title_outfit = /decl/hierarchy/outfit/job/medical/doctor/nurse + +/datum/alt_title/medical_contractor + title = JOB_ALT_MEDICAL_CONTRACTOR + title_blurb = "A " + JOB_ALT_MEDICAL_CONTRACTOR + " can be anything from a full-blown doctor to the likes of a nurse or orderly, but isn't directly employed by NT proper." + ////////////////////////////////// // Chemist ////////////////////////////////// @@ -102,6 +137,7 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_MEDICAL supervisors = "the " + JOB_CHIEF_MEDICAL_OFFICER selection_color = "#013D3B" economic_modifier = 5 @@ -113,13 +149,17 @@ outfit_type = /decl/hierarchy/outfit/job/medical/chemist job_description = "A " + JOB_CHEMIST + " produces and maintains a stock of basic to advanced chemicals for medical and occasionally research use. \ They are likely to know the use and dangers of many lab-produced chemicals." - alt_titles = list(JOB_ALT_PHARMACIST = /datum/alt_title/pharmacist) + alt_titles = list(JOB_ALT_PHARMACIST = /datum/alt_title/pharmacist, JOB_ALT_PHARMACOLOGIST = /datum/alt_title/pharmacologist) // Chemist Alt Titles /datum/alt_title/pharmacist title = JOB_ALT_PHARMACIST title_blurb = "A " + JOB_ALT_PHARMACIST + " focuses on the chemical needs of the Medical Department, and often offers to fill crew prescriptions at their discretion." +/datum/alt_title/pharmacologist + title = JOB_ALT_PHARMACOLOGIST + title_blurb = "A " + JOB_ALT_PHARMACOLOGIST + " focuses on the chemical needs of the Medical Department, primarily specializing in producing more advanced forms of medicine." + /* I'm commenting out Geneticist so you can't actually see it in the job menu, given that you can't play as one - Jon. ////////////////////////////////// // Geneticist @@ -154,6 +194,7 @@ faction = FACTION_STATION total_positions = 1 spawn_positions = 1 + pto_type = PTO_MEDICAL economic_modifier = 5 supervisors = "the " + JOB_CHIEF_MEDICAL_OFFICER selection_color = "#013D3B" @@ -162,7 +203,7 @@ outfit_type = /decl/hierarchy/outfit/job/medical/psychiatrist job_description = "A " + JOB_PSYCHIATRIST + " provides mental health services to crew members in need. They may also be called upon to determine whatever \ ails the mentally unwell, frequently under Security supervision. They understand the effects of various psychoactive drugs." - alt_titles = list(JOB_ALT_PSYCHOLOGIST = /datum/alt_title/psychologist) + alt_titles = list(JOB_ALT_PSYCHOLOGIST = /datum/alt_title/psychologist, JOB_ALT_PSYCHOANALYST = /datum/alt_title/psychoanalyst, JOB_ALT_PSYCHOTHERAPIST = /datum/alt_title/psychotherapist) banned_job_species = list(SPECIES_PROMETHEAN, SPECIES_DIONA) //Psychiatrist Alt Titles @@ -172,6 +213,18 @@ called upon to determine whatever ails the mentally unwell, frequently under Security supervision." title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist +/datum/alt_title/psychoanalyst + title = JOB_ALT_PSYCHOANALYST + title_blurb = "A " + JOB_ALT_PSYCHOANALYST + " provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \ + called upon to determine whatever ails the mentally unwell, frequently under Security supervision." + title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist + +/datum/alt_title/psychotherapist + title = JOB_ALT_PSYCHOTHERAPIST + title_blurb = "A " + JOB_ALT_PSYCHOTHERAPIST + " provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \ + called upon to determine whatever ails the mentally unwell, frequently under Security supervision." + title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist + ////////////////////////////////// // Paramedic ////////////////////////////////// @@ -181,8 +234,9 @@ departments = list(DEPARTMENT_MEDICAL) department_flag = MEDSCI faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 + total_positions = 3 + spawn_positions = 3 + pto_type = PTO_MEDICAL supervisors = "the " + JOB_CHIEF_MEDICAL_OFFICER selection_color = "#013D3B" economic_modifier = 4 @@ -191,14 +245,26 @@ outfit_type = /decl/hierarchy/outfit/job/medical/paramedic job_description = "A " + JOB_PARAMEDIC + " is primarily concerned with the recovery of patients who are unable to make it to the Medical Department on their own. \ They may also be called upon to keep patients stable when Medical is busy or understaffed." - alt_titles = list(JOB_ALT_EMERGENCY_MEDICAL_TECHNICIAN = /datum/alt_title/emt) + alt_titles = list(JOB_ALT_EMERGENCY_MEDICAL_TECHNICIAN = /datum/alt_title/emt, JOB_ALT_MEDICAL_RESPONDER = /datum/alt_title/medical_responder, JOB_ALT_SEARCH_AND_RESCUE = /datum/alt_title/sar) banned_job_species = list(SPECIES_DIONA) min_age_by_species = list(SPECIES_PROMETHEAN = 2) +/datum/job/paramedic/get_request_reasons() + return list("Assembling expedition team") + // Paramedic Alt Titles /datum/alt_title/emt title = JOB_ALT_EMERGENCY_MEDICAL_TECHNICIAN title_blurb = "An " + JOB_ALT_EMERGENCY_MEDICAL_TECHNICIAN + " is primarily concerned with the recovery of patients who are unable to make it to the Medical Department on their \ own. They are capable of keeping a patient stabilized until they reach the hands of someone with more training." title_outfit = /decl/hierarchy/outfit/job/medical/paramedic/emt + +/datum/alt_title/medical_responder + title = JOB_ALT_MEDICAL_RESPONDER + title_blurb = "A " + JOB_ALT_MEDICAL_RESPONDER + " is primarily concerned with the recovery of patients who are unable to make it to the Medical Department on their \ + own. They are capable of keeping a patient stabilized until they reach the hands of someone with more training." + title_outfit = /decl/hierarchy/outfit/job/medical/paramedic/emt + +/datum/alt_title/sar + title = JOB_ALT_SEARCH_AND_RESCUE diff --git a/code/game/jobs/job/medical_vr.dm b/code/game/jobs/job/medical_vr.dm deleted file mode 100644 index 9d08fdfcf29..00000000000 --- a/code/game/jobs/job/medical_vr.dm +++ /dev/null @@ -1,97 +0,0 @@ -/datum/job/cmo - disallow_jobhop = TRUE - pto_type = PTO_MEDICAL - dept_time_required = 60 - - access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, - access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) - - minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, - access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) - alt_titles = list(JOB_ALT_CHIEF_PHYSICIAN = /datum/alt_title/chief_physician, JOB_ALT_MEDICAL_DIRECTOR = /datum/alt_title/medical_director, JOB_ALT_HEALTHCARE_MANAGER = /datum/alt_title/healthcare_manager) - -/datum/alt_title/chief_physician - title = JOB_ALT_CHIEF_PHYSICIAN - -/datum/alt_title/medical_director - title = JOB_ALT_MEDICAL_DIRECTOR - -/datum/alt_title/healthcare_manager - title = JOB_ALT_HEALTHCARE_MANAGER - -/datum/job/cmo/get_request_reasons() - return list("Surgery pending", "Viral outbreak", "Training crew", "Assembling expedition team") - - -/datum/job/doctor - spawn_positions = 5 - pto_type = PTO_MEDICAL - alt_titles = list(JOB_ALT_PHYSICIAN = /datum/alt_title/physician, JOB_ALT_MEDICAL_PRACTITIONER = /datum/alt_title/medical_practitioner, JOB_ALT_SURGEON = /datum/alt_title/surgeon, - JOB_ALT_EMERGENCY_PHYSICIAN = /datum/alt_title/emergency_physician, JOB_ALT_NURSE = /datum/alt_title/nurse, JOB_ALT_ORDERLY = /datum/alt_title/orderly, - JOB_ALT_VIROLOGIST = /datum/alt_title/virologist, JOB_ALT_MEDICAL_CONTRACTOR = /datum/alt_title/medical_contractor) - -/datum/alt_title/physician - title = JOB_ALT_PHYSICIAN - -/datum/alt_title/medical_practitioner - title = JOB_ALT_MEDICAL_PRACTITIONER - -/datum/alt_title/orderly - title = JOB_ALT_ORDERLY - title_blurb = "An " + JOB_ALT_ORDERLY + " acts as Medbay's general helping hand, assisting any doctor that might need some form of help, as well as handling manual \ - and dirty labor around the department." - title_outfit = /decl/hierarchy/outfit/job/medical/doctor/nurse - -/datum/alt_title/medical_contractor - title = JOB_ALT_MEDICAL_CONTRACTOR - title_blurb = "A " + JOB_ALT_MEDICAL_CONTRACTOR + " can be anything from a full-blown doctor to the likes of a nurse or orderly, but isn't directly employed by NT proper." - -/datum/job/doctor/get_request_reasons() - return list("Surgery pending", "Viral outbreak", "Assembling expedition team") - - -/datum/job/chemist - pto_type = PTO_MEDICAL - alt_titles = list(JOB_ALT_PHARMACIST = /datum/alt_title/pharmacist, JOB_ALT_PHARMACOLOGIST = /datum/alt_title/pharmacologist) - -/datum/alt_title/pharmacologist - title = JOB_ALT_PHARMACOLOGIST - title_blurb = "A " + JOB_ALT_PHARMACOLOGIST + " focuses on the chemical needs of the Medical Department, primarily specializing in producing more advanced forms of medicine." - - -/datum/job/psychiatrist - pto_type = PTO_MEDICAL - alt_titles = list(JOB_ALT_PSYCHOLOGIST = /datum/alt_title/psychologist, JOB_ALT_PSYCHOANALYST = /datum/alt_title/psychoanalyst, JOB_ALT_PSYCHOTHERAPIST = /datum/alt_title/psychotherapist) - -/datum/alt_title/psychoanalyst - title = JOB_ALT_PSYCHOANALYST - title_blurb = "A " + JOB_ALT_PSYCHOANALYST + " provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \ - called upon to determine whatever ails the mentally unwell, frequently under Security supervision." - title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist - -/datum/alt_title/psychotherapist - title = JOB_ALT_PSYCHOTHERAPIST - title_blurb = "A " + JOB_ALT_PSYCHOTHERAPIST + " provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \ - called upon to determine whatever ails the mentally unwell, frequently under Security supervision." - title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist - - -/datum/job/paramedic - pto_type = PTO_MEDICAL - alt_titles = list(JOB_ALT_EMERGENCY_MEDICAL_TECHNICIAN = /datum/alt_title/emt, JOB_ALT_MEDICAL_RESPONDER = /datum/alt_title/medical_responder, JOB_ALT_SEARCH_AND_RESCUE = /datum/alt_title/sar) - total_positions = 3 - spawn_positions = 3 - -/datum/alt_title/medical_responder - title = JOB_ALT_MEDICAL_RESPONDER - title_blurb = "A " + JOB_ALT_MEDICAL_RESPONDER + " is primarily concerned with the recovery of patients who are unable to make it to the Medical Department on their \ - own. They are capable of keeping a patient stabilized until they reach the hands of someone with more training." - title_outfit = /decl/hierarchy/outfit/job/medical/paramedic/emt - -/datum/alt_title/sar - title = JOB_ALT_SEARCH_AND_RESCUE - -/datum/job/paramedic/get_request_reasons() - return list("Assembling expedition team") diff --git a/code/game/jobs/job/offduty_vr.dm b/code/game/jobs/job/offduty.dm similarity index 100% rename from code/game/jobs/job/offduty_vr.dm rename to code/game/jobs/job/offduty.dm diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index c67dbe59ad3..a7d158ec30b 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -16,13 +16,13 @@ req_admin_notify = 1 economic_modifier = 15 access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, - access_tox_storage, access_teleporter, access_sec_doors, + access_tox_storage, access_teleporter, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, - access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_network) + access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network, access_xenobotany) minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, - access_tox_storage, access_teleporter, access_sec_doors, + access_tox_storage, access_teleporter, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, - access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_network) + access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network, access_xenobotany) minimum_character_age = 25 minimal_player_age = 14 @@ -30,19 +30,34 @@ ideal_character_age = 50 ideal_age_by_species = list(SPECIES_UNATHI = 140, "mechanical" = 20, SPECIES_HUMAN_VATBORN = 20) banned_job_species = list(SPECIES_TESHARI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "digital") + disallow_jobhop = TRUE + pto_type = PTO_SCIENCE + dept_time_required = 60 outfit_type = /decl/hierarchy/outfit/job/science/rd job_description = "The " + JOB_RESEARCH_DIRECTOR + " manages and maintains the Research department. They are required to ensure the safety of the entire crew, \ at least with regards to anything occurring in the Research department, and to inform the crew of any disruptions that \ might originate from Research. The " + JOB_RESEARCH_DIRECTOR + " often has at least passing knowledge of most of the Research department, but \ are encouraged to allow their staff to perform their own duties." - alt_titles = list(JOB_ALT_RESEARCH_SUPERVISOR = /datum/alt_title/research_supervisor) + alt_titles = list(JOB_ALT_RESEARCH_SUPERVISOR = /datum/alt_title/research_supervisor, JOB_ALT_RESEARCH_MANAGER = /datum/alt_title/research_manager, + JOB_ALT_HEAD_OF_DEVELOPMENT = /datum/alt_title/head_of_development,JOB_ALT_HEAD_SCIENTIST = /datum/alt_title/head_scientist) +/datum/job/rd/get_request_reasons() + return list("Repairs needed", "Training crew", "Assembling expedition team") // " + JOB_RESEARCH_DIRECTOR + " Alt Titles /datum/alt_title/research_supervisor title = JOB_ALT_RESEARCH_SUPERVISOR +/datum/alt_title/research_manager + title = JOB_ALT_RESEARCH_MANAGER + +/datum/alt_title/head_of_development + title = JOB_ALT_HEAD_OF_DEVELOPMENT + +/datum/alt_title/head_scientist + title = JOB_ALT_HEAD_SCIENTIST + ////////////////////////////////// // Scientist ////////////////////////////////// @@ -53,11 +68,12 @@ department_flag = MEDSCI faction = FACTION_STATION total_positions = 5 - spawn_positions = 3 + spawn_positions = 5 + pto_type = PTO_SCIENCE supervisors = "the " + JOB_RESEARCH_DIRECTOR selection_color = "#633D63" economic_modifier = 7 - access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch) + access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_xenobotany) minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch) min_age_by_species = list(SPECIES_PROMETHEAN = 2) banned_job_species = list("digital") @@ -68,8 +84,12 @@ job_description = "A " + JOB_SCIENTIST + " is a generalist working in the Research department, with general knowledge of the scientific process, as well as \ the principles and requirements of Research and Development. They may also formulate experiments of their own devising, if \ they find an appropriate topic." - alt_titles = list(JOB_ALT_XENOARCHAEOLOGIST = /datum/alt_title/xenoarch, JOB_ALT_ANOMALIST = /datum/alt_title/anomalist, \ - JOB_ALT_PHORON_RESEARCHER = /datum/alt_title/phoron_research) + alt_titles = list(JOB_ALT_RESEARCHER = /datum/alt_title/researcher, JOB_ALT_LAB_ASSISTANT = /datum/alt_title/lab_assistant, JOB_ALT_XENOARCHAEOLOGIST = /datum/alt_title/xenoarch, + JOB_ALT_XENOPALEONTOLOGIST = /datum/alt_title/xenopaleontologist, JOB_ALT_ANOMALIST = /datum/alt_title/anomalist, JOB_ALT_PHORON_RESEARCHER = /datum/alt_title/phoron_research, + JOB_ALT_GAS_PHYSICIST = /datum/alt_title/gas_physicist, JOB_ALT_CIRCUIT_DESIGNER = /datum/alt_title/circuit_designer, JOB_ALT_CIRCUIT_PROGRAMMER = /datum/alt_title/circuit_programmer) + +/datum/job/scientist/get_request_reasons() + return list("Assembling expedition team") // Scientist Alt Titles /datum/alt_title/xenoarch @@ -88,6 +108,35 @@ Many " + JOB_ALT_PHORON_RESEARCHER + "s are interested in the combustability and explosive properties of gaseous phoron, as well as the specific hazards \ of working with the substance in that state." +/datum/alt_title/researcher + title = JOB_ALT_RESEARCHER + +/datum/alt_title/lab_assistant + title = JOB_ALT_LAB_ASSISTANT + title_blurb = "A " + JOB_ALT_LAB_ASSISTANT + " is a lower-level member of research staff, whose main purpose is to help scientists with their specialized work in more menial fashion, while also \ + learning the specializations in process." + +/datum/alt_title/xenopaleontologist + title = JOB_ALT_XENOPALEONTOLOGIST + title_blurb = "A " + JOB_ALT_XENOPALEONTOLOGIST + " enters digsites in search of fossils and other ancient remants of alien life. These digsites are frequently in vacuum or other inhospitable \ + locations, and as such a " + JOB_ALT_XENOPALEONTOLOGIST + " should be prepared to handle hostile evironmental conditions." + +/datum/alt_title/gas_physicist + title = JOB_ALT_GAS_PHYSICIST + title_blurb = "A " + JOB_ALT_GAS_PHYSICIST + " is a specialist in various practical applications of gasses, but currently focuses their attention on phoron, and has knowledge of its practical uses and dangers. \ + Many " + JOB_ALT_GAS_PHYSICIST + "s are interested in the combustability and explosive properties of gaseous phoron, as well as the specific hazards \ + of working with the substance in that state." + +/datum/alt_title/circuit_designer + title = JOB_ALT_CIRCUIT_DESIGNER + title_blurb = "A " + JOB_ALT_CIRCUIT_DESIGNER + " is a " + JOB_SCIENTIST + " whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \ + They work to create various useful devices using the capabilities of integrated circuitry." + +/datum/alt_title/circuit_programmer + title = JOB_ALT_CIRCUIT_PROGRAMMER + title_blurb = "A " + JOB_ALT_CIRCUIT_PROGRAMMER + " is a " + JOB_SCIENTIST + " whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \ + They work to create various useful devices using the capabilities of integrated circuitry." + ////////////////////////////////// // Xenobiologist ////////////////////////////////// @@ -98,7 +147,8 @@ department_flag = MEDSCI faction = FACTION_STATION total_positions = 3 - spawn_positions = 2 + spawn_positions = 3 + pto_type = PTO_SCIENCE supervisors = "the " + JOB_RESEARCH_DIRECTOR selection_color = "#633D63" economic_modifier = 7 @@ -112,15 +162,21 @@ outfit_type = /decl/hierarchy/outfit/job/science/xenobiologist job_description = "A " + JOB_XENOBIOLOGIST + " studies esoteric lifeforms, usually in the relative safety of their lab. They attempt to find ways to benefit \ from the byproducts of these lifeforms, and their main subject at present is the Giant Slime." -/*VR edit start - alt_titles = list(JOB_XENOBOTANIST = /datum/alt_title/xenobot) - Xenibiologist Alt Titles + alt_titles = list(JOB_ALT_XENOZOOLOGIST = /datum/alt_title/xenozoologist, JOB_ALT_XENOANTHROPOLOGIST = /datum/alt_title/xenoanthropologist) + +// Xenobiologist Alt Titles /datum/alt_title/xenobot title = JOB_XENOBOTANIST title_blurb = "A " + JOB_XENOBOTANIST + " grows and cares for a variety of abnormal, custom made, and frequently dangerous plant life. When the products of these plants \ is both safe and beneficial to the station, they may choose to introduce it to the rest of the crew." -VR edit end*/ + +/datum/alt_title/xenozoologist + title = JOB_ALT_XENOZOOLOGIST + +/datum/alt_title/xenoanthropologist + title = JOB_ALT_XENOANTHROPOLOGIST + title_blurb = JOB_ALT_XENOANTHROPOLOGIST + " still heavily focuses their study on alien lifeforms, but their specialty leans more towards fellow sapient beings than simple animals." ////////////////////////////////// // Roboticist @@ -131,8 +187,9 @@ VR edit end*/ departments = list(DEPARTMENT_RESEARCH) department_flag = MEDSCI faction = FACTION_STATION - total_positions = 2 + total_positions = 3 spawn_positions = 2 + pto_type = PTO_SCIENCE supervisors = "the " + JOB_RESEARCH_DIRECTOR selection_color = "#633D63" economic_modifier = 5 @@ -145,7 +202,14 @@ VR edit end*/ outfit_type = /decl/hierarchy/outfit/job/science/roboticist job_description = "A " + JOB_ROBOTICIST + " maintains and repairs the station's synthetics, including crew with prosthetic limbs. \ They can also assist the station by producing simple robots and even pilotable exosuits." - alt_titles = list(JOB_ALT_BIOMECHANICAL_ENGINEER = /datum/alt_title/biomech, JOB_ALT_MECHATRONIC_ENGINEER = /datum/alt_title/mech_tech) + alt_titles = list( + JOB_ALT_ASSEMBLY_TECHNICIAN = /datum/alt_title/assembly_tech, + JOB_ALT_BIOMECHANICAL_ENGINEER = /datum/alt_title/biomech, + JOB_ALT_MECHATRONIC_ENGINEER = /datum/alt_title/mech_tech, + JOB_ALT_SOFTWARE_ENGINEER = /datum/alt_title/software_engi) + +/datum/job/roboticist/get_request_reasons() + return list("Repairs needed") // Roboticist Alt Titles /datum/alt_title/biomech @@ -157,3 +221,41 @@ VR edit end*/ title = JOB_ALT_MECHATRONIC_ENGINEER title_blurb = "A " + JOB_ALT_MECHATRONIC_ENGINEER + " focuses on the construction and maintenance of Exosuits, and should be well versed in their use. \ They may also be called upon to work on synthetics and prosthetics, if needed." + +/datum/alt_title/software_engi + title = JOB_ALT_SOFTWARE_ENGINEER + title_blurb = "A " + JOB_ALT_SOFTWARE_ENGINEER + " specializes in working with software and firmware. They also often deal with integrated circuits." + +/datum/alt_title/assembly_tech + title = JOB_ALT_ASSEMBLY_TECHNICIAN + +////////////////////////////////// +// Xenobotanist +////////////////////////////////// +/datum/job/xenobotanist + title = JOB_XENOBOTANIST + flag = XENOBOTANIST + departments = list(DEPARTMENT_RESEARCH) + department_flag = MEDSCI + faction = FACTION_STATION + total_positions = 2 + spawn_positions = 2 + supervisors = "the " + JOB_RESEARCH_DIRECTOR + selection_color = "#633D63" + economic_modifier = 7 + access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobotany, access_hydroponics) + minimal_access = list(access_research, access_xenobotany, access_hydroponics, access_tox_storage) + pto_type = PTO_SCIENCE + + minimal_player_age = 14 + + outfit_type = /decl/hierarchy/outfit/job/science/xenobiologist + job_description = "A " + JOB_XENOBOTANIST + " grows and cares for a variety of abnormal, custom made, and frequently dangerous plant life. When the products of these plants \ + are both safe and beneficial to the station, they may choose to introduce it to the rest of the crew." + alt_titles = list(JOB_ALT_XENOHYDROPONICIST = /datum/alt_title/xenohydroponicist, JOB_ALT_XENOFLORIST = /datum/alt_title/xenoflorist) + +/datum/alt_title/xenoflorist + title = JOB_ALT_XENOFLORIST + +/datum/alt_title/xenohydroponicist + title = JOB_ALT_XENOHYDROPONICIST \ No newline at end of file diff --git a/code/game/jobs/job/science_vr.dm b/code/game/jobs/job/science_vr.dm deleted file mode 100644 index c0505e4109e..00000000000 --- a/code/game/jobs/job/science_vr.dm +++ /dev/null @@ -1,134 +0,0 @@ -/datum/job/rd - disallow_jobhop = TRUE - pto_type = PTO_SCIENCE - dept_time_required = 60 - - access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, - access_tox_storage, access_teleporter, - access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, - access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network, access_xenobotany) - minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, - access_tox_storage, access_teleporter, - access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, - access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network, access_xenobotany) - alt_titles = list(JOB_ALT_RESEARCH_SUPERVISOR = /datum/alt_title/research_supervisor, JOB_ALT_RESEARCH_MANAGER = /datum/alt_title/research_manager, - JOB_ALT_HEAD_OF_DEVELOPMENT = /datum/alt_title/head_of_development,JOB_ALT_HEAD_SCIENTIST = /datum/alt_title/head_scientist) - -/datum/alt_title/research_manager - title = JOB_ALT_RESEARCH_MANAGER - -/datum/alt_title/head_of_development - title = JOB_ALT_HEAD_OF_DEVELOPMENT - -/datum/alt_title/head_scientist - title = JOB_ALT_HEAD_SCIENTIST - -/datum/job/rd/get_request_reasons() - return list("Repairs needed", "Training crew", "Assembling expedition team") - - -/datum/job/scientist - spawn_positions = 5 - pto_type = PTO_SCIENCE - alt_titles = list(JOB_ALT_RESEARCHER = /datum/alt_title/researcher, JOB_ALT_LAB_ASSISTANT = /datum/alt_title/lab_assistant, JOB_ALT_XENOARCHAEOLOGIST = /datum/alt_title/xenoarch, - JOB_ALT_XENOPALEONTOLOGIST = /datum/alt_title/xenopaleontologist, JOB_ALT_ANOMALIST = /datum/alt_title/anomalist, JOB_ALT_PHORON_RESEARCHER = /datum/alt_title/phoron_research, - JOB_ALT_GAS_PHYSICIST = /datum/alt_title/gas_physicist, JOB_ALT_CIRCUIT_DESIGNER = /datum/alt_title/circuit_designer, JOB_ALT_CIRCUIT_PROGRAMMER = /datum/alt_title/circuit_programmer) - - - access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_xenobotany) - minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch) // Unchanged (for now?), mostly here for reference - -/datum/alt_title/researcher - title = JOB_ALT_RESEARCHER - -/datum/alt_title/lab_assistant - title = JOB_ALT_LAB_ASSISTANT - title_blurb = "A " + JOB_ALT_LAB_ASSISTANT + " is a lower-level member of research staff, whose main purpose is to help scientists with their specialized work in more menial fashion, while also \ - learning the specializations in process." - -/datum/alt_title/xenopaleontologist - title = JOB_ALT_XENOPALEONTOLOGIST - title_blurb = "A " + JOB_ALT_XENOPALEONTOLOGIST + " enters digsites in search of fossils and other ancient remants of alien life. These digsites are frequently in vacuum or other inhospitable \ - locations, and as such a " + JOB_ALT_XENOPALEONTOLOGIST + " should be prepared to handle hostile evironmental conditions." - -/datum/alt_title/gas_physicist - title = JOB_ALT_GAS_PHYSICIST - title_blurb = "A " + JOB_ALT_GAS_PHYSICIST + " is a specialist in various practical applications of gasses, but currently focuses their attention on phoron, and has knowledge of its practical uses and dangers. \ - Many " + JOB_ALT_GAS_PHYSICIST + "s are interested in the combustability and explosive properties of gaseous phoron, as well as the specific hazards \ - of working with the substance in that state." - -/datum/alt_title/circuit_designer - title = JOB_ALT_CIRCUIT_DESIGNER - title_blurb = "A " + JOB_ALT_CIRCUIT_DESIGNER + " is a " + JOB_SCIENTIST + " whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \ - They work to create various useful devices using the capabilities of integrated circuitry." - -/datum/alt_title/circuit_programmer - title = JOB_ALT_CIRCUIT_PROGRAMMER - title_blurb = "A " + JOB_ALT_CIRCUIT_PROGRAMMER + " is a " + JOB_SCIENTIST + " whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \ - They work to create various useful devices using the capabilities of integrated circuitry." - -/datum/job/scientist/get_request_reasons() - return list("Assembling expedition team") - -/datum/job/xenobiologist - spawn_positions = 3 - pto_type = PTO_SCIENCE - alt_titles = list(JOB_ALT_XENOZOOLOGIST = /datum/alt_title/xenozoologist, JOB_ALT_XENOANTHROPOLOGIST = /datum/alt_title/xenoanthropologist) - -/datum/alt_title/xenozoologist - title = JOB_ALT_XENOZOOLOGIST - -/datum/alt_title/xenoanthropologist - title = JOB_ALT_XENOANTHROPOLOGIST - title_blurb = JOB_ALT_XENOANTHROPOLOGIST + " still heavily focuses their study on alien lifeforms, but their specialty leans more towards fellow sapient beings than simple animals." - - -/datum/job/roboticist - total_positions = 3 - pto_type = PTO_SCIENCE - alt_titles = list( - JOB_ALT_ASSEMBLY_TECHNICIAN = /datum/alt_title/assembly_tech, - JOB_ALT_BIOMECHANICAL_ENGINEER = /datum/alt_title/biomech, - JOB_ALT_MECHATRONIC_ENGINEER = /datum/alt_title/mech_tech, - JOB_ALT_SOFTWARE_ENGINEER = /datum/alt_title/software_engi) - -/datum/alt_title/software_engi - title = JOB_ALT_SOFTWARE_ENGINEER - title_blurb = "A " + JOB_ALT_SOFTWARE_ENGINEER + " specializes in working with software and firmware. They also often deal with integrated circuits." - -/datum/alt_title/assembly_tech - title = JOB_ALT_ASSEMBLY_TECHNICIAN - -/datum/job/roboticist/get_request_reasons() - return list("Repairs needed") - -////////////////////////////////// -// Xenobotanist -////////////////////////////////// -/datum/job/xenobotanist - title = JOB_XENOBOTANIST - flag = XENOBOTANIST - departments = list(DEPARTMENT_RESEARCH) - department_flag = MEDSCI - faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 - supervisors = "the " + JOB_RESEARCH_DIRECTOR - selection_color = "#633D63" - economic_modifier = 7 - access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobotany, access_hydroponics) - minimal_access = list(access_research, access_xenobotany, access_hydroponics, access_tox_storage) - pto_type = PTO_SCIENCE - - minimal_player_age = 14 - - outfit_type = /decl/hierarchy/outfit/job/science/xenobiologist - job_description = "A " + JOB_XENOBOTANIST + " grows and cares for a variety of abnormal, custom made, and frequently dangerous plant life. When the products of these plants \ - are both safe and beneficial to the station, they may choose to introduce it to the rest of the crew." - alt_titles = list(JOB_ALT_XENOHYDROPONICIST = /datum/alt_title/xenohydroponicist, JOB_ALT_XENOFLORIST = /datum/alt_title/xenoflorist) - -/datum/alt_title/xenoflorist - title = JOB_ALT_XENOFLORIST - -/datum/alt_title/xenohydroponicist - title = JOB_ALT_XENOHYDROPONICIST diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 372d459e620..db2a0e051ce 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -16,26 +16,31 @@ req_admin_notify = 1 economic_modifier = 10 access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, - access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, - access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) + access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, + access_construction, + access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, - access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, - access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) + access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, + access_construction, + access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) minimum_character_age = 25 min_age_by_species = list(SPECIES_HUMAN_VATBORN = 14) minimal_player_age = 14 ideal_character_age = 50 ideal_age_by_species = list(SPECIES_HUMAN_VATBORN = 20) banned_job_species = list(SPECIES_TESHARI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "digital", SPECIES_UNATHI, "mechanical") + disallow_jobhop = TRUE + pto_type = PTO_SECURITY + dept_time_required = 60 outfit_type = /decl/hierarchy/outfit/job/security/hos job_description = " The " + JOB_HEAD_OF_SECURITY + " manages the Security Department, keeping the station safe and making sure the rules are followed. They are expected to \ keep the other Department Heads, and the rest of the crew, aware of developing situations that may be a threat. If necessary, the HoS may \ perform the duties of absent Security roles, such as distributing gear from the Armory." - alt_titles = list(JOB_ALT_SECURITY_COMMANDER = /datum/alt_title/sec_commander, JOB_ALT_CHIEF_OF_SECURITY = /datum/alt_title/sec_chief) + alt_titles = list(JOB_ALT_SECURITY_COMMANDER = /datum/alt_title/sec_commander, JOB_ALT_CHIEF_OF_SECURITY = /datum/alt_title/sec_chief, JOB_ALT_SECURITY_MANAGER = /datum/alt_title/security_manager) +/datum/job/hos/get_request_reasons() + return list("Wildlife management", "Forensic investigation", "Training crew", "Assembling expedition team") // Head of Security Alt Titles /datum/alt_title/sec_commander @@ -44,6 +49,9 @@ /datum/alt_title/sec_chief title = JOB_ALT_CHIEF_OF_SECURITY +/datum/alt_title/security_manager + title = JOB_ALT_SECURITY_MANAGER + ////////////////////////////////// // Warden ////////////////////////////////// @@ -59,17 +67,32 @@ supervisors = "the " + JOB_HEAD_OF_SECURITY selection_color = "#601C1C" economic_modifier = 5 + pto_type = PTO_SECURITY + dept_time_required = 20 access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_morgue, access_external_airlocks) minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_external_airlocks) minimal_player_age = 5 banned_job_species = list(SPECIES_ZADDAT, SPECIES_PROMETHEAN, SPECIES_TESHARI, SPECIES_DIONA) - + alt_titles = list(JOB_ALT_BRIG_SENTRY = /datum/alt_title/brig_sentry, JOB_ALT_ARMORY_SUPERINTENDENT = /datum/alt_title/armory_superintendent, JOB_ALT_MASTERATARMS = /datum/alt_title/master_at_arms) outfit_type = /decl/hierarchy/outfit/job/security/warden job_description = "The " + JOB_WARDEN + " watches over the physical Security Department, making sure the Brig and Armoury are secure and in order at all times. They oversee \ prisoners that have been processed and brigged, and are responsible for their well being. The " + JOB_WARDEN + " is also in charge of distributing \ Armoury gear in a crisis, and retrieving it when the crisis has passed. In an emergency, the " + JOB_WARDEN + " may be called upon to direct the \ Security Department as a whole." +/datum/job/warden/get_request_reasons() + return list("Wildlife management") + +//Warden Alt Titles +/datum/alt_title/brig_sentry + title = JOB_ALT_BRIG_SENTRY + +/datum/alt_title/armory_superintendent + title = JOB_ALT_ARMORY_SUPERINTENDENT + +/datum/alt_title/master_at_arms + title = JOB_ALT_MASTERATARMS + ////////////////////////////////// // Detective ////////////////////////////////// @@ -81,6 +104,7 @@ faction = FACTION_STATION total_positions = 2 spawn_positions = 2 + pto_type = PTO_SECURITY supervisors = "the " + JOB_HEAD_OF_SECURITY selection_color = "#601C1C" access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks, access_brig) //Vorestation edit - access_brig @@ -92,7 +116,10 @@ outfit_type = /decl/hierarchy/outfit/job/security/detective job_description = "A " + JOB_DETECTIVE + " works to help Security find criminals who have not properly been identified, through interviews and forensic work. \ For crimes only witnessed after the fact, or those with no survivors, they attempt to piece together what they can from pure evidence." - alt_titles = list(JOB_ALT_FORENSIC_TECHNICIAN = /datum/alt_title/forensic_tech) + alt_titles = list(JOB_ALT_INVESTIGATOR = /datum/alt_title/investigator, JOB_ALT_SECURITY_INSPECTOR = /datum/alt_title/security_inspector, JOB_ALT_FORENSIC_TECHNICIAN = /datum/alt_title/forensic_tech) + +/datum/job/detective/get_request_reasons() + return list("Forensic investigation") // Detective Alt Titles /datum/alt_title/forensic_tech @@ -100,6 +127,12 @@ title_blurb = "A " + JOB_ALT_FORENSIC_TECHNICIAN + " works more with hard evidence and labwork than a " + JOB_DETECTIVE + ", but they share the purpose of solving crimes." title_outfit = /decl/hierarchy/outfit/job/security/detective/forensic +/datum/alt_title/investigator + title = JOB_ALT_INVESTIGATOR + +/datum/alt_title/security_inspector + title = JOB_ALT_SECURITY_INSPECTOR + ////////////////////////////////// // Security Officer ////////////////////////////////// @@ -109,8 +142,9 @@ departments = list(DEPARTMENT_SECURITY) department_flag = ENGSEC faction = FACTION_STATION - total_positions = 4 - spawn_positions = 4 + total_positions = 5 + spawn_positions = 5 + pto_type = PTO_SECURITY supervisors = "the " + JOB_HEAD_OF_SECURITY selection_color = "#601C1C" economic_modifier = 4 @@ -123,13 +157,29 @@ job_description = "A " + JOB_SECURITY_OFFICER + " is concerned with maintaining the safety and security of the station as a whole, dealing with external threats and \ apprehending criminals. A " + JOB_SECURITY_OFFICER + " is responsible for the health, safety, and processing of any prisoner they arrest. \ No one is above the Law, not Security or Command." - alt_titles = list(JOB_ALT_JUNIOR_OFFICER = /datum/alt_title/junior_officer) + alt_titles = list(JOB_ALT_PATROL_OFFICER = /datum/alt_title/patrol_officer, JOB_ALT_SECURITY_GUARD = /datum/alt_title/security_guard, + JOB_ALT_SECURITY_DEPUTY = /datum/alt_title/security_guard, JOB_ALT_JUNIOR_OFFICER = /datum/alt_title/junior_officer, JOB_ALT_SECURITY_CONTRACTOR = /datum/alt_title/security_contractor) min_age_by_species = list(SPECIES_PROMETHEAN = 3) +/datum/job/officer/get_request_reasons() + return list("Wildlife management", "Assembling expedition team") + // Security Officer Alt Titles /datum/alt_title/junior_officer title = JOB_ALT_JUNIOR_OFFICER title_blurb = "A " + JOB_ALT_JUNIOR_OFFICER + " is an inexperienced " + JOB_SECURITY_OFFICER + ". They likely have training, but not experience, and are frequently \ paired off with a more senior co-worker. Junior Officers may also be expected to take over the boring duties of other Officers \ including patrolling the station or maintaining specific posts." + +/datum/alt_title/patrol_officer + title = JOB_ALT_PATROL_OFFICER + +/datum/alt_title/security_guard + title = JOB_ALT_SECURITY_GUARD + +/datum/alt_title/security_deputy + title = JOB_ALT_SECURITY_DEPUTY + +/datum/alt_title/security_contractor + title = JOB_ALT_SECURITY_CONTRACTOR diff --git a/code/game/jobs/job/security_vr.dm b/code/game/jobs/job/security_vr.dm deleted file mode 100644 index b7c196b3345..00000000000 --- a/code/game/jobs/job/security_vr.dm +++ /dev/null @@ -1,75 +0,0 @@ -/datum/job/hos - disallow_jobhop = TRUE - pto_type = PTO_SECURITY - dept_time_required = 60 - - access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, - access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, - access_construction, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) - minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, - access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, - access_construction, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) - alt_titles = list(JOB_ALT_SECURITY_COMMANDER = /datum/alt_title/sec_commander, JOB_ALT_CHIEF_OF_SECURITY = /datum/alt_title/sec_chief, JOB_ALT_SECURITY_MANAGER = /datum/alt_title/security_manager) - -/datum/alt_title/security_manager - title = JOB_ALT_SECURITY_MANAGER - -/datum/job/hos/get_request_reasons() - return list("Wildlife management", "Forensic investigation", "Training crew", "Assembling expedition team") - - -/datum/job/warden - pto_type = PTO_SECURITY - dept_time_required = 20 - alt_titles = list(JOB_ALT_BRIG_SENTRY = /datum/alt_title/brig_sentry, JOB_ALT_ARMORY_SUPERINTENDENT = /datum/alt_title/armory_superintendent, JOB_ALT_MASTERATARMS = /datum/alt_title/master_at_arms) - -/datum/alt_title/brig_sentry - title = JOB_ALT_BRIG_SENTRY - -/datum/alt_title/armory_superintendent - title = JOB_ALT_ARMORY_SUPERINTENDENT - -/datum/alt_title/master_at_arms - title = JOB_ALT_MASTERATARMS - -/datum/job/warden/get_request_reasons() - return list("Wildlife management") - - -/datum/job/detective - pto_type = PTO_SECURITY - alt_titles = list(JOB_ALT_INVESTIGATOR = /datum/alt_title/investigator, JOB_ALT_SECURITY_INSPECTOR = /datum/alt_title/security_inspector, JOB_ALT_FORENSIC_TECHNICIAN = /datum/alt_title/forensic_tech) - -/datum/alt_title/investigator - title = JOB_ALT_INVESTIGATOR - -/datum/alt_title/security_inspector - title = JOB_ALT_SECURITY_INSPECTOR - -/datum/job/detective/get_request_reasons() - return list("Forensic investigation") - - -/datum/job/officer - total_positions = 5 - spawn_positions = 5 - pto_type = PTO_SECURITY - alt_titles = list(JOB_ALT_PATROL_OFFICER = /datum/alt_title/patrol_officer, JOB_ALT_SECURITY_GUARD = /datum/alt_title/security_guard, - JOB_ALT_SECURITY_DEPUTY = /datum/alt_title/security_guard, JOB_ALT_JUNIOR_OFFICER = /datum/alt_title/junior_officer, JOB_ALT_SECURITY_CONTRACTOR = /datum/alt_title/security_contractor) - -/datum/alt_title/patrol_officer - title = JOB_ALT_PATROL_OFFICER - -/datum/alt_title/security_guard - title = JOB_ALT_SECURITY_GUARD - -/datum/alt_title/security_deputy - title = JOB_ALT_SECURITY_DEPUTY - -/datum/alt_title/security_contractor - title = JOB_ALT_SECURITY_CONTRACTOR - -/datum/job/officer/get_request_reasons() - return list("Wildlife management", "Assembling expedition team") diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index 6a5812af073..cce3f69603c 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -19,6 +19,8 @@ has_headset = FALSE assignable = FALSE mob_type = JOB_SILICON_AI + disallow_jobhop = TRUE + pto_type = PTO_CIVILIAN outfit_type = /decl/hierarchy/outfit/job/silicon/ai job_description = "The " + JOB_AI + " oversees the operation of the station and its crew, but has no real authority over them. \ The " + JOB_AI + " is required to follow its Laws, and Lawbound Synthetics that are linked to it are expected to follow \ @@ -46,8 +48,10 @@ departments = list(DEPARTMENT_SYNTHETIC) department_flag = ENGSEC faction = FACTION_STATION - total_positions = 2 - spawn_positions = 2 + pto_type = PTO_CYBORG + minimal_player_age = 3 //1 day is a little too little time + total_positions = 4 //Along with one able to spawn later in the round. + spawn_positions = 3 //Let's have 3 able to spawn in roundstart supervisors = "your Laws and the " + JOB_AI //Nodrak selection_color = "#254C25" minimal_player_age = 1 diff --git a/code/game/jobs/job/silicon_vr.dm b/code/game/jobs/job/silicon_vr.dm deleted file mode 100644 index f5df1e3acfc..00000000000 --- a/code/game/jobs/job/silicon_vr.dm +++ /dev/null @@ -1,9 +0,0 @@ -/datum/job/ai - disallow_jobhop = TRUE - pto_type = PTO_CIVILIAN - -/datum/job/cyborg - pto_type = PTO_CYBORG - minimal_player_age = 3 //1 day is a little too little time - total_positions = 4 //Along with one able to spawn later in the round. - spawn_positions = 3 //Let's have 3 able to spawn in roundstart \ No newline at end of file diff --git a/code/game/jobs/job/special_vr.dm b/code/game/jobs/job/special.dm similarity index 100% rename from code/game/jobs/job/special_vr.dm rename to code/game/jobs/job/special.dm diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index 256e57bf183..e13944eb9a6 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -36,7 +36,7 @@ if(O.has_tool_quality(TOOL_WIRECUTTER)) if(cable && cable.get_amount()) - var/m = round(input(usr, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1) + var/m = round(input(user, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1) m = min(m, cable.get_amount()) m = min(m, 30) if(m) @@ -45,7 +45,7 @@ var/obj/item/stack/cable_coil/CC = new (get_turf(src)) CC.set_amount(m) else - to_chat(usr, span_warning("There's no more cable on the reel.")) + to_chat(user, span_warning("There's no more cable on the reel.")) /obj/machinery/cablelayer/examine(mob/user) . = ..() diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index d168286ee19..7d9d97acb72 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -43,8 +43,8 @@ return /obj/machinery/optable/attack_hand(mob/user as mob) - if(HULK in usr.mutations) - visible_message(span_danger("\The [usr] destroys \the [src]!")) + if(HULK in user.mutations) + visible_message(span_danger("\The [user] destroys \the [src]!")) density = FALSE qdel(src) return diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 5a14185d7c6..180bebe532d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -296,10 +296,10 @@ /obj/machinery/sleeper/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - if(!controls_inside && usr == occupant) + if(!controls_inside && ui.user == occupant) return if(panel_open) - to_chat(usr, span_notice("Close the maintenance panel first.")) + to_chat(ui.user, span_notice("Close the maintenance panel first.")) return . = TRUE @@ -309,16 +309,16 @@ return if(occupant.stat == DEAD) var/datum/gender/G = gender_datums[occupant.get_visible_gender()] - to_chat(usr, span_danger("This person has no life to preserve anymore. Take [G.him] to a department capable of reanimating [G.him].")) + to_chat(ui.user, span_danger("This person has no life to preserve anymore. Take [G.him] to a department capable of reanimating [G.him].")) return var/chemical = params["chemid"] var/amount = text2num(params["amount"]) if(!length(chemical) || amount <= 0) return if(occupant.health > min_health) //|| (chemical in emergency_chems)) - inject_chemical(usr, chemical, amount) + inject_chemical(ui.user, chemical, amount) else - to_chat(usr, span_danger("This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!")) + to_chat(ui.user, span_danger("This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!")) if("removebeaker") remove_beaker() if("togglefilter") @@ -328,7 +328,7 @@ if("ejectify") go_out() if("changestasis") - var/new_stasis = tgui_input_list(usr, "Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level", stasis_choices) + var/new_stasis = tgui_input_list(ui.user, "Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level", stasis_choices) if(new_stasis) stasis_level = stasis_choices[new_stasis] if("auto_eject_dead_on") @@ -337,7 +337,7 @@ auto_eject_dead = FALSE else return FALSE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/sleeper/process() if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index a891a03f826..cf1fc43839f 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -39,7 +39,7 @@ if(istype(user, /mob/living/silicon)) return attack_hand(user) else // trying to unlock the interface - if(allowed(usr)) + if(allowed(user)) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] the device.") if(locked) @@ -48,7 +48,7 @@ user << browse(null, "window=ai_slipper") else if(user.machine==src) - attack_hand(usr) + attack_hand(user) else to_chat(user, span_warning("Access denied.")) return diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm index aff190e5e3a..522a883efee 100644 --- a/code/game/machinery/air_alarm.dm +++ b/code/game/machinery/air_alarm.dm @@ -682,10 +682,10 @@ var/list/selected = TLV["temperature"] var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE) var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE) - var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE) + var/input_temperature = tgui_input_number(ui.user, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE) if(isnum(input_temperature)) if(input_temperature > max_temperature || input_temperature < min_temperature) - to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C") + to_chat(ui.user, "Temperature must be between [min_temperature]C and [max_temperature]C") else target_temperature = input_temperature + T0C return TRUE @@ -694,13 +694,13 @@ // Yes, this is kinda snowflaky; however, I would argue it would be far more snowflakey // to include "custom hrefs" and all the other bullshit that nano states have just for the // like, two UIs, that want remote access to other UIs. - if((locked && !issilicon(usr) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(usr) && aidisabled)) + if((locked && !issilicon(ui.user) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(ui.user) && aidisabled)) return var/device_id = params["id_tag"] switch(action) if("lock") - if(issilicon(usr) && !wires.is_cut(WIRE_IDSCAN)) + if(issilicon(ui.user) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked . = TRUE if( "power", @@ -713,42 +713,42 @@ "panic_siphon", "scrubbing", "direction") - send_signal(device_id, list("[action]" = text2num(params["val"])), usr) + send_signal(device_id, list("[action]" = text2num(params["val"])), ui.user) . = TRUE if("excheck") - send_signal(device_id, list("checks" = text2num(params["val"])^1), usr) + send_signal(device_id, list("checks" = text2num(params["val"])^1), ui.user) . = TRUE if("incheck") - send_signal(device_id, list("checks" = text2num(params["val"])^2), usr) + send_signal(device_id, list("checks" = text2num(params["val"])^2), ui.user) . = TRUE if("set_external_pressure", "set_internal_pressure") var/target = params["value"] if(!isnull(target)) - send_signal(device_id, list("[action]" = target), usr) + send_signal(device_id, list("[action]" = target), ui.user) . = TRUE if("reset_external_pressure") - send_signal(device_id, list("reset_external_pressure"), usr) + send_signal(device_id, list("reset_external_pressure"), ui.user) . = TRUE if("reset_internal_pressure") - send_signal(device_id, list("reset_internal_pressure"), usr) + send_signal(device_id, list("reset_internal_pressure"), ui.user) . = TRUE if("threshold") var/env = params["env"] var/name = params["var"] - var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name], min_value=-1, round_value = FALSE) + var/value = tgui_input_number(ui.user, "New [name] for [env]:", name, TLV[env][name], min_value=-1, round_value = FALSE) if(!isnull(value) && !..()) if(value < 0) TLV[env][name] = -1 else TLV[env][name] = round(value, 0.01) clamp_tlv_values(env, name) - // investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS) + // investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(ui.user)]",INVESTIGATE_ATMOS) . = TRUE if("mode") mode = text2num(params["mode"]) - // investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS) - apply_mode(usr) + // investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(ui.user)]",INVESTIGATE_ATMOS) + apply_mode(ui.user) . = TRUE if("alarm") if(alarm_area.atmosalert(2, src)) @@ -817,7 +817,7 @@ to_chat(user, "It does nothing.") return else - if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) + if(allowed(user) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked to_chat(user, span_notice("You [locked ? "lock" : "unlock"] the Air Alarm interface.")) else diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index 5c5db6ebb59..1c538eaf01c 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -51,7 +51,7 @@ return list("scrubbers" = working) -/obj/machinery/computer/area_atmos/tgui_act(action, params) +/obj/machinery/computer/area_atmos/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -75,7 +75,7 @@ scanscrubbers() . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/area_atmos/proc/toggle_all(on) for(var/id in connectedscrubbers) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index fa0900ac461..c3a323a896c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -315,7 +315,7 @@ update_flag return data -/obj/machinery/portable_atmospherics/canister/tgui_act(action, params) +/obj/machinery/portable_atmospherics/canister/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -331,7 +331,7 @@ update_flag "\[Air\]" = "grey", \ "\[CAUTION\]" = "yellow", \ ) - var/label = tgui_input_list(usr, "Choose canister label", "Gas canister", colors) + var/label = tgui_input_list(ui.user, "Choose canister label", "Gas canister", colors) if(label) canister_color = colors[label] icon_state = colors[label] @@ -348,7 +348,7 @@ update_flag pressure = 10*ONE_ATMOSPHERE . = TRUE else if(pressure == "input") - pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10) + pressure = tgui_input_number(ui.user, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10) if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) @@ -359,14 +359,14 @@ update_flag if("valve") if(valve_open) if(holding) - release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the [holding]
" + release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the [holding]
" else - release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the " + span_red(span_bold("air")) + "
" + release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the " + span_red(span_bold("air")) + "
" else if(holding) - release_log += "Valve was " + span_bold("opened") + " by [usr] ([usr.ckey]), starting the transfer into the [holding]
" + release_log += "Valve was " + span_bold("opened") + " by [ui.user] ([ui.user.ckey]), starting the transfer into the [holding]
" else - release_log += "Valve was " + span_bold("opened") + " by [usr] ([usr.ckey]), starting the transfer into the " + span_red(span_bold("air")) + "
" + release_log += "Valve was " + span_bold("opened") + " by [ui.user] ([ui.user.ckey]), starting the transfer into the " + span_red(span_bold("air")) + "
" log_open() valve_open = !valve_open . = TRUE @@ -374,14 +374,14 @@ update_flag if(holding) if(valve_open) valve_open = 0 - release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the [holding]
" + release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the [holding]
" if(istype(holding, /obj/item/tank)) - holding.manipulated_by = usr.real_name + holding.manipulated_by = ui.user.real_name holding.loc = loc holding = null . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) update_icon() /obj/machinery/portable_atmospherics/canister/phoron/New() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 752f9305acb..c1b372e5ad4 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -146,11 +146,11 @@ if(..()) return TRUE - usr.set_machine(src) - add_fingerprint(usr) + ui.user.set_machine(src) + add_fingerprint(ui.user) if(busy) - to_chat(usr, span_notice("The autolathe is busy. Please wait for completion of previous operation.")) + to_chat(ui.user, span_notice("The autolathe is busy. Please wait for completion of previous operation.")) return switch(action) if("make") @@ -176,8 +176,8 @@ if(!isnull(materials.get_material_amount(material)) && materials.get_material_amount(material) < round(making.resources[material] * coeff)) max_sheets = 0 //Build list of multipliers for sheets. - multiplier = tgui_input_number(usr, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0) - if(!multiplier || multiplier <= 0 || (multiplier != round(multiplier)) || multiplier > max_sheets || tgui_status(usr, state) != STATUS_INTERACTIVE) + multiplier = tgui_input_number(ui.user, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0) + if(!multiplier || multiplier <= 0 || (multiplier != round(multiplier)) || multiplier > max_sheets || tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE //Check if we still have the materials. diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index d9fe85fcbd9..b3b41376ff6 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -135,14 +135,14 @@ ui = new(user, src, "Biogenerator", name) ui.open() -/obj/machinery/biogenerator/tgui_act(action, params) +/obj/machinery/biogenerator/tgui_act(action, params, datum/tgui/ui) if(..()) return . = TRUE switch(action) if("activate") - INVOKE_ASYNC(src, PROC_REF(activate)) + INVOKE_ASYNC(src, PROC_REF(activate), ui.user) return TRUE if("detach") if(beaker) @@ -166,11 +166,11 @@ return var/cost = round(br.cost / build_eff) if(cost > points) - to_chat(usr, span_danger("Insufficient biomass.")) + to_chat(ui.user, span_danger("Insufficient biomass.")) return var/amt_to_actually_dispense = round(min(beaker.reagents.get_free_space(), br.reagent_amt)) if(amt_to_actually_dispense <= 0) - to_chat(usr, span_danger("The loaded beaker is full!")) + to_chat(ui.user, span_danger("The loaded beaker is full!")) return points -= (cost * (amt_to_actually_dispense / br.reagent_amt)) beaker.reagents.add_reagent(br.reagent_id, amt_to_actually_dispense) @@ -179,7 +179,7 @@ var/cost = round(bi.cost / build_eff) if(cost > points) - to_chat(usr, span_danger("Insufficient biomass.")) + to_chat(ui.user, span_danger("Insufficient biomass.")) return points -= cost @@ -263,13 +263,13 @@ return tgui_interact(user) -/obj/machinery/biogenerator/proc/activate() - if(usr.stat) +/obj/machinery/biogenerator/proc/activate(mob/user) + if(user.stat) return if(stat) //NOPOWER etc return if(processing) - to_chat(usr, span_notice("The biogenerator is in the process of working.")) + to_chat(user, span_notice("The biogenerator is in the process of working.")) return var/S = 0 for(var/obj/item/reagent_containers/food/snacks/grown/I in contents) @@ -289,7 +289,7 @@ playsound(src, 'sound/machines/biogenerator_end.ogg', 40, 1) update_icon() else - to_chat(usr, span_warning("Error: No growns inside. Please insert growns.")) + to_chat(user, span_warning("Error: No growns inside. Please insert growns.")) return /obj/machinery/biogenerator/RefreshParts() diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index 7a02d6115a3..cc3e3fc7556 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -150,7 +150,7 @@ if(anomalous_organs) possible_list |= anomalous_products - var/choice = tgui_input_list(usr, "What would you like to print?", "Print Choice", possible_list) + var/choice = tgui_input_list(user, "What would you like to print?", "Print Choice", possible_list) if(!choice || printing || (stat & (BROKEN|NOPOWER))) return diff --git a/code/game/machinery/bomb_tester_vr.dm b/code/game/machinery/bomb_tester_vr.dm index e45c329f37a..6e59c568440 100644 --- a/code/game/machinery/bomb_tester_vr.dm +++ b/code/game/machinery/bomb_tester_vr.dm @@ -149,26 +149,26 @@ text_mode = "tank transfer valve detonation" if(MODE_CANISTER) text_mode = "canister-assisted single gas tank detonation" - to_chat(usr, span_notice("[src] set to simulate a [text_mode].")) + to_chat(ui.user, span_notice("[src] set to simulate a [text_mode].")) return TRUE if("add_tank") - if(istype(usr.get_active_hand(), /obj/item/tank)) - var/obj/item/tank/T = usr.get_active_hand() + if(istype(ui.user.get_active_hand(), /obj/item/tank)) + var/obj/item/tank/T = ui.user.get_active_hand() var/slot = params["slot"] if(slot == 1 && !tank1) tank1 = T else if(slot == 2 && !tank2) tank2 = T else - to_chat(usr, span_warning("Slot [slot] is full.")) + to_chat(ui.user, span_warning("Slot [slot] is full.")) return - usr.drop_item(T) + ui.user.drop_item(T) T.forceMove(src) return TRUE else - to_chat(usr, span_warning("You must be wielding a tank to insert it!")) + to_chat(ui.user, span_warning("You must be wielding a tank to insert it!")) if("remove_tank") var/obj/item/tank/T = locate(params["ref"]) in list(tank1, tank2) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 383a96868b5..1f89fdbe980 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -254,19 +254,19 @@ if (!(src.status)) if(user) visible_message(span_notice(" [user] has deactivated [src]!")) + add_hiddenprint(user) else visible_message(span_notice(" [src] clicks and shuts down. ")) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = "[initial(icon_state)]1" - add_hiddenprint(user) else if(user) visible_message(span_notice(" [user] has reactivated [src]!")) + add_hiddenprint(user) else visible_message(span_notice(" [src] clicks and reactivates itself. ")) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = initial(icon_state) - add_hiddenprint(user) /obj/machinery/camera/take_damage(var/force, var/message) //prob(25) gives an average of 3-4 hits diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 67824ecb3f5..6feae4eff23 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -80,19 +80,19 @@ if(W.has_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 50, 1) - var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT)) + var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT)) if(!input) - to_chat(usr, "No input found please hang up and try your call again.") + to_chat(user, "No input found please hang up and try your call again.") return var/list/tempnetwork = splittext(input, ",") if(tempnetwork.len < 1) - to_chat(usr, "No network found please hang up and try your call again.") + to_chat(user, "No network found please hang up and try your call again.") return var/area/camera_area = get_area(src) var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])" - input = sanitizeSafe(tgui_input_text(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN) + input = sanitizeSafe(tgui_input_text(user, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN) state = 4 var/obj/machinery/camera/C = new(src.loc) diff --git a/code/game/machinery/clawmachine.dm b/code/game/machinery/clawmachine.dm index 6b9298cf399..90c64d1031e 100644 --- a/code/game/machinery/clawmachine.dm +++ b/code/game/machinery/clawmachine.dm @@ -158,7 +158,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index ed07a6158bd..4f4722c559f 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -127,11 +127,11 @@ return data -/obj/machinery/computer/operating/tgui_act(action, params) +/obj/machinery/computer/operating/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) + if((ui.user.contents.Find(src) || (in_range(src, ui.user) && istype(src.loc, /turf))) || (istype(ui.user, /mob/living/silicon))) + ui.user.set_machine(src) . = TRUE switch(action) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 2808be538a9..aa3902c8467 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -111,23 +111,23 @@ laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") - to_chat(usr, "Law module applied.") + to_chat(user, "Law module applied.") if(istype(P, /obj/item/aiModule/nanotrasen)) laws.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.") laws.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.") laws.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.") laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") - to_chat(usr, "Law module applied.") + to_chat(user, "Law module applied.") if(istype(P, /obj/item/aiModule/purge)) laws.clear_inherent_laws() - to_chat(usr, "Law module applied.") + to_chat(user, "Law module applied.") if(istype(P, /obj/item/aiModule/freeform)) var/obj/item/aiModule/freeform/M = P laws.add_inherent_law(M.newFreeFormLaw) - to_chat(usr, "Added a freeform law.") + to_chat(user, "Added a freeform law.") if(istype(P, /obj/item/mmi)) var/obj/item/mmi/M = P @@ -148,7 +148,7 @@ user.drop_item() P.loc = src brain = P - to_chat(usr, "Added [P].") + to_chat(user, "Added [P].") icon_state = "3b" if(P.has_tool_quality(TOOL_CROWBAR) && brain) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 44600b9c69b..70ec7f8717c 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -80,7 +80,7 @@ return data -/obj/machinery/computer/aifixer/tgui_act(action, params) +/obj/machinery/computer/aifixer/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(!occupier) @@ -92,7 +92,7 @@ switch(action) if("PRG_beginReconstruction") if(occupier?.health < 100) - to_chat(usr, span_notice("Reconstruction in progress. This will take several minutes.")) + to_chat(ui.user, span_notice("Reconstruction in progress. This will take several minutes.")) playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE) restoring = TRUE var/mob/observer/dead/ghost = occupier.get_ghost() diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 8afe56476bd..f6a50c32548 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -159,7 +159,7 @@ sleep(10) enemy_hp -= attackamt - arcade_action() + arcade_action(ui.user) if("heal") blocked = 1 @@ -173,7 +173,7 @@ player_mp -= pointamt player_hp += healamt blocked = 1 - arcade_action() + arcade_action(ui.user) if("charge") blocked = 1 @@ -185,7 +185,7 @@ turtle-- sleep(10) - arcade_action() + arcade_action(ui.user) if(action == "newgame") //Reset everything @@ -201,10 +201,10 @@ randomize_characters() emagged = 0 - add_fingerprint(usr) + add_fingerprint(ui.user) return TRUE -/obj/machinery/computer/arcade/battle/proc/arcade_action() +/obj/machinery/computer/arcade/battle/proc/arcade_action(var/mob/user) if ((enemy_mp <= 0) || (enemy_hp <= 0)) if(!gameover) gameover = 1 @@ -215,8 +215,8 @@ feedback_inc("arcade_win_emagged") new /obj/effect/spawner/newbomb/timer/syndicate(src.loc) new /obj/item/clothing/head/collectable/petehat(src.loc) - message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") - log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") + message_admins("[key_name_admin(user)] has outbombed Cuban Pete and been awarded a bomb.") + log_game("[key_name_admin(user)] has outbombed Cuban Pete and been awarded a bomb.") randomize_characters() emagged = 0 else if(!contents.len) @@ -245,7 +245,7 @@ temp = "You have been drained! GAME OVER" if(emagged) feedback_inc("arcade_loss_mana_emagged") - usr.gib() + user.gib() else feedback_inc("arcade_loss_mana_normal") @@ -267,7 +267,7 @@ playsound(src, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE) if(emagged) feedback_inc("arcade_loss_hp_emagged") - usr.gib() + user.gib() else feedback_inc("arcade_loss_hp_normal") @@ -367,12 +367,12 @@ "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" ) -/obj/machinery/computer/arcade/orion_trail/proc/newgame() +/obj/machinery/computer/arcade/orion_trail/proc/newgame(var/mob/user) // Set names of settlers in crew settlers = list() for(var/i = 1; i <= 3; i++) add_crewmember() - add_crewmember("[usr]") + add_crewmember("[user]") // Re-set items to defaults engine = 1 hull = 1 @@ -466,7 +466,7 @@ if (href_list["continue"]) //Continue your travels if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) if(turns >= ORION_TRAIL_WINTURN) - win() + win(usr) else food -= (alive+traitors_aboard)*2 fuel -= 5 @@ -535,7 +535,7 @@ else if(href_list["newgame"]) //Reset everything if(gameStatus == ORION_STATUS_START) playsound(src, 'sound/arcade/Ori_begin.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE) - newgame() + newgame(usr) else if(href_list["menu"]) //back to the main menu if(gameStatus == ORION_STATUS_GAMEOVER) gameStatus = ORION_STATUS_START @@ -1006,14 +1006,14 @@ return removed -/obj/machinery/computer/arcade/orion_trail/proc/win() +/obj/machinery/computer/arcade/orion_trail/proc/win(var/mob/user) gameStatus = ORION_STATUS_START src.visible_message("\The [src] plays a triumpant tune, stating 'CONGRATULATIONS, YOU HAVE MADE IT TO ORION.'") playsound(src, 'sound/arcade/Ori_win.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE) if(emagged) new /obj/item/orion_ship(src.loc) - message_admins("[key_name_admin(usr)] made it to Orion on an emagged machine and got an explosive toy ship.") - log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.") + message_admins("[key_name_admin(user)] made it to Orion on an emagged machine and got an explosive toy ship.") + log_game("[key_name(user)] made it to Orion on an emagged machine and got an explosive toy ship.") else prizevend() emagged = 0 @@ -1025,7 +1025,7 @@ to_chat(user, span_notice("You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.")) name = "The Orion Trail: Realism Edition" desc = "Learn how our ancestors got to Orion, and try not to die in the process!" - newgame() + newgame(user) emagged = 1 return 1 @@ -1049,8 +1049,8 @@ if(active) return - message_admins("[key_name_admin(usr)] primed an explosive Orion ship for detonation.") - log_game("[key_name(usr)] primed an explosive Orion ship for detonation.") + message_admins("[key_name_admin(user)] primed an explosive Orion ship for detonation.") + log_game("[key_name(user)] primed an explosive Orion ship for detonation.") to_chat(user, span_warning("You flip the switch on the underside of [src].")) active = 1 @@ -1112,10 +1112,10 @@ var/paid = 0 var/obj/item/card/id/W = I.GetID() if(W) //for IDs and PDAs and wallets with IDs - paid = pay_with_card(W,I) + paid = pay_with_card(W, I, user) else if(istype(I, /obj/item/spacecash/ewallet)) var/obj/item/spacecash/ewallet/C = I - paid = pay_with_ewallet(C) + paid = pay_with_ewallet(C, user) else if(istype(I, /obj/item/spacecash)) var/obj/item/spacecash/C = I paid = pay_with_cash(C, user) @@ -1132,16 +1132,16 @@ // This is not a status display message, since it's something the character // themselves is meant to see BEFORE putting the money in - to_chat(usr, "[icon2html(cashmoney,user.client)] " + span_warning("That is not enough money.")) + to_chat(user, "[icon2html(cashmoney,user.client)] " + span_warning("That is not enough money.")) return 0 if(istype(cashmoney, /obj/item/spacecash)) - visible_message(span_info("\The [usr] inserts some cash into \the [src].")) + visible_message(span_info("\The [user] inserts some cash into \the [src].")) cashmoney.worth -= gameprice if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) else cashmoney.update_icon() @@ -1155,9 +1155,9 @@ ///// Ewallet -/obj/machinery/computer/arcade/clawmachine/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet) +/obj/machinery/computer/arcade/clawmachine/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet, var/mob/user) if(!emagged) - visible_message(span_info("\The [usr] swipes \the [wallet] through \the [src].")) + visible_message(span_info("\The [user] swipes \the [wallet] through \the [src].")) playsound(src, 'sound/machines/id_swipe.ogg', 50, 1) if(gameprice > wallet.worth) visible_message(span_info("Insufficient funds.")) @@ -1168,14 +1168,14 @@ return 1 if(emagged) playsound(src, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE) - to_chat(usr, span_info("It doesn't seem to accept that! Seem you'll need to swipe a valid ID.")) + to_chat(user, span_info("It doesn't seem to accept that! Seem you'll need to swipe a valid ID.")) ///// ID -/obj/machinery/computer/arcade/clawmachine/proc/pay_with_card(var/obj/item/card/id/I, var/obj/item/ID_container) +/obj/machinery/computer/arcade/clawmachine/proc/pay_with_card(var/obj/item/card/id/I, var/obj/item/ID_container, var/mob/user) if(I==ID_container || ID_container == null) - visible_message(span_info("\The [usr] swipes \the [I] through \the [src].")) + visible_message(span_info("\The [user] swipes \the [I] through \the [src].")) else - visible_message(span_info("\The [usr] swipes \the [ID_container] through \the [src].")) + visible_message(span_info("\The [user] swipes \the [ID_container] through \the [src].")) playsound(src, 'sound/machines/id_swipe.ogg', 50, 1) var/datum/money_account/customer_account = get_account(I.associated_account_number) if(!customer_account) @@ -1189,7 +1189,7 @@ // Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is // empty at high security levels if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) - var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction") + var/attempt_pin = tgui_input_number(user, "Enter pin code", "Vendor transaction") customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2) if(!customer_account) @@ -1268,7 +1268,7 @@ return data -/obj/machinery/computer/arcade/clawmachine/tgui_act(action, params) +/obj/machinery/computer/arcade/clawmachine/tgui_act(action, params, datum/tgui/ui) if(..()) return @@ -1289,9 +1289,9 @@ if(action == "pointless" && wintick >= 10) instructions = "Insert 1 thaler or swipe a card to play!" - clawvend() + clawvend(ui.user) -/obj/machinery/computer/arcade/clawmachine/proc/clawvend() /// True to a real claw machine, it's NEARLY impossible to win. +/obj/machinery/computer/arcade/clawmachine/proc/clawvend(var/mob/user) /// True to a real claw machine, it's NEARLY impossible to win. winprob += 1 /// Yeah. if(prob(winprob)) /// YEAH. @@ -1304,7 +1304,7 @@ winscreen = "You won...?" var/obj/item/grenade/G = new /obj/item/grenade/explosive(get_turf(src)) /// YEAAAAAAAAAAAAAAAAAAH!!!!!!!!!! G.activate() - G.throw_at(get_turf(usr),10,10) /// Play stupid games, win stupid prizes. + G.throw_at(get_turf(user),10,10) /// Play stupid games, win stupid prizes. playsound(src, 'sound/arcade/Ori_win.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE) winprob = 0 diff --git a/code/game/machinery/computer/arcade_vr.dm b/code/game/machinery/computer/arcade_vr.dm index a1d4ebb069e..80daaceb524 100644 --- a/code/game/machinery/computer/arcade_vr.dm +++ b/code/game/machinery/computer/arcade_vr.dm @@ -22,7 +22,6 @@ /obj/item/toy/redbutton = 2, /obj/item/toy/gnome = 2, /obj/item/toy/AI = 2, - /obj/item/clothing/gloves/ring/buzzer/toy = 2, /obj/item/storage/box/handcuffs/fake = 2, /obj/item/toy/nuke = 2, /obj/item/toy/minigibber = 2, diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index a566a6be1a3..77f9ce12c00 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -158,35 +158,35 @@ if(modify) data_core.manifest_modify(modify.registered_name, modify.assignment, modify.rank) modify.name = "[modify.registered_name]'s ID Card ([modify.assignment])" - if(ishuman(usr)) + if(ishuman(ui.user)) modify.forceMove(get_turf(src)) - if(!usr.get_active_hand()) - usr.put_in_hands(modify) + if(!ui.user.get_active_hand()) + ui.user.put_in_hands(modify) modify = null else modify.forceMove(get_turf(src)) modify = null else - var/obj/item/I = usr.get_active_hand() - if(istype(I, /obj/item/card/id) && usr.unEquip(I)) + var/obj/item/I = ui.user.get_active_hand() + if(istype(I, /obj/item/card/id) && ui.user.unEquip(I)) I.forceMove(src) modify = I . = TRUE if("scan") if(scan) - if(ishuman(usr)) + if(ishuman(ui.user)) scan.forceMove(get_turf(src)) - if(!usr.get_active_hand()) - usr.put_in_hands(scan) + if(!ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null else scan.forceMove(get_turf(src)) scan = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) scan = I . = TRUE @@ -205,7 +205,7 @@ if(is_authenticated() && modify) var/t1 = params["assign_target"] if(t1 == "Custom") - var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"), 45) + var/temp_t = sanitize(tgui_input_text(ui.user, "Enter a custom job assignment.","Assignment"), 45) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) modify.assignment = temp_t @@ -216,7 +216,7 @@ else var/datum/job/jobdatum = SSjob.get_job(t1) if(!jobdatum) - to_chat(usr, span_warning("No log exists for this job: [t1]")) + to_chat(ui.user, span_warning("No log exists for this job: [t1]")) return access = jobdatum.get_access() diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 9efcb481305..9175cb391ad 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -196,7 +196,7 @@ return data -/obj/machinery/computer/cloning/tgui_act(action, params) +/obj/machinery/computer/cloning/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -204,7 +204,7 @@ switch(tgui_modal_act(src, action, params)) if(TGUI_MODAL_ANSWER) if(params["id"] == "del_rec" && active_record) - var/obj/item/card/id/C = usr.get_active_hand() + var/obj/item/card/id/C = ui.user.get_active_hand() if(!istype(C) && !istype(C, /obj/item/pda)) set_temp("ID not in hand.", "danger") return @@ -360,16 +360,16 @@ else scan_mode = FALSE if("eject") - if(usr.incapacitated() || !scanner || loading) + if(ui.user.incapacitated() || !scanner || loading) return - scanner.eject_occupant(usr) - scanner.add_fingerprint(usr) + scanner.eject_occupant(ui.user) + scanner.add_fingerprint(ui.user) if("cleartemp") temp = null else return FALSE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob, var/scan_brain = 0) if(stat & NOPOWER) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 1d43173d5af..2ca39d0ebb7 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -185,7 +185,7 @@ if (!can_climb(user)) return - usr.visible_message(span_warning("[user] starts climbing onto \the [src]!")) + user.visible_message(span_warning("[user] starts climbing onto \the [src]!")) LAZYDISTINCTADD(climbers, user) if(!do_after(user,(issmall(user) ? climb_delay * 0.6 : climb_delay))) @@ -196,10 +196,10 @@ LAZYREMOVE(climbers, user) return - usr.forceMove(climb_to(user)) + user.forceMove(climb_to(user)) if (get_turf(user) == get_turf(src)) - usr.visible_message(span_warning("[user] climbs onto \the [src]!")) + user.visible_message(span_warning("[user] climbs onto \the [src]!")) LAZYREMOVE(climbers, user) /obj/machinery/computer/proc/climb_to(var/mob/living/user) diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 6bf5417f8dd..ddb74b6ad69 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -49,7 +49,7 @@ to_chat(user, span_warning("This guest pass is already deactivated!")) return - var/confirm = tgui_alert(usr, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", list("Yes", "No")) + var/confirm = tgui_alert(user, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", list("Yes", "No")) if(confirm == "Yes") //rip guest pass 0 && dur <= 360) //VOREStation Edit duration = dur else - to_chat(usr, span_warning("Invalid duration.")) + to_chat(ui.user, span_warning("Invalid duration.")) if("access") var/A = text2num(params["access"]) if(A in accesses) @@ -215,22 +215,22 @@ if(A in giver.GetAccess()) //Let's make sure the ID card actually has the access. accesses.Add(A) else - to_chat(usr, span_warning("Invalid selection, please consult technical support if there are any issues.")) - log_debug("[key_name_admin(usr)] tried selecting an invalid guest pass terminal option.") + to_chat(ui.user, span_warning("Invalid selection, please consult technical support if there are any issues.")) + log_debug("[key_name_admin(ui.user)] tried selecting an invalid guest pass terminal option.") if("id") if(giver) - if(ishuman(usr)) - giver.loc = usr.loc - if(!usr.get_active_hand()) - usr.put_in_hands(giver) + if(ishuman(ui.user)) + giver.loc = ui.user.loc + if(!ui.user.get_active_hand()) + ui.user.put_in_hands(giver) giver = null else giver.loc = src.loc giver = null accesses.Cut() else - var/obj/item/I = usr.get_active_hand() - if(istype(I, /obj/item/card/id) && usr.unEquip(I)) + var/obj/item/I = ui.user.get_active_hand() + if(istype(I, /obj/item/card/id) && ui.user.unEquip(I)) I.loc = src giver = I @@ -238,7 +238,7 @@ var/dat = "

Activity log of guest pass terminal #[uid]


" for (var/entry in internal_log) dat += "[entry]

" - //to_chat(usr, "Printing the log, standby...") + //to_chat(ui.user, "Printing the log, standby...") //sleep(50) var/obj/item/paper/P = new/obj/item/paper( loc ) P.name = "activity log" @@ -263,7 +263,7 @@ pass.reason = reason pass.name = "guest pass #[number]" else - to_chat(usr, span_warning("Cannot issue pass without issuing ID.")) + to_chat(ui.user, span_warning("Cannot issue pass without issuing ID.")) - add_fingerprint(usr) + add_fingerprint(ui.user) return TRUE diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 00339ac2737..afc2640e436 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -202,7 +202,7 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/med_data/tgui_act(action, params) +/obj/machinery/computer/med_data/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -221,13 +221,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) scan = I if("login") @@ -236,12 +236,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -259,8 +259,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null @@ -298,6 +298,16 @@ active1 = general_record active2 = medical_record screen = MED_DATA_RECORD + if("sync_r") + if(active2) + set_temp(client_update_record(src,usr)) + if("edit_notes") + // The modal input in tgui is busted for this sadly... + var/new_notes = strip_html_simple(tgui_input_text(usr,"Enter new information here.","Character Preference", html_decode(active2.fields["notes"]), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH) + if(usr.Adjacent(src)) + if(new_notes != "" || tgui_alert(usr, "Are you sure you want to delete the current record's notes?", "Confirm Delete", list("Delete", "No")) == "Delete") + if(usr.Adjacent(src)) + active2.fields["notes"] = new_notes if("new") if(istype(active1, /datum/data/record) && !istype(active2, /datum/data/record)) var/datum/data/record/R = new /datum/data/record() diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 10b4187e6cb..fb49f1ca0f9 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -179,7 +179,7 @@ custommessage = "This is a test, please ignore." customjob = "Admin" -/obj/machinery/computer/message_monitor/tgui_act(action, params) +/obj/machinery/computer/message_monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -202,7 +202,7 @@ //Find a server if("find") if(message_servers && message_servers.len > 1) - linkedServer = tgui_input_list(usr,"Please select a server.", "Select a server.", message_servers) + linkedServer = tgui_input_list(ui.user,"Please select a server.", "Select a server.", message_servers) set_temp("NOTICE: Server selected.", "alert") else if(message_servers && message_servers.len > 0) linkedServer = message_servers[1] @@ -211,13 +211,13 @@ temp = noserver //Hack the Console to get the password if("hack") - if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr)) + if((istype(ui.user, /mob/living/silicon/ai) || istype(ui.user, /mob/living/silicon/robot)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user)) hacking = 1 update_icon() //Time it takes to bruteforce is dependant on the password length. spawn(100*length(linkedServer.decryptkey)) - if(src && linkedServer && usr) - BruteForce(usr) + if(src && linkedServer && ui.user) + BruteForce(ui.user) if(!auth) return @@ -243,10 +243,10 @@ . = TRUE //Change the password - KEY REQUIRED if("pass") - var/dkey = trim(tgui_input_text(usr, "Please enter the current decryption key.")) + var/dkey = trim(tgui_input_text(ui.user, "Please enter the current decryption key.")) if(dkey && dkey != "") if(linkedServer.decryptkey == dkey) - var/newkey = trim(tgui_input_text(usr,"Please enter the new key (3 - 16 characters max):",null,null,16)) + var/newkey = trim(tgui_input_text(ui.user,"Please enter the new key (3 - 16 characters max):",null,null,16)) if(length(newkey) <= 3) set_temp("NOTICE: Decryption key too short!", "average") else if(length(newkey) > 16) @@ -325,7 +325,7 @@ . = TRUE if("addtoken") - linkedServer.spamfilter += tgui_input_text(usr,"Enter text you want to be filtered out","Token creation") + linkedServer.spamfilter += tgui_input_text(ui.user,"Enter text you want to be filtered out","Token creation") . = TRUE if("deltoken") diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 7b2dffc6ea3..9bc753b59e9 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -136,7 +136,7 @@ dat += "
\nToggle Outer Door
" dat += "

Close" user << browse(dat, "window=computer;size=400x500") - add_fingerprint(usr) + add_fingerprint(user) onclose(user, "computer") return diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 8e73278ce31..043bfc8e5d5 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -66,7 +66,7 @@ return list("locked" = !screen, "chemImplants" = chemImplants, "trackImplants" = trackImplants) -/obj/machinery/computer/prisoner/tgui_act(action, list/params) +/obj/machinery/computer/prisoner/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE switch(action) @@ -76,17 +76,17 @@ I.activate(clamp(params["val"], 0, 10)) . = TRUE if("lock") - if(allowed(usr)) + if(allowed(ui.user)) screen = !screen else - to_chat(usr, "Unauthorized Access.") + to_chat(ui.user, "Unauthorized Access.") . = TRUE if("warn") - var/warning = sanitize(tgui_input_text(usr, "Message:", "Enter your message here!", "")) + var/warning = sanitize(tgui_input_text(ui.user, "Message:", "Enter your message here!", "")) if(!warning) return var/obj/item/implant/I = locate(params["imp"]) if(I && I.imp_in) to_chat(I.imp_in, span_notice("You hear a voice in your head saying: '[warning]'")) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index ca5ef050255..9f16d3d057b 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -151,30 +151,30 @@ data["show_detonate_all"] = (data["auth"] && length(data["cyborgs"]) > 0 && ishuman(user)) return data -/obj/machinery/computer/robotics/tgui_act(action, params) +/obj/machinery/computer/robotics/tgui_act(action, params, datum/tgui/ui) if(..()) return . = FALSE - if(!is_authenticated(usr)) - to_chat(usr, span_warning("Access denied.")) + if(!is_authenticated(ui.user)) + to_chat(ui.user, span_warning("Access denied.")) return switch(action) if("arm") // Arms the emergency self-destruct system - if(issilicon(usr)) - to_chat(usr, span_danger("Access Denied (silicon detected)")) + if(issilicon(ui.user)) + to_chat(ui.user, span_danger("Access Denied (silicon detected)")) return safety = !safety - to_chat(usr, span_notice("You [safety ? "disarm" : "arm"] the emergency self destruct.")) + to_chat(ui.user, span_notice("You [safety ? "disarm" : "arm"] the emergency self destruct.")) . = TRUE if("nuke") // Destroys all accessible cyborgs if safety is disabled - if(issilicon(usr)) - to_chat(usr, span_danger("Access Denied (silicon detected)")) + if(issilicon(ui.user)) + to_chat(ui.user, span_danger("Access Denied (silicon detected)")) return if(safety) - to_chat(usr, span_danger("Self-destruct aborted - safety active")) + to_chat(ui.user, span_danger("Self-destruct aborted - safety active")) return - message_admins(span_notice("[key_name_admin(usr)] detonated all cyborgs!")) - log_game(span_notice("[key_name(usr)] detonated all cyborgs!")) + message_admins(span_notice("[key_name_admin(ui.user)] detonated all cyborgs!")) + log_game(span_notice("[key_name(ui.user)] detonated all cyborgs!")) for(var/mob/living/silicon/robot/R in mob_list) if(istype(R, /mob/living/silicon/robot/drone)) continue @@ -188,7 +188,7 @@ . = TRUE if("killbot") // destroys one specific cyborg var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_control(usr, R, TRUE)) + if(!can_control(ui.user, R, TRUE)) return if(R.mind && R.mind.special_role && R.emagged) to_chat(R, span_userdanger("Extreme danger! Termination codes detected. Scrambling security codes and automatic AI unlink triggered.")) @@ -196,22 +196,22 @@ . = TRUE return var/turf/T = get_turf(R) - message_admins(span_notice("[key_name_admin(usr)] detonated [key_name_admin(R)] ([ADMIN_COORDJMP(T)])!")) - log_game(span_notice("[key_name(usr)] detonated [key_name(R)]!")) + message_admins(span_notice("[key_name_admin(ui.user)] detonated [key_name_admin(R)] ([ADMIN_COORDJMP(T)])!")) + log_game(span_notice("[key_name(ui.user)] detonated [key_name(R)]!")) to_chat(R, span_danger("Self-destruct command received.")) if(R.connected_ai) to_chat(R.connected_ai, "

[span_alert("ALERT - Cyborg detonation detected: [R.name]")]
") R.self_destruct() . = TRUE if("stopbot") // lock or unlock the borg - if(isrobot(usr)) - to_chat(usr, span_danger("Access Denied.")) + if(isrobot(ui.user)) + to_chat(ui.user, span_danger("Access Denied.")) return var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_control(usr, R, TRUE)) + if(!can_control(ui.user, R, TRUE)) return - message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!")) - log_game("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!") + message_admins(span_notice("[ADMIN_LOOKUPFLW(ui.user)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!")) + log_game("[key_name(ui.user)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!") R.SetLockdown(!R.lockcharge) to_chat(R, "[!R.lockcharge ? span_notice("Your lockdown has been lifted!") : span_alert("You have been locked down!")]") if(R.connected_ai) @@ -219,13 +219,13 @@ . = TRUE if("hackbot") // AIs hacking/emagging a borg var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_hack(usr, R)) + if(!can_hack(ui.user, R)) return - var/choice = tgui_alert(usr, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No")) + var/choice = tgui_alert(ui.user, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No")) if(choice != "Yes") return - log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!") - message_admins(span_notice("[key_name_admin(usr)] emagged [key_name_admin(R)] using robotic console!")) + log_game("[key_name(ui.user)] emagged [key_name(R)] using robotic console!") + message_admins(span_notice("[key_name_admin(ui.user)] emagged [key_name_admin(R)] using robotic console!")) R.emagged = TRUE to_chat(R, span_notice("Failsafe protocols overridden. New tools available.")) . = TRUE diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 1be57d146ef..86d6842df88 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -185,7 +185,7 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/secure_data/tgui_act(action, params) +/obj/machinery/computer/secure_data/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -204,13 +204,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) scan = I if("login") @@ -219,12 +219,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -242,8 +242,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null @@ -270,6 +270,16 @@ qdel(active1) if(active2) qdel(active2) + if("sync_r") + if(active2) + set_temp(client_update_record(src,usr)) + if("edit_notes") + // The modal input in tgui is busted for this sadly... + var/new_notes = strip_html_simple(tgui_input_text(usr,"Enter new information here.","Character Preference", html_decode(active2.fields["notes"]), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH) + if(usr.Adjacent(src)) + if(new_notes != "" || tgui_alert(usr, "Are you sure you want to delete the current record's notes?", "Confirm Delete", list("Delete", "No")) == "Delete") + if(usr.Adjacent(src)) + active2.fields["notes"] = new_notes if("d_rec") var/datum/data/record/general_record = locate(params["d_rec"] || "") if(!data_core.general.Find(general_record)) @@ -338,12 +348,12 @@ SStgui.update_uis(src) addtimer(CALLBACK(src, PROC_REF(print_finish)), 5 SECONDS) if("photo_front") - var/icon/photo = get_photo(usr) + var/icon/photo = get_photo(ui.user) if(photo && active1) active1.fields["photo_front"] = photo active1.fields["photo-south"] = "'data:image/png;base64,[icon2base64(photo)]'" if("photo_side") - var/icon/photo = get_photo(usr) + var/icon/photo = get_photo(ui.user) if(photo && active1) active1.fields["photo_side"] = photo active1.fields["photo-west"] = "'data:image/png;base64,[icon2base64(photo)]'" @@ -474,7 +484,7 @@ var/obj/item/photo/photo = user.get_active_hand() return photo.img if(istype(user, /mob/living/silicon)) - var/mob/living/silicon/tempAI = usr + var/mob/living/silicon/tempAI = user var/obj/item/photo/selection = tempAI.GetPicture() if (selection) return selection.img diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 57524d95fd2..bac1fa7c9c9 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -143,11 +143,11 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/skills/tgui_act(action, params) +/obj/machinery/computer/skills/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) if(!data_core.general.Find(active1)) active1 = null @@ -160,13 +160,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) scan = I if("cleartemp") @@ -177,12 +177,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -199,8 +199,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null @@ -214,6 +214,16 @@ for(var/datum/data/record/R in data_core.general) qdel(R) set_temp("All employment records deleted.") + if("sync_r") + if(active1) + set_temp(client_update_record(src,active1,usr)) + if("edit_notes") + // The modal input in tgui is busted for this sadly... + var/new_notes = strip_html_simple(tgui_input_text(usr,"Enter new information here.","Character Preference", html_decode(active1.fields["notes"]), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH) + if(usr.Adjacent(src)) + if(new_notes != "" || tgui_alert(usr, "Are you sure you want to delete the current record's notes?", "Confirm Delete", list("Delete", "No")) == "Delete") + if(usr.Adjacent(src)) + active1.fields["notes"] = new_notes if("del_r") if(PDA_Manifest) PDA_Manifest.Cut() diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index dc285601caf..8117cf4499a 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -179,7 +179,7 @@ data["categories"] = all_supply_groups return data -/obj/machinery/computer/supplycomp/tgui_act(action, params) +/obj/machinery/computer/supplycomp/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(!SSsupply) @@ -221,29 +221,29 @@ visible_message(span_warning("[src]'s monitor flashes, \"[reqtime - world.time] seconds remaining until another requisition form may be printed.\"")) return FALSE - var/amount = clamp(tgui_input_number(usr, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20) + var/amount = clamp(tgui_input_number(ui.user, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20) if(!amount) return FALSE var/timeout = world.time + 600 - var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?","")) + var/reason = sanitize(tgui_input_text(ui.user, "Reason:","Why do you require this item?","")) if(world.time > timeout) - to_chat(usr, span_warning("Error. Request timed out.")) + to_chat(ui.user, span_warning("Error. Request timed out.")) return FALSE if(!reason) return FALSE for(var/i in 1 to amount) - SSsupply.create_order(S, usr, reason) + SSsupply.create_order(S, ui.user, reason) var/idname = "*None Provided*" var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user idname = H.get_authentification_name() idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name + else if(issilicon(ui.user)) + idname = ui.user.real_name idrank = "Stationbound synthetic" var/obj/item/paper/reqform = new /obj/item/paper(loc) @@ -280,23 +280,23 @@ return FALSE var/timeout = world.time + 600 - var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?","")) + var/reason = sanitize(tgui_input_text(ui.user, "Reason:","Why do you require this item?","")) if(world.time > timeout) - to_chat(usr, span_warning("Error. Request timed out.")) + to_chat(ui.user, span_warning("Error. Request timed out.")) return FALSE if(!reason) return FALSE - SSsupply.create_order(S, usr, reason) + SSsupply.create_order(S, ui.user, reason) var/idname = "*None Provided*" var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user idname = H.get_authentification_name() idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name + else if(issilicon(ui.user)) + idname = ui.user.real_name idrank = "Stationbound synthetic" var/obj/item/paper/reqform = new /obj/item/paper(loc) @@ -323,7 +323,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"])) + var/new_val = sanitize(tgui_input_text(ui.user, params["edit"], "Enter the new value for this field:", params["default"])) if(!new_val) return FALSE @@ -362,7 +362,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.approve_order(O, usr) + SSsupply.approve_order(O, ui.user) . = TRUE if("deny_order") var/datum/supply_order/O = locate(params["ref"]) @@ -370,7 +370,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.deny_order(O, usr) + SSsupply.deny_order(O, ui.user) . = TRUE if("delete_order") var/datum/supply_order/O = locate(params["ref"]) @@ -378,12 +378,12 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.delete_order(O, usr) + SSsupply.delete_order(O, ui.user) . = TRUE if("clear_all_requests") if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.deny_all_pending(usr) + SSsupply.deny_all_pending(ui.user) . = TRUE // Exports if("export_edit_field") @@ -394,11 +394,11 @@ if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE var/list/L = E.contents[params["index"]] - var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value")) + var/field = tgui_alert(ui.user, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value")) if(!field) return FALSE - var/new_val = sanitize(tgui_input_text(usr, field, "Enter the new value for this field:", L[lowertext(field)])) + var/new_val = sanitize(tgui_input_text(ui.user, field, "Enter the new value for this field:", L[lowertext(field)])) if(!new_val) return @@ -432,7 +432,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.add_export_item(E, usr) + SSsupply.add_export_item(E, ui.user) . = TRUE if("export_edit") var/datum/exported_crate/E = locate(params["ref"]) @@ -441,7 +441,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"])) + var/new_val = sanitize(tgui_input_text(ui.user, params["edit"], "Enter the new value for this field:", params["default"])) if(!new_val) return @@ -461,20 +461,20 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.delete_export(E, usr) + SSsupply.delete_export(E, ui.user) . = TRUE if("send_shuttle") switch(params["mode"]) if("send_away") if (shuttle.forbidden_atoms_check()) - to_chat(usr, span_warning("For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.")) + to_chat(ui.user, span_warning("For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.")) else shuttle.launch(src) - to_chat(usr, span_notice("Initiating launch sequence.")) + to_chat(ui.user, span_notice("Initiating launch sequence.")) if("send_to_station") shuttle.launch(src) - to_chat(usr, span_notice("The supply shuttle has been called and will arrive in approximately [round(SSsupply.movetime/600,1)] minutes.")) + to_chat(ui.user, span_notice("The supply shuttle has been called and will arrive in approximately [round(SSsupply.movetime/600,1)] minutes.")) if("cancel_shuttle") shuttle.cancel_launch(src) @@ -483,7 +483,7 @@ shuttle.force_launch(src) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/supplycomp/proc/post_signal(var/command) var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 410ce817bd7..4e5eba6d71b 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -112,33 +112,33 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("id") if(card) - usr.put_in_hands(card) + ui.user.put_in_hands(card) card = null else - var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/card/id) && usr.unEquip(I)) + var/obj/item/I = ui.user.get_active_hand() + if (istype(I, /obj/item/card/id) && ui.user.unEquip(I)) I.forceMove(src) card = I update_icon() return TRUE if("switch-to-onduty-rank") - if(checkFace()) - if(checkCardCooldown()) - makeOnDuty(params["switch-to-onduty-rank"], params["switch-to-onduty-assignment"]) - usr.put_in_hands(card) + if(checkFace(ui.user)) + if(checkCardCooldown(ui.user)) + makeOnDuty(params["switch-to-onduty-rank"], params["switch-to-onduty-assignment"], ui.user) + ui.user.put_in_hands(card) card = null update_icon() return TRUE if("switch-to-offduty") - if(checkFace()) - if(checkCardCooldown()) - makeOffDuty() - usr.put_in_hands(card) + if(checkFace(ui.user)) + if(checkCardCooldown(ui.user)) + makeOffDuty(ui.user) + ui.user.put_in_hands(card) card = null update_icon() return TRUE @@ -165,10 +165,10 @@ && !job.disallow_jobhop \ && job.timeoff_factor > 0 -/obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment) +/obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment, var/mob/user) var/datum/job/oldjob = job_master.GetJob(card.rank) var/datum/job/newjob = job_master.GetJob(newrank) - if(!oldjob || !isOpenOnDutyJob(usr, oldjob.pto_type, newjob)) + if(!oldjob || !isOpenOnDutyJob(user, oldjob.pto_type, newjob)) return if(newassignment != newjob.title && !(newassignment in newjob.alt_titles)) return @@ -181,13 +181,13 @@ card.last_job_switch = world.time callHook("reassign_employee", list(card)) newjob.current_positions++ - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user H.mind.assigned_role = card.rank H.mind.role_alt_title = card.assignment announce.autosay("[card.registered_name] has moved On-Duty as [card.assignment].", "Employee Oversight", channel, zlevels = using_map.get_map_levels(get_z(src))) return -/obj/machinery/computer/timeclock/proc/makeOffDuty() +/obj/machinery/computer/timeclock/proc/makeOffDuty(var/mob/user) var/datum/job/foundjob = job_master.GetJob(card.rank) if(!foundjob) return @@ -206,35 +206,35 @@ data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time callHook("reassign_employee", list(card)) - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user H.mind.assigned_role = ptojob.title H.mind.role_alt_title = ptojob.title foundjob.current_positions-- announce.autosay("[card.registered_name], [oldtitle], has moved Off-Duty.", "Employee Oversight", channel, zlevels = using_map.get_map_levels(get_z(src))) return -/obj/machinery/computer/timeclock/proc/checkCardCooldown() +/obj/machinery/computer/timeclock/proc/checkCardCooldown(var/mob/user) if(!card) return FALSE var/time_left = 10 MINUTES - (world.time - card.last_job_switch) if(time_left > 0) - to_chat(usr, "You need to wait another [round((time_left/10)/60, 1)] minute\s before you can switch.") + to_chat(user, "You need to wait another [round((time_left/10)/60, 1)] minute\s before you can switch.") return FALSE return TRUE -/obj/machinery/computer/timeclock/proc/checkFace() +/obj/machinery/computer/timeclock/proc/checkFace(var/mob/user) if(!card) - to_chat(usr, span_notice("No ID is inserted.")) + to_chat(user, span_notice("No ID is inserted.")) return FALSE - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user if(!(istype(H))) - to_chat(usr, span_warning("Invalid user detected. Access denied.")) + to_chat(user, span_warning("Invalid user detected. Access denied.")) return FALSE else if((H.wear_mask && (H.wear_mask.flags_inv & HIDEFACE)) || (H.head && (H.head.flags_inv & HIDEFACE))) //Face hiding bad - to_chat(usr, span_warning("Facial recognition scan failed due to physical obstructions. Access denied.")) + to_chat(user, span_warning("Facial recognition scan failed due to physical obstructions. Access denied.")) return FALSE else if(H.get_face_name() == "Unknown" || !(H.real_name == card.registered_name)) - to_chat(usr, span_warning("Facial recognition scan failed. Access denied.")) + to_chat(user, span_warning("Facial recognition scan failed. Access denied.")) return FALSE else return TRUE diff --git a/code/game/machinery/contraband_scanner.dm b/code/game/machinery/contraband_scanner.dm new file mode 100644 index 00000000000..265cad9bd8c --- /dev/null +++ b/code/game/machinery/contraband_scanner.dm @@ -0,0 +1,67 @@ +/obj/machinery/contraband_scanner + name = "contraband scanner" + gender = PLURAL + icon = 'icons/obj/atm_fieldgen.dmi' + icon_state = "arfg_off" + desc = "A simple scanner that analyzes those who pass over it, and sounds an alarm if it detects any items that are programmed into its contraband list." + anchored = TRUE + opacity = FALSE + density = FALSE + power_channel = EQUIP + use_power = USE_POWER_IDLE + idle_power_usage = 10 + active_power_usage = 250 + + var/deep_scan = TRUE //check more than just their hands/pockets? + var/contraband_count = 0 //how many items have we detected? only one actually needs to be found to set off the alarm + var/area_lockdown = TRUE //do we set off the fire alarm for our area when triggered? + var/close_blastdoors = TRUE //close all blast doors in the area when triggered? + var/power_fields = TRUE //do we activate all ARFs when triggered? use w/ impassable fieldgens. requires area_lockdown = TRUE to do anything. + + var/last_trigger //when were we last triggered? combined with the cooldown below for sanity reasons + var/cooldown = 15 SECONDS //minimum time between retriggers, so people can't spam trigger the scanner to be obnoxious + var/auto_cancel = TRUE //automatically cancel alarm states after a delay? same duration as the cooldown for sanity + var/trigger_message = "The contraband scanner has been tripped!" + var/trigger_sound = 'sound/machines/airalarm.ogg' //sound that plays when we're set off + + var/list/contraband = list(/obj/item/melee,/obj/item/gun,/obj/item/material) + +/obj/machinery/contraband_scanner/Crossed(mob/living/M as mob) + if(M.is_incorporeal()) + return + if(isliving(M)) + var/area/A = src.loc.loc + if(last_trigger > world.time - cooldown) + return + for(var/obj/O in M.contents) + if(is_type_in_list(O,contraband)) + contraband_count++ + if(deep_scan) + for(var/obj/O2 in O.contents) //one layer deep is fine for now I think + if(is_type_in_list(O2,contraband)) + contraband_count++ + if(contraband_count && last_trigger < world.time - cooldown) + visible_message(span_danger(trigger_message)) + playsound(src, trigger_sound, 25, 0, 4, volume_channel = VOLUME_CHANNEL_ALARMS) + for(var/obj/machinery/contraband_scanner/CS in A) + CS.last_trigger = world.time //set everyone's trigger time at once, to cut down on spam + CS.contraband_count = 0 //clear all our contraband counts too + if(area_lockdown) + if(close_blastdoors) + for(var/obj/machinery/door/blast/B in A) + if(!B.density) + spawn(0) + B.close() + if(power_fields) + A.arfgs_activate() + if(auto_cancel) + spawn(cooldown) + if(close_blastdoors) + for(var/obj/machinery/door/blast/B in A) + if(B.density) + spawn(0) + B.open() + if(power_fields) + A.arfgs_deactivate() + + ..() diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 70716c5ecfd..79603bfaa72 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -90,7 +90,7 @@ return if(panel_open) - to_chat(usr, span_boldnotice("Close the maintenance panel first.")) + to_chat(user, span_boldnotice("Close the maintenance panel first.")) return tgui_interact(user) @@ -139,8 +139,8 @@ return data -/obj/machinery/atmospherics/unary/cryo_cell/tgui_act(action, params) - if(..() || usr == occupant) +/obj/machinery/atmospherics/unary/cryo_cell/tgui_act(action, params, datum/tgui/ui) + if(..() || ui.user == occupant) return TRUE . = TRUE @@ -157,13 +157,13 @@ beaker = null update_icon() if("ejectOccupant") - if(!occupant || isslime(usr) || ispAI(usr)) + if(!occupant || isslime(ui.user) || ispAI(ui.user)) return 0 // don't update UIs attached to this object go_out() else return FALSE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/G as obj, var/mob/user as mob) if(istype(G, /obj/item/reagent_containers/glass)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index d3ed23c511c..e8479049e58 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -114,7 +114,7 @@ if(..()) return - add_fingerprint(usr) + add_fingerprint(ui.user) return FALSE // VOREStation Edit - prevent topic exploits /* VOREStation Edit - Unreachable due to above @@ -124,12 +124,12 @@ return if(!LAZYLEN(frozen_items)) - to_chat(usr, span_notice("There is nothing to recover from storage.")) + to_chat(ui.user, span_notice("There is nothing to recover from storage.")) return var/obj/item/I = locate(params["ref"]) in frozen_items if(!I) - to_chat(usr, span_notice("\The [I] is no longer in storage.")) + to_chat(ui.user, span_notice("\The [I] is no longer in storage.")) return visible_message(span_notice("The console beeps happily as it disgorges [I].")) @@ -141,7 +141,7 @@ return if(!LAZYLEN(frozen_items)) - to_chat(usr, span_notice("There is nothing to recover from storage.")) + to_chat(ui.user, span_notice("There is nothing to recover from storage.")) return visible_message(span_notice("The console beeps happily as it disgorges the desired objects.")) @@ -709,7 +709,7 @@ if(willing) if(M == user) - visible_message("[usr] [on_enter_visible_message] [src].", 3) + visible_message("[user] [on_enter_visible_message] [src].", 3) else visible_message("\The [user] starts putting [M] into \the [src].", 3) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 6c9538e1f19..a5d9ecc4ea1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -660,7 +660,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite - if(!issilicon(usr)) + if(!issilicon(user)) if(src.isElectrified()) if(!src.justzap) if(src.shock(user, 100)) @@ -984,7 +984,7 @@ About the new airlock wires panel: return ..() /obj/machinery/door/airlock/attack_hand(mob/user as mob) - if(!istype(usr, /mob/living/silicon)) + if(!istype(user, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 100)) return @@ -1046,10 +1046,10 @@ About the new airlock wires panel: src.hold_open = user src.attack_hand(user) -/obj/machinery/door/airlock/tgui_act(action, params) +/obj/machinery/door/airlock/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!user_allowed(usr)) + if(!user_allowed(ui.user)) return TRUE switch(action) @@ -1058,14 +1058,14 @@ About the new airlock wires panel: loseMainPower() update_icon() else - to_chat(usr, span_warning("Main power is already offline.")) + to_chat(ui.user, span_warning("Main power is already offline.")) . = TRUE if("disrupt-backup") if(!backup_power_lost_until) loseBackupPower() update_icon() else - to_chat(usr, span_warning("Backup power is already offline.")) + to_chat(ui.user, span_warning("Backup power is already offline.")) . = TRUE if("shock-restore") electrify(0, 1) @@ -1080,14 +1080,14 @@ About the new airlock wires panel: set_idscan(aiDisabledIdScanner, 1) . = TRUE // if("emergency-toggle") - // toggle_emergency(usr) + // toggle_emergency(ui.user) // . = TRUE if("bolt-toggle") - toggle_bolt(usr) + toggle_bolt(ui.user) . = TRUE if("light-toggle") if(wires.is_cut(WIRE_BOLT_LIGHT)) - to_chat(usr, "The bolt lights wire is cut - The door bolt lights are permanently disabled.") + to_chat(ui.user, "The bolt lights wire is cut - The door bolt lights are permanently disabled.") return lights = !lights update_icon() @@ -1097,12 +1097,12 @@ About the new airlock wires panel: . = TRUE if("speed-toggle") if(wires.is_cut(WIRE_SPEED)) - to_chat(usr, "The timing wire is cut - Cannot alter timing.") + to_chat(ui.user, "The timing wire is cut - Cannot alter timing.") return normalspeed = !normalspeed . = TRUE if("open-close") - user_toggle_open(usr) + user_toggle_open(ui.user) . = TRUE update_icon() @@ -1158,7 +1158,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/attackby(obj/item/C, mob/user as mob) //to_world("airlock attackby src [src] obj [C] mob [user]") - if(!istype(usr, /mob/living/silicon)) + if(!istype(user, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 75)) return @@ -1189,7 +1189,7 @@ About the new airlock wires panel: else if(C.has_tool_quality(TOOL_SCREWDRIVER)) if (src.p_open) if (stat & BROKEN) - to_chat(usr, span_warning("The panel is broken and cannot be closed.")) + to_chat(user, span_warning("The panel is broken and cannot be closed.")) else src.p_open = FALSE playsound(src, C.usesound, 50, 1) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 5d8fd2c688f..5301aa56613 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -261,7 +261,7 @@ ..() /obj/machinery/access_button/attack_hand(mob/user) - add_fingerprint(usr) + add_fingerprint(user) if(!allowed(user)) to_chat(user, span_warning("Access Denied")) diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 355f561c1f9..da9f612f766 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -193,7 +193,7 @@ to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets.")) return to_chat(user, span_notice("You begin repairing [src]...")) - if(do_after(usr, 30)) + if(do_after(user, 30)) if(P.use(amt)) to_chat(user, span_notice("You have repaired \The [src]")) src.repair() diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 84a8a1e2e01..9c95ca1ff25 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -173,13 +173,13 @@ break return data -/obj/machinery/door_timer/tgui_act(action, params) +/obj/machinery/door_timer/tgui_act(action, params, datum/tgui/ui) if(..()) return . = TRUE - if(!allowed(usr)) - to_chat(usr, span_warning("Access denied.")) + if(!allowed(ui.user)) + to_chat(ui.user, span_warning("Access denied.")) return FALSE switch(action) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 2f70e0436e0..8055af222cc 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -437,12 +437,12 @@ return ..(M) /obj/machinery/door/update_nearby_tiles(need_rebuild) - if(!air_master) + if(!SSair) return 0 for(var/turf/simulated/turf in locs) update_heat_protection(turf) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) return 1 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index d4477eeac00..4502ed93343 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -501,15 +501,15 @@ update_nearby_tiles(need_rebuild) - if(!air_master) return 0 + if(!SSair) return 0 var/turf/simulated/source = loc var/turf/simulated/destination = get_step(source,dir) update_heat_protection(loc) - if(istype(source)) air_master.tiles_to_update += source - if(istype(destination)) air_master.tiles_to_update += destination + if(istype(source)) SSair.tiles_to_update += source + if(istype(destination)) SSair.tiles_to_update += destination return 1 */ diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 4aeb8ba70b4..f534ccd832a 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -30,14 +30,14 @@ . = ..() // stack_trace("WARNING: Embedded controller [src] ([type]) had Topic() called unexpectedly. Please report this.") // statpanel means that topic can always be called for clicking -/obj/machinery/embedded_controller/tgui_act(action, params) +/obj/machinery/embedded_controller/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(LAZYLEN(valid_actions)) if(action in valid_actions) program.receive_user_command(action) - if(usr) - add_fingerprint(usr) + if(ui.user) + add_fingerprint(ui.user) /obj/machinery/embedded_controller/process() if(program) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 9d26ad77dc4..902b7c96501 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -124,7 +124,7 @@ // Proc: tgui_act() // Parameters: 2 (standard tgui_act arguments) // Description: Responds to button presses on the TGUI interface. -/obj/machinery/exonet_node/tgui_act(action, params) +/obj/machinery/exonet_node/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -134,7 +134,7 @@ toggle = !toggle update_power() if(!toggle) - var/msg = "[usr.client.key] ([usr]) has turned [src] off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src] off, at [x],[y],[z]." message_admins(msg) log_game(msg) @@ -146,7 +146,7 @@ . = TRUE allow_external_communicators = !allow_external_communicators if(!allow_external_communicators) - var/msg = "[usr.client.key] ([usr]) has turned [src]'s communicator port off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src]'s communicator port off, at [x],[y],[z]." message_admins(msg) log_game(msg) @@ -154,12 +154,12 @@ . = TRUE allow_external_newscasters = !allow_external_newscasters if(!allow_external_newscasters) - var/msg = "[usr.client.key] ([usr]) has turned [src]'s newscaster port off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src]'s newscaster port off, at [x],[y],[z]." message_admins(msg) log_game(msg) update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) // Proc: get_exonet_node() // Parameters: None diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index bfd592e4675..8534b2d4d1b 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -35,10 +35,10 @@ /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) if(W.has_tool_quality(TOOL_WRENCH)) - var/m = tgui_input_list(usr, "Choose work mode", "Mode", mode) + var/m = tgui_input_list(user, "Choose work mode", "Mode", mode) mode[m] = !mode[m] var/O = mode[m] - user.visible_message(span_notice("[usr] has set \the [src] [m] mode [!O?"off":"on"]."), span_notice("You set \the [src] [m] mode [!O?"off":"on"].")) + user.visible_message(span_notice("[user] has set \the [src] [m] mode [!O?"off":"on"]."), span_notice("You set \the [src] [m] mode [!O?"off":"on"].")) return if(istype(W, /obj/item/stack/tile)) @@ -51,7 +51,7 @@ if(!length(contents)) to_chat(user, span_notice("\The [src] is empty.")) else - var/obj/item/stack/tile/E = tgui_input_list(usr, "Choose remove tile type.", "Tiles", contents) + var/obj/item/stack/tile/E = tgui_input_list(user, "Choose remove tile type.", "Tiles", contents) if(E) to_chat(user, span_notice("You remove the [E] from \the [src].")) E.loc = src.loc @@ -59,7 +59,7 @@ return if(W.has_tool_quality(TOOL_SCREWDRIVER)) - T = tgui_input_list(usr, "Choose tile type.", "Tiles", contents) + T = tgui_input_list(user, "Choose tile type.", "Tiles", contents) return ..() diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm index 9fd11d81c0f..f26860c9248 100644 --- a/code/game/machinery/gear_dispenser.dm +++ b/code/game/machinery/gear_dispenser.dm @@ -186,7 +186,7 @@ var/list/dispenser_presets = list() dispenser_flags &= ~GD_BUSY return - var/choice = tgui_input_list(usr, "Select equipment to dispense.", "Equipment Dispenser", gear_list) + var/choice = tgui_input_list(user, "Select equipment to dispense.", "Equipment Dispenser", gear_list) if(!choice) dispenser_flags &= ~GD_BUSY diff --git a/code/game/machinery/holoposter.dm b/code/game/machinery/holoposter.dm index 9b32fbb3716..4f76a3a66d6 100644 --- a/code/game/machinery/holoposter.dm +++ b/code/game/machinery/holoposter.dm @@ -85,7 +85,7 @@ GLOBAL_LIST_EMPTY(holoposters) return if (W.has_tool_quality(TOOL_MULTITOOL)) playsound(src, 'sound/items/penclick.ogg', 60, 1) - icon_state = tgui_input_list(usr, "Available Posters", "Holographic Poster", postertypes + "random") + icon_state = tgui_input_list(user, "Available Posters", "Holographic Poster", postertypes + "random") if(!Adjacent(user)) return if(icon_state == "random") diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index b290528f877..d5abde1e1fe 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -152,7 +152,7 @@ /obj/machinery/media/jukebox/interact(mob/user) if(inoperable()) - to_chat(usr, "\The [src] doesn't appear to function.") + to_chat(user, "\The [src] doesn't appear to function.") return tgui_interact(user) @@ -235,17 +235,17 @@ spawn(15) explode() else if(current_track == null) - to_chat(usr, "No track selected.") + to_chat(ui.user, "No track selected.") else StartPlaying() return TRUE if("add_new_track") - SSmedia_tracks.add_track(usr, params["url"], params["title"], text2num(params["duration"]) * 10, params["artist"], params["genre"], text2num(params["secret"]), text2num(params["lobby"])) + SSmedia_tracks.add_track(ui.user, params["url"], params["title"], text2num(params["duration"]) * 10, params["artist"], params["genre"], text2num(params["secret"]), text2num(params["lobby"])) if("remove_new_track") var/datum/track/track_to_remove = locate(params["ref"]) in getTracksList() if(track_to_remove == current_track && playing) StopPlaying() - SSmedia_tracks.remove_track(usr, track_to_remove) + SSmedia_tracks.remove_track(ui.user, track_to_remove) /obj/machinery/media/jukebox/attack_ai(mob/user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 8ee5e8910d3..a344167c4a7 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -28,9 +28,9 @@ if(istype(I, /obj/item/multitool)) if(panel_open) - var/input = sanitize(tgui_input_text(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) + var/input = sanitize(tgui_input_text(user, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) if(!input) - to_chat(usr, "No input found please hang up and try your call again.") + to_chat(user, "No input found please hang up and try your call again.") return id = input return diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 17a1837e333..07dbe9a32e4 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -416,7 +416,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if(FC.channel_name == channel_name) check = 1 break - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(channel_name == "" || channel_name == "\[REDACTED\]") set_temp("Error: Could not submit feed channel to network: Invalid Channel Name.", "danger", FALSE) return TRUE @@ -430,7 +430,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit feed channel to network: A feed channel already exists under your name.", "danger", FALSE) return TRUE - var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) if(choice == "Confirm") news_network.CreateFeedChannel(channel_name, our_user, c_locked) set_temp("Feed channel [channel_name] created successfully.", "success", FALSE) @@ -442,25 +442,25 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) for(var/datum/feed_channel/F in news_network.network_channels) if((!F.locked || F.author == scanned_user) && !F.censored) available_channels += F.channel_name - var/new_channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) + var/new_channel_name = tgui_input_list(ui.user, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) if(new_channel_name) channel_name = new_channel_name return TRUE if("set_new_message") - msg = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", multiline = TRUE, prevent_enter = TRUE)) + msg = sanitize(tgui_input_text(ui.user, "Write your Feed story", "Network Channel Handler", multiline = TRUE, prevent_enter = TRUE)) return TRUE if("set_new_title") - title = sanitize(tgui_input_text(usr, "Enter your Feed title", "Network Channel Handler")) + title = sanitize(tgui_input_text(ui.user, "Enter your Feed title", "Network Channel Handler")) return TRUE if("set_attachment") - AttachPhoto(usr) + AttachPhoto(ui.user) return TRUE if("submit_new_message") - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(msg == "" || msg == "\[REDACTED\]") set_temp("Error: Could not submit feed message to network: Invalid Message.", "danger", FALSE) return TRUE @@ -496,7 +496,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if("submit_wanted") if(!securityCaster) return FALSE - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(channel_name == "") set_temp("Error: Could not submit wanted issue to network: Invalid Criminal Name.", "danger", FALSE) return TRUE @@ -507,11 +507,11 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit wanted issue to network: Author unverified.", "danger", FALSE) return TRUE - var/choice = tgui_alert(usr, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) if(choice == "Confirm") if(news_network.wanted_issue) if(news_network.wanted_issue.is_admin_message) - tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") + tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") return news_network.wanted_issue.author = channel_name news_network.wanted_issue.body = msg @@ -536,9 +536,9 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if(!securityCaster) return FALSE if(news_network.wanted_issue.is_admin_message) - tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") + tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") return - var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) if(choice=="Confirm") news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) @@ -551,7 +551,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(FC.author != "\[REDACTED\]") FC.backup_author = FC.author @@ -566,7 +566,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - tgui_alert_async(usr, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.") + tgui_alert_async(ui.user, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.") return if(MSG.author != "\[REDACTED\]") MSG.backup_author = MSG.author @@ -581,7 +581,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(MSG.body != "\[REDACTED\]") MSG.backup_body = MSG.body @@ -603,7 +603,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.") return FC.censored = !FC.censored FC.update() diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 26f9d6fabfb..3f6ec0cbe35 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -85,7 +85,7 @@ var/bomb_set if(extended) if(istype(O, /obj/item/disk/nuclear)) - usr.drop_item() + user.drop_item() O.loc = src auth = O add_fingerprint(user) diff --git a/code/game/machinery/painter_vr.dm b/code/game/machinery/painter_vr.dm index 9ed6caf6f48..aaf4d632cf9 100644 --- a/code/game/machinery/painter_vr.dm +++ b/code/game/machinery/painter_vr.dm @@ -106,17 +106,16 @@ /obj/machinery/gear_painter/AltClick(mob/user) . = ..() - drop_item() + drop_item(user) -/obj/machinery/gear_painter/proc/drop_item() +/obj/machinery/gear_painter/proc/drop_item(var/mob/user) if(!oview(1,src)) return if(!inserted) return - to_chat(usr, span_notice("You remove [inserted] from [src]")) + to_chat(user, span_notice("You remove [inserted] from [src]")) inserted.forceMove(drop_location()) - var/mob/living/user = usr - if(istype(user)) + if(isliving(user)) user.put_in_hands(inserted) inserted = null update_icon() @@ -155,11 +154,11 @@ .["item"] = list() .["item"]["name"] = inserted.name .["item"]["sprite"] = icon2base64(get_flat_icon(inserted,dir=SOUTH,no_anim=TRUE)) - .["item"]["preview"] = icon2base64(build_preview()) + .["item"]["preview"] = icon2base64(build_preview(user)) else .["item"] = null -/obj/machinery/gear_painter/tgui_act(action, params) +/obj/machinery/gear_painter/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return @@ -169,17 +168,17 @@ active_mode = text2num(params["mode"]) return TRUE if("choose_color") - var/chosen_color = input(usr, "Choose a color: ", "ColorMate colour picking", activecolor) as color|null + var/chosen_color = input(ui.user, "Choose a color: ", "ColorMate colour picking", activecolor) as color|null if(chosen_color) activecolor = chosen_color return TRUE if("paint") - do_paint(usr) + do_paint(ui.user) temp = "Painted Successfully!" return TRUE if("drop") temp = "" - drop_item() + drop_item(ui.user) return TRUE if("clear") inserted.remove_atom_colour(FIXED_COLOUR_PRIORITY) @@ -242,7 +241,7 @@ /// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin. -/obj/machinery/gear_painter/proc/build_preview() +/obj/machinery/gear_painter/proc/build_preview(mob/user) if(inserted) //sanity var/list/cm switch(active_mode) @@ -261,17 +260,17 @@ text2num(color_matrix_last[11]), text2num(color_matrix_last[12]), ) - if(!check_valid_color(cm, usr)) + if(!check_valid_color(cm, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) if(COLORMATE_TINT) - if(!check_valid_color(activecolor, usr)) + if(!check_valid_color(activecolor, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) if(COLORMATE_HSV) cm = color_matrix_hsv(build_hue, build_sat, build_val) color_matrix_last = cm - if(!check_valid_color(cm, usr)) + if(!check_valid_color(cm, user)) return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE) var/cur_color = inserted.color diff --git a/code/game/machinery/pandemic.dm b/code/game/machinery/pandemic.dm index ae8687d6657..cd51b2a9fc7 100644 --- a/code/game/machinery/pandemic.dm +++ b/code/game/machinery/pandemic.dm @@ -114,7 +114,7 @@ default_name = replacetext(beaker.name, new/regex(" culture bottle\\Z", "g"), "") else default_name = D.name - var/name = tgui_input_text(usr, "Name:", "Name the culture", default_name, MAX_NAME_LEN) + var/name = tgui_input_text(ui.user, "Name:", "Name the culture", default_name, MAX_NAME_LEN) if(name == null || wait) return var/obj/item/reagent_containers/glass/bottle/B = create_culture(name) @@ -167,7 +167,7 @@ if(!A) atom_say("Unable to find requested strain.") return - print_form(A, usr) + print_form(A, ui.user) if("name_strain") var/strain_index = text2num(params["strain_index"]) if(isnull(strain_index)) @@ -184,7 +184,7 @@ if(A.name != "Unknown") atom_say("Request rejected. Strain already has a name.") return - var/new_name = tgui_input_text(usr, "Name the Strain", "New Name", max_length = MAX_NAME_LEN) + var/new_name = tgui_input_text(ui.user, "Name the Strain", "New Name", max_length = MAX_NAME_LEN) if(!new_name) return A.AssignName(new_name) diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 8693642de76..0314d6b1b9b 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -297,7 +297,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) // Queue management can be done even while busy if("queue") @@ -331,7 +331,7 @@ return TRUE if(busy) - to_chat(usr, span_notice("[src] is busy. Please wait for completion of previous operation.")) + to_chat(ui.user, span_notice("[src] is busy. Please wait for completion of previous operation.")) return switch(action) diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm index acbb0ebbeb4..a26f25e2193 100644 --- a/code/game/machinery/pda_multicaster.dm +++ b/code/game/machinery/pda_multicaster.dm @@ -57,7 +57,7 @@ visible_message("\the [user] turns \the [src] [toggle ? "on" : "off"].") update_power() if(!toggle) - var/msg = "[usr.client.key] ([usr]) has turned [src] off, at [x],[y],[z]." + var/msg = "[user.client.key] ([user]) has turned [src] off, at [x],[y],[z]." message_admins(msg) log_game(msg) diff --git a/code/game/machinery/petrification.dm b/code/game/machinery/petrification.dm new file mode 100644 index 00000000000..5b061e80068 --- /dev/null +++ b/code/game/machinery/petrification.dm @@ -0,0 +1,254 @@ +/obj/machinery/petrification + name = "odd interface" + desc = "An odd looking machine with an interface, some buttons and a tiny keyboard on the side." + icon = 'icons/obj/machines/petrification.dmi' + icon_state = "petrification" + + idle_power_usage = 100 + active_power_usage = 1000 + use_power = USE_POWER_IDLE + anchored = TRUE + unacidable = TRUE + dir = EAST + var/material = "stone" + var/identifier = "statue" + var/adjective = "hardens" + var/tint = "#ffffff" + var/able_to_unpetrify = TRUE + var/discard_clothes = TRUE + var/mob/living/carbon/human/target + var/list/remotes = list() + +/obj/machinery/petrification/New() + . = ..() + if(!pixel_x && !pixel_y) + pixel_x = (dir & 3) ? 0 : (dir == 4 ? 26 : -26) + pixel_y = (dir & 3) ? (dir == 1 ? 26 : -26) : 0 + +/obj/machinery/petrification/proc/get_viable_targets() + var/list/targets = list() + //dir is the opposite of whichever direction we want to scan + var/turf/center + center = get_step(src, turn(dir, 180)) + if (!center) + return + //square of 3x3 in front of the device + for (var/n = center.x-1; n <= center.x+1; n++) + for (var/m = center.y-1; m <= center.y+1; m++) + var/turf/T = locate(n,m,z) + if (!isturf(T)) + continue + for (var/mob/living/carbon/human/H in T) + if (H.stat == DEAD) + continue + var/option = "[H]["[H]" != H.real_name ? " ([H.real_name])" : ""]" + var/r = 1 + if (option in targets) + while ("[option] ([r])" in targets) + r += 1 + option = "[option] ([r])" + targets[option] = H + return targets + +/obj/machinery/petrification/proc/is_valid_target(var/mob/living/carbon/human/H) + if (QDELETED(H) || !istype(H) || !H.client) + return FALSE + var/turf/T = H.loc + if (!isturf(T)) + return FALSE + var/turf/center + center = get_step(get_turf(src), turn(dir, 180)) + if (!center) + return + if (T.z != z || T.x > center.x + 1 || T.x < center.x - 1 || T.y > center.y + 1 || T.y < center.y - 1) + return FALSE + return TRUE + +/obj/machinery/petrification/proc/popup_msg(var/mob/user, var/message, var/notice = TRUE) + if (notice) + message = "A notice pops up on the interface: \"[message]\"" + if (target) + to_chat(user, span_notice("[message]")) + +/obj/machinery/petrification/proc/petrify(var/mob/user, var/obj/item/petrifier/petrifier = null) + . = FALSE + var/mat = material + var/idt = identifier + var/adj = adjective + var/tnt = tint + var/can_unpetrify = able_to_unpetrify + var/no_clothes = discard_clothes + var/mob/living/carbon/human/statue = target + if (petrifier && istype(petrifier)) + mat = petrifier.material + idt = petrifier.identifier + adj = petrifier.adjective + tnt = petrifier.tint + can_unpetrify = petrifier.able_to_unpetrify + no_clothes = petrifier.discard_clothes + statue = petrifier.target + if (QDELETED(statue) || !istype(statue)) + popup_msg(user, "Invalid target.") + return + if (statue.stat == DEAD) + popup_msg(user, "The target must be alive.") + return + if (!statue.client) + popup_msg(user, "The target must be capable of conscious thought.") + return + if (!istext(mat) || !istext(idt) || !istext(adj) || !istext(tnt)) + popup_msg(user, "Invalid options.") + var/turf/T = statue.loc + if (!istype(T)) + popup_msg(user, "They must be visible to the [petrifier ? "device" : "machine"].") + if (!petrifier) + var/turf/center = get_step(get_turf(src), turn(dir, 180)) + if (!center) + return + if (T.z != z || T.x > center.x + 1 || T.x < center.x - 1 || T.y > center.y + 1 || T.y < center.y - 1) + popup_msg(user, "They are out of range. They must be standing within a 3x3 square in front of the machine.") + return + else + var/turf/center = get_turf(petrifier) + if (!center) + return + if (T.z != center.z || get_dist(center, T) > 4) + popup_msg(user, "They are out of range. They must be standing within 4 tiles of the device.") + return + var/datum/component/gargoyle/comp = statue.GetComponent(/datum/component/gargoyle) + if (no_clothes) + for(var/obj/item/W in statue) + if(istype(W, /obj/item/implant/backup) || istype(W, /obj/item/nif)) + continue + statue.drop_from_inventory(W) + + var/obj/structure/gargoyle/G = new(T, statue, idt, mat, adj, tnt, can_unpetrify, no_clothes) + G.was_rayed = TRUE + + if (can_unpetrify) + add_verb(statue,/mob/living/carbon/human/proc/gargoyle_transformation) + comp?.cooldown = 0 + else + remove_verb(statue,/mob/living/carbon/human/proc/gargoyle_transformation) + remove_verb(statue,/mob/living/carbon/human/proc/gargoyle_pause) + remove_verb(statue,/mob/living/carbon/human/proc/gargoyle_checkenergy) + comp?.cooldown = INFINITY + + if (!petrifier) + visible_message(span_notice("A ray of purple light streams out of \the [src], aimed directly at [statue]. Everywhere the light touches on them quickly [adj] into [mat].")) + SStgui.update_uis(src) + return TRUE + +/obj/machinery/petrification/attack_hand(var/mob/user as mob) + if(..()) + return + user.set_machine(src) + tgui_interact(user) + +/obj/machinery/petrification/tgui_interact(mob/user, datum/tgui/ui = null) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "PetrificationInterface", name) + ui.open() + +/obj/machinery/petrification/tgui_data(mob/user) + var/list/data = list() + data["material"] = material + data["identifier"] = identifier + data["adjective"] = adjective + data["tint"] = tint + var/list/h = rgb2num(tint) + data["t"] = ((h[1]*0.299)+(h[2]*0.587)+(h[3]*0.114)) > 102 //0.4 luminance + data["target"] = "[target ? target : "None"]" + data["able_to_unpetrify"] = able_to_unpetrify + data["discard_clothes"] = discard_clothes + data["can_remote"] = is_valid_target(target) && istext(material) && istext(identifier) && istext(adjective) && istext(tint) + return data + +/obj/machinery/petrification/proc/set_input(var/option, mob/user) + var/list/only_these = list("tint","material","identifier","adjective","able_to_unpetrify","discard_clothes","target") + if (!(option in only_these)) + return + switch(option) + if("tint") + var/new_color = input(user, "Choose the color for the [identifier] to be:", "Statue color", tint) as color|null + if (new_color) + tint = new_color + if("material","identifier","adjective") + var/input = tgui_input_text(user, "What should the [option] be?", "Statue [option]", vars[option], MAX_NAME_LEN) + input = sanitizeSafe(input, 25) + if (length(input) <= 0) + return + if (option == "adjective") + if (copytext_char(input, -1) != "s") + switch(copytext_char(input, -2)) + if ("ss") + input += "es" + if ("sh") + input += "es" + if ("ch") + input += "es" + else + switch(copytext_char(input, -1)) + if("s", "x", "z") + input += "es" + else + input += "s" + vars[option] = input + if("able_to_unpetrify", "discard_clothes") + vars[option] = !vars[option] + if("target") + var/list/targets = get_viable_targets() + if (!length(targets)) + popup_msg(user, "No targets within range. Make sure there is a humanoid being within a 3x3 metre square in front of the interface.") + return + var/selected = input(user, "Choose the target.", "Petrification Target") as null|anything in targets + if (selected && ishuman(targets[selected]) && is_valid_target(targets[selected])) + var/confirmation = tgui_alert(targets[selected], "You have been selected as a petrification target. If you press confirm, you will possibly be turned into a statue, and if the option is selected, possibly one that cannot be reverted back from a statue at all.","Petrification Target",list("Confirm", "Cancel")) + if (confirmation != "Confirm") + popup_msg(user, "They declined the request.", FALSE) + return + var/double = tgui_alert(targets[selected], "This is your last warning, are you -certain-?","Petrification Target",list("Confirm", "Cancel")) + if (confirmation == "Confirm" && double == "Confirm") + target = targets[selected] + else + popup_msg(user, "They declined the request.", FALSE) + +/obj/machinery/petrification/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) + if(..()) + return TRUE + + if (ui.user) + add_fingerprint(ui.user) + + switch(action) + if("set_option") + if (params["option"]) + set_input(params["option"], ui.user) + SStgui.update_uis(src) + return TRUE + if("petrify") + petrify(ui.user) + return TRUE + if("remote") + if (is_valid_target(target) && istext(material) && istext(identifier) && istext(adjective) && istext(tint)) + var/obj/item/petrifier/PE = remotes[target] + if (!QDELETED(PE)) + PE.visible_message(span_warning("\The [PE] disappears!")) + qdel(PE) + var/obj/item/petrifier/P = new(loc, src) + P.material = material + P.identifier = identifier + P.adjective = adjective + P.tint = tint + P.able_to_unpetrify = able_to_unpetrify + P.discard_clothes = discard_clothes + P.target = target + remotes[target] = P + ui.user.put_in_hands(P) + return TRUE + return TRUE + +/obj/item/paper/petrification_notes + name = "written notes" + info = "" + span_italics("Found this buried in the machine over there after digging through it a bit- I hooked it up to one of our displays so it was a bit more usable- seems to be a spare part, it was right next to another one that actually " + span_bold("was") + " hooked up. Turns things into other materials, probably one of the components that makes that machine work.") + "" diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index bf87c9ff93c..95bfe9ec346 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -67,10 +67,10 @@ return data -/obj/machinery/pipedispenser/tgui_act(action, params) +/obj/machinery/pipedispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(unwrenched || !ui.user.canmove || ui.user.stat || ui.user.restrained() || !in_range(loc, ui.user)) return TRUE . = TRUE @@ -101,18 +101,18 @@ else if(istype(recipe, /datum/pipe_recipe/meter)) created_object = new recipe.pipe_type(loc) else - log_runtime(EXCEPTION("Warning: [usr] attempted to spawn pipe recipe type by params [json_encode(params)] ([recipe] [recipe?.type]), but it was not allowed by this machine ([src] [type])")) + log_runtime(EXCEPTION("Warning: [ui.user] attempted to spawn pipe recipe type by params [json_encode(params)] ([recipe] [recipe?.type]), but it was not allowed by this machine ([src] [type])")) return - created_object.add_fingerprint(usr) + created_object.add_fingerprint(ui.user) wait = TRUE VARSET_IN(src, wait, FALSE, 15) /obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob) - src.add_fingerprint(usr) + src.add_fingerprint(user) if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter)) - to_chat(usr, span_notice("You put [W] back in [src].")) + to_chat(user, span_notice("You put [W] back in [src].")) user.drop_item() qdel(W) return @@ -128,8 +128,8 @@ src.anchored = FALSE src.stat |= MAINT src.unwrenched = 1 - if (usr.machine==src) - usr << browse(null, "window=pipedispenser") + if (user.machine==src) + user << browse(null, "window=pipedispenser") else /*if (unwrenched==1)*/ playsound(src, W.usesound, 50, 1) to_chat(user, span_notice("You begin to fasten \the [src] to the floor...")) @@ -155,17 +155,17 @@ disposals = TRUE //Allow you to drag-drop disposal pipes into it -/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe as obj, mob/usr as mob) - if(!usr.canmove || usr.stat || usr.restrained()) +/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe as obj, mob/user as mob) + if(!user.canmove || user.stat || user.restrained()) return - if (!istype(pipe) || get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 ) + if (!istype(pipe) || get_dist(user, src) > 1 || get_dist(src,pipe) > 1 ) return if (pipe.anchored) return - to_chat(usr, span_notice("You shove [pipe] back in [src].")) + to_chat(user, span_notice("You shove [pipe] back in [src].")) qdel(pipe) // adding a pipe dispensers that spawn unhooked from the ground diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 0b5c572e137..96f96dcfe32 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -82,7 +82,7 @@ if(default_part_replacement(user, W)) return if (!panel_open && W.has_tool_quality(TOOL_WRENCH)) - P_type_t = tgui_input_list(usr, "Choose pipe type", "Pipe type", Pipes) + P_type_t = tgui_input_list(user, "Choose pipe type", "Pipe type", Pipes) P_type = Pipes[P_type_t] user.visible_message(span_notice("[user] has set \the [src] to manufacture [P_type_t]."), span_notice("You set \the [src] to manufacture [P_type_t].")) return diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm index ce35f88253b..4d4082b75d6 100644 --- a/code/game/machinery/pointdefense.dm +++ b/code/game/machinery/pointdefense.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense) return FALSE if(!(get_z(PD) in GetConnectedZlevels(get_z(src)))) - to_chat(usr, span_warning("[PD] is not within control range.")) + to_chat(ui.user, span_warning("[PD] is not within control range.")) return FALSE if(!PD.Activate()) //Activate() whilst the device is active will return false. diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 756508c1707..117ab2cda28 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -443,7 +443,7 @@ /obj/machinery/porta_turret/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - if(isLocked(usr)) + if(isLocked(ui.user)) return TRUE . = TRUE @@ -1094,7 +1094,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new turret name", name, finish_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return finish_name = t diff --git a/code/game/machinery/protean_reconstitutor.dm b/code/game/machinery/protean_reconstitutor.dm index f26e23d90cb..37eac939c05 100644 --- a/code/game/machinery/protean_reconstitutor.dm +++ b/code/game/machinery/protean_reconstitutor.dm @@ -135,7 +135,7 @@ if(W.has_tool_quality(TOOL_WRENCH)) if(protean_brain || protean_orchestrator || protean_refactory) - var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(protean_brain,protean_orchestrator,protean_refactory)) + var/choice = tgui_input_list(user, "What component would you like to remove?", "Remove Component", list(protean_brain,protean_orchestrator,protean_refactory)) if(!choice) return if(choice == protean_brain) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index c387e5dd3ac..8f998d90d9d 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -137,18 +137,18 @@ var/list/obj/machinery/requests_console/allConsoles = list() data["announceAuth"] = announceAuth return data -/obj/machinery/requests_console/tgui_act(action, list/params) +/obj/machinery/requests_console/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("write") if(reject_bad_text(params["write"])) recipient = params["write"] //write contains the string of the receiving department's name - var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = sanitize(tgui_input_text(ui.user, "Write your message:", "Awaiting Input", "")) if(new_message) message = new_message screen = RCS_MESSAUTH @@ -164,7 +164,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() . = TRUE if("writeAnnouncement") - var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = sanitize(tgui_input_text(ui.user, "Write your message:", "Awaiting Input", "")) if(new_message) message = new_message else @@ -233,9 +233,9 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(computer_deconstruction_screwdriver(user, O)) return if(istype(O, /obj/item/multitool)) - var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) + var/input = sanitize(tgui_input_text(user, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) if(!input) - to_chat(usr, "No input found. Please hang up and try your call again.") + to_chat(user, "No input found. Please hang up and try your call again.") return department = input announcement.title = "[department] announcement" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index f7c9f3c6b9a..a10c4aa36da 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -78,12 +78,12 @@ return else // insert cell - var/obj/item/cell/C = usr.get_active_hand() + var/obj/item/cell/C = user.get_active_hand() if(istype(C)) user.drop_item() cell = C C.loc = src - C.add_fingerprint(usr) + C.add_fingerprint(user) user.visible_message(span_notice("[user] inserts a power cell into [src]."), span_notice("You insert the power cell into [src].")) power_change() @@ -140,7 +140,7 @@ return data -/obj/machinery/space_heater/tgui_act(action, params) +/obj/machinery/space_heater/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -154,11 +154,11 @@ . = TRUE if("cellremove") - if(cell && !usr.get_active_hand()) - usr.visible_message(span_notice("[usr] removes [cell] from [src]."), span_notice("You remove [cell] from [src].")) + if(cell && !ui.user.get_active_hand()) + ui.user.visible_message(span_notice("[ui.user] removes [cell] from [src]."), span_notice("You remove [cell] from [src].")) cell.update_icon() - usr.put_in_hands(cell) - cell.add_fingerprint(usr) + ui.user.put_in_hands(cell) + cell.add_fingerprint(ui.user) cell = null power_change() . = TRUE @@ -166,14 +166,14 @@ if("cellinstall") if(!cell) - var/obj/item/cell/C = usr.get_active_hand() + var/obj/item/cell/C = ui.user.get_active_hand() if(istype(C)) - usr.drop_item() + ui.user.drop_item() cell = C C.loc = src - C.add_fingerprint(usr) + C.add_fingerprint(ui.user) power_change() - usr.visible_message(span_notice("[usr] inserts \the [C] into \the [src]."), span_notice("You insert \the [C] into \the [src].")) + ui.user.visible_message(span_notice("[ui.user] inserts \the [C] into \the [src]."), span_notice("You insert \the [C] into \the [src].")) . = TRUE /obj/machinery/space_heater/process() diff --git a/code/game/machinery/suit_storage/suit_cycler.dm b/code/game/machinery/suit_storage/suit_cycler.dm index 3db6a74911b..e9bbf206491 100644 --- a/code/game/machinery/suit_storage/suit_cycler.dm +++ b/code/game/machinery/suit_storage/suit_cycler.dm @@ -357,7 +357,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) return data -/obj/machinery/suit_cycler/tgui_act(action, params) +/obj/machinery/suit_cycler/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -409,20 +409,20 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) . = TRUE if("lock") - if(allowed(usr)) + if(allowed(ui.user)) locked = !locked - to_chat(usr, "You [locked ? "" : "un"]lock \the [src].") + to_chat(ui.user, "You [locked ? "" : "un"]lock \the [src].") else - to_chat(usr, span_danger("Access denied.")) + to_chat(ui.user, span_danger("Access denied.")) . = TRUE if("eject_guy") - eject_occupant(usr) + eject_occupant(ui.user) . = TRUE if("uv") if(safeties && occupant) - to_chat(usr, span_danger("The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.")) + to_chat(ui.user, span_danger("The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.")) return active = 1 diff --git a/code/game/machinery/suit_storage/suit_storage.dm b/code/game/machinery/suit_storage/suit_storage.dm index 14705c2a479..b4a89aa5c04 100644 --- a/code/game/machinery/suit_storage/suit_storage.dm +++ b/code/game/machinery/suit_storage/suit_storage.dm @@ -120,45 +120,45 @@ data["occupied"] = FALSE return data -/obj/machinery/suit_storage_unit/tgui_act(action, params) //I fucking HATE this proc +/obj/machinery/suit_storage_unit/tgui_act(action, params, datum/tgui/ui) //I fucking HATE this proc if(..() || isUV || isbroken) return TRUE switch(action) if("door") - toggle_open(usr) + toggle_open(ui.user) . = TRUE if("dispense") switch(params["item"]) if("helmet") - dispense_helmet(usr) + dispense_helmet(ui.user) if("mask") - dispense_mask(usr) + dispense_mask(ui.user) if("suit") - dispense_suit(usr) + dispense_suit(ui.user) . = TRUE if("uv") - start_UV(usr) + start_UV(ui.user) . = TRUE if("lock") - toggle_lock(usr) + toggle_lock(ui.user) . = TRUE if("eject_guy") - eject_occupant(usr) + eject_occupant(ui.user) . = TRUE // Panel Open stuff if(!. && panelopen) switch(action) if("toggleUV") - toggleUV(usr) + toggleUV(ui.user) . = TRUE if("togglesafeties") - togglesafeties(usr) + togglesafeties(ui.user) . = TRUE update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index de8a16c1ab7..a6429938630 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -17,7 +17,7 @@ var/charges = 1 /obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob) - usr.set_machine(src) + user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) if(is_special_character(user)) diff --git a/code/game/machinery/syndicatebeacon_vr.dm b/code/game/machinery/syndicatebeacon_vr.dm index 2c911638583..b5762b18491 100644 --- a/code/game/machinery/syndicatebeacon_vr.dm +++ b/code/game/machinery/syndicatebeacon_vr.dm @@ -1,7 +1,7 @@ // Virgo modified syndie beacon, does not give objectives /obj/machinery/syndicate_beacon/virgo/attack_hand(var/mob/user as mob) - usr.set_machine(src) + user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) if(is_special_character(user)) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 683c1dd5f86..3a4e0592af1 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -75,11 +75,11 @@ ui = new(user, src, "TelecommsLogBrowser", name) ui.open() -/obj/machinery/computer/telecomms/server/tgui_act(action, params) +/obj/machinery/computer/telecomms/server/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("view") @@ -114,8 +114,8 @@ . = TRUE if("delete") - if(!allowed(usr) && !emagged) - to_chat(usr, span_warning("ACCESS DENIED.")) + if(!allowed(ui.user) && !emagged) + to_chat(ui.user, span_warning("ACCESS DENIED.")) return if(SelectedServer) @@ -128,10 +128,10 @@ . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network, 15) + var/newnet = tgui_input_text(ui.user, "Which network do you want to view?", "Comm Monitor", network, 15) newnet = sanitize(newnet,15) - if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(newnet && ((ui.user in range(1, src) || issilicon(ui.user)))) if(length(newnet) > 15) set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad") return TRUE diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 72fef22286f..83f61126ce6 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -25,9 +25,9 @@ if (integrity < 100) //Damaged, let's repair! if (T.use(1)) integrity = between(0, integrity + rand(10,20), 100) - to_chat(usr, "You apply the Nanopaste to [src], repairing some of the damage.") + to_chat(user, "You apply the Nanopaste to [src], repairing some of the damage.") else - to_chat(usr, "This machine is already in perfect condition.") + to_chat(user, "This machine is already in perfect condition.") return @@ -210,15 +210,15 @@ data["change_freq"] = change_frequency return data -/obj/machinery/telecomms/bus/Options_Act(action, params) +/obj/machinery/telecomms/bus/Options_Act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("change_freq") . = TRUE - var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num - if(canAccess(usr)) + var/newfreq = input(ui.user, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num + if(canAccess(ui.user)) if(newfreq) if(findtext(num2text(newfreq), ".")) newfreq *= 10 // shift the decimal one place @@ -274,11 +274,11 @@ overmap_range = clamp(new_range, overmap_range_min, overmap_range_max) update_idle_power_usage(initial(idle_power_usage)**(overmap_range+1)) -/obj/machinery/telecomms/tgui_act(action, params) +/obj/machinery/telecomms/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - var/obj/item/multitool/P = get_multitool(usr) + var/obj/item/multitool/P = get_multitool(ui.user) switch(action) if("toggle") @@ -288,16 +288,16 @@ . = TRUE if("id") - var/newid = copytext(reject_bad_text(tgui_input_text(usr, "Specify the new ID for this machine", src, id)),1,MAX_MESSAGE_LEN) - if(newid && canAccess(usr)) + var/newid = copytext(reject_bad_text(tgui_input_text(ui.user, "Specify the new ID for this machine", src, id)),1,MAX_MESSAGE_LEN) + if(newid && canAccess(ui.user)) id = newid set_temp("-% New ID assigned: \"[id]\" %-", "average") . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Specify the new network for this machine. This will break all current links.", src, network) + var/newnet = tgui_input_text(ui.user, "Specify the new network for this machine. This will break all current links.", src, network) newnet = sanitize(newnet,15) - if(newnet && canAccess(usr)) + if(newnet && canAccess(ui.user)) if(length(newnet) > 15) set_temp("-% Too many characters in new network tag %-", "average") @@ -313,8 +313,8 @@ if("freq") - var/newfreq = tgui_input_number(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, max_value=9999) - if(newfreq && canAccess(usr)) + var/newfreq = tgui_input_number(ui.user, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, max_value=9999) + if(newfreq && canAccess(ui.user)) if(findtext(num2text(newfreq), ".")) newfreq *= 10 // shift the decimal one place if(!(newfreq in freq_listening) && newfreq < 10000) @@ -372,7 +372,7 @@ if(Options_Act(action, params)) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/telecomms/proc/canAccess(var/mob/user) if(issilicon(user) || in_range(user, src)) diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 41985368885..67204b61897 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -61,11 +61,11 @@ ui = new(user, src, "TelecommsMachineBrowser", name) ui.open() -/obj/machinery/computer/telecomms/monitor/tgui_act(action, params) +/obj/machinery/computer/telecomms/monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("view") @@ -100,9 +100,9 @@ . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network, 15) + var/newnet = tgui_input_text(ui.user, "Which network do you want to view?", "Comm Monitor", network, 15) newnet = sanitize(newnet,15) //Honestly, I'd be amazed if someone managed to do HTML in 15 chars. - if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(newnet && ((ui.user in range(1, src) || issilicon(ui.user)))) if(length(newnet) > 15) set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad") return TRUE diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 64b597f9bda..3ada9642b5e 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -65,8 +65,8 @@ L = locate("landmark*[C.data]") // use old stype if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf)) - to_chat(usr, "You insert the coordinates into the machine.") - to_chat(usr, "A message flashes across the screen, reminding the user that the nuclear authentication disk is not transportable via insecure means.") + to_chat(user, "You insert the coordinates into the machine.") + to_chat(user, "A message flashes across the screen, reminding the user that the nuclear authentication disk is not transportable via insecure means.") user.drop_item() qdel(I) @@ -86,7 +86,7 @@ teleport_control.locked = L one_time_use = 1 - add_fingerprint(usr) + add_fingerprint(user) else ..() diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 23a235faf37..904beff78cc 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -99,7 +99,7 @@ return if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) - if(allowed(usr)) + if(allowed(user)) if(emagged) to_chat(user, span_notice("The turret control is unresponsive.")) else @@ -152,10 +152,10 @@ ) return data -/obj/machinery/turretid/tgui_act(action, params) +/obj/machinery/turretid/tgui_act(action, params, datum/tgui/ui) if(..()) return - if(isLocked(usr)) + if(isLocked(ui.user)) return . = TRUE diff --git a/code/game/machinery/upgrade_machinery.dm b/code/game/machinery/upgrade_machinery.dm new file mode 100644 index 00000000000..03a0477c9dc --- /dev/null +++ b/code/game/machinery/upgrade_machinery.dm @@ -0,0 +1,39 @@ +// Handles automagically upgrades to machines based on components placed on a machine during map init +/obj/machinery/Initialize(var/mapload) + . = ..() + // Handles automagically upgrades to machines based on components placed on a machine during map init + if(mapload) + spawn(100) + // Sanity checks + if(!QDELETED(src) && isturf(loc)) + handle_mapped_upgrades() +// This is meant to be overridden per machine +/obj/machinery/proc/handle_mapped_upgrades() + return +// Each machine is a special snowflake... sadly. +/obj/machinery/power/smes/buildable/handle_mapped_upgrades() + // Detect new coils placed by mappers + var/list/parts_found = list() + for(var/i = 1, i <= loc.contents.len, i++) + var/obj/item/W = loc.contents[i] + if(istype(W, /obj/item/smes_coil)) + parts_found.Add(W) + // If any coils are on us, clear base coils and rebuild using these ones + if(parts_found.len == 0) + return + while(TRUE) + var/obj/item/smes_coil/C = locate(/obj/item/smes_coil) in component_parts + if(isnull(C)) + break + component_parts.Remove(C) + C.forceMove(src.loc) + C.Destroy() + cur_coils-- + // Rebuild from mapper's coils + for(var/i = 1, i <= parts_found.len, i++) + if (cur_coils < max_coils) + var/obj/item/W = parts_found[i] + cur_coils++ + component_parts.Add(W) + W.forceMove(src) + RefreshParts() diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 7ae9f4102c4..4dd2eae2bba 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -12,7 +12,7 @@ var/insistinga = 0 /obj/machinery/wish_granter/attack_hand(var/mob/living/carbon/human/user as mob) - usr.set_machine(src) + user.set_machine(src) if(chargesa <= 0) to_chat(user, span_infoplain("The Wish Granter lies silent.")) @@ -32,7 +32,7 @@ else chargesa-- insistinga = 0 - var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) + var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) switch(wish) if("Power") to_chat(user, span_boldwarning("Your wish is granted, but at a terrible cost...")) diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm index 387506e7d1b..09de44ec120 100644 --- a/code/game/mecha/combat/fighter.dm +++ b/code/game/mecha/combat/fighter.dm @@ -270,9 +270,9 @@ /obj/mecha/combat/fighter/gunpod/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/multitool) && state == 1) - var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Fore Stripe", "Aft Stripe", "CANCEL")) + var/new_paint_location = tgui_input_list(user, "Please select a target zone.", "Paint Zone", list("Fore Stripe", "Aft Stripe", "CANCEL")) if(new_paint_location && new_paint_location != "CANCEL") - var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null + var/new_paint_color = input(user, "Please select a paint color.", "Paint Color", null) as color|null if(new_paint_color) switch(new_paint_location) if("Fore Stripe") diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 6c7b5f2aade..c17eaa485bf 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -536,14 +536,14 @@ return data -/obj/machinery/mecha_part_fabricator/tgui_act(action, var/list/params) +/obj/machinery/mecha_part_fabricator/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE . = TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) switch(action) if("sync_rnd") diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index fbd3759d9d4..e7a72c3653a 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -105,13 +105,13 @@ . = TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) switch(action) if("species") - var/new_species = tgui_input_list(usr, "Select a new species", "Prosfab Species Selection", species_types) - if(new_species && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_species = tgui_input_list(ui.user, "Select a new species", "Prosfab Species Selection", species_types) + if(new_species && tgui_status(ui.user, state) == STATUS_INTERACTIVE) species = new_species return if("manufacturer") @@ -124,8 +124,8 @@ continue new_manufacturers += A - var/new_manufacturer = tgui_input_list(usr, "Select a new manufacturer", "Prosfab Species Selection", new_manufacturers) - if(new_manufacturer && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_manufacturer = tgui_input_list(ui.user, "Select a new manufacturer", "Prosfab Species Selection", new_manufacturers) + if(new_manufacturer && tgui_status(ui.user, state) == STATUS_INTERACTIVE) manufacturer = new_manufacturer return return FALSE diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 0e7eda66c16..325288ff2e1 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1416,7 +1416,7 @@ if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) if(add_req_access || maint_access) - if(internals_access_allowed(usr)) + if(internals_access_allowed(user)) var/obj/item/card/id/id_card if(istype(W, /obj/item/card/id)) id_card = W diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 8bc612b2199..7ba0f91f393 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -26,15 +26,15 @@ /obj/machinery/computer/mecha/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - - + + var/list/beacons = list() for(var/obj/item/mecha_parts/mecha_tracking/TR in world) var/list/tr_data = TR.tgui_data(user) if(tr_data) beacons.Add(list(tr_data)) data["beacons"] = beacons - + LAZYINITLIST(stored_data) data["stored_data"] = stored_data @@ -43,12 +43,12 @@ /obj/machinery/computer/mecha/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - + switch(action) if("send_message") var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["mt"]) if(istype(MT)) - var/message = sanitize(tgui_input_text(usr, "Input message", "Transmit message")) + var/message = sanitize(tgui_input_text(ui.user, "Input message", "Transmit message")) var/obj/mecha/M = MT.in_mecha() if(message && M) M.occupant_message(message) @@ -65,7 +65,7 @@ if(istype(MT)) stored_data = MT.get_mecha_log() return TRUE - + if("clear_log") stored_data = null return TRUE diff --git a/code/game/mecha/space/shuttle.dm b/code/game/mecha/space/shuttle.dm index 1a7ddfd1d18..b7dd4f35f39 100644 --- a/code/game/mecha/space/shuttle.dm +++ b/code/game/mecha/space/shuttle.dm @@ -68,9 +68,9 @@ /obj/mecha/working/hoverpod/shuttlecraft/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/multitool) && state == 1) - var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Central", "Engine", "Base", "Front", "CANCEL")) + var/new_paint_location = tgui_input_list(user, "Please select a target zone.", "Paint Zone", list("Central", "Engine", "Base", "Front", "CANCEL")) if(new_paint_location && new_paint_location != "CANCEL") - var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null + var/new_paint_color = input(user, "Please select a paint color.", "Paint Color", null) as color|null if(new_paint_color) switch(new_paint_location) if("Central") diff --git a/code/game/objects/effects/chem/coating.dm b/code/game/objects/effects/chem/coating.dm index 2e9ad26049c..13a3cb4c393 100644 --- a/code/game/objects/effects/chem/coating.dm +++ b/code/game/objects/effects/chem/coating.dm @@ -34,3 +34,5 @@ /obj/effect/decal/cleanable/chemcoating/update_icon() ..() color = reagents.get_color() + cut_overlays() + add_janitor_hud_overlay() diff --git a/code/game/objects/effects/decals/Cleanable/aliens.dm b/code/game/objects/effects/decals/Cleanable/aliens.dm index 57a32434af2..37cf4c29a7e 100644 --- a/code/game/objects/effects/decals/Cleanable/aliens.dm +++ b/code/game/objects/effects/decals/Cleanable/aliens.dm @@ -13,6 +13,8 @@ /obj/effect/decal/cleanable/blood/gibs/xeno/update_icon() color = "#FFFFFF" + cut_overlays() + add_janitor_hud_overlay() /obj/effect/decal/cleanable/blood/gibs/xeno/up random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1") @@ -30,4 +32,4 @@ random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3") /obj/effect/decal/cleanable/blood/xtracks - basecolor = "#05EE05" \ No newline at end of file + basecolor = "#05EE05" diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 84b47051aa1..5753d327b7a 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -70,6 +70,8 @@ var/global/list/image/splatter_cache=list() else name = initial(name) desc = initial(desc) + cut_overlays() + add_janitor_hud_overlay() /obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp) if(perp.is_incorporeal()) @@ -112,6 +114,10 @@ var/global/list/image/splatter_cache=list() var/obj/structure/bed/chair/wheelchair/W = perp.buckled W.bloodiness = 4 + if(viruses) + for(var/datum/disease/D in viruses) + perp.ContractDisease(D) + amount-- /obj/effect/decal/cleanable/blood/proc/dry() @@ -124,6 +130,11 @@ var/global/list/image/splatter_cache=list() ..() if (amount && istype(user)) add_fingerprint(user) + + if(viruses) + for(var/datum/disease/D in viruses) + user.ContractDisease(D) + if (user.gloves) return var/taken = rand(1,amount) @@ -183,7 +194,7 @@ var/global/list/image/splatter_cache=list() density = FALSE anchored = TRUE icon = 'icons/effects/blood.dmi' - icon_state = "gibbl5" + icon_state = "gib1" random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6") var/fleshcolor = "#FFFFFF" @@ -201,6 +212,7 @@ var/global/list/image/splatter_cache=list() icon = blood cut_overlays() add_overlay(giblets) + add_janitor_hud_overlay() /obj/effect/decal/cleanable/blood/gibs/up random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6","gibup1","gibup1","gibup1") @@ -258,4 +270,14 @@ var/global/list/image/splatter_cache=list() viruses.Cut() return ..() +/obj/effect/decal/cleanable/mucus/Crossed(mob/living/carbon/human/perp) + if(viruses) + for(var/datum/disease/D in viruses) + perp.ContractDisease(D) + +/obj/effect/decal/cleanable/vomit/Crossed(mob/living/carbon/human/perp) + if(viruses) + for(var/datum/disease/D in viruses) + perp.ContractDisease(D) + #undef DRYING_TIME diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm index b0980966a30..26a4fb11af6 100644 --- a/code/game/objects/effects/decals/Cleanable/robots.dm +++ b/code/game/objects/effects/decals/Cleanable/robots.dm @@ -10,6 +10,8 @@ /obj/effect/decal/cleanable/blood/gibs/robot/update_icon() color = "#FFFFFF" + cut_overlays() + add_janitor_hud_overlay() /obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like return @@ -49,4 +51,4 @@ /obj/effect/decal/cleanable/blood/oil/streak random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5") - amount = 2 \ No newline at end of file + amount = 2 diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm index 3d9e74ca6a2..400a6124a4c 100644 --- a/code/game/objects/effects/decals/Cleanable/tracks.dm +++ b/code/game/objects/effects/decals/Cleanable/tracks.dm @@ -142,6 +142,7 @@ var/global/list/image/fluidtrack_cache=list() stack[stack_idx]=track add_overlay(I) updatedtracks=0 // Clear our memory of updated tracks. + add_janitor_hud_overlay() /obj/effect/decal/cleanable/blood/tracks/footprints name = "wet footprints" diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 7338689e33a..a56798eae94 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -12,7 +12,6 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for var/generic_filth = FALSE var/age = 0 var/list/random_icon_states = list() - var/obj/effect/decal/jan_hud/jan_icon = null /obj/effect/decal/cleanable/Initialize(var/mapload, var/_age) if(!isnull(_age)) @@ -21,12 +20,11 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for src.icon_state = pick(src.random_icon_states) if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload)) SSpersistence.track_value(src, /datum/persistent/filth) - jan_icon = new/obj/effect/decal/jan_hud(src.loc) . = ..() + update_icon() /obj/effect/decal/cleanable/Destroy() SSpersistence.forget_value(src, /datum/persistent/filth) - QDEL_NULL(jan_icon) . = ..() /obj/effect/decal/cleanable/clean_blood(var/ignore = 0) @@ -40,13 +38,25 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for src.icon_state = pick(src.random_icon_states) ..() -/obj/effect/decal/jan_hud - plane = PLANE_JANHUD - layer = BELOW_MOB_LAYER - vis_flags = VIS_HIDE - persist_storable = FALSE - icon = 'icons/mob/hud.dmi' - mouse_opacity = 0 -/obj/effect/decal/jan_hud/Initialize() - src.icon_state = "janhud[rand(1,9)]" +/obj/effect/decal/cleanable/update_icon() + // Overrides should not inheret from this, and instead replace it entirely to match this in some form. + // add_janitor_hud_overlay() does not pre-cut overlays, so cut_overlays() must be called first. + // This is so it may be used with update_icon() overrides that use overlays, while adding the janitor overlay at the end. + cut_overlays() + add_janitor_hud_overlay() + + +/obj/effect/decal/cleanable/proc/add_janitor_hud_overlay() + // This was original a seperate object that followed the grime, it got stuck in everything you can imagine! + // It also likely doubled the memory use of every cleanable decal on station... + var/image/hud = image('icons/mob/hud.dmi', src, "janhud[rand(1,9)]") + hud.appearance_flags = (RESET_COLOR|PIXEL_SCALE|KEEP_APART) + hud.plane = PLANE_JANHUD + hud.layer = BELOW_MOB_LAYER + hud.mouse_opacity = 0 + //HUD VARIANT: Allows the hud to show up with it's normal alpha, even if the 'dirty thing' it's attached to has a low alpha (ex: dirt). If you want to disable it, simply comment out the lines between the 'HUD VARIANT' tag! + hud.appearance_flags = RESET_ALPHA + hud.alpha = 255 + //HUD VARIANT end + add_overlay(hud) diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index ca1fcd2f3c6..f3c7027f09f 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -195,7 +195,7 @@ if(ruined) return - if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") + if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 493529cedeb..0f1803aa779 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -6,26 +6,39 @@ layer = DIRTY_LAYER anchored = TRUE -/obj/effect/decal/cleanable/crayon/New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune") - ..() - loc = location + var/art_type + var/art_color + var/art_shade +/obj/effect/decal/cleanable/crayon/Initialize(var/ml, main = "#FFFFFF",shade = "#000000",var/type = "rune", new_age = 0) name = type desc = "A [type] drawn in crayon." + // Persistence vars. Unused here but used downstream. If someone updates the persistance code, it's here. + art_type = type + art_color = main + art_shade = shade + switch(type) if("rune") type = "rune[rand(1,6)]" if("graffiti") type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa") - var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1) - var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1) + . = ..(ml, new_age) // mapload, age - mainOverlay.Blend(main,ICON_ADD) - shadeOverlay.Blend(shade,ICON_ADD) +/obj/effect/decal/cleanable/crayon/update_icon() + cut_overlays() + var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[art_type]",2.1) + var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[art_type]s",2.1) - add_overlay(mainOverlay) - add_overlay(shadeOverlay) + if(mainOverlay && shadeOverlay) + mainOverlay.Blend(art_color,ICON_ADD) + shadeOverlay.Blend(art_shade,ICON_ADD) - add_hiddenprint(usr) + add_overlay(mainOverlay) + add_overlay(shadeOverlay) + + add_janitor_hud_overlay() + return +// CHOMPEdit End diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm index 7aa5709988f..024dc55d40b 100644 --- a/code/game/objects/effects/decals/posters/posters.dm +++ b/code/game/objects/effects/decals/posters/posters.dm @@ -180,7 +180,7 @@ if(ruined) return - if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") + if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/effects/info.dm b/code/game/objects/effects/info.dm new file mode 100644 index 00000000000..e98cf020a1f --- /dev/null +++ b/code/game/objects/effects/info.dm @@ -0,0 +1,28 @@ +/// An info button that, when clicked, puts some text in the user's chat +/obj/effect/abstract/info + name = "info" + icon = 'icons/effects/effects.dmi' + icon_state = "info" + + mouse_opacity = MOUSE_OPACITY_OPAQUE + + /// What should the info button display when clicked? + var/info_text + +/obj/effect/abstract/info/Initialize(mapload, info_text) + . = ..() + + if (!isnull(info_text)) + src.info_text = info_text + +/obj/effect/abstract/info/Click() + . = ..() + to_chat(usr, info_text) + +/obj/effect/abstract/info/MouseEntered(location, control, params) + . = ..() + icon_state = "info_hovered" + +/obj/effect/abstract/info/MouseExited() + . = ..() + icon_state = initial(icon_state) diff --git a/code/game/objects/effects/zone_divider.dm b/code/game/objects/effects/zone_divider.dm index fa2ea82531c..3638219b20f 100644 --- a/code/game/objects/effects/zone_divider.dm +++ b/code/game/objects/effects/zone_divider.dm @@ -13,8 +13,8 @@ // Special case to prevent us from being part of a zone during the first air master tick. // We must merge ourselves into a zone on next tick. This will cause a bit of lag on // startup, but it can't really be helped you know? - if(air_master && air_master.current_cycle == 0) + if(SSair && SSair.current_cycle == 0) spawn(1) - air_master.mark_for_update(get_turf(src)) + SSair.mark_for_update(get_turf(src)) return FALSE return is_zone ? FALSE : TRUE // Anything except zones can pass diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm index 8371f5b0175..28817531895 100644 --- a/code/game/objects/items/antag_spawners.dm +++ b/code/game/objects/items/antag_spawners.dm @@ -118,7 +118,6 @@ to speak with your team, and learn what their plan is for today.")) R.key = C.key -// R.Namepick() // Apparnetly making someone a merc lets them pick a name, so this isn't needed. spawn(1) mercs.add_antagonist(R.mind, FALSE, TRUE, FALSE, FALSE, FALSE) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 84b8d743f6c..c0f82b0b153 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -251,9 +251,9 @@ if (!isturf(NT) || (NT in found) || (NT in pending)) continue // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm index 336a6219d90..214bbff5185 100644 --- a/code/game/objects/items/blueprints_vr.dm +++ b/code/game/objects/items/blueprints_vr.dm @@ -678,9 +678,9 @@ if(!visual && forbiddenAreas[NT.loc.type]) return ROOM_ERR_FORBIDDEN // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) @@ -835,9 +835,9 @@ if(!get_new_area_type(NT.loc) == 1) //The contains somewhere that is NOT a buildable area. return 3 //NOT A BUILDABLE AREA - if(air_master.air_blocked(T, NT)) //Is the room airtight? + if(SSair.air_blocked(T, NT)) //Is the room airtight? // Okay thats the edge of the room - if(get_new_area_type(NT.loc) == 1 && air_master.air_blocked(NT, NT)) + if(get_new_area_type(NT.loc) == 1 && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/game/objects/items/contraband_vr.dm b/code/game/objects/items/contraband_vr.dm index 1052a490b68..85faa40ce98 100644 --- a/code/game/objects/items/contraband_vr.dm +++ b/code/game/objects/items/contraband_vr.dm @@ -11,14 +11,14 @@ /*var/spawn_chance = rand(1,100) switch(spawn_chance) if(0 to 49) - new /obj/random/gun/guarenteed(usr.loc) - to_chat(usr, "You got a thing!") + new /obj/random/gun/guarenteed(user.loc) + to_chat(user, "You got a thing!") if(50 to 99) - new /obj/item/bikehorn/rubberducky(usr.loc) - new /obj/item/bikehorn(usr.loc) - to_chat(usr, "You got two things!") + new /obj/item/bikehorn/rubberducky(user.loc) + new /obj/item/bikehorn(user.loc) + to_chat(user, "You got two things!") if(100) - to_chat(usr, "The box contained nothing!") + to_chat(user, "The box contained nothing!") return */ var/loot = pick(/obj/effect/landmark/costume, @@ -95,7 +95,7 @@ qdel(loot) loot = new_I // swap it //VOREstation edit end - new loot(usr.loc) + new loot(user.loc) to_chat(user, "You unwrap the package.") qdel(src) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 0ab0aa1223c..dd38831b034 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -59,27 +59,26 @@ return data -/obj/item/aicard/tgui_act(action, params) +/obj/item/aicard/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(!carded_ai) return - var/user = usr switch(action) if("wipe") - msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].") - add_attack_logs(user,carded_ai,"Purged from AI Card") + msg_admin_attack("[key_name_admin(ui.user)] wiped [key_name_admin(AI)] with \the [src].") + add_attack_logs(ui.user,carded_ai,"Purged from AI Card") INVOKE_ASYNC(src, PROC_REF(wipe_ai)) if("radio") carded_ai.aiRadio.disabledAi = !carded_ai.aiRadio.disabledAi to_chat(carded_ai, span_warning("Your Subspace Transceiver has been [carded_ai.aiRadio.disabledAi ? "disabled" : "enabled"]!")) - to_chat(user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.")) + to_chat(ui.user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.")) if("wireless") carded_ai.control_disabled = !carded_ai.control_disabled to_chat(carded_ai, span_warning("Your wireless interface has been [carded_ai.control_disabled ? "disabled" : "enabled"]!")) - to_chat(user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface.")) + to_chat(ui.user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface.")) if(carded_ai.control_disabled && carded_ai.deployed_shell) carded_ai.disconnect_shell("Disconnecting from remote shell due to [src] wireless access interface being disabled.") update_icon() diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm index 36474a2bc34..4d288db81c3 100644 --- a/code/game/objects/items/devices/body_snatcher_vr.dm +++ b/code/game/objects/items/devices/body_snatcher_vr.dm @@ -17,38 +17,38 @@ flags |= NOBLUDGEON //So borgs don't spark. /obj/item/bodysnatcher/attack(mob/living/M, mob/living/user) - usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(ishuman(M) || issilicon(M)) //Allows body swapping with humans, synths, and pAI's/borgs since they all have a mind. - if(usr == M) + if(user == M) to_chat(user,span_warning(" A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?")) return if(!M.mind) //Do they have a mind? - to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] appears braindead.")) + to_chat(user,span_warning("A warning pops up on the device, informing you that [M] appears braindead.")) return if(!M.allow_mind_transfer) - to_chat(usr,span_danger("The target's mind is too complex to be affected!")) + to_chat(user,span_danger("The target's mind is too complex to be affected!")) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.resleeve_lock && usr.ckey != H.resleeve_lock) + if(H.resleeve_lock && user.ckey != H.resleeve_lock) to_chat(src, span_danger("[H] cannot be impersonated!")) return if(M.stat == DEAD) //Are they dead? - to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.")) + to_chat(user,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.")) return - var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel")) - if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M)) + var/choice = tgui_alert(user,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel")) + if(choice == "Continue" && user.get_active_hand() == src && user.Adjacent(M)) - usr.visible_message(span_warning("[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!")) - if(do_after(usr,35 SECONDS,M)) - if(usr.mind && M.mind && M.stat != DEAD && usr.stat != DEAD) - log_and_message_admins("[usr.ckey] used a Bodysnatcher to swap bodies with [M.ckey]") - to_chat(usr,span_notice("Your minds have been swapped! Have a nice day.")) + user.visible_message(span_warning("[user] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!")) + if(do_after(user,35 SECONDS,M)) + if(user.mind && M.mind && M.stat != DEAD && user.stat != DEAD) + log_and_message_admins("[user.ckey] used a Bodysnatcher to swap bodies with [M.ckey]") + to_chat(user,span_notice("Your minds have been swapped! Have a nice day.")) var/datum/mind/user_mind = user.mind var/datum/mind/prey_mind = M.mind var/target_ooc_notes = M.ooc_notes @@ -58,8 +58,8 @@ var/user_likes = user.ooc_notes_likes var/user_dislikes = user.ooc_notes_dislikes M.ghostize() - usr.ghostize() - usr.mind = null + user.ghostize() + user.mind = null M.mind = null user_mind.current = null prey_mind.current = null @@ -73,9 +73,9 @@ user.ooc_notes = target_ooc_notes user.ooc_notes_likes = target_likes user.ooc_notes_dislikes = target_dislikes - usr.sleeping = 10 //Device knocks out both the user and the target. - usr.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision - usr.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body. + user.sleeping = 10 //Device knocks out both the user and the target. + user.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision + user.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body. if(ishuman(M)) //Let's not have the AI slurring, even though its downright hilarious. M.sleeping = 10 M.eye_blurry = 30 diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 14cd916ea89..e85308b5dda 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -28,10 +28,10 @@ disrupt() ..() -/obj/item/chameleon/attack_self() - toggle() +/obj/item/chameleon/attack_self(mob/user) + toggle(user) -/obj/item/chameleon/afterattack(atom/target, mob/user , proximity) +/obj/item/chameleon/afterattack(atom/target, mob/user, proximity) if(!proximity) return if(!active_dummy) if(istype(target,/obj/item) && !istype(target, /obj/item/disk/nuclear)) @@ -42,30 +42,32 @@ saved_icon_state = target.icon_state saved_overlays = target.overlays -/obj/item/chameleon/proc/toggle() +/obj/item/chameleon/proc/toggle(mob/user) if(!can_use || !saved_item) return if(active_dummy) eject_all() playsound(src, 'sound/effects/pop.ogg', 100, 1, -6) qdel(active_dummy) active_dummy = null - to_chat(usr, span_notice("You deactivate the [src].")) + to_chat(user, span_notice("You deactivate the [src].")) var/obj/effect/overlay/T = new /obj/effect/overlay(get_turf(src)) T.icon = 'icons/effects/effects.dmi' flick("emppulse",T) - spawn(8) qdel(T) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), T), 0.8 SECONDS, TIMER_DELETE_ME) else playsound(src, 'sound/effects/pop.ogg', 100, 1, -6) var/obj/O = new saved_item(src) if(!O) return - var/obj/effect/dummy/chameleon/C = new /obj/effect/dummy/chameleon(usr.loc) - C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, src) + if(istype(user.loc, /obj/item/holder)) // This doesn't go well... + return + var/obj/effect/dummy/chameleon/C = new /obj/effect/dummy/chameleon(user.loc) + C.activate(O, user, saved_icon, saved_icon_state, saved_overlays, src) qdel(O) - to_chat(usr, span_notice("You activate the [src].")) + to_chat(user, span_notice("You activate the [src].")) var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src)) T.icon = 'icons/effects/effects.dmi' flick("emppulse",T) - spawn(8) qdel(T) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), T), 0.8 SECONDS, TIMER_DELETE_ME) /obj/item/chameleon/proc/disrupt(var/delete_dummy = 1) if(active_dummy) @@ -78,7 +80,10 @@ qdel(active_dummy) active_dummy = null can_use = 0 - spawn(50) can_use = 1 + addtimer(CALLBACK(src, PROC_REF(allow_use)), 5 SECONDS, TIMER_DELETE_ME) + +/obj/item/chameleon/proc/allow_use() + can_use = 1 /obj/item/chameleon/proc/eject_all() for(var/atom/movable/A in active_dummy) @@ -127,6 +132,9 @@ ..() master.disrupt() +/obj/effect/dummy/chameleon/proc/allow_move() + can_move = 1 + /obj/effect/dummy/chameleon/relaymove(var/mob/user, direction) if(istype(loc, /turf/space)) return //No magical space movement! @@ -134,15 +142,15 @@ can_move = 0 switch(user.bodytemperature) if(300 to INFINITY) - spawn(10) can_move = 1 + addtimer(CALLBACK(src, PROC_REF(allow_move)), 1 SECOND, TIMER_DELETE_ME) if(295 to 300) - spawn(13) can_move = 1 + addtimer(CALLBACK(src, PROC_REF(allow_move)), 1.3 SECONDS, TIMER_DELETE_ME) if(280 to 295) - spawn(16) can_move = 1 + addtimer(CALLBACK(src, PROC_REF(allow_move)), 1.6 SECONDS, TIMER_DELETE_ME) if(260 to 280) - spawn(20) can_move = 1 + addtimer(CALLBACK(src, PROC_REF(allow_move)), 2 SECONDS, TIMER_DELETE_ME) else - spawn(25) can_move = 1 + addtimer(CALLBACK(src, PROC_REF(allow_move)), 2.5 SECONDS, TIMER_DELETE_ME) step(src, direction) return diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 33cf9408c0a..c387c58ec08 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -318,11 +318,11 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) . = TRUE switch(action) if("rename") - var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) ) + var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name) ) if(new_name) register_device(new_name) @@ -341,7 +341,7 @@ ringer = !ringer if("set_ringer_tone") - var/ringtone = tgui_input_text(usr, "Set Ringer Tone", "Ringer") + var/ringtone = tgui_input_text(ui.user, "Set Ringer Tone", "Ringer") if(ringtone) ttone = ringtone @@ -360,7 +360,7 @@ if("dial") if(!get_connection_to_tcomms()) - to_chat(usr, span_danger("Error: Cannot connect to Exonet node.")) + to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node.")) return FALSE var/their_address = params["dial"] exonet.send_message(their_address, "voice") @@ -373,16 +373,16 @@ if("message") if(!get_connection_to_tcomms()) - to_chat(usr, span_danger("Error: Cannot connect to Exonet node.")) + to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node.")) return FALSE var/their_address = params["message"] - var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message")) + var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message")) if(text) exonet.send_message(their_address, "text", text) im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text)) - log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", usr) + log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user) var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address) - to_chat(usr, span_notice("[icon2html(src, usr.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)")) + to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)")) for(var/mob/M in player_list) if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat) @@ -395,16 +395,16 @@ var/name_to_disconnect = params["disconnect"] for(var/mob/living/voice/V in contents) if(name_to_disconnect == sanitize(V.name)) - close_connection(usr, V, "[usr] hung up") + close_connection(ui.user, V, "[ui.user] hung up") for(var/obj/item/communicator/comm in communicating) if(name_to_disconnect == sanitize(comm.name)) - close_connection(usr, comm, "[usr] hung up") + close_connection(ui.user, comm, "[ui.user] hung up") if("startvideo") var/ref_to_video = params["startvideo"] var/obj/item/communicator/comm = locate(ref_to_video) if(comm) - connect_video(usr, comm) + connect_video(ui.user, comm) if("endvideo") if(video_source) @@ -418,15 +418,15 @@ if("hang_up") for(var/mob/living/voice/V in contents) - close_connection(usr, V, "[usr] hung up") + close_connection(ui.user, V, "[ui.user] hung up") for(var/obj/item/communicator/comm in communicating) - close_connection(usr, comm, "[usr] hung up") + close_connection(ui.user, comm, "[ui.user] hung up") if("switch_tab") selected_tab = params["switch_tab"] if("edit") - var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) + var/n = tgui_input_text(ui.user, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) n = sanitizeSafe(n, extra = 0) if(n) note = html_decode(n) diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 3c5da0ca3ec..e765f3a0e14 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -132,7 +132,7 @@ if(!slot_check()) to_chat(user, span_warning("You need to equip [src] before taking out [paddles].")) else - if(!usr.put_in_hands(paddles)) //Detach the paddles into the user's hands + if(!user.put_in_hands(paddles)) //Detach the paddles into the user's hands to_chat(user, span_warning("You need a free hand to hold the paddles!")) update_icon() //success diff --git a/code/game/objects/items/devices/denecrotizer_vr.dm b/code/game/objects/items/devices/denecrotizer_vr.dm index af55b535d47..b82dfb39738 100644 --- a/code/game/objects/items/devices/denecrotizer_vr.dm +++ b/code/game/objects/items/devices/denecrotizer_vr.dm @@ -49,7 +49,7 @@ if(!evaluate_ghost_join(user)) return ..() - tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS) + tgui_alert_async(user, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS) /// A reply to an async alert request was received /mob/living/simple_mob/proc/reply_ghost_join(response) diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index d6a812a4105..ae9b0a5ed58 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -107,7 +107,7 @@ new painting_decal(F, painting_dir, painting_colour) /obj/item/floor_painter/attack_self(var/mob/user) - var/choice = tgui_alert(usr, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel")) + var/choice = tgui_alert(user, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel")) if(choice == "Cancel") return else if(choice == "Decal") diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index ce097cdfd69..3545ff34867 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -1,8 +1,8 @@ /obj/item/multitool/hacktool var/is_hacking = 0 var/max_known_targets - var/hackspeed = 1 - var/max_level = 4 //what's the max door security_level we can handle? + var/hackspeed = 1 //time taken to hack: lower is faster + var/max_level = 4 //what's the max door security_level we can handle? default is 1, med/eng/atmos are 1.5, sec/sci are 2, command is 3, vault is 5 var/full_override = FALSE //can we override door bolts too? defaults to false for event/safety reasons var/in_hack_mode = 0 @@ -155,3 +155,16 @@ if(!hacktool || !hacktool.in_hack_mode || !(src_object in hacktool.known_targets)) return STATUS_CLOSE return ..() + +/obj/item/multitool/hacktool/modified + name = "modified multitool" + desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. This ones seems a bit larger and heavier than the usual model, for some reason. Maybe it's an older version?" + description_info = "You can use this on airlocks or APCs to try to hack them without cutting wires." + icon_state = "multitool_modified" + +/obj/item/multitool/hacktool/obvious + name = "non-standard multitool" + desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. This one doesn't look like the usual model at all!" + description_info = "You can use this on airlocks or APCs to try to hack them without cutting wires." + icon_state = "multitool_suspicious" + in_hack_mode = 1 //start in hackmode diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 84181f83124..e85bb876bca 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -134,14 +134,14 @@ var/mob/living/silicon/robot/R = user if(R.emagged) src.Emag() - to_chat(usr, You short circuit the [src].") + to_chat(user, You short circuit the [src].") return */ - to_chat(usr, "It has [uses] lights remaining.") - var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null + to_chat(user, "It has [uses] lights remaining.") + var/new_color = input(user, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null if(new_color) selected_color = new_color - to_chat(usr, "The light color has been changed.") + to_chat(user, "The light color has been changed.") /obj/item/lightreplacer/update_icon() icon_state = "lightreplacer[emagged]" diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm index d3eb23c42e1..141f9a6e250 100644 --- a/code/game/objects/items/devices/locker_painter.dm +++ b/code/game/objects/items/devices/locker_painter.dm @@ -120,7 +120,7 @@ return /obj/item/closet_painter/attack_self(var/mob/user) - var/choice = tgui_alert(usr, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour")) + var/choice = tgui_alert(user, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour")) if(choice == "Regular Closet Colour") choose_colour() else if(choice == "Secure Closet Colour") diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index cdaa8215768..65640675b22 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -33,7 +33,7 @@ tool_qualities = list(TOOL_MULTITOOL) /obj/item/multitool/attack_self(mob/living/user) - var/choice = tgui_alert(usr, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel")) + var/choice = tgui_alert(user, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel")) switch(choice) if("Clear Buffers") to_chat(user,span_notice("You clear \the [src]'s memory.")) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 5aefe909d78..0bad4759a84 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -61,21 +61,21 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) if(pai != null) //Have a person in them already? return ..() if(is_damage_critical()) - to_chat(usr, span_warning("That card is too damaged to activate!")) + to_chat(user, span_warning("That card is too damaged to activate!")) return var/time_till_respawn = user.time_till_respawn() if(time_till_respawn == -1) // Special case, never allowed to respawn - to_chat(usr, span_warning("Respawning is not allowed!")) + to_chat(user, span_warning("Respawning is not allowed!")) else if(time_till_respawn) // Nonzero time to respawn - to_chat(usr, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.")) + to_chat(user, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.")) return - if(jobban_isbanned(usr, JOB_PAI)) - to_chat(usr,span_warning("You cannot join a pAI card when you are banned from playing as a pAI.")) + if(jobban_isbanned(user, JOB_PAI)) + to_chat(user,span_warning("You cannot join a pAI card when you are banned from playing as a pAI.")) return for(var/ourkey in paikeys) if(ourkey == user.ckey) - to_chat(usr, span_warning("You can't just rejoin any old pAI card!!! Your card still exists.")) + to_chat(user, span_warning("You can't just rejoin any old pAI card!!! Your card still exists.")) return var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel")) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index f6af18a4aa6..ead212defab 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -8,7 +8,8 @@ subspace_transmission = 1 canhear_range = 0 // can't hear headsets from very far away slot_flags = SLOT_EARS - sprite_sheets = list(SPECIES_TESHARI = 'icons/inventory/ears/mob_teshari.dmi') + sprite_sheets = list(SPECIES_TESHARI = 'icons/inventory/ears/mob_teshari.dmi', + SPECIES_WEREBEAST = 'icons/inventory/ears/mob_vr_werebeast.dmi') var/translate_binary = 0 var/translate_hive = 0 @@ -83,254 +84,6 @@ /obj/item/radio/headset/tgui_state(mob/user) return GLOB.tgui_inventory_state -/obj/item/radio/headset/syndicate - origin_tech = list(TECH_ILLEGAL = 3) - syndie = 1 - ks1type = /obj/item/encryptionkey/syndicate - -/obj/item/radio/headset/syndicate/alt - icon_state = "syndie_headset" - item_state = "headset" - origin_tech = list(TECH_ILLEGAL = 3) - syndie = 1 - ks1type = /obj/item/encryptionkey/syndicate - -/obj/item/radio/headset/raider - origin_tech = list(TECH_ILLEGAL = 2) - syndie = 1 - ks1type = /obj/item/encryptionkey/raider - -/obj/item/radio/headset/raider/Initialize() - . = ..() - set_frequency(RAID_FREQ) - -/obj/item/radio/headset/binary - origin_tech = list(TECH_ILLEGAL = 3) - ks1type = /obj/item/encryptionkey/binary - -/obj/item/radio/headset/headset_sec - name = "security radio headset" - desc = "This is used by your elite security force." - icon_state = "sec_headset" - ks2type = /obj/item/encryptionkey/headset_sec - -/obj/item/radio/headset/headset_sec/alt - name = "security bowman headset" - desc = "This is used by your elite security force." - icon_state = "sec_headset_alt" - ks2type = /obj/item/encryptionkey/headset_sec - -/obj/item/radio/headset/headset_eng - name = "engineering radio headset" - desc = "When the engineers wish to chat like girls." - icon_state = "eng_headset" - ks2type = /obj/item/encryptionkey/headset_eng - -/obj/item/radio/headset/headset_eng/alt - name = "engineering bowman headset" - desc = "When the engineers wish to chat like girls." - icon_state = "eng_headset_alt" - ks2type = /obj/item/encryptionkey/headset_eng - -/obj/item/radio/headset/headset_rob - name = "robotics radio headset" - desc = "Made specifically for the roboticists who cannot decide between departments." - icon_state = "rob_headset" - ks2type = /obj/item/encryptionkey/headset_rob - -/obj/item/radio/headset/headset_med - name = "medical radio headset" - desc = "A headset for the trained staff of the medbay." - icon_state = "med_headset" - ks2type = /obj/item/encryptionkey/headset_med - -/obj/item/radio/headset/headset_med/alt - name = "medical bowman headset" - desc = "A headset for the trained staff of the medbay." - icon_state = "med_headset_alt" - ks2type = /obj/item/encryptionkey/headset_med - -/obj/item/radio/headset/headset_sci - name = "science radio headset" - desc = "A sciency headset. Like usual." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/headset_sci - -/obj/item/radio/headset/headset_medsci - name = "medical research radio headset" - desc = "A headset that is a result of the mating between medical and science." - icon_state = "med_headset" - ks2type = /obj/item/encryptionkey/headset_medsci - -/obj/item/radio/headset/headset_com - name = "command radio headset" - desc = "A headset with a commanding channel." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/headset_com - -/obj/item/radio/headset/headset_com/alt - name = "command bowman headset" - desc = "A headset with a commanding channel." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/headset_com - - -/obj/item/radio/headset/heads/captain - name = "site manager's headset" - desc = "The headset of the boss." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/captain - -/obj/item/radio/headset/heads/captain/alt - name = "site manager's bowman headset" - desc = "The headset of the boss." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/captain - -/obj/item/radio/headset/heads/captain/sfr - name = "SFR headset" - desc = "A headset belonging to a Sif Free Radio DJ. SFR, best tunes in the wilderness." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/captain - -/obj/item/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway. - name = "\improper AI subspace transceiver" - desc = "Integrated AI radio transceiver." - icon = 'icons/obj/robot_component.dmi' - icon_state = "radio" - item_state = "headset" - ks2type = /obj/item/encryptionkey/heads/ai_integrated - var/myAi = null // Atlantis: Reference back to the AI which has this radio. - var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu. - -/obj/item/radio/headset/heads/ai_integrated/receive_range(freq, level) - if (disabledAi) - return -1 //Transciever Disabled. - return ..(freq, level, 1) - -/obj/item/radio/headset/heads/rd - name = "research director's headset" - desc = "Headset of the eccentric-in-chief." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/rd - -/obj/item/radio/headset/heads/rd/alt - name = "research director's bowman headset" - desc = "Headset of the eccentric-in-chief." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/rd - -/obj/item/radio/headset/heads/hos - name = "head of security's headset" - desc = "The headset of the hardass who protects your worthless lives." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/hos - -/obj/item/radio/headset/heads/hos/alt - name = "head of security's bowman headset" - desc = "The headset of the hardass who protects your worthless lives." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/hos - -/obj/item/radio/headset/heads/ce - name = "chief engineer's headset" - desc = "The headset of the clown who is in charge of the circus." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/ce - -/obj/item/radio/headset/heads/ce/alt - name = "chief engineer's bowman headset" - desc = "The headset of the clown who is in charge of the circus." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/ce - -/obj/item/radio/headset/heads/cmo - name = "chief medical officer's headset" - desc = "The headset of the highly trained medical chief." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/cmo - -/obj/item/radio/headset/heads/cmo/alt - name = "chief medical officer's bowman headset" - desc = "The headset of the highly trained medical chief." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/cmo - -/obj/item/radio/headset/heads/hop - name = "head of personnel's headset" - desc = "The headset of the poor fool who will one day be " + JOB_SITE_MANAGER + "." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/hop - -/obj/item/radio/headset/heads/hop/alt - name = "head of personnel's bowman headset" - desc = "The headset of the poor fool who will one day be " + JOB_SITE_MANAGER + "." - icon_state = "com_headset_alt" - ks2type = /obj/item/encryptionkey/heads/hop - -/obj/item/radio/headset/headset_mine - name = "mining radio headset" - desc = "Headset used by miners. Has inbuilt short-band radio for when comms are down." - icon_state = "mine_headset" - adhoc_fallback = TRUE - ks2type = /obj/item/encryptionkey/headset_cargo - -/obj/item/radio/headset/headset_cargo - name = "supply radio headset" - desc = "A headset used by the QM and their cronies." - icon_state = "cargo_headset" - ks2type = /obj/item/encryptionkey/headset_cargo - -/obj/item/radio/headset/headset_cargo/alt - name = "supply bowman headset" - desc = "A bowman headset used by the QM and their cronies." - icon_state = "cargo_headset_alt" - ks2type = /obj/item/encryptionkey/headset_cargo - -/obj/item/radio/headset/headset_service - name = "service radio headset" - desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean." - icon_state = "srv_headset" - ks2type = /obj/item/encryptionkey/headset_service - -/obj/item/radio/headset/ert - name = "emergency response team radio headset" - desc = "The headset of the boss's boss." - icon_state = "com_headset" - centComm = 1 -// freerange = 1 - ks2type = /obj/item/encryptionkey/ert - -/obj/item/radio/headset/ert/alt - name = "emergency response team bowman headset" - desc = "The headset of the boss's boss." - icon_state = "com_headset_alt" -// freerange = 1 - ks2type = /obj/item/encryptionkey/ert - -/obj/item/radio/headset/omni //Only for the admin intercoms - ks2type = /obj/item/encryptionkey/omni - -/obj/item/radio/headset/ia - name = "internal affair's headset" - desc = "The headset of your worst enemy." - icon_state = "com_headset" - ks2type = /obj/item/encryptionkey/heads/hos - -/obj/item/radio/headset/mmi_radio - name = "brain-integrated radio" - desc = "MMIs and synthetic brains are often equipped with these." - icon = 'icons/obj/robot_component.dmi' - icon_state = "radio" - item_state = "headset" - var/mmiowner = null - var/radio_enabled = 1 - -/obj/item/radio/headset/mmi_radio/receive_range(freq, level) - if (!radio_enabled || istype(src.loc.loc, /mob/living/silicon) || istype(src.loc.loc, /obj/item/organ/internal)) - return -1 //Transciever Disabled. - return ..(freq, level, 1) - /obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob) // ..() user.set_machine(src) @@ -361,15 +114,15 @@ keyslot2 = null recalculateChannels() - to_chat(user, "You pop out the encryption keys in the headset!") + to_chat(user, span_notice("You pop out the encryption keys in the headset!")) playsound(src, W.usesound, 50, 1) else - to_chat(user, "This headset doesn't have any encryption keys! How useless...") + to_chat(user, span_notice("This headset doesn't have any encryption keys! How useless...")) if(istype(W, /obj/item/encryptionkey/)) if(keyslot1 && keyslot2) - to_chat(user, "The headset can't hold another key!") + to_chat(user, span_notice("The headset can't hold another key!")) return if(!keyslot1) @@ -387,7 +140,6 @@ return - /obj/item/radio/headset/recalculateChannels(var/setDescription = 0) src.channels = list() src.translate_binary = 0 @@ -451,3 +203,436 @@ radio_text += ", " radio_desc = radio_text + +/obj/item/radio/headset/mob_headset/receive_range(freq, level) + if(ismob(src.loc)) + return ..(freq, level, 1) + return -1 + +/obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity) + if(!proximity) + return + if(istype(target,/mob/living/simple_mob)) + var/mob/living/simple_mob/M = target + if(!M.mob_radio) + user.drop_item() + forceMove(M) + M.mob_radio = src + return + if(M.mob_radio) + M.mob_radio.forceMove(M.loc) + M.mob_radio = null + return + ..() + +/obj/item/radio/headset/alt + name = "bowman radio headset" + desc = "A larger, sturdier radio headset. A bit bulky, but guaranteed to stay on no matter what." + icon_state = "headset_alt" + +/obj/item/radio/headset/earbud + name = "radio earbud" + desc = "A discreet radio earbud and low-profile mic. Simple and unobtrusive." + icon_state = "headset_earbud" + +/obj/item/radio/headset/headset_sec + name = "security radio headset" + icon_state = "sec_headset" + ks2type = /obj/item/encryptionkey/headset_sec + +/obj/item/radio/headset/alt/headset_sec + name = "security bowman headset" + icon_state = "sec_headset_alt" + ks2type = /obj/item/encryptionkey/headset_sec + +/obj/item/radio/headset/earbud/headset_sec + name = "security earbud" + icon_state = "sec_earbud" + ks2type = /obj/item/encryptionkey/headset_sec + +/obj/item/radio/headset/headset_eng + name = "engineering radio headset" + icon_state = "eng_headset" + ks2type = /obj/item/encryptionkey/headset_eng + +/obj/item/radio/headset/alt/headset_eng + name = "engineering bowman headset" + icon_state = "eng_headset_alt" + ks2type = /obj/item/encryptionkey/headset_eng + +/obj/item/radio/headset/earbud/headset_eng + name = "engineering earbud" + icon_state = "eng_earbud" + ks2type = /obj/item/encryptionkey/headset_eng + +/obj/item/radio/headset/headset_med + name = "medical radio headset" + icon_state = "med_headset" + ks2type = /obj/item/encryptionkey/headset_med + +/obj/item/radio/headset/alt/headset_med + name = "medical bowman headset" + icon_state = "med_headset_alt" + ks2type = /obj/item/encryptionkey/headset_med + +/obj/item/radio/headset/earbud/headset_med + name = "medical earbud" + icon_state = "med_earbud" + ks2type = /obj/item/encryptionkey/headset_med + +/obj/item/radio/headset/headset_sci + name = "science radio headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/headset_sci + +/obj/item/radio/headset/alt/headset_sci + name = "science bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/headset_sci + +/obj/item/radio/headset/earbud/headset_sci + name = "science earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/headset_sci + +/obj/item/radio/headset/headset_com + name = "command radio headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/headset_com + +/obj/item/radio/headset/alt/headset_com + name = "command bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/headset_com + +/obj/item/radio/headset/earbud/headset_com + name = "command earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/headset_com + +/obj/item/radio/headset/heads/captain + name = "site manager's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/captain + +/obj/item/radio/headset/heads/captain/sfr + name = "SFR headset" + desc = "A headset belonging to a Sif Free Radio DJ. SFR, best tunes in the wilderness." + icon_state = "com_headset_alt" + +/obj/item/radio/headset/alt/heads/captain + name = "site manager's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/captain + +/obj/item/radio/headset/earbud/heads/captain + name = "site manager's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/captain + +/obj/item/radio/headset/heads/rd + name = "research director's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/rd + +/obj/item/radio/headset/alt/heads/rd + name = "research director's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/rd + +/obj/item/radio/headset/earbud/heads/rd + name = "research director's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/rd + +/obj/item/radio/headset/heads/hos + name = "head of security's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/alt/heads/hos + name = "head of security's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/earbud/heads/hos + name = "head of security's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/heads/ce + name = "chief engineer's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/ce + +/obj/item/radio/headset/alt/heads/ce + name = "chief engineer's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/ce + +/obj/item/radio/headset/earbud/heads/ce + name = "chief engineer's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/ce + +/obj/item/radio/headset/heads/cmo + name = "chief medical officer's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/cmo + +/obj/item/radio/headset/alt/heads/cmo + name = "chief medical officer's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/cmo + +/obj/item/radio/headset/earbud/heads/cmo + name = "chief medical officer's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/cmo + +/obj/item/radio/headset/heads/hop + name = "head of personnel's headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/hop + +/obj/item/radio/headset/alt/heads/hop + name = "head of personnel's bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/hop + +/obj/item/radio/headset/earbud/heads/hop + name = "head of personnel's earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/hop + +/obj/item/radio/headset/miner + name = "mining radio headset" + desc = "Headset used by miners. Has inbuilt short-band radio for when comms are down." + icon_state = "mine_headset" + adhoc_fallback = TRUE + ks2type = /obj/item/encryptionkey/headset_cargo + +/obj/item/radio/headset/cargo + name = "supply radio headset" + icon_state = "cargo_headset" + ks2type = /obj/item/encryptionkey/headset_cargo + +/obj/item/radio/headset/alt/cargo + name = "supply bowman headset" + icon_state = "cargo_headset_alt" + ks2type = /obj/item/encryptionkey/headset_cargo + +/obj/item/radio/headset/earbud/cargo + name = "supply earbud" + icon_state = "cargo_earbud" + ks2type = /obj/item/encryptionkey/headset_cargo + +/obj/item/radio/headset/qm + name = "qm radio headset" + icon_state = "cargo_headset" + ks2type = /obj/item/encryptionkey/qm + +/obj/item/radio/headset/alt/qm + name = "qm bowman headset" + icon_state = "cargo_headset_alt" + ks2type = /obj/item/encryptionkey/qm + +/obj/item/radio/headset/earbud/qm + name = "qm earbud" + icon_state = "cargo_earbud" + ks2type = /obj/item/encryptionkey/qm + +/obj/item/radio/headset/service + name = "service radio headset" + icon_state = "srv_headset" + ks2type = /obj/item/encryptionkey/headset_service + +/obj/item/radio/headset/alt/service + name = "service bowman headset" + icon_state = "srv_headset_alt" + ks2type = /obj/item/encryptionkey/headset_service + +/obj/item/radio/headset/earbud/service + name = "service earbud" + icon_state = "srv_earbud" + ks2type = /obj/item/encryptionkey/headset_service + +/obj/item/radio/headset/ert + name = "emergency response team radio headset" + icon_state = "com_headset" + centComm = 1 + ks2type = /obj/item/encryptionkey/ert + +/obj/item/radio/headset/alt/ert + name = "emergency response team bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/ert + +/obj/item/radio/headset/ia + name = "internal affairs headset" + icon_state = "com_headset" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/alt/ia + name = "internal affairs bowman headset" + icon_state = "com_headset_alt" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/earbud/ia + name = "internal affairs earbud" + icon_state = "com_earbud" + ks2type = /obj/item/encryptionkey/heads/hos + +/obj/item/radio/headset/centcom + name = "centcom radio headset" + icon_state = "cent_headset" + item_state = "headset" + centComm = 1 + ks2type = /obj/item/encryptionkey/ert + +/obj/item/radio/headset/alt/centcom + name = "centcom bowman headset" + icon_state = "com_headset_alt" + +/obj/item/radio/headset/nanotrasen + name = "\improper NT radio headset" + icon_state = "nt_headset" + centComm = 1 + ks2type = /obj/item/encryptionkey/ert + +/obj/item/radio/headset/alt/nanotrasen + name = "\improper NT bowman headset" + icon_state = "nt_headset_alt" + +/obj/item/radio/headset/pathfinder + name = "pathfinder's headset" + icon_state = "exp_headset" + adhoc_fallback = TRUE + ks2type = /obj/item/encryptionkey/pathfinder + +/obj/item/radio/headset/alt/pathfinder + name = "pathfinder's bowman headset" + icon_state = "exp_headset_alt" + +/obj/item/radio/headset/pilot + name = "pilot's headset" + icon_state = "pilot_headset" + adhoc_fallback = TRUE + +/obj/item/radio/headset/alt/pilot + name = "pilot's bowman headset" + icon_state = "pilot_headset_alt" + +/obj/item/radio/headset/explorer + name = "away team member's headset" + icon_state = "exp_headset" + adhoc_fallback = TRUE + ks2type = /obj/item/encryptionkey/explorer + +/obj/item/radio/headset/alt/explorer + name = "away team's bowman headset" + icon_state = "exp_headset_alt" + +/obj/item/radio/headset/sar + name = "search and rescue headset" + icon_state = "sar_headset" + adhoc_fallback = TRUE + ks2type = /obj/item/encryptionkey/sar + +/obj/item/radio/headset/alt/sar + name = "search and rescue bowman headset" + icon_state = "sar_headset_alt" + adhoc_fallback = TRUE + ks2type = /obj/item/encryptionkey/sar + +/obj/item/radio/headset/talon + name = "talon headset" + adhoc_fallback = TRUE + icon_state = "pilot_headset" + ks2type = /obj/item/encryptionkey/talon + +/obj/item/radio/headset/alt/talon + name = "talon bowman headset" + adhoc_fallback = TRUE + icon_state = "pilot_headset" + ks2type = /obj/item/encryptionkey/talon + +/obj/item/radio/headset/earbud/talon + name = "talon earbud" + adhoc_fallback = TRUE + icon_state = "pilot_headset" + ks2type = /obj/item/encryptionkey/talon + +/obj/item/radio/headset/headset_rob + name = "robotics radio headset" + icon_state = "rob_headset" + ks2type = /obj/item/encryptionkey/headset_rob + +// Special Antag/Admin/Event/Other headsets + +/obj/item/radio/headset/syndicate + origin_tech = list(TECH_ILLEGAL = 3) + icon_state = "syndie_headset" + syndie = 1 + ks1type = /obj/item/encryptionkey/syndicate + +/obj/item/radio/headset/alt/syndicate + origin_tech = list(TECH_ILLEGAL = 3) + icon_state = "syndie_headset_alt" + syndie = 1 + ks1type = /obj/item/encryptionkey/syndicate + +/obj/item/radio/headset/earbud/syndicate + origin_tech = list(TECH_ILLEGAL = 3) + icon_state = "syndie_earbud" + syndie = 1 + ks1type = /obj/item/encryptionkey/syndicate + +/obj/item/radio/headset/raider + origin_tech = list(TECH_ILLEGAL = 2) + icon_state = "syndie_headset" + syndie = 1 + ks1type = /obj/item/encryptionkey/raider + +/obj/item/radio/headset/raider/Initialize() + . = ..() + set_frequency(RAID_FREQ) + +/obj/item/radio/headset/binary + origin_tech = list(TECH_ILLEGAL = 3) + ks1type = /obj/item/encryptionkey/binary + +/obj/item/radio/headset/omni //Only for the admin intercoms + ks2type = /obj/item/encryptionkey/omni + +/obj/item/radio/headset/mmi_radio + name = "brain-integrated radio" + icon = 'icons/obj/robot_component.dmi' + icon_state = "radio" + item_state = "headset" + var/mmiowner = null + var/radio_enabled = 1 + +/obj/item/radio/headset/mmi_radio/receive_range(freq, level) + if (!radio_enabled || istype(src.loc.loc, /mob/living/silicon) || istype(src.loc.loc, /obj/item/organ/internal)) + return -1 //Transciever Disabled. + return ..(freq, level, 1) + +/obj/item/radio/headset/mob_headset //Adminbus headset for simplemob shenanigans. + name = "nonhuman radio receiver" + desc = "An updated, self-adhesive modular intercom that requires no hands to operate or ears to hold, just stick it on. Takes encryption keys" + +/obj/item/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway. + name = "\improper AI subspace transceiver" + desc = "Integrated AI radio transceiver." + icon = 'icons/obj/robot_component.dmi' + icon_state = "radio" + item_state = "headset" + ks2type = /obj/item/encryptionkey/heads/ai_integrated + var/myAi = null // Atlantis: Reference back to the AI which has this radio. + var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu. + +/obj/item/radio/headset/heads/ai_integrated/receive_range(freq, level) + if (disabledAi) + return -1 //Transciever Disabled. + return ..(freq, level, 1) \ No newline at end of file diff --git a/code/game/objects/items/devices/radio/headset_vr.dm b/code/game/objects/items/devices/radio/headset_vr.dm deleted file mode 100644 index bad15ccd483..00000000000 --- a/code/game/objects/items/devices/radio/headset_vr.dm +++ /dev/null @@ -1,131 +0,0 @@ -/obj/item/radio/headset/centcom - name = "centcom radio headset" - desc = "The headset of the boss's boss." - icon_state = "cent_headset" - item_state = "headset" - centComm = 1 - ks2type = /obj/item/encryptionkey/ert - -/obj/item/radio/headset/centcom/alt - name = "centcom bowman headset" - icon_state = "com_headset_alt" - -/obj/item/radio/headset/nanotrasen - name = "\improper NT radio headset" - desc = "The headset of a Nanotrasen corporate employee." - icon_state = "nt_headset" - centComm = 1 - ks2type = /obj/item/encryptionkey/ert - -/obj/item/radio/headset/nanotrasen/alt - name = "\improper NT bowman headset" - icon_state = "nt_headset_alt" - -/obj/item/radio/headset - sprite_sheets = list(SPECIES_TESHARI = 'icons/inventory/ears/mob_teshari.dmi', - SPECIES_WEREBEAST = 'icons/inventory/ears/mob_vr_werebeast.dmi') - -/obj/item/radio/headset/mob_headset //Adminbus headset for simplemob shenanigans. - name = "nonhuman radio receiver" - desc = "An updated, self-adhesive modular intercom that requires no hands to operate or ears to hold, just stick it on. Takes encryption keys" - -/obj/item/radio/headset/mob_headset/receive_range(freq, level) - if(ismob(src.loc)) - return ..(freq, level, 1) - return -1 - -/obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity) - if(!proximity) - return - if(istype(target,/mob/living/simple_mob)) - var/mob/living/simple_mob/M = target - if(!M.mob_radio) - user.drop_item() - forceMove(M) - M.mob_radio = src - return - if(M.mob_radio) - M.mob_radio.forceMove(M.loc) - M.mob_radio = null - return - ..() - -/obj/item/radio/headset/headset_cargo - desc = "A headset used by the QM's slaves." - -/obj/item/radio/headset/headset_cargo/alt - desc = "A bowman headset used by the QM's slaves." - -/obj/item/radio/headset/headset_qm - name = "qm radio headset" - desc = "A headset used by the QM." - icon_state = "cargo_headset" - ks2type = /obj/item/encryptionkey/qm - -/obj/item/radio/headset/headset_qm/alt - name = "qm bowman headset" - desc = "A bowman headset used by the QM." - icon_state = "cargo_headset_alt" - -/obj/item/radio/headset/pathfinder - name = "pathfinder's headset" - desc = "Headset used by pathfinders for exploring. Access to the explorer and command channels." - icon_state = "exp_headset" - adhoc_fallback = TRUE - ks2type = /obj/item/encryptionkey/pathfinder - -/obj/item/radio/headset/pathfinder/alt - name = "pathfinder's bowman headset" - desc = "Bowman headset used by pathfinders for exploring. Access to the explorer and command channels." - icon_state = "exp_headset_alt" - -/obj/item/radio/headset/pilot - name = "pilot's headset" - desc = "A headset used by pilots." - icon_state = "pilot_headset" - adhoc_fallback = TRUE - -/obj/item/radio/headset/pilot/alt - name = "pilot's bowman headset" - desc = "A bowman headset used by pilots." - icon_state = "pilot_headset_alt" - -/obj/item/radio/headset/explorer - name = "away team member's headset" - desc = "Headset used by the away team for exploring. Access to the away team channel." - icon_state = "exp_headset" - adhoc_fallback = TRUE - ks2type = /obj/item/encryptionkey/explorer - -/obj/item/radio/headset/explorer/alt - name = "away team's bowman headset" - desc = "Bowman headset used by the away team for exploring. Access to the away team channel." - icon_state = "exp_headset_alt" - -/obj/item/radio/headset/sar - name = "fm radio headset" - desc = "A headset for field medics." - icon_state = "sar_headset" - adhoc_fallback = TRUE - ks2type = /obj/item/encryptionkey/sar - -/obj/item/radio/headset/sar/alt - name = "fm radio bowman headset" - desc = "A bowman headset for field medics." - icon_state = "sar_headset_alt" - -/* //They're all volunteers now. -/obj/item/radio/headset/volunteer - name = "volunteer's headset" - desc = "A headset used by volunteers to expedition teams, has access to the Away Team channel." - icon_state = "pilot_headset" - adhoc_fallback = TRUE - ks2type = /obj/item/encryptionkey/explorer -*/ - -/obj/item/radio/headset/talon - name = "talon headset" - desc = "A headset for communication between the crew of the ITV Talon." - adhoc_fallback = TRUE - icon_state = "pilot_headset" - ks2type = /obj/item/encryptionkey/talon diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 03a2f53da90..c7720c6f091 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -240,7 +240,7 @@ var/global/list/default_medbay_channels = list( return STATUS_CLOSE return ..() -/obj/item/radio/tgui_act(action, params) +/obj/item/radio/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -251,8 +251,8 @@ var/global/list/default_medbay_channels = list( new_frequency = sanitize_frequency(new_frequency) set_frequency(new_frequency) if(hidden_uplink) - if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency)) - usr << browse(null, "window=radio") + if(hidden_uplink.check_trigger(ui.user, frequency, traitor_frequency)) + ui.user << browse(null, "window=radio") . = TRUE if("broadcast") ToggleBroadcast() @@ -269,7 +269,7 @@ var/global/list/default_medbay_channels = list( . = TRUE if("specFreq") var/freq = params["channel"] - if(has_channel_access(usr, freq)) + if(has_channel_access(ui.user, freq)) set_frequency(text2num(freq)) . = TRUE if("subspace") @@ -277,10 +277,10 @@ var/global/list/default_medbay_channels = list( subspace_transmission = !subspace_transmission if(!subspace_transmission) channels = list() - to_chat(usr, span_notice("Subspace Transmission is disabled")) + to_chat(ui.user, span_notice("Subspace Transmission is disabled")) else recalculateChannels() - to_chat(usr, span_notice("Subspace Transmission is enabled")) + to_chat(ui.user, span_notice("Subspace Transmission is enabled")) . = TRUE if("toggleLoudspeaker") if(!subspace_switchable) @@ -288,12 +288,12 @@ var/global/list/default_medbay_channels = list( loudspeaker = !loudspeaker if(loudspeaker) - to_chat(usr, span_notice("Loadspeaker enabled.")) + to_chat(ui.user, span_notice("Loadspeaker enabled.")) else - to_chat(usr, span_notice("Loadspeaker disabled.")) + to_chat(ui.user, span_notice("Loadspeaker disabled.")) . = TRUE - if(. && iscarbon(usr)) + if(. && iscarbon(ui.user)) playsound(src, "button", 10) GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) diff --git a/code/game/objects/items/devices/radio/radiopack.dm b/code/game/objects/items/devices/radio/radiopack.dm index 0dd91f0c875..c4e53205cdf 100644 --- a/code/game/objects/items/devices/radio/radiopack.dm +++ b/code/game/objects/items/devices/radio/radiopack.dm @@ -64,7 +64,7 @@ if(!slot_check()) to_chat(user, span_warning("You need to equip [src] before taking out [handset].")) else - if(!usr.put_in_hands(handset)) //Detach the handset into the user's hands + if(!user.put_in_hands(handset)) //Detach the handset into the user's hands to_chat(user, span_warning("You need a free hand to hold the handset!")) update_icon() //success diff --git a/code/game/objects/items/devices/scanners/gas.dm b/code/game/objects/items/devices/scanners/gas.dm index 1ec74ff1059..29e07259a1a 100644 --- a/code/game/objects/items/devices/scanners/gas.dm +++ b/code/game/objects/items/devices/scanners/gas.dm @@ -28,7 +28,7 @@ if (user.stat) return if (!user.IsAdvancedToolUser()) - to_chat(usr, span_warning("You don't have the dexterity to do this!")) + to_chat(user, span_warning("You don't have the dexterity to do this!")) return analyze_gases(src, user) diff --git a/code/game/objects/items/devices/scanners/guide.dm b/code/game/objects/items/devices/scanners/guide.dm index 403a81f9747..68bd33d8e8d 100644 --- a/code/game/objects/items/devices/scanners/guide.dm +++ b/code/game/objects/items/devices/scanners/guide.dm @@ -102,7 +102,7 @@ if(D.visibility_flags & HIDDEN_SCANNER) continue else - dat += span_bold("Viral Infection") + " - Inform a Virologist or the Chief Medical Officer and administer antiviral chemicals such as Spaceacilin. Limit exposure to other personnel.
" + dat += span_bold("Viral Infection") + " - Inform a Virologist or the Chief Medical Officer and administer antiviral chemicals such as Spaceacillin. Limit exposure to other personnel.
" if(robotparts) dat += span_bold("Robotic body parts") + " - Should not be repaired by medical personnel, refer to robotics if damaged." diff --git a/code/game/objects/items/devices/scanners/health.dm b/code/game/objects/items/devices/scanners/health.dm index c9927024305..348d8b55e6e 100644 --- a/code/game/objects/items/devices/scanners/health.dm +++ b/code/game/objects/items/devices/scanners/health.dm @@ -248,7 +248,7 @@ else dat += span_warning("Unknown substance[(unknown > 1)?"s":""] found in subject's dermis.") dat += "
" - if(C.resistances.len) + if(LAZYLEN(C.resistances)) for (var/datum/disease/virus in C.GetViruses()) if(virus.visibility_flags & HIDDEN_SCANNER || virus.visibility_flags & HIDDEN_PANDEMIC) continue diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 4e347a328e4..26a57d99845 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -201,7 +201,7 @@ operating = 1 while(selected_camera && Adjacent(user)) - selected_camera = tgui_input_list(usr, "Select camera to view.", "Camera Choice", cameras) + selected_camera = tgui_input_list(user, "Select camera to view.", "Camera Choice", cameras) selected_camera = null operating = 0 diff --git a/code/game/objects/items/devices/ticket_printer.dm b/code/game/objects/items/devices/ticket_printer.dm index b4b8ec41853..51b0d3e8ba5 100644 --- a/code/game/objects/items/devices/ticket_printer.dm +++ b/code/game/objects/items/devices/ticket_printer.dm @@ -20,13 +20,13 @@ var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)) if(length(ticket_name) > 100) - tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error") + tgui_alert_async(user, "Entered name too long. 100 character limit.","Error") return if(!ticket_name) return var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200)) if(length(details) > 200) - tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error") + tgui_alert_async(user, "Entered details too long. 200 character limit.","Error") return if(!details) return @@ -71,13 +71,13 @@ var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)) if(length(ticket_name) > 100) - tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error") + tgui_alert_async(user, "Entered name too long. 100 character limit.","Error") return if(!ticket_name) return var/details = sanitize(tgui_input_text(user, "What is the ticket for? This could be anything like travel to a destination or permission to do something! This is not official and does not override any rules or authorities on the station.", "Ticket Details", max_length = 200)) if(length(details) > 200) - tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error") + tgui_alert_async(user, "Entered details too long. 200 character limit.","Error") return if(!details) return diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 535809bc4fa..958ce7471cf 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -86,7 +86,7 @@ data["valve"] = valve_open return data -/obj/item/transfer_valve/tgui_act(action, params) +/obj/item/transfer_valve/tgui_act(action, params, datum/tgui/ui) if(..()) return . = TRUE @@ -99,7 +99,7 @@ toggle_valve() if("device") if(attached_device) - attached_device.attack_self(usr) + attached_device.attack_self(ui.user) if("remove_device") if(attached_device) attached_device.forceMove(get_turf(src)) @@ -110,7 +110,7 @@ . = FALSE if(.) update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/item/transfer_valve/proc/process_activation(var/obj/item/D) if(toggle) diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index 1fe7de3c9a5..99a2dde7698 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -412,7 +412,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat var/mob/living/L = user var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", list("Eat it!", "No, thanks.")) if(confirm == "Eat it!") - var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs) + var/obj/belly/bellychoice = tgui_input_list(user, "Which belly?","Select A Belly", L.vore_organs) if(bellychoice) user.visible_message(span_warning("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice.name]!"),span_notice("You begin putting \the [src] into your [bellychoice.name]!")) if(do_after(user,5 SECONDS,src)) diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index c8be5fb6545..34b18d7b958 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -197,7 +197,7 @@ switch(action) if("buy") var/datum/uplink_item/UI = (locate(params["ref"]) in uplink.items) - UI.buy(src, usr) + UI.buy(src, ui.user) return TRUE if("lock") toggle() diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/lockpicks.dm new file mode 100644 index 00000000000..0af583a1736 --- /dev/null +++ b/code/game/objects/items/lockpicks.dm @@ -0,0 +1,54 @@ +//For bypassing locked /obj/structure/simple_doors + +/obj/item/lockpick + name = "set of lockpicks" + desc = "A set of picks and tension wrenches, ideal for picking old-style mechanical locks... not that any of those exist on most NT facilities these days. Still, it might be useful elsewhere?" + icon = 'icons/obj/lockpicks.dmi' + icon_state = "lockpicks" + w_class = ITEMSIZE_SMALL + var/pick_type = "simple" + var/pick_time = 10 SECONDS + var/pick_verb = "pick" + +/obj/item/lockpick/afterattack(atom/A, mob/user) + if(!user.IsAdvancedToolUser()) //no lockpicking for monkeys + return + if(istype(A, /obj/structure/simple_door)) + var/obj/structure/simple_door/D = A + if(!D.locked) //you can pick your nose, but you can't pick an unlocked door + to_chat(user, span_notice("\The [D] isn't locked.")) + return + else if(D.lock_type != pick_type) //make sure our types match + to_chat(user, span_warning("\The [src] can't pick \the [D]. Another tool might work?")) + return + else if(!D.can_pick) //make sure we're actually allowed to bypass it at all + to_chat(user, span_warning("\The [D] can't be [pick_verb]ed.")) + return + else //finally, we can assume that they do match + to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]...")) + playsound(src, D.keysound,100, 1) + if(do_after(user, pick_time * D.lock_difficulty)) + to_chat(user, span_notice("Success!")) + D.locked = FALSE + else if(istype(A,/mob/living/carbon/human)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose + var/mob/living/carbon/human/H = A + if(user.zone_sel.selecting == BP_HEAD) + if(H == user) + to_chat(user, span_notice("Your nose isn't locked. If you're feeling stuffy, maybe you should talk to a doctor..?")) + else + user.visible_message(span_notice("[user] tries to [pick_verb] [H]'s nose with \the [src]! They don't seem to be having much success."),span_notice("You try to [pick_verb] [H]'s nose. It doesn't seem to be working.")) + return + +/obj/item/lockpick/pick_gun + name = "pick gun" + desc = "A more sophisticated and automated alternative to traditional lockpicking methods. Contains a dazzling array of tools in a simple-to-use housing: just press the face plate against the lock face and hold the trigger down until it goes click." + icon_state = "pick_gun" + pick_time = 3 SECONDS + +/obj/item/lockpick/mag_sequencer + name = "magnetic sequencer" + desc = "A deceptively simple gadget that brute-forces magnetic locks using a small electromagnet. A predecessor to the cryptographic sequencer, a more complicated device that is considered contraband in most jurisdictions. Not that these aren't illegal either, mind you!" + icon_state = "mag_sequencer" + pick_type = "maglock" + pick_time = 5 SECONDS + pick_verb = "bypass" diff --git a/code/game/objects/items/petrifier.dm b/code/game/objects/items/petrifier.dm new file mode 100644 index 00000000000..0e976bef481 --- /dev/null +++ b/code/game/objects/items/petrifier.dm @@ -0,0 +1,28 @@ +/obj/item/petrifier + name = "odd button" + desc = "A metal device with a single, purple button on it, and a tiny interface." + icon = 'icons/obj/machines/petrification.dmi' + icon_state = "petrifier" + + var/mob/living/carbon/human/target + var/identifier = "statue" + var/material = "stone" + var/adjective = "hardens" + var/tint = "#FFFFFF" + var/discard_clothes = TRUE + var/able_to_unpetrify = TRUE + var/obj/machinery/petrification/linked + +/obj/item/petrifier/Initialize(mapload, var/to_link) + . = ..() + linked = to_link + +/obj/item/petrifier/attack_self(var/mob/user) + . = ..() + if (!isturf(user.loc) && user.get_ultimate_mob() != target) + to_chat(user, span_warning("The device beeps but does nothing.")) + return + if (linked?.petrify(user, src)) + visible_message(span_notice("A ray of purple light streams out of \the [src], aimed directly at [target]. Everywhere the light touches on them quickly [adjective] into [material].")) + to_chat(user, span_warning("The device fizzles and crumbles into dust.")) + qdel(src) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 32af47b31af..2d93e9c7bca 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -225,7 +225,6 @@ feedback_inc("cyborg_birth",1) callHook("borgify", list(O)) - O.namepick() qdel(src) else @@ -235,7 +234,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return - if (!in_range(src, usr) && src.loc != usr) + if (!in_range(src, user) && src.loc != user) return src.created_name = t diff --git a/code/game/objects/items/selectable_item_vr.dm b/code/game/objects/items/selectable_item_vr.dm index c5997966d46..3183971bcef 100644 --- a/code/game/objects/items/selectable_item_vr.dm +++ b/code/game/objects/items/selectable_item_vr.dm @@ -12,7 +12,7 @@ /obj/item/selectable_item/attack_self(mob/user as mob) tgui_alert(user, {"[preface_string]"}, preface_title) - var/chosen_item = tgui_input_list(usr, selection_string, selection_title, item_options) + var/chosen_item = tgui_input_list(user, selection_string, selection_title, item_options) chosen_item = item_options[chosen_item] if(!QDELETED(src) && chosen_item) user.drop_item() @@ -45,4 +45,4 @@ preface_title = "Gender Chemistry Kit" item_options = list("Androrovir" = /obj/item/reagent_containers/glass/beaker/vial/androrovir, "Gynorovir" = /obj/item/reagent_containers/glass/beaker/vial/gynorovir, - "Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir) \ No newline at end of file + "Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index 1a63c55db5a..66f3ce09d19 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -37,7 +37,7 @@ var/obj/item/weldingtool/WT = W.get_welder() if(WT.remove_fuel(0, user)) cut_overlays() - to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.") + to_chat(user, "You slice off [src]'s uneven chunks of aluminum and scorch marks.") return diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 8e5eb5e8c1f..1e3443524f0 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -137,7 +137,7 @@ var/multiplier = text2num(params["multiplier"]) if(!multiplier || (multiplier <= 0)) //href exploit protection return - produce_recipe(R, multiplier, usr) + produce_recipe(R, multiplier, ui.user) return TRUE /obj/item/stack/proc/is_valid_recipe(datum/stack_recipe/R, list/recipe_list) @@ -402,7 +402,7 @@ /obj/item/stack/attack_hand(mob/user as mob) if (user.get_inactive_hand() == src) - var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1) + var/N = tgui_input_number(user, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1) if(N != round(N)) to_chat(user, span_warning("You cannot separate a non-whole number of stacks!")) return @@ -413,8 +413,8 @@ src.add_fingerprint(user) F.add_fingerprint(user) spawn(0) - if (src && usr.machine==src) - src.interact(usr) + if (src && user.machine==src) + src.interact(user) else ..() return @@ -425,10 +425,10 @@ src.transfer_to(S) spawn(0) //give the stacks a chance to delete themselves if necessary - if (S && usr.machine==S) - S.interact(usr) - if (src && usr.machine==src) - src.interact(usr) + if (S && user.machine==S) + S.interact(user) + if (src && user.machine==src) + src.interact(user) else return ..() diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index ec3fcb8cc43..65ee1e6e0bf 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -53,8 +53,8 @@ return if(WT.remove_fuel(0,user)) - new welds_into(usr.loc) - usr.update_icon() + new welds_into(user.loc) + user.update_icon() visible_message(span_notice("\The [src] is shaped by [user.name] with the welding tool."),"You hear welding.") var/obj/item/stack/tile/T = src src = null diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 0aab2540071..6a444248c6a 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -197,8 +197,8 @@ to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index b6df0bcafd8..443f4c3f867 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -556,35 +556,6 @@ /obj/item/toy/AI/proc/cooldownreset() cooldown = 0 -/* - * Hand buzzer - */ -/obj/item/clothing/gloves/ring/buzzer/toy - name = "steel ring" - desc = "Torus shaped finger decoration. It has a small piece of metal on the palm-side." - icon_state = "seal-signet" - drop_sound = 'sound/items/drop/ring.ogg' - -/obj/item/clothing/gloves/ring/buzzer/toy/Touch(var/atom/A, var/proximity) - if(proximity && istype(usr, /mob/living/carbon/human)) - - return zap(usr, A, proximity) - return 0 - -/obj/item/clothing/gloves/ring/buzzer/toy/zap(var/mob/living/carbon/human/user, var/atom/movable/target, var/proximity) - . = FALSE - if(user.a_intent == I_HELP && battery.percent() >= 50) - if(isliving(target)) - var/mob/living/L = target - - to_chat(L, span_warning("You feel a powerful shock!")) - if(!.) - playsound(L, 'sound/effects/sparks7.ogg', 40, 1) - L.electrocute_act(battery.percent() * 0, src) - return . - - return 0 - /* * Toy cuffs */ @@ -1052,9 +1023,9 @@ activate(user) /obj/item/toy/desk/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck - if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) - if(!istype(usr, /mob/living/simple_mob)) - if( !usr.get_active_hand() ) //if active hand is empty + if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user)))))) + if(!istype(user, /mob/living/simple_mob)) + if(!user.get_active_hand()) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 41bab1e08f8..378ab6b450d 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -115,6 +115,12 @@ drop_sound = 'sound/items/drop/food.ogg' pickup_sound = 'sound/items/pickup/food.ogg' +/obj/item/trash/turkeybones + name = "turkey bones" + icon_state = "turkeybones" + drop_sound = 'sound/items/drop/food.ogg' + pickup_sound = 'sound/items/pickup/food.ogg' + /obj/item/trash/pistachios name = "pistachios packet" icon_state = "pistachios_pack" diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 6fccf471ff4..25ae7e9f81a 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -30,51 +30,51 @@ AI MODULES if (istype(AM, /obj/machinery/computer/aiupload)) var/obj/machinery/computer/aiupload/comp = AM if(comp.stat & NOPOWER) - to_chat(usr, "The upload computer has no power!") + to_chat(user, "The upload computer has no power!") return if(comp.stat & BROKEN) - to_chat(usr, "The upload computer is broken!") + to_chat(user, "The upload computer is broken!") return if (!comp.current) - to_chat(usr, "You haven't selected an AI to transmit laws to!") + to_chat(user, "You haven't selected an AI to transmit laws to!") return if (comp.current.stat == 2 || comp.current.control_disabled == 1) - to_chat(usr, "Upload failed. No signal is being detected from the AI.") + to_chat(user, "Upload failed. No signal is being detected from the AI.") else if (comp.current.see_in_dark == 0) - to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.") + to_chat(user, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.") else - src.transmitInstructions(comp.current, usr) + src.transmitInstructions(comp.current, user) to_chat(comp.current, "These are your laws now:") comp.current.show_laws() for(var/mob/living/silicon/robot/R in mob_list) if(R.lawupdate && (R.connected_ai == comp.current)) to_chat(R, "These are your laws now:") R.show_laws() - to_chat(usr, "Upload complete. The AI's laws have been modified.") + to_chat(user, "Upload complete. The AI's laws have been modified.") else if (istype(AM, /obj/machinery/computer/borgupload)) var/obj/machinery/computer/borgupload/comp = AM if(comp.stat & NOPOWER) - to_chat(usr, "The upload computer has no power!") + to_chat(user, "The upload computer has no power!") return if(comp.stat & BROKEN) - to_chat(usr, "The upload computer is broken!") + to_chat(user, "The upload computer is broken!") return if (!comp.current) - to_chat(usr, "You haven't selected a robot to transmit laws to!") + to_chat(user, "You haven't selected a robot to transmit laws to!") return if (comp.current.stat == 2 || comp.current.emagged) - to_chat(usr, "Upload failed. No signal is being detected from the robot.") + to_chat(user, "Upload failed. No signal is being detected from the robot.") else if (comp.current.connected_ai) - to_chat(usr, "Upload failed. The robot is slaved to an AI.") + to_chat(user, "Upload failed. The robot is slaved to an AI.") else - src.transmitInstructions(comp.current, usr) + src.transmitInstructions(comp.current, user) to_chat(comp.current, "These are your laws now:") comp.current.show_laws() - to_chat(usr, "Upload complete. The robot's laws have been modified.") + to_chat(user, "Upload complete. The robot's laws have been modified.") else if(istype(AM, /mob/living/silicon/robot)) var/mob/living/silicon/robot/R = AM @@ -133,13 +133,13 @@ AI MODULES /obj/item/aiModule/safeguard/attack_self(var/mob/user as mob) ..() - var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) + var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) targetName = targName desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName) /obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user) if(!targetName) - to_chat(usr, "No name detected on module, please enter one.") + to_chat(user, "No name detected on module, please enter one.") return 0 ..() @@ -159,13 +159,13 @@ AI MODULES /obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob) ..() - var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name)) + var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name)) targetName = targName desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName) /obj/item/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user) if(!targetName) - to_chat(usr, "No name detected on module, please enter one.") + to_chat(user, "No name detected on module, please enter one.") return 0 return ..() @@ -240,11 +240,11 @@ AI MODULES /obj/item/aiModule/freeform/attack_self(var/mob/user as mob) ..() - var/new_lawpos = tgui_input_number(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) + var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER) var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'" @@ -257,7 +257,7 @@ AI MODULES /obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() @@ -362,7 +362,7 @@ AI MODULES /obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'" @@ -373,7 +373,7 @@ AI MODULES /obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() @@ -386,7 +386,7 @@ AI MODULES /obj/item/aiModule/syndicate/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A hacked AI law module: '[newFreeFormLaw]'" @@ -402,7 +402,7 @@ AI MODULES /obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() diff --git a/code/game/objects/items/weapons/RPD_vr.dm b/code/game/objects/items/weapons/RPD_vr.dm index eab54cac62e..b834d815006 100644 --- a/code/game/objects/items/weapons/RPD_vr.dm +++ b/code/game/objects/items/weapons/RPD_vr.dm @@ -112,10 +112,10 @@ return data -/obj/item/pipe_dispenser/tgui_act(action, params) +/obj/item/pipe_dispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(!ui.user.canmove || ui.user.stat || ui.user.restrained() || !in_range(loc, ui.user)) return TRUE var/playeffect = TRUE switch(action) @@ -217,7 +217,7 @@ var/obj/item/pipe/P = new pipe_item_type(get_turf(A), path, queued_p_dir) P.update() - P.add_fingerprint(usr) + P.add_fingerprint(user) if(R.paintable) P.color = pipe_colors[paint_color] P.setPipingLayer(queued_piping_layer) @@ -248,7 +248,7 @@ activate() - C.add_fingerprint(usr) + C.add_fingerprint(user) C.update_icon() if(mode & WRENCH_MODE) do_wrench(C, user) diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index 13e4e74b015..84666ffd4dc 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -74,14 +74,14 @@ to_chat(user, span_warning("Circuit controls are locked.")) return var/existing_networks = jointext(network,",") - var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) + var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) if(!input) - to_chat(usr, "No input found please hang up and try your call again.") + to_chat(user, "No input found please hang up and try your call again.") return var/list/tempnetwork = splittext(input, ",") tempnetwork = difflist(tempnetwork,restricted_camera_networks,1) if(tempnetwork.len < 1) - to_chat(usr, "No network found please hang up and try your call again.") + to_chat(user, "No network found please hang up and try your call again.") return network = tempnetwork return diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 1a3d671b96b..30168a939cc 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -32,7 +32,7 @@ opposite_catastasis = "BROAD" catastasis = "STANDARD" - switch(tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel"))) + switch(tgui_alert(user, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel"))) if("Switch to STANDARD","Switch to BROAD") src.contraband_enabled = !src.contraband_enabled diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index c672280e437..1348a5860c0 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -101,7 +101,7 @@ /obj/item/dnainjector/attack(mob/M as mob, mob/user as mob) if (!istype(M, /mob)) return - if (!usr.IsAdvancedToolUser()) + if (!user.IsAdvancedToolUser()) return if(inuse) return 0 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index ed05e9e8a0b..87dfe250718 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -39,7 +39,7 @@ ..() /obj/item/plastique/attack_self(mob/user as mob) - var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10) + var/newtime = tgui_input_number(user, "Please set the timer.", "Timer", 10, 60000, 10) if(user.get_active_hand() == src) newtime = CLAMP(newtime, 10, 60000) timer = newtime diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index e1b812f8801..80f3e194048 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -99,7 +99,7 @@ if (!safety) if (src.reagents.total_volume < 1) - to_chat(usr, span_notice("\The [src] is empty.")) + to_chat(user, span_notice("\The [src] is empty.")) return if (world.time < src.last_use + 20) @@ -136,7 +136,7 @@ W.set_color() W.set_up(my_target) - if((istype(usr.loc, /turf/space)) || (usr.lastarea.get_gravity() == 0)) + if((istype(user.loc, /turf/space)) || (user.lastarea.get_gravity() == 0)) user.inertia_dir = get_dir(target, user) step(user, user.inertia_dir) else diff --git a/code/game/objects/items/weapons/game_kit.dm b/code/game/objects/items/weapons/game_kit.dm index 47b39a164ee..e2eac323d23 100644 --- a/code/game/objects/items/weapons/game_kit.dm +++ b/code/game/objects/items/weapons/game_kit.dm @@ -11,15 +11,15 @@ THAT STUPID GAME KIT return src.attack_hand(user) /obj/item/game_kit/MouseDrop(mob/user as mob) - if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr))) - if (usr.hand) - if (!usr.l_hand) + if (user == usr && !user.restrained() && !user.stat && (user.contents.Find(src) || in_range(src, user))) + if (user.hand) + if (!user.l_hand) spawn (0) - src.attack_hand(usr, 1, 1) + src.attack_hand(user, 1, 1) else - if (!usr.r_hand) + if (!user.r_hand) spawn (0) - src.attack_hand(usr, 0, 1) + src.attack_hand(user, 0, 1) /obj/item/game_kit/proc/update() var/dat = text("
Game Board

[] remove
", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 01caf091bdd..efe0c92ae2f 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -32,7 +32,7 @@ if(detonator) // detonator.loc=src.loc detonator.detached() - usr.put_in_hands(detonator) + user.put_in_hands(detonator) detonator=null det_time = null stage=0 diff --git a/code/game/objects/items/weapons/id cards/cards.dm b/code/game/objects/items/weapons/id cards/cards.dm index 638fb5be4ae..861841a21ff 100644 --- a/code/game/objects/items/weapons/id cards/cards.dm +++ b/code/game/objects/items/weapons/id cards/cards.dm @@ -130,11 +130,11 @@ if(istype(O, /obj/item/stack/telecrystal)) var/obj/item/stack/telecrystal/T = O if(T.get_amount() < 1) - to_chat(usr, span_notice("You are not adding enough telecrystals to fuel \the [src].")) + to_chat(user, span_notice("You are not adding enough telecrystals to fuel \the [src].")) return uses += T.get_amount()*0.5 //Gives 5 uses per 10 TC uses = CEILING(uses, 1) //Ensures no decimal uses nonsense, rounds up to be nice - to_chat(usr, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses].")) + to_chat(user, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses].")) qdel(O) @@ -201,13 +201,13 @@ if(I) icon = I -/obj/item/card_fluff/attack_self() +/obj/item/card_fluff/attack_self(mob/user) - var/choice = tgui_input_list(usr, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset")) + var/choice = tgui_input_list(user, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset")) if(!choice) return if(choice == "Band") - var/bandchoice = tgui_input_list(usr, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black")) + var/bandchoice = tgui_input_list(user, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black")) if(!bandchoice) return if(bandchoice == "red") @@ -238,7 +238,7 @@ update_icon() return else if(choice == "Stamp") - var/stampchoice = tgui_input_list(usr, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation")) + var/stampchoice = tgui_input_list(user, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation")) if(!stampchoice) return if(stampchoice == "ship") diff --git a/code/game/objects/items/weapons/id cards/syndicate_ids.dm b/code/game/objects/items/weapons/id cards/syndicate_ids.dm index f95d49255e8..b6fe6fe37cc 100644 --- a/code/game/objects/items/weapons/id cards/syndicate_ids.dm +++ b/code/game/objects/items/weapons/id cards/syndicate_ids.dm @@ -38,7 +38,7 @@ if(!registered_user && register_user(user)) to_chat(user, span_notice("The microscanner marks you as its owner, preventing others from accessing its internals.")) if(registered_user == user) - switch(tgui_alert(usr, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show"))) + switch(tgui_alert(user, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show"))) if(null) return if("Edit") diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index fe4a98091f8..48be1714cb5 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -24,7 +24,7 @@ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null, MAX_NAME_LEN) if (user.get_active_hand() != I) return - if((!in_range(src, usr) && src.loc != user)) + if((!in_range(src, user) && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if(t) diff --git a/code/game/objects/items/weapons/implants/implantreagent_vr.dm b/code/game/objects/items/weapons/implants/implantreagent_vr.dm index 2188e08ff12..48a60b0f53e 100644 --- a/code/game/objects/items/weapons/implants/implantreagent_vr.dm +++ b/code/game/objects/items/weapons/implants/implantreagent_vr.dm @@ -92,7 +92,7 @@ if(container.reagents.total_volume < container.volume) var/container_name = container.name if(rimplant.reagents.trans_to(container, amount = rimplant.transfer_amount)) - user.visible_message(span_notice("[usr] [pick(rimplant.emote_descriptor)] into \the [container_name]."), + user.visible_message(span_notice("[user] [pick(rimplant.emote_descriptor)] into \the [container_name]."), span_notice("You [pick(rimplant.self_emote_descriptor)] some [rimplant.reagent_name] into \the [container_name].")) if(prob(5)) src.visible_message(span_notice("[src] [pick(rimplant.random_emote)].")) // M-mlem. diff --git a/code/game/objects/items/weapons/joke.dm b/code/game/objects/items/weapons/joke.dm index feba68dbc72..efe530e5f94 100644 --- a/code/game/objects/items/weapons/joke.dm +++ b/code/game/objects/items/weapons/joke.dm @@ -16,4 +16,24 @@ else M.ClearTransform() M.update_transform() - return ..() \ No newline at end of file + return ..() + +// Do not ever just leave this laying about, it will go horribly wrong! +/obj/item/squishhammer/dark + name = "The Dark Short Stacker" + desc = "Wield the power of this weapon with responsibility (God knows you won't)." + icon = 'icons/obj/items.dmi' + icon_state = "dark_hammer" + attack_verb = list("stacked") + force = 0 + throwforce = 0 + +/obj/item/squishhammer/dark/attack(mob/M as mob, mob/user as mob) + ..() + var/mob/living/carbon/human/H = M + if(istype(H)) + for(var/obj/item/organ/external/E in H.organs) + E.fracture() // Oof, ouch, owie + var/turf/T = M.loc + if(isturf(T)) + new /obj/effect/gibspawner/generic(T) diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm index 33c4c82e9e9..847ddd6efa2 100644 --- a/code/game/objects/items/weapons/material/ashtray.dm +++ b/code/game/objects/items/weapons/material/ashtray.dm @@ -3,7 +3,7 @@ var/global/list/ashtray_cache = list() /obj/item/material/ashtray name = "ashtray" icon = 'icons/obj/objects.dmi' - icon_state = "blank" + icon_state = "ashtray" randpixel = 5 force_divisor = 0.1 thrown_force_divisor = 0.1 @@ -16,6 +16,7 @@ var/global/list/ashtray_cache = list() if(!material) qdel(src) return + icon_state = "blank" max_butts = round(material.hardness/5) //This is arbitrary but whatever. randpixel_xy() update_icon() diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index d1631a2f11c..7984198f2ac 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -29,7 +29,7 @@ /obj/item/chainsaw/proc/turnOn(mob/user as mob) if(on) return - visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].") + visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].") if(max_fuel <= 0) if(do_after(user, 15)) @@ -38,7 +38,7 @@ to_chat(user, "You fumble with the string.") else if(do_after(user, 15)) - visible_message("You start \the [src] up with a loud grinding!", "[usr] starts \the [src] up with a loud grinding!") + visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!") attack_verb = list("shredded", "ripped", "torn") playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1) force = active_force @@ -91,7 +91,7 @@ Hyd.die() if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1) to_chat(user, span_notice("You begin filling the tank on the chainsaw.")) - if(do_after(usr, 15)) + if(do_after(user, 15)) A.reagents.trans_to_obj(src, max_fuel) playsound(src, 'sound/effects/refill.ogg', 50, 1, -6) to_chat(user, span_notice("Chainsaw succesfully refueled.")) diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index 9c5b04f5262..825376f6697 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -66,13 +66,13 @@ return 0 else to_chat(user, span_notice("You begin to place \the [src.name].")) - if(!do_after(usr, 10)) + if(!do_after(user, 10)) return 0 var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material()) to_chat(user, span_notice("You place \the [src.name].")) G.grave_name = grave_name G.epitaph = epitaph - G.add_fingerprint(usr) + G.add_fingerprint(user) G.dir = user.dir QDEL_NULL(src) return diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index 43c524b51fa..cb5458c936d 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -108,12 +108,12 @@ if(M == user) if(!M.can_eat(loaded)) return - M.visible_message(span_bold("\The [user]") + "eats some of [loaded] with \the [src].") + M.visible_message(span_bold("\The [user]") + " eats some of [loaded] with \the [src].") else user.visible_message(span_warning("\The [user] begins to feed \the [M]!")) if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS))) return - M.visible_message(span_bold("\The [user]") + "feeds some of [loaded] to \the [M] with \the [src].") + M.visible_message(span_bold("\The [user]") + " feeds some of [loaded] to \the [M] with \the [src].") playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1) loaded = null update_icon() diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 5a1df7edea1..0a96d13303e 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -145,7 +145,7 @@ to_chat(M, "You should repair [src] first. Try using [kit] on it.") return FALSE M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].") - if(do_after(usr, sharpen_time)) + if(do_after(M, sharpen_time)) M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].") src.set_material(material) return TRUE diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index ecd8df84568..3095bce5845 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -65,8 +65,7 @@ var/light_glove_d = rand(2, 4) var/no_glove_d = rand(4, 6) var/list/forbidden_gloves = list( - /obj/item/clothing/gloves/sterile, - /obj/item/clothing/gloves/knuckledusters + /obj/item/clothing/gloves/sterile ) if(src == user.l_hand) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index cd6478d6ff0..debbc5cdb4a 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -187,8 +187,8 @@ to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/weapons/melee/misc_vr.dm b/code/game/objects/items/weapons/melee/misc_vr.dm index 5e9f318aa6d..092ec058919 100644 --- a/code/game/objects/items/weapons/melee/misc_vr.dm +++ b/code/game/objects/items/weapons/melee/misc_vr.dm @@ -13,4 +13,42 @@ sharp = TRUE edge = FALSE attack_verb = list("stabbed", "lunged at", "dextrously struck", "sliced", "lacerated", "impaled", "diced", "charioted") - hitsound = 'sound/weapons/bladeslice.ogg' \ No newline at end of file + hitsound = 'sound/weapons/bladeslice.ogg' + +/obj/item/melee/hammer + name = "claw hammer" + desc = "A simple claw hammer for hitting things or people with, and the claw part probably does something too." + icon = 'icons/obj/weapons.dmi' + icon_state = "claw_hammer" + force = 15 + throwforce = 10 + w_class = ITEMSIZE_SMALL + attack_verb = list("smashed", "swung at", "pummelled", "nailed", "crushed", "bonked", "hammered", "cracked") + defend_chance = 0 + +/obj/item/melee/hammer/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone, var/attack_modifier) + if(istype(target,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = target + if(prob(50)) + var/obj/item/organ/external/affecting = H.get_organ(hit_zone) + affecting.fracture() + return ..() + +/obj/item/melee/hammer/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) + if(!proximity) return + ..() + if(A) + if(istype(A,/obj/structure/window)) + var/obj/structure/window/W = A + if(prob(50)) + W.visible_message(span_warning("\The [W] shatters under the force of the impact!")) + W.shatter() + else if(istype(A,/obj/structure/barricade)) + var/obj/structure/barricade/B = A + if(prob(50)) + B.visible_message(span_warning("\The [B] is broken apart with ease!")) + B.dismantle() + else if(istype(A,/obj/structure/grille)) + if(prob(50)) + A.visible_message(span_warning("\The [A] is smashed open!")) + qdel(A) diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 013b527e814..dd18c3a68a7 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -16,7 +16,7 @@ /obj/item/teleportation_scroll/attack_self(mob/user as mob) if((user.mind && !wizards.is_antagonist(user.mind))) - to_chat(usr, span_warning("You stare at the scroll but cannot make sense of the markings!")) + to_chat(user, span_warning("You stare at the scroll but cannot make sense of the markings!")) return user.set_machine(src) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 80da3eb459f..d5917f21796 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -208,8 +208,8 @@ if(user.incapacitated() || !istype(user)) to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 0e51b19eec8..ad934b0d035 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -141,7 +141,7 @@ to_chat(user, span_notice("\the [src] is too full to possibly fit anything else inside of it.")) return - if (istype(W, /obj/item/ore)) + if (istype(W, /obj/item/ore) && !istype(W, /obj/item/ore/slag)) var/obj/item/ore/ore = W stored_ore[ore.material]++ current_capacity++ @@ -178,6 +178,8 @@ if(current_pickup >= max_pickup) max_pickup_reached = 1 break + if(istype(O, /obj/item/ore/slag)) + continue var/obj/item/ore/ore = O stored_ore[ore.material]++ current_capacity++ diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index f7056d0a638..eeb20d7da98 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -79,7 +79,7 @@ /obj/item/storage/fancy/egg_box/open(mob/user as mob) if(open) return - if (isobserver(usr)) + if (isobserver(user)) return open = TRUE update_icon() diff --git a/code/game/objects/items/weapons/storage/firstaid_vr.dm b/code/game/objects/items/weapons/storage/firstaid_vr.dm index 9491340fcec..9c2bdecbb7e 100644 --- a/code/game/objects/items/weapons/storage/firstaid_vr.dm +++ b/code/game/objects/items/weapons/storage/firstaid_vr.dm @@ -71,6 +71,7 @@ /obj/item/storage/firstaid/surgery can_hold = list( + /obj/item/surgical/bone_clamp, /obj/item/surgical/bonesetter, /obj/item/surgical/cautery, /obj/item/surgical/circular_saw, diff --git a/code/game/objects/items/weapons/storage/mre.dm b/code/game/objects/items/weapons/storage/mre.dm index 5209591cf6a..c164aef1208 100644 --- a/code/game/objects/items/weapons/storage/mre.dm +++ b/code/game/objects/items/weapons/storage/mre.dm @@ -36,7 +36,7 @@ MRE Stuff /obj/item/storage/mre/open(mob/user) if(!opened) - to_chat(usr, span_notice("You tear open the bag, breaking the vacuum seal.")) + to_chat(user, span_notice("You tear open the bag, breaking the vacuum seal.")) opened = 1 update_icon() . = ..() @@ -236,7 +236,7 @@ MRE Stuff /obj/item/storage/mrebag/open(mob/user) if(!opened && !isobserver(user)) - to_chat(usr, span_notice("The pouch heats up as you break the vacuum seal.")) + to_chat(user, span_notice("The pouch heats up as you break the vacuum seal.")) opened = 1 update_icon() . = ..() diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 54007da3cf3..e3776dbaefa 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -52,7 +52,7 @@ if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking)) user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1) src.l_hacking = 1 - if (do_after(usr, 100)) + if (do_after(user, 100)) if (prob(40)) src.l_setshort = 1 src.l_set = 0 @@ -84,7 +84,7 @@ if (isliving(user) && Adjacent(user) && (src.locked == 1)) to_chat(user, span_warning("[src] is locked and cannot be opened!")) else if (isliving(user) && Adjacent(user) && (!src.locked)) - src.open(usr) + src.open(user) else for(var/mob/M in range(1)) if (M.s_active == src) @@ -110,7 +110,7 @@ data["l_set"] = l_set return data -/obj/item/storage/secure/tgui_act(action, params) +/obj/item/storage/secure/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch (action) @@ -132,12 +132,12 @@ src.locked = 1 cut_overlays() src.code = null - src.close(usr) + src.close(ui.user) else src.code += text("[]", digit) if (length(src.code) > 5) src.code = "ERROR" - src.add_fingerprint(usr) + src.add_fingerprint(ui.user) . = TRUE return @@ -172,7 +172,7 @@ if ((src.loc == user) && (src.locked == 1)) to_chat(user, span_warning("[src] is locked and cannot be opened!")) else if ((src.loc == user) && (!src.locked)) - src.open(usr) + src.open(user) else ..() for(var/mob/M in range(1)) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index d6770d73a9f..5fc8d4cd1a6 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -787,7 +787,7 @@ var/open = 0 storage_slots = 1 can_hold = list( - /obj/item/clothing/gloves/ring, + /obj/item/clothing/accessory/ring, /obj/item/coin, /obj/item/clothing/accessory/medal ) @@ -801,7 +801,7 @@ if(contents.len >= 1) var/contained_image = null - if(istype(contents[1], /obj/item/clothing/gloves/ring)) + if(istype(contents[1], /obj/item/clothing/accessory/ring)) contained_image = "ring_trinket" else if(istype(contents[1], /obj/item/coin)) contained_image = "coin_trinket" diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 6d6882e0b86..820995c12fc 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -141,12 +141,12 @@ var/list/global/tank_gauge_cache = list() var/obj/item/assembly_holder/assy = src.proxyassembly.assembly if(assy.a_left && assy.a_right) - assy.dropInto(usr.loc) + assy.dropInto(user.loc) assy.master = null src.proxyassembly.assembly = null else if(!src.proxyassembly.assembly.a_left) - assy.a_right.dropInto(usr.loc) + assy.a_right.dropInto(user.loc) assy.a_right.holder = null assy.a_right = null src.proxyassembly.assembly = null @@ -257,7 +257,7 @@ var/list/global/tank_gauge_cache = list() return data -/obj/item/tank/tgui_act(action, params) +/obj/item/tank/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) @@ -278,10 +278,10 @@ var/list/global/tank_gauge_cache = list() if(.) distribute_pressure = clamp(round(pressure), 0, TANK_MAX_RELEASE_PRESSURE) if("toggle") - toggle_valve(usr) + toggle_valve(ui.user) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/item/tank/proc/toggle_valve(var/mob/user) if(istype(loc,/mob/living/carbon)) diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index 86c52420265..e0ce8ab19bf 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -330,17 +330,17 @@ if(H.nif && H.nif.flag_check(NIF_V_UVFILTER,NIF_FLAGS_VISION)) return //VOREStation Add - NIF switch(safety) if(1) - to_chat(usr, span_warning("Your eyes sting a little.")) + to_chat(user, span_warning("Your eyes sting a little.")) E.damage += rand(1, 2) if(E.damage > 12) user.eye_blurry += rand(3,6) if(0) - to_chat(usr, span_warning("Your eyes burn.")) + to_chat(user, span_warning("Your eyes burn.")) E.damage += rand(2, 4) if(E.damage > 10) E.damage += rand(4,10) if(-1) - to_chat(usr, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely.")) + to_chat(user, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely.")) user.eye_blurry += rand(12,20) E.damage += rand(12, 16) if(safety<2) diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/game/objects/items/weapons/tools/wirecutters.dm index 031ab1a6f66..c4e073f0a2f 100644 --- a/code/game/objects/items/weapons/tools/wirecutters.dm +++ b/code/game/objects/items/weapons/tools/wirecutters.dm @@ -46,7 +46,7 @@ /obj/item/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/handcuffs/cable))) - usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ + user.visible_message("\The [user] cuts \the [C]'s restraints with \the [src]!",\ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") C.handcuffed = null diff --git a/code/game/objects/random/mapping.dm b/code/game/objects/random/mapping.dm index 3496fe8bb01..aa2a1bb880d 100644 --- a/code/game/objects/random/mapping.dm +++ b/code/game/objects/random/mapping.dm @@ -223,8 +223,8 @@ /obj/random/sfr/item_to_spawn() return pick(prob(25);/obj/item/radio/headset/heads/captain/sfr, - prob(25);/obj/item/radio/headset/headset_cargo/alt, - prob(25);/obj/item/radio/headset/headset_com/alt, + prob(25);/obj/item/radio/headset/alt/cargo, + prob(25);/obj/item/radio/headset/alt/headset_com, prob(25);/obj/item/radio/headset) // Mining Goodies diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index adc52260937..51c745c1cec 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -263,7 +263,7 @@ prob(6);/obj/item/material/butterflyblade, prob(6);/obj/item/material/butterflyhandle, prob(2);/obj/item/material/butterfly/switchblade, - prob(2);/obj/item/clothing/gloves/knuckledusters, + prob(2);/obj/item/clothing/accessory/knuckledusters, prob(1);/obj/item/material/knife/tacknife, prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc, prob(1);/obj/item/beartrap, diff --git a/code/game/objects/random/mob_vr.dm b/code/game/objects/random/mob_vr.dm index 6b7dfa39679..e13801e1497 100644 --- a/code/game/objects/random/mob_vr.dm +++ b/code/game/objects/random/mob_vr.dm @@ -154,7 +154,7 @@ prob(4);/obj/item/storage/pill_bottle/zoom, prob(4);/obj/item/material/butterfly, prob(2);/obj/item/material/butterfly/switchblade, - prob(2);/obj/item/clothing/gloves/knuckledusters, + prob(2);/obj/item/clothing/accessory/knuckledusters, prob(2);/obj/item/reagent_containers/syringe/drugs, prob(1);/obj/item/material/knife/tacknife, prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc, diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index dd0d55cfcea..13db2e0c075 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -104,7 +104,7 @@ if (!can_climb(user)) return - usr.visible_message(span_warning("[user] starts climbing onto \the [src]!")) + user.visible_message(span_warning("[user] starts climbing onto \the [src]!")) LAZYDISTINCTADD(climbers, user) if(!do_after(user,(issmall(user) ? climb_delay * 0.6 : climb_delay))) @@ -115,10 +115,10 @@ LAZYREMOVE(climbers, user) return - usr.forceMove(climb_to(user)) + user.forceMove(climb_to(user)) if (get_turf(user) == get_turf(src)) - usr.visible_message(span_warning("[user] climbs onto \the [src]!")) + user.visible_message(span_warning("[user] climbs onto \the [src]!")) LAZYREMOVE(climbers, user) /obj/structure/proc/climb_to(var/mob/living/user) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index a7d06703ffc..8fd2723c55c 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -128,14 +128,13 @@ . = ..() tgui_interact(user) -/obj/item/canvas/tgui_act(action, params) +/obj/item/canvas/tgui_act(action, params, datum/tgui/ui) . = ..() if(. || finalized) return - var/mob/user = usr switch(action) if("paint") - var/obj/item/I = user.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() var/color = get_paint_tool_color(I) if(!color) return FALSE @@ -148,7 +147,7 @@ if("finalize") . = TRUE if(!finalized) - finalize(user) + finalize(ui.user) /obj/item/canvas/proc/finalize(mob/user) finalized = TRUE diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 62fa4b0be00..7800bba0707 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -39,6 +39,23 @@ LINEN BINS return ..() +/obj/item/bedsheet/verb/turn_around() + set name = "Turn Around" + set category = "Object" + set src in oview(1) + + if(!usr || !isturf(usr.loc)) + return + if(usr.stat || usr.restrained()) + return + if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + return + + if(dir >= 2) + src.set_dir(1) + else + src.set_dir(2) + /obj/item/bedsheet/blue icon_state = "sheetblue" diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index e5c252bd174..9c1cba95829 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -319,7 +319,7 @@ return if(W.loc != user) // This should stop mounted modules ending up outside the module. return - usr.drop_item() + user.drop_item() if(W) W.forceMove(loc) else if(istype(W, /obj/item/packageWrap)) @@ -385,7 +385,7 @@ /obj/structure/closet/attack_self_tk(mob/user as mob) add_fingerprint(user) if(!toggle()) - to_chat(usr, span_notice("It won't budge!")) + to_chat(user, span_notice("It won't budge!")) /obj/structure/closet/verb/verb_toggleopen() set src in oview(1) diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index 6f4cd019da4..0fa429bbb53 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -100,7 +100,7 @@ return if(W.loc != user) // This should stop mounted modules ending up outside the module. return - usr.drop_item() + user.drop_item() if(W) W.forceMove(src.loc) else diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index aa09e9fc5b6..cb8732ecbae 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -23,7 +23,9 @@ starts_with = list( /obj/item/clothing/head/that = 2, - /obj/item/radio/headset/headset_service = 2, + /obj/item/radio/headset/service = 2, + /obj/item/radio/headset/alt/service = 2, + /obj/item/radio/headset/earbud/service = 2, /obj/item/clothing/head/pin/flower, /obj/item/clothing/head/pin/flower/pink, /obj/item/clothing/head/pin/flower/yellow, @@ -51,7 +53,9 @@ starts_with = list( /obj/item/clothing/under/sundress, /obj/item/clothing/under/waiter = 2, - /obj/item/radio/headset/headset_service = 2, + /obj/item/radio/headset/service = 2, + /obj/item/radio/headset/alt/service = 2, + /obj/item/radio/headset/earbud/service = 2, /obj/item/storage/box/mousetraps = 2, /obj/item/clothing/under/rank/chef, /obj/item/clothing/head/chefhat, @@ -69,7 +73,9 @@ starts_with = list( /obj/item/clothing/under/rank/janitor, /obj/item/clothing/under/dress/maid/janitor, - /obj/item/radio/headset/headset_service, + /obj/item/radio/headset/service, + /obj/item/radio/headset/alt/service, + /obj/item/radio/headset/earbud/service, /obj/item/cartridge/janitor, /obj/item/clothing/suit/storage/hooded/wintercoat/janitor, /obj/item/clothing/gloves/black, diff --git a/code/game/objects/structures/crates_lockers/closets/misc_vr.dm b/code/game/objects/structures/crates_lockers/closets/misc_vr.dm index d8ccfd6025f..f001c78f45b 100644 --- a/code/game/objects/structures/crates_lockers/closets/misc_vr.dm +++ b/code/game/objects/structures/crates_lockers/closets/misc_vr.dm @@ -63,7 +63,7 @@ /obj/item/clothing/shoes/boots/winter/explorer, /obj/item/clothing/gloves/black, /obj/item/radio/headset/explorer, - /obj/item/radio/headset/explorer/alt, + /obj/item/radio/headset/alt/explorer, /obj/item/cartridge/explorer, /obj/item/flashlight, /obj/item/gps/explorer, @@ -104,7 +104,7 @@ /obj/item/clothing/shoes/boots/winter/explorer, /obj/item/clothing/gloves/black, /obj/item/radio/headset/pathfinder, - /obj/item/radio/headset/pathfinder/alt, + /obj/item/radio/headset/alt/pathfinder, /obj/item/cartridge/explorer, /obj/item/flashlight, /obj/item/gps/explorer, @@ -153,7 +153,7 @@ /obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar, /obj/item/clothing/shoes/boots/winter/explorer, /obj/item/radio/headset/sar, - /obj/item/radio/headset/sar/alt, + /obj/item/radio/headset/alt/sar, /obj/item/cartridge/sar, /obj/item/flashlight, /obj/item/tank/emergency/oxygen/engi, @@ -201,7 +201,7 @@ /obj/item/clothing/shoes/black, /obj/item/clothing/gloves/fingerless, /obj/item/radio/headset/pilot, - /obj/item/radio/headset/pilot/alt, + /obj/item/radio/headset/alt/pilot, /obj/item/flashlight, /obj/item/reagent_containers/food/snacks/liquidfood, /obj/item/reagent_containers/food/snacks/liquidprotein, @@ -211,7 +211,7 @@ /obj/item/radio, /obj/item/gps/explorer, /obj/item/gun/energy/gun/protector/pilotgun/locked, - /obj/item/clothing/gloves/watch/survival, + /obj/item/clothing/accessory/watch/survival, /obj/item/clothing/accessory/storage/webbing/pilot1, /obj/item/clothing/accessory/storage/webbing/pilot2, /obj/item/emergency_beacon diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index 34810bfe424..9ede8e655ca 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -11,8 +11,9 @@ /obj/item/clothing/suit/storage/hooded/wintercoat/cargo, /obj/item/clothing/shoes/boots/winter/supply, /obj/item/clothing/shoes/black, - /obj/item/radio/headset/headset_cargo, - /obj/item/radio/headset/headset_cargo/alt, + /obj/item/radio/headset/cargo, + /obj/item/radio/headset/alt/cargo, + /obj/item/radio/headset/earbud/cargo, /obj/item/clothing/gloves/black, /obj/item/clothing/gloves/fingerless, /obj/item/clothing/head/soft) @@ -37,8 +38,9 @@ /obj/item/clothing/under/rank/cargo/jeans, /obj/item/clothing/under/rank/cargo/jeans/female, /obj/item/clothing/shoes/brown, - /obj/item/radio/headset/headset_qm, //VOREStation Edit, - /obj/item/radio/headset/headset_qm/alt, //VOREStation Edit, + /obj/item/radio/headset/qm, + /obj/item/radio/headset/alt/qm, + /obj/item/radio/headset/earbud/qm, /obj/item/clothing/under/rank/neo_qm, /obj/item/clothing/under/rank/neo_qm_skirt, /obj/item/clothing/under/rank/neo_qm_jacket, @@ -73,7 +75,7 @@ closet_appearance = /decl/closet_appearance/secure_closet/mining starts_with = list( - /obj/item/radio/headset/headset_mine, + /obj/item/radio/headset/miner, /obj/item/clothing/under/rank/miner, /obj/item/clothing/gloves/black, /obj/item/clothing/shoes/black, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 7186779efe9..78018e247ee 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -20,7 +20,8 @@ /obj/item/clothing/shoes/brown, /obj/item/cartridge/ce, /obj/item/radio/headset/heads/ce, - /obj/item/radio/headset/heads/ce/alt, + /obj/item/radio/headset/alt/heads/ce, + /obj/item/radio/headset/earbud/heads/ce, /obj/item/storage/toolbox/mechanical, /obj/item/clothing/suit/storage/hazardvest, ///obj/item/clothing/mask/gas, //VOREStation Removal: Locker bloat, grr. The fancy one below functions as a mask & helmet combined. @@ -92,7 +93,8 @@ /obj/item/clothing/accessory/storage/brown_vest, /obj/item/storage/toolbox/mechanical, /obj/item/radio/headset/headset_eng, - /obj/item/radio/headset/headset_eng/alt, + /obj/item/radio/headset/alt/headset_eng, + /obj/item/radio/headset/earbud/headset_eng, /obj/item/clothing/suit/storage/hazardvest, /obj/item/clothing/mask/gas, /obj/item/clothing/glasses/meson, @@ -129,7 +131,8 @@ /obj/item/extinguisher/atmo, ///obj/item/clamp, //VOREStation Removal: without leaks those are pointless, /obj/item/radio/headset/headset_eng, - /obj/item/radio/headset/headset_eng/alt, + /obj/item/radio/headset/alt/headset_eng, + /obj/item/radio/headset/earbud/headset_eng, /obj/item/clothing/suit/storage/hazardvest/atmos, //VOREStation edit. Eng locker gets regular haz-vest, atmos gets the themed one of their own /obj/item/clothing/mask/gas, /obj/item/cartridge/atmos, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm index e5fc9ce56e5..5e4389f0ef7 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm @@ -8,7 +8,9 @@ /obj/item/clothing/under/rank/hydroponics, /obj/item/clothing/gloves/botanic_leather, /obj/item/analyzer/plant_analyzer, - /obj/item/radio/headset/headset_service, + /obj/item/radio/headset/service, + /obj/item/radio/headset/alt/service, + /obj/item/radio/headset/earbud/service, /obj/item/clothing/head/greenbandana, /obj/item/shovel/spade, /obj/item/material/minihoe, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index a747bf9e3e2..231b17b6108 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -39,7 +39,8 @@ /obj/item/clothing/shoes/white, /obj/item/cartridge/medical, /obj/item/radio/headset/headset_med, - /obj/item/radio/headset/headset_med/alt, + /obj/item/radio/headset/alt/headset_med, + /obj/item/radio/headset/earbud/headset_med, /obj/item/clothing/suit/storage/hooded/wintercoat/medical, /obj/item/clothing/suit/storage/hooded/wintercoat/medical/alt, /obj/item/clothing/shoes/boots/winter/medical, @@ -108,7 +109,9 @@ /obj/item/clothing/suit/storage/toggle/labcoat/emt, /obj/item/clothing/suit/storage/hooded/wintercoat/medical/para, /obj/item/clothing/shoes/boots/winter/medical, - /obj/item/radio/headset/headset_med/alt, + /obj/item/radio/headset/headset_med, + /obj/item/radio/headset/alt/headset_med, + /obj/item/radio/headset/earbud/headset_med, /obj/item/cartridge/medical, /obj/item/storage/briefcase/inflatable, /obj/item/flashlight, @@ -143,7 +146,8 @@ /obj/item/clothing/under/rank/neo_cmo_turtle_skirt, /obj/item/clothing/under/rank/neo_cmo_gorka, /obj/item/radio/headset/heads/cmo, - /obj/item/radio/headset/heads/cmo/alt, + /obj/item/radio/headset/alt/heads/cmo, + /obj/item/radio/headset/earbud/heads/cmo, /obj/item/flash, /obj/item/reagent_containers/hypospray/vial, /obj/item/clothing/suit/storage/hooded/wintercoat/medical, 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 5b5d4c42f2a..f33d9ba9aee 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm @@ -45,7 +45,8 @@ /obj/item/clothing/shoes/laceup/brown, /obj/item/clothing/gloves/sterile/latex, /obj/item/radio/headset/heads/rd, - /obj/item/radio/headset/heads/rd/alt, + /obj/item/radio/headset/alt/heads/rd, + /obj/item/radio/headset/earbud/heads/rd, /obj/item/tank/air, /obj/item/clothing/mask/gas, /obj/item/flash, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 80d3bb90eb5..90661f4dd40 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -10,7 +10,8 @@ /obj/item/cartridge/captain, /obj/item/storage/lockbox/medal, /obj/item/radio/headset/heads/captain, - /obj/item/radio/headset/heads/captain/alt, + /obj/item/radio/headset/alt/heads/captain, + /obj/item/radio/headset/earbud/heads/captain, /obj/item/gun/energy/gun, /obj/item/melee/telebaton, /obj/item/flash, @@ -27,7 +28,8 @@ /obj/item/clothing/head/helmet, /obj/item/cartridge/hop, /obj/item/radio/headset/heads/hop, - /obj/item/radio/headset/heads/hop/alt, + /obj/item/radio/headset/alt/heads/hop, + /obj/item/radio/headset/earbud/heads/hop, /obj/item/storage/box/ids = 2, /obj/item/gun/energy/gun/compact, /obj/item/storage/box/commandkeys, @@ -90,7 +92,8 @@ /obj/item/clothing/head/helmet/dermal, /obj/item/cartridge/hos, /obj/item/radio/headset/heads/hos, - /obj/item/radio/headset/heads/hos/alt, + /obj/item/radio/headset/alt/heads/hos, + /obj/item/radio/headset/earbud/heads/hos, /obj/item/clothing/glasses/sunglasses/sechud, /obj/item/taperoll/police, /obj/item/shield/riot, @@ -151,7 +154,8 @@ /obj/item/clothing/under/rank/neo_sec_gorka, /obj/item/cartridge/security, /obj/item/radio/headset/headset_sec, - /obj/item/radio/headset/headset_sec/alt, + /obj/item/radio/headset/alt/headset_sec, + /obj/item/radio/headset/earbud/headset_sec, /obj/item/clothing/glasses/sunglasses/sechud, /obj/item/taperoll/police, /obj/item/clothing/accessory/badge/holo/warden, @@ -189,7 +193,8 @@ /obj/item/clothing/head/helmet, /obj/item/cartridge/security, /obj/item/radio/headset/headset_sec, - /obj/item/radio/headset/headset_sec/alt, + /obj/item/radio/headset/alt/headset_sec, + /obj/item/radio/headset/earbud/headset_sec, /obj/item/storage/belt/security, /obj/item/flash, /obj/item/reagent_containers/spray/pepper, @@ -257,7 +262,8 @@ /obj/item/storage/belt/detective, /obj/item/storage/box/evidence, /obj/item/radio/headset/headset_sec, - /obj/item/radio/headset/headset_sec/alt, + /obj/item/radio/headset/alt/headset_sec, + /obj/item/radio/headset/earbud/headset_sec, /obj/item/clothing/suit/storage/vest/detective, /obj/item/taperoll/police, /obj/item/clothing/accessory/holster/armpit, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm b/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm index 7761b7f03f2..e627ad4a49c 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security_vr.dm @@ -31,7 +31,8 @@ /obj/item/clothing/head/helmet/HoS/hat/blue, /obj/item/clothing/head/helmet/dermal, /obj/item/radio/headset/heads/hos, - /obj/item/radio/headset/heads/hos/alt, + /obj/item/radio/headset/alt/heads/hos, + /obj/item/radio/headset/earbud/heads/hos, /obj/item/clothing/glasses/sunglasses/sechud, /obj/item/storage/belt/security, /obj/item/clothing/accessory/holster/waist, @@ -76,7 +77,8 @@ /obj/item/clothing/head/helmet, /obj/item/cartridge/security, /obj/item/radio/headset/headset_sec, - /obj/item/radio/headset/headset_sec/alt, + /obj/item/radio/headset/alt/headset_sec, + /obj/item/radio/headset/earbud/headset_sec, /obj/item/storage/belt/security, /obj/item/flash, /obj/item/reagent_containers/spray/pepper, @@ -122,7 +124,8 @@ /obj/item/clothing/head/helmet/dermal, /obj/item/cartridge/hos, /obj/item/radio/headset/heads/hos, - /obj/item/radio/headset/heads/hos/alt, + /obj/item/radio/headset/alt/heads/hos, + /obj/item/radio/headset/earbud/heads/hos, /obj/item/clothing/glasses/sunglasses/sechud, /obj/item/taperoll/police, /obj/item/shield/riot, @@ -169,7 +172,8 @@ /obj/item/clothing/head/helmet/warden, /obj/item/cartridge/security, /obj/item/radio/headset/headset_sec, - /obj/item/radio/headset/headset_sec/alt, + /obj/item/radio/headset/alt/headset_sec, + /obj/item/radio/headset/earbud/headset_sec, /obj/item/clothing/glasses/sunglasses/sechud, /obj/item/taperoll/police, /obj/item/clothing/accessory/badge/holo/warden, @@ -204,7 +208,8 @@ /obj/item/cartridge/captain, /obj/item/storage/lockbox/medal, /obj/item/radio/headset/heads/captain, - /obj/item/radio/headset/heads/captain/alt, + /obj/item/radio/headset/alt/heads/captain, + /obj/item/radio/headset/earbud/heads/captain, /obj/item/gunbox/captain, /obj/item/melee/telebaton, /obj/item/flash, diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index ea27c4a4502..08519aa8450 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -34,10 +34,10 @@ if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) if(!amount) - to_chat(usr, "It's empty..") + to_chat(user, "It's empty..") return if(amount) - to_chat(usr, "You take out some items from \the [src].") + to_chat(user, "You take out some items from \the [src].") for(var/path in spawnitems) new path(src.loc) amount-- @@ -448,4 +448,4 @@ /obj/structure/closet/walllocker_double/engineering/east pixel_x = 32 - dir = EAST \ No newline at end of file + dir = EAST diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index b920ecd8b79..f010c116e94 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -410,7 +410,7 @@ /obj/item/clothing/under/rank/centcom, /obj/item/clothing/under/ert, /obj/item/clothing/under/syndicate/combat, - /obj/item/radio/headset/ert/alt, + /obj/item/radio/headset/alt/ert, /obj/item/clothing/glasses/sunglasses, /obj/item/clothing/shoes/boots/swat, /obj/item/clothing/gloves/swat, diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe_vr.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe_vr.dm index 67deb1eec87..7f9956a8553 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe_vr.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe_vr.dm @@ -3,13 +3,14 @@ closet_appearance = /decl/closet_appearance/tactical/alt //because ert lockers are red for some dumb reason starts_with = list( /obj/item/clothing/under/ert, - /obj/item/radio/headset/ert/alt, + /obj/item/radio/headset/ert, + /obj/item/radio/headset/alt/ert, /obj/item/clothing/glasses/sunglasses, /obj/item/clothing/shoes/boots/swat, /obj/item/clothing/gloves/swat, /obj/item/clothing/mask/balaclava/tactical, /obj/item/clothing/mask/balaclava) - + //would you believe mercs have no official locker? well, now they do. basically just a rebranded ERT locker but hey, it's an option. -Killian /obj/structure/closet/wardrobe/merc name = "mercenary equipment" @@ -18,7 +19,9 @@ starts_with = list( /obj/item/clothing/under/tactical, /obj/item/clothing/under/syndicate/combat, - /obj/item/radio/headset/syndicate/alt, + /obj/item/radio/headset/syndicate, + /obj/item/radio/headset/alt/syndicate, + /obj/item/radio/headset/earbud/syndicate, /obj/item/clothing/glasses/sunglasses, /obj/item/clothing/shoes/boots/combat, /obj/item/clothing/gloves/combat, diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 86b7c70f27f..5557a27cf79 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -127,6 +127,10 @@ name = "chicken crate" starts_with = list(/mob/living/simple_mob/animal/passive/chick = 5) +/obj/structure/largecrate/animal/turkey + name = "turkey crate" + starts_with = list(/mob/living/simple_mob/vore/turkey) + /obj/structure/largecrate/animal/catslug name = "catslug carrier" starts_with = list(/mob/living/simple_mob/vore/alienanimals/catslug) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 86e68cf8202..d376be9a3f1 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -72,10 +72,10 @@ update_icon() return else - to_chat(usr, span_warning("You kick the display case.")) + to_chat(user, span_warning("You kick the display case.")) for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - to_chat(O, span_warning("[usr] kicks the display case.")) + to_chat(O, span_warning("[user] kicks the display case.")) src.health -= 2 healthcheck() return diff --git a/code/game/objects/structures/fitness_vr.dm b/code/game/objects/structures/fitness_vr.dm index bf8be539025..f3d6aa082b2 100644 --- a/code/game/objects/structures/fitness_vr.dm +++ b/code/game/objects/structures/fitness_vr.dm @@ -27,7 +27,7 @@ if(!can_climb(user)) return - usr.visible_message(span_warning("[user] starts climbing onto \the [src]!")) + user.visible_message(span_warning("[user] starts climbing onto \the [src]!")) LAZYDISTINCTADD(climbers, user) if(!do_after(user,(issmall(user) ? 20 : 34))) @@ -39,11 +39,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) LAZYREMOVE(climbers, user) /obj/structure/fitness/boxing_ropes/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied. diff --git a/code/game/objects/structures/gargoyle.dm b/code/game/objects/structures/gargoyle.dm new file mode 100644 index 00000000000..04ef9cd1277 --- /dev/null +++ b/code/game/objects/structures/gargoyle.dm @@ -0,0 +1,293 @@ +/obj/structure/gargoyle + name = "statue" + desc = "A very lifelike carving." + density = TRUE + anchored = TRUE + var/mob/living/carbon/human/gargoyle + var/initial_sleep + var/initial_blind + var/initial_is_shifted + var/initial_lying + var/initial_lying_prev + var/wagging + var/flapping + var/obj_integrity = 100 + var/original_int = 100 + var/max_integrity = 100 + var/stored_examine + var/identifier = "statue" + var/material = "stone" + var/adjective = "hardens" + var/list/tail_lower_dirs = list(SOUTH, EAST, WEST) + var/image/tail_image + var/tail_alt = TAIL_UPPER_LAYER + + var/can_revert = TRUE + var/was_rayed = FALSE + +/obj/structure/gargoyle/Initialize(mapload, var/mob/living/carbon/human/H, var/ident_ovr, var/mat_ovr, var/adj_ovr, var/tint_ovr, var/revert = TRUE, var/discard_clothes) + . = ..() + if (isspace(loc) || isopenspace(loc)) + anchored = FALSE + if (!istype(H) || !isturf(H.loc)) + return + var/datum/component/gargoyle/comp = H.GetComponent(/datum/component/gargoyle) + var/tint = "#FFFFFF" + if (comp) + comp.cooldown = world.time + (15 SECONDS) + comp.statue = src + comp.transformed = TRUE + comp.paused = FALSE + identifier = length(comp.identifier) > 0 ? comp.identifier : initial(identifier) + material = length(comp.material) > 0 ? comp.material : initial(material) + tint = length(comp.tint) > 0 ? comp.tint : initial(tint) + adjective = length(comp.adjective) > 0 ? comp.adjective : initial(adjective) + if (copytext_char(adjective, -1) != "s") + adjective += "s" + gargoyle = H + + if (H.get_effective_size(TRUE) < 0.5) // "So small! I can step over it!" + density = FALSE + + if (ident_ovr) + identifier = ident_ovr + if (mat_ovr) + material = mat_ovr + if (adj_ovr) + adjective = adj_ovr + if (tint_ovr) + tint = tint_ovr + + if (H.tail_style?.clip_mask_state) + tail_lower_dirs.Cut() + else if (H.tail_style) + tail_lower_dirs = H.tail_style.lower_layer_dirs.Copy() + tail_alt = H.tail_alt ? TAIL_UPPER_LAYER_ALT : TAIL_UPPER_LAYER + + max_integrity = H.getMaxHealth() + 100 + obj_integrity = H.health + 100 + original_int = obj_integrity + name = "[identifier] of [H.name]" + desc = "A very lifelike [identifier] made of [material]." + stored_examine = H.examine(H) + description_fluff = H.get_description_fluff() + + if (H.buckled) + H.buckled.unbuckle_mob(H, TRUE) + //icon = H.icon + //copy_overlays(H) + + //calculate our tints + var/list/RGB = rgb2num(tint) + + var/colorr = rgb(RGB[1]*0.299, RGB[2]*0.299, RGB[3]*0.299) + var/colorg = rgb(RGB[1]*0.587, RGB[2]*0.587, RGB[3]*0.587) + var/colorb = rgb(RGB[1]*0.114, RGB[2]*0.114, RGB[3]*0.114) + + var/tint_color = list(colorr, colorg, colorb, "#000000") + + var/list/body_layers = HUMAN_BODY_LAYERS + var/list/other_layers = HUMAN_OTHER_LAYERS + for (var/i = 1; i <= length(H.overlays_standing); i++) + if (i in other_layers) + continue + if (discard_clothes && !(i in body_layers)) + continue + if (istype(H.overlays_standing[i], /image) && (i in body_layers)) + var/image/old_image = H.overlays_standing[i] + var/image/new_image = image(old_image) + if (i == TAIL_LOWER_LAYER || i == TAIL_UPPER_LAYER || i == TAIL_UPPER_LAYER_ALT) + tail_image = new_image + new_image.color = tint_color + new_image.layer = old_image.layer + add_overlay(new_image) + else + if (!isnull(H.overlays_standing[i])) + add_overlay(H.overlays_standing[i]) + + initial_sleep = H.sleeping + initial_blind = H.eye_blind + initial_is_shifted = H.is_shifted + transform = H.transform + layer = H.layer + pixel_x = H.pixel_x + pixel_y = H.pixel_y + dir = H.dir + initial_lying = H.lying + initial_lying_prev = H.lying_prev + H.sdisabilities |= MUTE + if (H.appearance_flags & PIXEL_SCALE) + appearance_flags |= PIXEL_SCALE + wagging = H.wagging + H.transforming = TRUE + flapping = H.flapping + H.toggle_tail(FALSE, FALSE) + H.toggle_wing(FALSE, FALSE) + H.visible_message(span_warning("[H]'s skin rapidly [adjective] as they turn to [material]!"), span_warning("Your skin abruptly [adjective] as you turn to [material]!")) + H.forceMove(src) + H.SetBlinded(0) + H.SetSleeping(0) + H.status_flags |= GODMODE + H.updatehealth() + H.canmove = 0 + + can_revert = revert + + START_PROCESSING(SSprocessing, src) + +/obj/structure/gargoyle/Destroy() + STOP_PROCESSING(SSprocessing, src) + if (!gargoyle) + return ..() + if (can_revert) + unpetrify(deleting = FALSE) //don't delete if we're already deleting! + else + visible_message(span_warning("The [identifier] loses shape and crumbles into a pile of [material]!")) + . = ..() + +/obj/structure/gargoyle/process() + if (!gargoyle) + qdel(src) + if (gargoyle.loc != src) + can_revert = TRUE //something's gone wrong, they escaped, lets not qdel them + unpetrify(deal_damage = FALSE, deleting = TRUE) + +/obj/structure/gargoyle/examine_icon() + var/icon/examine_icon = icon(icon=src.icon, icon_state=src.icon_state, dir=SOUTH, frame=1, moving=0) + examine_icon.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + return examine_icon + +/obj/structure/gargoyle/get_description_info() + if (gargoyle) + if (isspace(loc) || isopenspace(loc)) + return + return "It can be [anchored ? "un" : ""]anchored with a wrench." + +/obj/structure/gargoyle/examine(mob/user) + . = ..() + if (gargoyle && stored_examine) + . += "The [identifier] seems to have a bit more to them..." + . += stored_examine + return + +/obj/structure/gargoyle/proc/unpetrify(var/deal_damage = TRUE, var/deleting = FALSE) + if (!gargoyle) + return + var/datum/component/gargoyle/comp = gargoyle.GetComponent(/datum/component/gargoyle) + if (comp) + comp.cooldown = world.time + (15 SECONDS) + comp.statue = null + comp.transformed = FALSE + else + if (was_rayed) + remove_verb(gargoyle,/mob/living/carbon/human/proc/gargoyle_transformation) + if (gargoyle.loc == src) + gargoyle.forceMove(loc) + gargoyle.transform = transform + gargoyle.pixel_x = pixel_x + gargoyle.pixel_y = pixel_y + gargoyle.is_shifted = initial_is_shifted + gargoyle.dir = dir + gargoyle.lying = initial_lying + gargoyle.lying_prev = initial_lying_prev + gargoyle.toggle_tail(wagging, FALSE) + gargoyle.toggle_wing(flapping, FALSE) + gargoyle.sdisabilities &= ~MUTE //why is there no ADD_TRAIT etc here that's actually ussssed + gargoyle.status_flags &= ~GODMODE + gargoyle.SetBlinded(initial_blind) + gargoyle.SetSleeping(initial_sleep) + gargoyle.transforming = FALSE + gargoyle.canmove = 1 + gargoyle.update_canmove() + var/hurtmessage = "" + if (deal_damage) + if (obj_integrity < original_int) + var/f = (original_int - obj_integrity) / 10 + for (var/x in 1 to 10) + gargoyle.adjustBruteLoss(f) + hurtmessage = " " + span_bold("You feel your body take the damage that was dealt while being [material]!") + gargoyle.updatehealth() + alpha = 0 + gargoyle.visible_message(span_warning("[gargoyle]'s skin rapidly reverts, returning them to normal!"), span_warning("Your skin reverts, freeing your movement once more![hurtmessage]")) + gargoyle = null + if (deleting) + qdel(src) + +/obj/structure/gargoyle/return_air() + return return_air_for_internal_lifeform() + +/obj/structure/gargoyle/return_air_for_internal_lifeform(var/mob/living/lifeform) + var/air_type = /datum/gas_mixture/belly_air + if(istype(lifeform)) + air_type = lifeform.get_perfect_belly_air_type() + var/air = new air_type(1000) + return air + +/obj/structure/gargoyle/proc/damage(var/damage) + if (was_rayed) + return //gargoyle quick regenerates, the others don't, so let's not have them getting too damaged + obj_integrity = min(obj_integrity-damage, max_integrity) + if(obj_integrity <= 0) + qdel(src) + +/obj/structure/gargoyle/take_damage(var/damage) + damage(damage) + +/obj/structure/gargoyle/attack_generic(var/mob/user, var/damage, var/attack_message = "hits") + user.do_attack_animation(src) + visible_message(span_danger("[user] [attack_message] the [src]!")) + damage(damage) + +/obj/structure/gargoyle/attackby(var/obj/item/W as obj, var/mob/living/user as mob) + if(W.is_wrench()) + if (isspace(loc) || isopenspace(loc)) + to_chat(user, span_warning("You can't anchor that here!")) + anchored = FALSE + return ..() + playsound(src, W.usesound, 50, 1) + if (do_after(user, (2 SECONDS) * W.toolspeed, target = src)) + to_chat(user, span_notice("You [anchored ? "un" : ""]anchor the [src].")) + anchored = !anchored + else if(!isrobot(user) && gargoyle && gargoyle.vore_selected && gargoyle.trash_catching) + if(istype(W,/obj/item/grab || /obj/item/holder)) + gargoyle.vore_attackby(W, user) + return + if(gargoyle.adminbus_trash || is_type_in_list(W,edible_trash) && W.trash_eatable && !is_type_in_list(W,item_vore_blacklist)) + to_chat(user, span_warning("You slip [W] into [gargoyle]'s [lowertext(gargoyle.vore_selected.name)] .")) + user.drop_item() + W.forceMove(gargoyle.vore_selected) + return + else if (!(W.flags & NOBLUDGEON)) + user.setClickCooldown(user.get_attack_speed(W)) + if(W.damtype == BRUTE || W.damtype == BURN) + user.do_attack_animation(src) + playsound(src, W.hitsound, 50, 1) + damage(W.force) + else + return ..() + +/obj/structure/gargoyle/set_dir(var/new_dir) + . = ..() + if(. && tail_image) + cut_overlay(tail_image) + tail_image.layer = BODY_LAYER + ((dir in tail_lower_dirs) ? TAIL_LOWER_LAYER : tail_alt) + add_overlay(tail_image) + +/obj/structure/gargoyle/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR) + if(istype(AM,/obj/item) && gargoyle && gargoyle.vore_selected && gargoyle.trash_catching) + var/obj/item/I = AM + if(gargoyle.adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist)) + gargoyle.hitby(AM, speed) + return + else if(istype(AM,/mob/living) && gargoyle) + var/mob/living/L = AM + if(gargoyle.throw_vore && L.throw_vore && gargoyle.can_be_drop_pred && L.can_be_drop_prey) + var/drop_prey_temp = FALSE + if(gargoyle.can_be_drop_prey) + drop_prey_temp = TRUE + gargoyle.can_be_drop_prey = FALSE //Making sure the original gargoyle body is not the one getting throwvored instead. + gargoyle.hitby(L, speed) + if(drop_prey_temp) + gargoyle.can_be_drop_prey = TRUE + return + return ..() diff --git a/code/game/objects/structures/ghost_pods/silicon.dm b/code/game/objects/structures/ghost_pods/silicon.dm index 64ac8f5674b..4f50784aed2 100644 --- a/code/game/objects/structures/ghost_pods/silicon.dm +++ b/code/game/objects/structures/ghost_pods/silicon.dm @@ -31,7 +31,6 @@ from the pod is not a crewmember.")) R.ckey = M.ckey visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated.")) - R.namepick() log_and_message_admins("successfully opened \a [src] and got a Lost Drone.") ..() @@ -57,7 +56,6 @@ definiton of 'your gravesite' is where your pod is.")) R.ckey = M.ckey visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated.")) - R.namepick() ..() /obj/structure/ghost_pod/ghost_activated/swarm_drone diff --git a/code/game/objects/structures/ghost_pods/silicon_vr.dm b/code/game/objects/structures/ghost_pods/silicon_vr.dm index cfc3b781d2f..1039349f2e1 100644 --- a/code/game/objects/structures/ghost_pods/silicon_vr.dm +++ b/code/game/objects/structures/ghost_pods/silicon_vr.dm @@ -21,7 +21,6 @@ from the pod is not a crewmember.")) R.ckey = M.ckey visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated.")) - R.namepick() log_and_message_admins("successfully opened \a [src] and got a Lost Drone.") used = TRUE return TRUE diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 708bba5edd2..4c0a488a599 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -233,7 +233,7 @@ return 0 var/wall_fake - add_hiddenprint(usr) + add_hiddenprint(user) if(M.integrity < 50) to_chat(user, span_notice("This material is too soft for use in wall construction.")) @@ -256,7 +256,7 @@ T.set_material(M, reinf_material, girder_material) if(wall_fake) T.can_open = 1 - T.add_hiddenprint(usr) + T.add_hiddenprint(user) qdel(src) return 1 diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 5fe81e63187..7b7f7a6b644 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -151,7 +151,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) return 1 else if (istype(I, /obj/item/reagent_containers/glass/bucket) && mybucket) - I.afterattack(mybucket, usr, 1) + I.afterattack(mybucket, user, 1) update_icon() return 1 @@ -189,12 +189,12 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) //Altclick the cart with a reagent container to pour things into the bucket without putting the bottle in trash /obj/structure/janitorialcart/AltClick(mob/living/user) if(user.incapacitated() || !Adjacent(user)) return - var/obj/I = usr.get_active_hand() + var/obj/I = user.get_active_hand() if(istype(I, /obj/item/mop)) equip_janicart_item(user, I) else if(istype(I, /obj/item/reagent_containers) && mybucket) var/obj/item/reagent_containers/C = I - C.afterattack(mybucket, usr, 1) + C.afterattack(mybucket, user, 1) update_icon() @@ -226,62 +226,62 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) if(..()) return TRUE - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() switch(action) if("bag") if(mybag) - usr.put_in_hands(mybag) - to_chat(usr, span_notice("You take [mybag] from [src].")) + ui.user.put_in_hands(mybag) + to_chat(ui.user, span_notice("You take [mybag] from [src].")) mybag = null nullTguiIcon("mybag") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("mop") if(mymop) - usr.put_in_hands(mymop) - to_chat(usr, span_notice("You take [mymop] from [src].")) + ui.user.put_in_hands(mymop) + to_chat(ui.user, span_notice("You take [mymop] from [src].")) mymop = null nullTguiIcon("mymop") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("spray") if(myspray) - usr.put_in_hands(myspray) - to_chat(usr, span_notice("You take [myspray] from [src].")) + ui.user.put_in_hands(myspray) + to_chat(ui.user, span_notice("You take [myspray] from [src].")) myspray = null nullTguiIcon("myspray") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("replacer") if(myreplacer) - usr.put_in_hands(myreplacer) - to_chat(usr, span_notice("You take [myreplacer] from [src].")) + ui.user.put_in_hands(myreplacer) + to_chat(ui.user, span_notice("You take [myreplacer] from [src].")) myreplacer = null nullTguiIcon("myreplacer") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("sign") if(istype(I, /obj/item/clothing/suit/caution) && signs < 4) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) else if(signs) var/obj/item/clothing/suit/caution/sign = locate() in src if(sign) - usr.put_in_hands(sign) - to_chat(usr, span_notice("You take \a [sign] from [src].")) + ui.user.put_in_hands(sign) + to_chat(ui.user, span_notice("You take \a [sign] from [src].")) signs-- if(!signs) nullTguiIcon("signs") else - to_chat(usr, span_notice("[src] doesn't have any signs left.")) + to_chat(ui.user, span_notice("[src] doesn't have any signs left.")) if("bucket") if(mybucket) - mybucket.forceMove(get_turf(usr)) - to_chat(usr, span_notice("You unmount [mybucket] from [src].")) + mybucket.forceMove(get_turf(ui.user)) + to_chat(ui.user, span_notice("You unmount [mybucket] from [src].")) mybucket = null nullTguiIcon("mybucket") else - to_chat(usr, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))")) + to_chat(ui.user, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))")) return FALSE else return FALSE diff --git a/code/game/objects/structures/kitchen_foodcart_vr.dm b/code/game/objects/structures/kitchen_foodcart_vr.dm index d80b3456cfe..c15168e9f6b 100644 --- a/code/game/objects/structures/kitchen_foodcart_vr.dm +++ b/code/game/objects/structures/kitchen_foodcart_vr.dm @@ -24,9 +24,9 @@ /obj/structure/foodcart/attack_hand(var/mob/user as mob) if(contents.len) - var/obj/item/reagent_containers/food/choice = tgui_input_list(usr, "What would you like to grab from the cart?", "Grab Choice", contents) + var/obj/item/reagent_containers/food/choice = tgui_input_list(user, "What would you like to grab from the cart?", "Grab Choice", contents) if(choice) - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(!user.canmove || user.stat || user.restrained() || !in_range(loc, user)) return if(ishuman(user)) if(!user.get_active_hand()) @@ -39,4 +39,4 @@ if(contents.len < 5) icon_state = "foodcart-[contents.len]" else - icon_state = "foodcart-5" \ No newline at end of file + icon_state = "foodcart-5" diff --git a/code/game/objects/structures/ledges.dm b/code/game/objects/structures/ledges.dm index 301488f38cd..6da40df1c1c 100644 --- a/code/game/objects/structures/ledges.dm +++ b/code/game/objects/structures/ledges.dm @@ -54,7 +54,7 @@ if(!can_climb(user)) return - usr.visible_message(span_warning("[user] starts climbing onto \the [src]!")) + user.visible_message(span_warning("[user] starts climbing onto \the [src]!")) LAZYDISTINCTADD(climbers, user) if(!do_after(user,(issmall(user) ? 20 : 34))) @@ -66,11 +66,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) LAZYREMOVE(climbers, user) /obj/structure/ledge/can_climb(var/mob/living/user, post_climb_check=0) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index db3284c760c..d3caa34c3ed 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -125,7 +125,7 @@ /obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user) if(istype(get_area(src),/area/syndicate_mothership)) if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != SPECIES_VOX && is_alien_whitelisted(user, SPECIES_VOX)) - var/choice = tgui_alert(usr, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes")) + var/choice = tgui_alert(user, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes")) if(choice && choice == "Yes") var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX) vox.gender = user.gender diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 5cb4e5c7078..5af4964bf58 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -124,7 +124,7 @@ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null) if (user.get_active_hand() != P) return - if ((!in_range(src, usr) && src.loc != user)) + if ((!in_range(src, user) && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if (t) @@ -220,7 +220,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) /obj/structure/morgue/crematorium/attack_hand(mob/user as mob) if (cremating) - to_chat(usr, span_warning("It's locked.")) + to_chat(user, span_warning("It's locked.")) return if ((src.connected) && (src.locked == 0)) for(var/atom/movable/A as mob|obj in src.connected.loc) @@ -250,7 +250,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null) if (user.get_active_hand() != P) return - if ((!in_range(src, usr) > 1 && src.loc != user)) + if ((!in_range(src, user) > 1 && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if (t) diff --git a/code/game/objects/structures/morgue_vr.dm b/code/game/objects/structures/morgue_vr.dm index 4d341a1e563..d52ac601e2a 100644 --- a/code/game/objects/structures/morgue_vr.dm +++ b/code/game/objects/structures/morgue_vr.dm @@ -15,7 +15,7 @@ return else if(!isemptylist(src.search_contents_for(/obj/item/disk/nuclear))) - to_chat(usr, "You get the feeling that you shouldn't cremate one of the items in the cremator.") + to_chat(user, "You get the feeling that you shouldn't cremate one of the items in the cremator.") return for(var/I in contents) diff --git a/code/game/objects/structures/pillows.dm b/code/game/objects/structures/pillows.dm index 9f251db31d5..075046fd81a 100644 --- a/code/game/objects/structures/pillows.dm +++ b/code/game/objects/structures/pillows.dm @@ -40,6 +40,7 @@ icon_state = "pillowpile_large_pink" var/pillowpilefront = "/obj/structure/bed/pillowpilefront" var/sourcepillow = "/obj/item/bedsheet/pillow" + flippable = FALSE /obj/structure/bed/pillowpilefront name = "pillow pile" diff --git a/code/game/objects/structures/props/beam_prism.dm b/code/game/objects/structures/props/beam_prism.dm index 75174e6c0c2..33b7cf0c50b 100644 --- a/code/game/objects/structures/props/beam_prism.dm +++ b/code/game/objects/structures/props/beam_prism.dm @@ -50,7 +50,7 @@ to_chat(user, span_warning("\The [src]'s motors resist your efforts to rotate it. You may need to find some form of controller.")) return - var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) + var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ @@ -59,13 +59,13 @@ var/new_bearing if(free_rotate) - new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) + new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time.")) return else - var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions) + var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions) new_bearing = round(compass_directions[choice]) var/rotate_degrees = new_bearing - degrees_from_north @@ -156,7 +156,7 @@ /obj/structure/prop/prismcontrol/attack_hand(mob/living/user) ..() - var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) + var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ @@ -176,16 +176,16 @@ var/new_bearing if(free_rotate) - new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) + new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time.")) return else - var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions) + var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions) new_bearing = round(compass_directions[choice]) - confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No")) + confirm = tgui_alert(user, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ diff --git a/code/game/objects/structures/props/machines.dm b/code/game/objects/structures/props/machines.dm index 9e9e0d7714c..a7aa684edff 100644 --- a/code/game/objects/structures/props/machines.dm +++ b/code/game/objects/structures/props/machines.dm @@ -556,9 +556,9 @@ * This one is a bit more fancy than others. Anything in the contents (PLEASE LIMIT TO ONE THING) * will show up inside it! Also if you map in an item on it, it will grab that at mapload and start * in the 'closed, full of fluid' state, so you can put a body on it or whatever. - * + * * As an aghost you can also dragdrop something into it (you have to be ghosted next to it) - * + * * Possible 'state' options for change_state(state) are: * open: Open, no fluid or anything. At the end the contents are ejected. * closed: Closed, full of liquid @@ -582,7 +582,7 @@ /obj/structure/prop/machine/nt_pod/Initialize(mapload) // Our non-map-preview state icon_state = "nt_pod" - + // Alpha mask to make sure things don't sneak out var/obj/effect/overlay/vis/mask = new mask.icon = icon @@ -607,7 +607,7 @@ // Save old settings contents_vis_flags = AM.vis_flags contents_original_pixel_y = AM.pixel_y - + // Arrange AM.add_filter("podmask", 1, alpha_mask_filter(render_source = "nt_podmask[REF(src)]", flags = MASK_INVERSE)) AM.pixel_y = 12 @@ -616,7 +616,7 @@ if(ismob(AM)) var/mob/M = AM buckle_mob(M, TRUE, FALSE) - + // TRAP THEM change_state("closed") @@ -639,7 +639,7 @@ return if(!user.client?.holder) return - + AM.forceMove(src) /obj/structure/prop/machine/nt_pod/change_state(state) @@ -648,17 +648,17 @@ if("open") cut_overlay("nt_pod_top_on") cut_overlay("nt_pod_under") - + // Fluid drains fluid.icon_state = "nothing" flick("nt_pod_emptying", fluid) // 8ds sleep(8) - + // Door opens door.icon_state = "nothing" flick("nt_pod_opening", door) // 9ds sleep(9) - + // GET OUT outside.layer = BELOW_MOB_LAYER if(contents.len) @@ -670,7 +670,7 @@ cut_overlay("nt_pod_top_on") add_overlay("nt_pod_top_on") add_overlay("nt_pod_under") - + // Door closes door.icon_state = "nt_pod_glass" flick("nt_pod_closing", door) // 9ds @@ -683,4 +683,90 @@ cut_overlay("nt_pod_panel") add_overlay("nt_pod_panel") if("panel_closed") - cut_overlay("nt_pod_panel") \ No newline at end of file + cut_overlay("nt_pod_panel") + +// Old Virology stuff + +/obj/structure/prop/machine/centrifuge + name = "centrifuge" + desc = "Used to separate things with different weight. Spin 'em round, round, right round." + icon = 'icons/obj/virology_vr.dmi' + icon_state = "centrifuge" + var/on = FALSE + +/obj/structure/prop/machine/centrifuge/attack_hand(mob/user as mob) + ..() + + if(!on) + on = TRUE + user.visible_message("\The [user] turns on \the [src].") + icon_state = "centrifuge_moving" + else + on = FALSE + user.visible_message("\The [user] turns off \the [src].") + icon_state = "centrifuge" + + update_icon() + +/obj/structure/prop/machine/incubator + name = "incubator" + desc = "Encourages the growth of diseases. This model comes with a dispenser system and a small radiation generator." + icon = 'icons/obj/virology_vr.dmi' + icon_state = "incubator" + var/on = FALSE + +/obj/structure/prop/machine/incubator/attack_hand(mob/user as mob) + ..() + + if(!on) + on = TRUE + user.visible_message("\The [user] turns on \the [src].") + icon_state = "incubator_on" + else + on = FALSE + user.visible_message("\The [user] turns off \the [src].") + icon_state = "incubator" + + update_icon() + +/obj/structure/prop/machine/disease_analyser + name = "disease analyser" + desc = "Analyzes diseases to find out information about them!" + icon = 'icons/obj/virology_vr.dmi' + icon_state = "analyser" + var/on = FALSE + +/obj/structure/prop/machine/disease_analyser/attack_hand(mob/user as mob) + ..() + + if(!on) + on = TRUE + user.visible_message("\The [user] turns on \the [src].") + icon_state = "analyser_" + else + on = FALSE + user.visible_message("\The [user] turns off \the [src].") + icon_state = "analyser" + + update_icon() + +/obj/structure/prop/machine/isolator + name = "disease isolator" + desc = "Used to isolate and identify diseases, allowing for comparison with a remote database." + icon = 'icons/obj/virology_vr.dmi' + icon_state = "isolator_in" + var/on = FALSE + +/obj/structure/prop/machine/isolator/attack_hand(mob/user as mob) + ..() + + if(!on) + on = TRUE + user.visible_message("\The [user] turns on \the [src].") + icon_state = "isolator_" + else + on = FALSE + user.visible_message("\The [user] turns off \the [src].") + icon_state = "isolator_in" + + update_icon() diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 69167f859cf..cb7048f66be 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -206,7 +206,7 @@ playsound(src, W.usesound, 50, 1) if(do_after(user, 20, src)) user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."), span_notice("You dismantle \the [src].")) - new /obj/item/stack/material/steel(get_turf(usr), 2) + new /obj/item/stack/material/steel(get_turf(user), 2) qdel(src) return @@ -285,7 +285,7 @@ if(!can_climb(user)) return - usr.visible_message(span_warning("[user] starts climbing onto \the [src]!")) + user.visible_message(span_warning("[user] starts climbing onto \the [src]!")) LAZYDISTINCTADD(climbers, user) if(!do_after(user,(issmall(user) ? 20 : 34))) @@ -297,11 +297,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) if(!anchored) take_damage(maxhealth) // Fatboy LAZYREMOVE(climbers, user) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index f9585448e8d..65fbb86b1a0 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -37,7 +37,7 @@ /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction if(tool.has_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc)) - var/direction = tgui_input_list(usr, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel")) + var/direction = tgui_input_list(user, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel")) if(direction == "Cancel") return var/target_type = original_type || /obj/structure/sign var/obj/structure/sign/S = new target_type(user.loc) diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index db06f7fea8e..c68d08208bf 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -18,6 +18,9 @@ var/locked = FALSE //has the door been locked? var/lock_id = null //does the door have an associated key? + var/lock_type = "simple" //string matched to "pick_type" on /obj/item/lockpick + var/can_pick = TRUE //can it be picked/bypassed? + var/lock_difficulty = 1 //multiplier to picking/bypassing time var/keysound = 'sound/items/toolbelt_equip.ogg' /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index ac1fa248670..b731aa690db 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -7,6 +7,7 @@ icon_state = "nest" var/health = 100 unacidable = TRUE + flippable = FALSE /obj/structure/bed/nest/update_icon() return @@ -42,7 +43,7 @@ #undef NEST_RESIST_TIME /obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob) - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) + if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) return unbuckle_mob() @@ -56,7 +57,7 @@ if(istype(xenos) && !(locate(/obj/item/organ/internal/xenos/hivenode) in xenos.internal_organs)) return - if(M == usr) + if(M == user) return else M.visible_message(\ diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 90ecec8c8b3..ffb9073731f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -21,6 +21,7 @@ var/datum/material/padding_material var/base_icon = "bed" var/applies_material_colour = 1 + var/flippable = TRUE /obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material) ..(newloc) @@ -168,6 +169,30 @@ if(padding_material) padding_material.place_sheet(get_turf(src), 1) +/obj/structure/bed/verb/turn_around() + set name = "Turn Around" + set category = "Object" + set src in oview(1) + + if(!flippable) + to_chat(usr,span_notice("\The [src] can't face the other direction.")) + return + + if(!usr || !isturf(usr.loc)) + return + if(usr.stat || usr.restrained()) + return + if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + return + if(dir == 2) + src.set_dir(1) + else if(dir == 1) + src.set_dir(2) + else if(dir == 4) + src.set_dir(8) + else if(dir == 8) + src.set_dir(4) + /obj/structure/bed/psych name = "psychiatrist's couch" desc = "For prime comfort during psychiatric evaluations." @@ -208,6 +233,7 @@ surgery_odds = 50 //VOREStation Edit var/bedtype = /obj/structure/bed/roller var/rollertype = /obj/item/roller + flippable = FALSE /obj/structure/bed/roller/adv name = "advanced roller bed" @@ -347,6 +373,7 @@ catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_bed) icon = 'icons/obj/abductor.dmi' icon_state = "bed" + flippable = FALSE /obj/structure/bed/alien/update_icon() return // Doesn't care about material or anything else. diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 92d4af0acbb..fc106d1b6e7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -148,7 +148,7 @@ /obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob) if (pulling) - MouseDrop(usr) + MouseDrop(user) else if(has_buckled_mobs()) for(var/A in buckled_mobs) @@ -169,7 +169,7 @@ user.set_dir(get_dir(user, src)) to_chat(user, "You grip \the [name]'s handles.") else - to_chat(usr, "You let go of \the [name]'s handles.") + to_chat(user, "You let go of \the [name]'s handles.") pulling.pulledby = null pulling = null return @@ -228,7 +228,7 @@ /obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob) if(M == pulling) pulling = null - usr.pulledby = null + user.pulledby = null ..() /obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 888d0174e66..678513ec03e 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -98,14 +98,14 @@ #undef TANK_DISPENSER_CAPACITY -/obj/structure/dispenser/tgui_act(action, params) +/obj/structure/dispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return switch(action) if("plasma") var/obj/item/tank/phoron/tank = locate() in src - if(tank && Adjacent(usr)) - usr.put_in_hands(tank) + if(tank && Adjacent(ui.user)) + ui.user.put_in_hands(tank) phorontanks-- . = TRUE playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1) @@ -115,8 +115,8 @@ if(istype(T, /obj/item/tank/oxygen) || istype(T, /obj/item/tank/air) || istype(T, /obj/item/tank/anesthetic)) tank = T break - if(tank && Adjacent(usr)) - usr.put_in_hands(tank) + if(tank && Adjacent(ui.user)) + ui.user.put_in_hands(tank) oxygentanks-- . = TRUE playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1) diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index 26d9b82066c..c53a14b659b 100644 --- a/code/game/objects/structures/trash_pile_vr.dm +++ b/code/game/objects/structures/trash_pile_vr.dm @@ -292,7 +292,7 @@ prob(3);/obj/item/cracker, prob(3);/obj/item/material/butterfly, prob(3);/obj/item/material/butterfly/switchblade, - prob(3);/obj/item/clothing/gloves/knuckledusters, + prob(3);/obj/item/clothing/accessory/knuckledusters, prob(3);/obj/item/clothing/gloves/heavy_engineer, prob(3);/obj/item/reagent_containers/syringe/drugs, prob(2);/obj/item/implanter/sizecontrol, diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index c6bab800416..74c86c61e1f 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -18,8 +18,8 @@ /obj/structure/toilet/attack_hand(mob/living/user as mob) if(swirlie) - usr.setClickCooldown(user.get_attack_speed()) - usr.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.") + user.setClickCooldown(user.get_attack_speed()) + user.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.") swirlie.adjustBruteLoss(5) return @@ -519,13 +519,13 @@ ..() if(!istype(thing) || !thing.is_open_container()) return ..() - if(!usr.Adjacent(src)) + if(!user.Adjacent(src)) return ..() if(!thing.reagents || thing.reagents.total_volume == 0) - to_chat(usr, span_warning("\The [thing] is empty.")) + to_chat(user, span_warning("\The [thing] is empty.")) return // Clear the vessel. - visible_message(span_infoplain(span_bold("\The [usr]") + " tips the contents of \the [thing] into \the [src].")) + visible_message(span_infoplain(span_bold("\The [user]") + " tips the contents of \the [thing] into \the [src].")) thing.reagents.clear_reagents() thing.update_icon() @@ -549,13 +549,13 @@ to_chat(user, span_warning("Someone's already washing here.")) return - to_chat(usr, span_notice("You start washing your hands.")) + to_chat(user, span_notice("You start washing your hands.")) playsound(src, 'sound/effects/sink_long.ogg', 75, 1) busy = 1 if(!do_after(user, 40, src)) busy = 0 - to_chat(usr, span_notice("You stop washing your hands.")) + to_chat(user, span_notice("You stop washing your hands.")) return busy = 0 @@ -573,6 +573,9 @@ H.l_hand.clean_blood() H.bloody_hands = 0 H.germ_level = 0 + H.hand_blood_color = null + LAZYCLEARLIST(H.blood_DNA) + H.update_bloodied() else user.clean_blood() for(var/mob/V in viewers(src, null)) @@ -620,12 +623,12 @@ var/obj/item/I = O if(!I || !istype(I,/obj/item)) return - to_chat(usr, span_notice("You start washing \the [I].")) + to_chat(user, span_notice("You start washing \the [I].")) busy = 1 if(!do_after(user, 40, src)) busy = 0 - to_chat(usr, span_notice("You stop washing \the [I].")) + to_chat(user, span_notice("You stop washing \the [I].")) return busy = 0 diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 61bb0bf6eef..eb30553d685 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -187,12 +187,12 @@ //Crowbar to complete the assembly, Step 7 complete. else if(W.has_tool_quality(TOOL_CROWBAR)) if(!src.electronics) - to_chat(usr,span_warning("The assembly is missing electronics.")) + to_chat(user,span_warning("The assembly is missing electronics.")) return if(src.electronics && istype(src.electronics, /obj/item/circuitboard/broken)) - to_chat(usr,span_warning("The assembly has broken airlock electronics.")) + to_chat(user,span_warning("The assembly has broken airlock electronics.")) return - usr << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner + user << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner playsound(src, W.usesound, 100, 1) user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.") diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 6b46ba2acbe..6867af1386c 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -91,10 +91,6 @@ dirtoverlay.alpha = min((dirt - 50) * 5, 255) /turf/simulated/Entered(atom/A, atom/OL) - if(movement_disabled && usr.ckey != movement_disabled_exception) - to_chat(usr, span_danger("Movement is admin-disabled.")) //This is to identify lag problems - return - if (istype(A,/mob/living)) var/mob/living/M = A if(M.lying || M.flying) //VOREStation Edit diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index d7630618e2b..cfc998f72a1 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -17,7 +17,7 @@ src.blocks_air = 0 set_opacity(0) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) else can_open = WALL_OPENING //flick("[material.icon_base]fwall_closing", src) @@ -29,18 +29,18 @@ src.blocks_air = 1 set_opacity(1) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) can_open = WALL_CAN_OPEN update_icon() /turf/simulated/wall/proc/update_air() - if(!air_master) + if(!SSair) return for(var/turf/simulated/turf in loc) update_thermal(turf) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) /turf/simulated/wall/proc/update_thermal(var/turf/simulated/source) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 8751a723377..a44d9152774 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -182,9 +182,6 @@ //There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000 /turf/Enter(atom/movable/mover, atom/oldloc) - if(movement_disabled && usr.ckey != movement_disabled_exception) - to_chat(usr, span_warning("Movement is admin-disabled.")) //This is to identify lag problems - return // Do not call ..() // Byond's default turf/Enter() doesn't have the behaviour we want with Bump() // By default byond will call Bump() on the first dense object in contents @@ -331,7 +328,7 @@ to_chat(vandal, span_warning("There's too much graffiti here to add more.")) return FALSE - var/message = sanitize(tgui_input_text(usr, "Enter a message to engrave.", "Graffiti"), trim = TRUE) + var/message = sanitize(tgui_input_text(vandal, "Enter a message to engrave.", "Graffiti"), trim = TRUE) if(!message) return FALSE diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 72cb432e1bc..54027edb899 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -21,6 +21,11 @@ if(istype(below)) below.update_icon() // To add or remove the 'ceiling-less' overlay. +/proc/has_valid_ZAS_zone(turf/simulated/T) + if(!istype(T)) + return FALSE + return HAS_VALID_ZONE(T) + //Creates a new turf /turf/proc/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0, var/preserve_outdoors = FALSE) if (!N) @@ -28,7 +33,8 @@ if(N == /turf/space) var/turf/below = GetBelow(src) - if(istype(below) && (air_master.has_valid_zone(below) || air_master.has_valid_zone(src)) && !(src.z in using_map.below_blocked_levels) && (!istype(below, /turf/unsimulated/wall) && !istype(below, /turf/simulated/sky))) // VOREStation Edit: Weird open space + var/zones_present = has_valid_ZAS_zone(below) || has_valid_ZAS_zone(src) + if(istype(below) && zones_present && !(src.z in using_map.below_blocked_levels) && (!istype(below, /turf/unsimulated/wall) && !istype(below, /turf/simulated/sky))) // VOREStation Edit: Weird open space N = /turf/simulated/open var/obj/fire/old_fire = fire @@ -75,8 +81,8 @@ if(tell_universe) universe.OnTurfChange(W) - if(air_master) - air_master.mark_for_update(W) + if(SSair) + SSair.mark_for_update(W) for(var/turf/space/S in range(W, 1)) S.update_starlight() diff --git a/code/game/turfs/unsimulated/planetary.dm b/code/game/turfs/unsimulated/planetary.dm index c6be94c5ed0..d73201c1661 100644 --- a/code/game/turfs/unsimulated/planetary.dm +++ b/code/game/turfs/unsimulated/planetary.dm @@ -33,7 +33,7 @@ // Force ZAS to reconsider our connections because our temperature has changed if(connections) connections.erase_all() - air_master.mark_for_update(src) + SSair.mark_for_update(src) // Normal station/earth air. /turf/unsimulated/wall/planetary/normal @@ -67,4 +67,3 @@ oxygen = MOLES_O2STANDARD nitrogen = MOLES_N2STANDARD temperature = 310.92 // About 37.7C / 100F - diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index f7e33d15d3a..4e674822928 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1284,23 +1284,6 @@ var/datum/announcement/minor/admin_min_announcer = new if(!ai_number) to_chat(usr, span_bold("No AIs located")) //Just so you know the thing is actually working and not just ignoring you. -/datum/admins/proc/show_skills() - set category = "Admin.Investigate" - set name = "Show Skills" - - if (!istype(src,/datum/admins)) - src = usr.client.holder - if (!istype(src,/datum/admins)) - to_chat(usr, "Error: you are not an admin!") - return - - var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Select mob.", human_mob_list) - if(!M) return - - show_skill_window(usr, M) - - return - /client/proc/update_mob_sprite(mob/living/carbon/human/H as mob) set category = "Admin.Game" set name = "Update Mob Sprite" diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index be0b5b8fb81..6c65a272e24 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -59,7 +59,7 @@ var/datum/admin_secrets/admin_secrets = new() /datum/admin_secret_item/proc/can_execute(var/mob/user) if(can_view(user)) - if(!warn_before_use || tgui_alert(usr, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes") + if(!warn_before_use || tgui_alert(user, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes") return 1 return 0 diff --git a/code/modules/admin/admin_verb_lists.dm b/code/modules/admin/admin_verb_lists.dm index c0c031d2443..44f5c6e1cae 100644 --- a/code/modules/admin/admin_verb_lists.dm +++ b/code/modules/admin/admin_verb_lists.dm @@ -84,7 +84,6 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_rejuvenate, /client/proc/toggleghostwriters, /client/proc/toggledrones, - /datum/admins/proc/show_skills, /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, @@ -355,7 +354,6 @@ var/list/admin_verbs_mod = list( /client/proc/colorooc, /client/proc/player_panel_new, /client/proc/dsay, - /datum/admins/proc/show_skills, /datum/admins/proc/show_player_panel, /client/proc/check_antagonists, /client/proc/aooc, @@ -472,7 +470,6 @@ var/list/admin_verbs_event_manager = list( /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/toggleghostwriters, - /datum/admins/proc/show_skills, /client/proc/man_up, /client/proc/global_man_up, /client/proc/response_team, // Response Teams admin verb, diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index 4b29645516b..fac337afb8a 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -99,7 +99,6 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_rejuvenate, /client/proc/toggleghostwriters, /client/proc/toggledrones, - /datum/admins/proc/show_skills, /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, @@ -405,7 +404,6 @@ var/list/admin_verbs_mod = list( /client/proc/colorooc, /client/proc/player_panel_new, /client/proc/dsay, - /datum/admins/proc/show_skills, /datum/admins/proc/show_player_panel, /client/proc/check_antagonists, /client/proc/aooc, @@ -534,7 +532,6 @@ var/list/admin_verbs_event_manager = list( /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/toggleghostwriters, - /datum/admins/proc/show_skills, /client/proc/man_up, /client/proc/global_man_up, /client/proc/response_team, // Response Teams admin verb, diff --git a/code/modules/admin/modify_robot.dm b/code/modules/admin/modify_robot.dm index f2847943f35..8aea4d07dc5 100644 --- a/code/modules/admin/modify_robot.dm +++ b/code/modules/admin/modify_robot.dm @@ -43,9 +43,16 @@ qdel(source) . = ..() +/datum/eventkit/modify_robot/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/spritesheet/robot_icons) + ) + /datum/eventkit/modify_robot/tgui_data(mob/user) . = list() // Target section for general data + var/datum/asset/spritesheet/robot_icons/spritesheet = get_asset_datum(/datum/asset/spritesheet/robot_icons) + if(target) .["target"] = list() .["target"]["name"] = target.name @@ -62,10 +69,8 @@ // Target section for options once a module has been selected if(target.module) .["target"]["active"] = target.icon_selected - .["target"]["front"] = icon2base64(get_flat_icon(target,dir=SOUTH,no_anim=TRUE)) - .["target"]["side"] = icon2base64(get_flat_icon(target,dir=WEST,no_anim=TRUE)) - .["target"]["side_alt"] = icon2base64(get_flat_icon(target,dir=EAST,no_anim=TRUE)) - .["target"]["back"] = icon2base64(get_flat_icon(target,dir=NORTH,no_anim=TRUE)) + .["target"]["sprite"] = sanitize_css_class_name("[target.sprite_datum.type]") + .["target"]["sprite_size"] = spritesheet.icon_size_id(.["target"]["sprite"] + "S") .["target"]["modules"] = get_target_items(user) var/list/module_options = list() for(var/module in robot_modules) @@ -110,7 +115,7 @@ .["access_options"] = access_options // Section for source data for the module we might want to salvage if(source) - .["source"] += get_module_source(user) + .["source"] += get_module_source(user, spritesheet) var/list/all_robots = list() for(var/mob/living/silicon/robot/R in silicon_mob_list) if(!R.loc) @@ -152,7 +157,7 @@ /datum/eventkit/modify_robot/tgui_state(mob/user) return GLOB.tgui_admin_state -/datum/eventkit/modify_robot/tgui_act(action, params) +/datum/eventkit/modify_robot/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return @@ -180,8 +185,11 @@ if("select_source") if(source) qdel(source) - source = new /mob/living/silicon/robot(null) var/module_type = robot_modules[params["new_source"]] + if(ispath(module_type, /obj/item/robot_module/robot/syndicate)) + source = new /mob/living/silicon/robot/syndicate(null) + else + source = new /mob/living/silicon/robot(null) source.modtype = params["new_source"] var/obj/item/robot_module/robot/robot_type = new module_type(source) source.sprite_datum = pick(SSrobot_sprites.get_module_sprites(source.modtype, source)) @@ -198,9 +206,15 @@ var/obj/item/add_item = locate(params["module"]) if(!add_item) return TRUE + if(istype(add_item, /obj/item/card/id)) + source.idcard = null source.module.emag.Remove(add_item) source.module.modules.Remove(add_item) source.module.contents.Remove(add_item) + if(istype(add_item, /obj/item/card/id)) + if(target.idcard) + qdel(target.idcard) + target.idcard = add_item target.module.modules.Add(add_item) target.module.contents.Add(add_item) spawn(0) @@ -249,6 +263,8 @@ return TRUE if("rem_module") var/obj/item/rem_item = locate(params["module"]) + if(target.idcard == rem_item) + target.idcard = new /obj/item/card/id/synthetic(target) target.uneq_all() target.hud_used?.update_robot_modules_display(TRUE) target.module.emag.Remove(rem_item) @@ -292,12 +308,12 @@ var/new_upgrade = text2path(params["upgrade"]) if(new_upgrade == /obj/item/borg/upgrade/utility/reset) var/obj/item/borg/upgrade/utility/reset/rmodul = new_upgrade - if(tgui_alert(usr, "Are you sure that you want to install [initial(rmodul.name)] and reset the robot's module?","Confirm",list("Yes","No"))!="Yes") + if(tgui_alert(ui.user, "Are you sure that you want to install [initial(rmodul.name)] and reset the robot's module?","Confirm",list("Yes","No"))!="Yes") return FALSE var/obj/item/borg/upgrade/U = new new_upgrade(null) if(new_upgrade == /obj/item/borg/upgrade/utility/rename) var/obj/item/borg/upgrade/utility/rename/UN = U - var/new_name = sanitizeSafe(tgui_input_text(usr, "Enter new robot name", "Robot Reclassification", UN.heldname, MAX_NAME_LEN), MAX_NAME_LEN) + var/new_name = sanitizeSafe(tgui_input_text(ui.user, "Enter new robot name", "Robot Reclassification", UN.heldname, MAX_NAME_LEN), MAX_NAME_LEN) if(new_name) UN.heldname = new_name U = UN @@ -487,7 +503,7 @@ target.lawsync() return TRUE if("change_supplied_law_position") - var/new_position = tgui_input_number(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) + var/new_position = tgui_input_number(ui.user, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) if(isnum(new_position)) supplied_law_position = CLAMP(new_position, 1, MAX_SUPPLIED_LAW_NUMBER) target.lawsync() @@ -495,7 +511,7 @@ if("edit_law") var/datum/ai_law/AL = locate(params["edit_law"]) in target.laws.all_laws() if(AL) - var/new_law = sanitize(tgui_input_text(usr, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) + var/new_law = sanitize(tgui_input_text(ui.user, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) if(new_law && new_law != AL.law) AL.law = new_law target.lawsync() @@ -528,8 +544,8 @@ for(var/mob/living/silicon/robot/R in AI.connected_robots) to_chat(R, span_danger("Law Notice")) R.laws.show_laws(R) - if(usr != target) - to_chat(usr, span_notice("Laws displayed.")) + if(ui.user != target) + to_chat(ui.user, span_notice("Laws displayed.")) return TRUE if("select_ai") selected_ai = locate(params["new_ai"]) @@ -573,10 +589,11 @@ target_items += list(list("name" = item.name, "ref" = "\ref[item]", "icon" = icon2html(item, user, sourceonly=TRUE), "desc" = item.desc)) return target_items -/datum/eventkit/modify_robot/proc/get_module_source(var/mob/user) +/datum/eventkit/modify_robot/proc/get_module_source(var/mob/user, var/datum/asset/spritesheet/robot_icons/spritesheet) var/list/source_list = list() source_list["model"] = source.module - source_list["front"] = icon2base64(get_flat_icon(source,dir=SOUTH,no_anim=TRUE)) + source_list["sprite"] = sanitize_css_class_name("[source.sprite_datum.type]") + source_list["sprite_size"] = spritesheet.icon_size_id(source_list["sprite"] + "S") var/list/source_items = list() for(var/obj/item in (source.module.modules | source.module.emag)) var/exists diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index 921795beb73..ce23bbd1529 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -39,11 +39,11 @@ /datum/eventkit/player_effects/tgui_state(mob/user) return GLOB.tgui_admin_state -/datum/eventkit/player_effects/tgui_act(action) +/datum/eventkit/player_effects/tgui_act(action, list/params, datum/tgui/ui) . = ..() if(.) return - if(!check_rights_for(usr.client, R_SPAWN)) + if(!check_rights_for(ui.user.client, R_SPAWN)) return log_and_message_admins("[key_name(user)] used player effect: [action] on [target.ckey] playing [target.name]") @@ -66,7 +66,7 @@ to_chat(user,"[target] didn't have any breakable legs, sorry.") if("bluespace_artillery") - bluespace_artillery(target,usr) + bluespace_artillery(target, ui.user) if("spont_combustion") var/mob/living/carbon/human/Tar = target @@ -137,14 +137,14 @@ "Orange Eyes (Light)" = /mob/living/simple_mob/shadekin/orange/white, "Orange Eyes (Brown)" = /mob/living/simple_mob/shadekin/orange/brown, "Rivyr (Unique)" = /mob/living/simple_mob/shadekin/blue/rivyr) - var/kin_type = tgui_input_list(usr, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types) + var/kin_type = tgui_input_list(ui.user, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types) if(!kin_type || !target) return kin_type = kin_types[kin_type] - var/myself = tgui_alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete")) + var/myself = tgui_alert(ui.user, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete")) if(!myself || myself == "Cancel" || !target) return @@ -187,13 +187,13 @@ if("redspace_abduct") - redspace_abduction(target, usr) + redspace_abduction(target, ui.user) if("autosave") - fake_autosave(target, usr) + fake_autosave(target, ui.user) if("autosave2") - fake_autosave(target, usr, TRUE) + fake_autosave(target, ui.user, TRUE) if("adspam") if(target.client) @@ -718,7 +718,7 @@ if(where == "To Me") user.client.Getmob(target) if(where == "To Mob") - var/mob/selection = tgui_input_list(usr, "Select a mob to jump [target] to:", "Jump to mob", mob_list) + var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", mob_list) target.on_mob_jump() target.forceMove(get_turf(selection)) log_admin("[key_name(user)] jumped [target] to [selection]") @@ -765,22 +765,22 @@ if("ai") if(!istype(target, /mob/living)) - to_chat(usr, span_notice("This can only be used on instances of type /mob/living")) + to_chat(ui.user, span_notice("This can only be used on instances of type /mob/living")) return var/mob/living/L = target if(L.client || L.teleop) - to_chat(usr, span_warning("This cannot be used on player mobs!")) + to_chat(ui.user, span_warning("This cannot be used on player mobs!")) return if(L.ai_holder) //Cleaning up the original ai var/ai_holder_old = L.ai_holder L.ai_holder = null qdel(ai_holder_old) //Only way I could make #TESTING - Unable to be GC'd to stop. del() logs show it works. - L.ai_holder_type = tgui_input_list(usr, "Choose AI holder", "AI Type", typesof(/datum/ai_holder/)) + L.ai_holder_type = tgui_input_list(ui.user, "Choose AI holder", "AI Type", typesof(/datum/ai_holder/)) L.initialize_ai_holder() - L.faction = sanitize(tgui_input_text(usr, "Please input AI faction", "AI faction", "neutral")) - L.a_intent = tgui_input_list(usr, "Please choose AI intent", "AI intent", list(I_HURT, I_HELP)) - if(tgui_alert(usr, "Make mob wake up? This is needed for carbon mobs.", "Wake mob?", list("Yes", "No")) == "Yes") + L.faction = sanitize(tgui_input_text(ui.user, "Please input AI faction", "AI faction", "neutral")) + L.a_intent = tgui_input_list(ui.user, "Please choose AI intent", "AI intent", list(I_HURT, I_HELP)) + if(tgui_alert(ui.user, "Make mob wake up? This is needed for carbon mobs.", "Wake mob?", list("Yes", "No")) == "Yes") L.AdjustSleeping(-100) if("cloaking") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index d543c9e64c5..198d877c91f 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -599,10 +599,6 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) set category = "Admin" set name = "Adminhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted).")) diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 922e3c326ef..aa3efca68dc 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -830,9 +830,9 @@ if (!isturf(NT) || (NT in found) || (NT in pending)) continue // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type_buildmode(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type_buildmode(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 18ff612d9ad..ba2e7afcb25 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -678,9 +678,11 @@ var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets) if(istype(planet)) var/datum/time/current_time_datum = planet.current_time - var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), 23) + var/planet_hours = max(round(current_time_datum.seconds_in_day / 36000) - 1, 0) + var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), planet_hours) if(!isnull(new_hour)) - var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), 59) + var/planet_minutes = max(round(current_time_datum.seconds_in_hour / 600) - 1, 0) + var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), planet_minutes) if(!isnull(new_minute)) var/type_needed = current_time_datum.type var/datum/time/new_time = new type_needed() diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 63b18ab07b8..593be726a6b 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -2,12 +2,12 @@ set category = "Debug.Investigate" set name = "Show Air Report" - if(!master_controller || !air_master) - tgui_alert_async(usr,"Master_controller or air_master not found.","Air Report") + if(!master_controller || !SSair) + tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report") return - var/active_groups = air_master.active_zones - var/inactive_groups = air_master.zones.len - active_groups + var/active_groups = SSair.active_zones + var/inactive_groups = SSair.zones.len - active_groups var/hotspots = 0 for(var/obj/fire/hotspot in world) @@ -15,7 +15,7 @@ var/active_on_main_station = 0 var/inactive_on_main_station = 0 - for(var/zone/zone in air_master.zones) + for(var/zone/zone in SSair.zones) var/turf/simulated/turf = locate() in zone.contents if(turf?.z in using_map.station_levels) if(zone.needs_update) @@ -25,8 +25,8 @@ var/output = {"AIR SYSTEMS REPORT
General Processing Data
- Cycle: [air_master.current_cycle]
- Groups: [air_master.zones.len]
+ Cycle: [SSair.current_cycle]
+ Groups: [SSair.zones.len]
---- Active: [active_groups]
---- Inactive: [inactive_groups]

---- Active on station: [active_on_main_station]
@@ -36,7 +36,7 @@ Hotspot Processing: [hotspots]

Geometry Processing Data
- Tile Update: [air_master.tiles_to_update.len]
+ Tile Update: [SSair.tiles_to_update.len]
"} usr << browse(output,"window=airreport") @@ -127,11 +127,11 @@ to_chat(src, "Only administrators may use this command.") return - if(!air_master) + if(!SSair) to_chat(usr, "Cannot find air_system") return var/datum/air_group/dead_groups = list() - for(var/datum/air_group/group in air_master.air_groups) + for(var/datum/air_group/group in SSair.air_groups) if (!group.group_processing) dead_groups += group var/datum/air_group/dest_group = pick(dead_groups) @@ -149,7 +149,7 @@ to_chat(src, "Only administrators may use this command.") return - if(!air_master) + if(!SSair) to_chat(usr, "Cannot find air_system") return diff --git a/code/modules/admin/verbs/entity_narrate.dm b/code/modules/admin/verbs/entity_narrate.dm index d8322e93b83..839fb497836 100644 --- a/code/modules/admin/verbs/entity_narrate.dm +++ b/code/modules/admin/verbs/entity_narrate.dm @@ -221,11 +221,11 @@ return data -/datum/entity_narrate/tgui_act(action, list/params) +/datum/entity_narrate/tgui_act(action, list/params, datum/tgui/ui) . = ..() if(.) return - if(!check_rights_for(usr.client, R_FUN)) return + if(!check_rights_for(ui.user.client, R_FUN)) return switch(action) if("change_mode_multi") @@ -260,7 +260,7 @@ var/datum/weakref/wref = entity_refs[tgui_selected_id] tgui_selected_refs = wref.resolve() if(!tgui_selected_refs) - to_chat(usr, span_notice("[tgui_selected_id] has invalid reference, deleting")) + to_chat(ui.user, span_notice("[tgui_selected_id] has invalid reference, deleting")) entity_names -= tgui_selected_id entity_refs -= tgui_selected_id tgui_selected_id = "" @@ -281,9 +281,9 @@ tgui_selected_name = A.name if("narrate") if(world.time < (tgui_last_message + 0.5 SECONDS)) - to_chat(usr, span_notice("You can't messages that quickly! Wait at least half a second")) + to_chat(ui.user, span_notice("You can't messages that quickly! Wait at least half a second")) else - to_chat(usr, span_notice("Message successfully sent!")) + to_chat(ui.user, span_notice("Message successfully sent!")) tgui_last_message = world.time var/message = params["message"] //Sanitizing before speaking it if(tgui_selection_mode) @@ -291,7 +291,7 @@ var/datum/weakref/wref = entity_refs[entity] var/ref = wref.resolve() if(!ref) - to_chat(usr, span_notice("[entity] has invalid reference, deleting")) + to_chat(ui.user, span_notice("[entity] has invalid reference, deleting")) entity_names -= entity entity_refs -= entity tgui_selected_id_multi -= entity @@ -299,7 +299,7 @@ if(istype(ref, /mob/living)) var/mob/living/L = ref if(L.client) - log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", usr) + log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user) narrate_tgui_mob(L, message) else if(istype(ref, /atom)) var/atom/A = ref @@ -308,7 +308,7 @@ var/datum/weakref/wref = entity_refs[tgui_selected_id] var/ref = wref.resolve() if(!ref) - to_chat(usr, span_notice("[tgui_selected_id] has invalid reference, deleting")) + to_chat(ui.user, span_notice("[tgui_selected_id] has invalid reference, deleting")) entity_names -= tgui_selected_id entity_refs -= tgui_selected_id tgui_selected_id = "" @@ -319,7 +319,7 @@ if(istype(ref, /mob/living)) var/mob/living/L = ref if(L.client) - log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", usr) + log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user) narrate_tgui_mob(L, message) else if(istype(ref, /atom)) var/atom/A = ref diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 22be10769d9..5967b575b71 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -146,12 +146,6 @@ var/list/debug_verbs = list ( ,/client/proc/print_jobban_old ,/client/proc/print_jobban_old_filter ,/client/proc/forceEvent - ,/client/proc/break_all_air_groups - ,/client/proc/regroup_all_air_groups - ,/client/proc/kill_pipe_processing - ,/client/proc/kill_air_processing - ,/client/proc/disable_communication - ,/client/proc/disable_movement ,/client/proc/Zone_Info ,/client/proc/Test_ZAS_Connection ,/client/proc/ZoneTick @@ -345,80 +339,3 @@ var/list/debug_verbs = list ( to_world("There are [count] objects of type [type_path] in the game world") feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -var/global/prevent_airgroup_regroup = 0 - -/client/proc/break_all_air_groups() - set category = "Mapping" - set name = "Break All Airgroups" - - /*prevent_airgroup_regroup = 1 - for(var/datum/air_group/AG in air_master.air_groups) - AG.suspend_group_processing() - message_admins("[src.ckey] used 'Break All Airgroups'")*/ - -/client/proc/regroup_all_air_groups() - set category = "Mapping" - set name = "Regroup All Airgroups Attempt" - - to_chat(usr, span_red("Proc disabled.")) //Why not.. Delete the procs instead? - - /*prevent_airgroup_regroup = 0 - for(var/datum/air_group/AG in air_master.air_groups) - AG.check_regroup() - message_admins("[src.ckey] used 'Regroup All Airgroups Attempt'")*/ - -/client/proc/kill_pipe_processing() - set category = "Mapping" - set name = "Kill pipe processing" - - to_chat(usr, span_red("Proc disabled.")) - - /*pipe_processing_killed = !pipe_processing_killed - if(pipe_processing_killed) - message_admins("[src.ckey] used 'kill pipe processing', stopping all pipe processing.") - else - message_admins("[src.ckey] used 'kill pipe processing', restoring all pipe processing.")*/ - -/client/proc/kill_air_processing() - set category = "Mapping" - set name = "Kill air processing" - - to_chat(usr, span_red("Proc disabled.")) - - /*air_processing_killed = !air_processing_killed - if(air_processing_killed) - message_admins("[src.ckey] used 'kill air processing', stopping all air processing.") - else - message_admins("[src.ckey] used 'kill air processing', restoring all air processing.")*/ - -//This proc is intended to detect lag problems relating to communication procs -var/global/say_disabled = 0 -/client/proc/disable_communication() - set category = "Mapping" - set name = "Disable all communication verbs" - - to_chat(usr, span_red("Proc disabled.")) - - /*say_disabled = !say_disabled - if(say_disabled) - message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.") - else - message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")*/ - -//This proc is intended to detect lag problems relating to movement -var/global/movement_disabled = 0 -var/global/movement_disabled_exception //This is the client that calls the proc, so he can continue to run around to gauge any change to lag. -/client/proc/disable_movement() - set category = "Mapping" - set name = "Disable all movement" - - to_chat(usr, span_red("Proc disabled.")) - - /*movement_disabled = !movement_disabled - if(movement_disabled) - message_admins("[src.ckey] used 'Disable all movement', killing all movement.") - movement_disabled_exception = usr.ckey - else - message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/ diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index a33d77a4054..1e3b8117e9e 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -2,10 +2,6 @@ set category = "IC.Game" set name = "Pray" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_red("Speech is currently admin-disabled.")) - return - var/raw_msg = sanitize(tgui_input_text(usr, "Prayers are sent to staff but do not open tickets or go to Discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN)) if(!raw_msg) return diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 572c1a5d26e..564b0879488 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -437,6 +437,45 @@ Insert("bottle-[i]", 'icons/obj/chemical.dmi', "bottle-[i]") +// Robot UI sprites +/datum/asset/spritesheet/robot_icons + name = "robot_icons" + +/datum/asset/spritesheet/robot_icons/create_spritesheets() + for(var/datum/robot_sprite/S as anything in typesof(/datum/robot_sprite)) + if(!S.name || !S.sprite_icon_state) // snowflake out those customs... they suck + continue + var/icon/I_N = icon(S.sprite_icon, S.sprite_icon_state, NORTH) + var/icon/I_S = icon(S.sprite_icon, S.sprite_icon_state, SOUTH) + var/icon/I_W = icon(S.sprite_icon, S.sprite_icon_state, WEST) + var/icon/I_E = icon(S.sprite_icon, S.sprite_icon_state, EAST) + if(S.has_eye_sprites) + var/icon/I_NE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", NORTH) + if(I_NE) + I_N.Blend(I_NE, ICON_OVERLAY) + if(S.has_eye_sprites) + var/icon/I_SE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", SOUTH) + if(I_SE) + I_S.Blend(I_SE, ICON_OVERLAY) + if(S.has_eye_sprites) + var/icon/I_WE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", WEST) + if(I_WE) + I_W.Blend(I_WE, ICON_OVERLAY) + if(S.has_eye_sprites) + var/icon/I_EE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", EAST) + if(I_EE) + I_E.Blend(I_EE, ICON_OVERLAY) + var/imgid = sanitize_css_class_name("[S.type]") + I_N.Scale(120, 120) + I_S.Scale(120, 120) + I_W.Scale(120, 120) + I_E.Scale(120, 120) + Insert(imgid + "N", I_N) + Insert(imgid + "S", I_S) + Insert(imgid + "W", I_W) + Insert(imgid + "E", I_E) + + //Cloning pod sprites for UIs /datum/asset/simple/cloning assets = list( diff --git a/code/modules/asset_cache/assets/chat.dm b/code/modules/asset_cache/assets/chat.dm index 0853ea542c7..cbaf4ac35bd 100644 --- a/code/modules/asset_cache/assets/chat.dm +++ b/code/modules/asset_cache/assets/chat.dm @@ -2,5 +2,4 @@ name = "chat" /datum/asset/spritesheet/chat/create_spritesheets() - //honk - //This function has to be overridden otherwise it will generate runtimes + InsertAll("", text_tag_icons) // OOC, LOOC ect icons diff --git a/code/modules/asset_cache/assets/kitchen_recipes.dm b/code/modules/asset_cache/assets/kitchen_recipes.dm new file mode 100644 index 00000000000..2cca2ed6704 --- /dev/null +++ b/code/modules/asset_cache/assets/kitchen_recipes.dm @@ -0,0 +1,26 @@ +/datum/asset/spritesheet/kitchen_recipes + name = "kitchen_recipes" + +/datum/asset/spritesheet/kitchen_recipes/create_spritesheets() + for(var/datum/recipe/R as anything in subtypesof(/datum/recipe)) + add_atom_icon(R.result, sanitize_css_class_name("[R.type]")) + +/datum/asset/spritesheet/kitchen_recipes/proc/add_atom_icon(typepath, id) + var/icon_file + var/icon_state + var/obj/preview_item = typepath + + // if(ispath(ingredient_typepath, /datum/reagent)) + // var/datum/reagent/reagent = ingredient_typepath + // preview_item = initial(reagent.default_container) + // var/datum/glass_style/style = GLOB.glass_style_singletons[preview_item]?[reagent] + // if(istype(style)) + // icon_file = style.icon + // icon_state = style.icon_state + + // icon_file ||= initial(preview_item.icon_preview) || initial(preview_item.icon) + // icon_state ||= initial(preview_item.icon_state_preview) || initial(preview_item.icon_state) + icon_file = initial(preview_item.icon) + icon_state = initial(preview_item.icon_state) + + Insert("[id]", icon_file, icon_state) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index c61f8cd792d..95a17a4f71a 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -237,7 +237,7 @@ random_species = TRUE /obj/effect/landmark/corpse/miner - corpseradio = /obj/item/radio/headset/headset_cargo + corpseradio = /obj/item/radio/headset/miner corpseuniform = /obj/item/clothing/under/rank/miner corpsegloves = /obj/item/clothing/gloves/black corpseback = /obj/item/storage/backpack/industrial diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm index 993a4126ac1..73fe9978c5a 100644 --- a/code/modules/blob2/overmind/overmind.dm +++ b/code/modules/blob2/overmind/overmind.dm @@ -116,7 +116,7 @@ var/list/overminds = list() if(client) if(message) client.handle_spam_prevention(MUTE_IC) - if((client.prefs.muted & MUTE_IC) || say_disabled) + if((client.prefs.muted & MUTE_IC)) to_chat(src, span_warning("You cannot speak in IC (Muted).")) return diff --git a/code/modules/casino/casino_prize_vendor.dm b/code/modules/casino/casino_prize_vendor.dm index e63d90943a1..bf4acaa1f02 100644 --- a/code/modules/casino/casino_prize_vendor.dm +++ b/code/modules/casino/casino_prize_vendor.dm @@ -198,7 +198,7 @@ /obj/machinery/casino_prize_dispenser/attackby(obj/item/W as obj, mob/user as mob) if(currently_vending) if(istype(W, /obj/item/spacecasinocash)) - to_chat(usr, span_warning("Please select prize on display with sufficient amount of chips.")) + to_chat(user, span_warning("Please select prize on display with sufficient amount of chips.")) else SStgui.update_uis(src) return // don't smack that machine with your 2 chips @@ -211,15 +211,15 @@ /obj/machinery/casino_prize_dispenser/proc/pay_with_chips(var/obj/item/spacecasinocash/cashmoney, mob/user, var/price) //"cashmoney_:[cashmoney] user:[user] currently_vending:[currently_vending]" if(price > cashmoney.worth) - to_chat(usr, "[icon2html(cashmoney, user.client)] " + span_warning("That is not enough chips.")) + to_chat(user, "[icon2html(cashmoney, user.client)] " + span_warning("That is not enough chips.")) return 0 if(istype(cashmoney, /obj/item/spacecasinocash)) - visible_message(span_info("\The [usr] inserts some chips into \the [src].")) + visible_message(span_info("\The [user] inserts some chips into \the [src].")) cashmoney.worth -= price if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) else cashmoney.update_icon() @@ -249,10 +249,10 @@ ui = new(user, src, "CasinoPrizeDispenser", name) ui.open() -/obj/machinery/casino_prize_dispenser/tgui_act(action, params) +/obj/machinery/casino_prize_dispenser/tgui_act(action, params, datum/tgui/ui) if(stat & (BROKEN|NOPOWER)) return - if(usr.stat || usr.restrained()) + if(ui.user.stat || ui.user.restrained()) return if(..()) return TRUE @@ -283,36 +283,36 @@ if("event") restriction_check = category_event else - to_chat(usr, span_warning("Prize checkout error has occurred, purchase cancelled.")) + to_chat(ui.user, span_warning("Prize checkout error has occurred, purchase cancelled.")) return FALSE if(restriction_check < 1) - to_chat(usr, span_warning("[name] is restricted, this prize can't be bought.")) + to_chat(ui.user, span_warning("[name] is restricted, this prize can't be bought.")) return FALSE if(restriction_check > 1) item_given = TRUE if(price <= 0 && item_given == TRUE) - vend(bi, usr) + vend(bi, ui.user) return TRUE currently_vending = bi - if(istype(usr.get_active_hand(), /obj/item/spacecasinocash)) - var/obj/item/spacecasinocash/cash = usr.get_active_hand() - paid = pay_with_chips(cash, usr, price) + if(istype(ui.user.get_active_hand(), /obj/item/spacecasinocash)) + var/obj/item/spacecasinocash/cash = ui.user.get_active_hand() + paid = pay_with_chips(cash, ui.user, price) else - to_chat(usr, span_warning("Payment failure: Improper payment method, please provide chips.")) + to_chat(ui.user, span_warning("Payment failure: Improper payment method, please provide chips.")) return TRUE // we set this because they shouldn't even be able to get this far, and we want the UI to update. if(paid) if(item_given == TRUE) - vend(bi, usr) + vend(bi, ui.user) speak("Thank you for your purchase, your [bi] has been logged.") - do_logging(currently_vending, usr, bi) + do_logging(currently_vending, ui.user, bi) . = TRUE else - to_chat(usr, span_warning("Payment failure: unable to process payment.")) + to_chat(ui.user, span_warning("Payment failure: unable to process payment.")) /obj/machinery/casino_prize_dispenser/proc/vend(datum/data/casino_prize/bi, mob/user) SStgui.update_uis(src) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 86dffce176b..3917ef0e6a3 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -143,7 +143,21 @@ if("openLink") src << link(href_list["link"]) - ..() //redirect to hsrc.Topic() + if (hsrc) + var/datum/real_src = hsrc + if(QDELETED(real_src)) + return + + //fun fact: Topic() acts like a verb and is executed at the end of the tick like other verbs. So we have to queue it if the server is + //overloaded + if(hsrc && hsrc != holder && DEFAULT_TRY_QUEUE_VERB(VERB_CALLBACK(src, PROC_REF(_Topic), hsrc, href, href_list))) + return + ..() //redirect to hsrc.Topic() + +///dumb workaround because byond doesnt seem to recognize the Topic() typepath for /datum/proc/Topic() from the client Topic, +///so we cant queue it without this +/client/proc/_Topic(datum/hsrc, href, list/href_list) + return hsrc.Topic(href, href_list) //This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc. /client/AllowUpload(filename, filelength) diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm index 14c56354f93..b76ff9ee387 100644 --- a/code/modules/client/preference_setup/general/04_equipment.dm +++ b/code/modules/client/preference_setup/general/04_equipment.dm @@ -11,6 +11,7 @@ pref.all_underwear_metadata = check_list_copy(save_data["all_underwear_metadata"]) for(var/i in pref.all_underwear_metadata) pref.all_underwear_metadata[i] = path2text_list(pref.all_underwear_metadata[i]) + pref.headset = save_data["headset"] pref.backbag = save_data["backbag"] pref.pdachoice = save_data["pdachoice"] pref.communicator_visibility = save_data["communicator_visibility"] @@ -23,6 +24,7 @@ for(var/i in pref.all_underwear_metadata) underwear[i] = check_list_copy(pref.all_underwear_metadata[i]) save_data["all_underwear_metadata"] = underwear + save_data["headset"] = pref.headset save_data["backbag"] = pref.backbag save_data["pdachoice"] = pref.pdachoice save_data["communicator_visibility"] = pref.communicator_visibility @@ -72,6 +74,10 @@ var/global/list/valid_ringtones = list( pref.all_underwear -= underwear_category_name // TODO - Looks like this is duplicating the work of sanitize_character() if so, remove + if(pref.headset > GLOB.headsetlist.len || pref.headset < 1) + pref.headset = 1 //Same as above + character.headset = pref.headset + if(pref.backbag > backbaglist.len || pref.backbag < 1) pref.backbag = 2 //Same as above character.backbag = pref.backbag @@ -107,6 +113,7 @@ var/global/list/valid_ringtones = list( for(var/underwear_metadata in pref.all_underwear_metadata) if(!(underwear_metadata in pref.all_underwear)) pref.all_underwear_metadata -= underwear_metadata + pref.headset = sanitize_integer(pref.headset, 1, GLOB.headsetlist.len, initial(pref.headset)) pref.backbag = sanitize_integer(pref.backbag, 1, backbaglist.len, initial(pref.backbag)) pref.pdachoice = sanitize_integer(pref.pdachoice, 1, pdachoicelist.len, initial(pref.pdachoice)) pref.ringtone = sanitize(pref.ringtone, 20) @@ -123,6 +130,7 @@ var/global/list/valid_ringtones = list( . += " [gt.get_contents(get_metadata(UWC.name, gt))]" . += "
" + . += "Headset Type: [GLOB.headsetlist[pref.headset]]
" . += "Backpack Type: [backbaglist[pref.backbag]]
" . += "PDA Type: [pdachoicelist[pref.pdachoice]]
" . += "Communicator Visibility: [(pref.communicator_visibility) ? "Yes" : "No"]
" @@ -149,6 +157,12 @@ var/global/list/valid_ringtones = list( /datum/category_item/player_setup_item/general/equipment/OnTopic(var/href,var/list/href_list, var/mob/user) + if(href_list["change_headset"]) + var/new_headset = tgui_input_list(user, "Choose your character's style of headset:", "Character Preference", GLOB.headsetlist, GLOB.headsetlist[pref.headset]) + if(!isnull(new_headset) && CanUseTopic(user)) + pref.headset = GLOB.headsetlist.Find(new_headset) + return TOPIC_REFRESH_UPDATE_PREVIEW + if(href_list["change_backpack"]) var/new_backbag = tgui_input_list(user, "Choose your character's style of bag:", "Character Preference", backbaglist, backbaglist[pref.backbag]) if(!isnull(new_backbag) && CanUseTopic(user)) diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm index d22bdcc20e9..dcd8cf03c38 100644 --- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm +++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm @@ -360,18 +360,18 @@ /datum/gear/accessory/wristband_collection display_name = "wristbands (selection)" - path = /obj/item/clothing/accessory/wristbandcollection + path = /obj/item/clothing/accessory/wristband/collection /datum/gear/accessory/wristband_collection/New() ..() var/list/wristband_lists = list( - "Green, Blue and Yellow" = /obj/item/clothing/accessory/wristbandcollection, - "Pink, Black and Red" = /obj/item/clothing/accessory/wristbandcollection/pink, - "Red and Orange" = /obj/item/clothing/accessory/wristbandcollection/les, - "White, Pink and Blue" = /obj/item/clothing/accessory/wristbandcollection/trans, - "Blue, Purple and Pink" = /obj/item/clothing/accessory/wristbandcollection/bi, - "Black, White and Grey" = /obj/item/clothing/accessory/wristbandcollection/ace, - "Spiked" = /obj/item/clothing/accessory/wristband_spiked + "Green, Blue and Yellow" = /obj/item/clothing/accessory/wristband/collection, + "Pink, Black and Red" = /obj/item/clothing/accessory/wristband/collection/pink, + "Red and Orange" = /obj/item/clothing/accessory/wristband/collection/les, + "White, Pink and Blue" = /obj/item/clothing/accessory/wristband/collection/trans, + "Blue, Purple and Pink" = /obj/item/clothing/accessory/wristband/collection/bi, + "Black, White and Grey" = /obj/item/clothing/accessory/wristband/collection/ace, + "Spiked" = /obj/item/clothing/accessory/wristband/spiked ) gear_tweaks += new/datum/gear_tweak/path(wristband_lists) diff --git a/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm b/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm index c63f709505c..17030caab04 100644 --- a/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm @@ -271,7 +271,7 @@ // C CKEYS /datum/gear/fluff/cappy_watch - path = /obj/item/clothing/accessory/watch + path = /obj/item/clothing/accessory/watch/custom display_name = "Cappy's Pocket Watch" ckeywhitelist = list("cappycat") character_name = list("Cappy Fuzzlyfeathers") @@ -528,7 +528,7 @@ character_name = list("Elizabeth Bayou") /datum/gear/fluff/mercury_vopal_ring - path = /obj/item/clothing/gloves/ring/material/void_opal/fluff/mercury + path = /obj/item/clothing/accessory/ring/material/void_opal/fluff/mercury display_name = "Mercury's Mate Ring" ckeywhitelist = list("haloren") character_name = list("Mercury") @@ -694,6 +694,12 @@ ckeywhitelist = list("john.wayne9392") character_name = list("Harmony Pretchl") +/datum/gear/fluff/vox_dylo_pills + path = /obj/item/storage/pill_bottle/dylovene + display_name = "Dylovene pill bottle" + ckeywhitelist = list("jparker890") + character_name = list("Krey-Timinine") + /datum/gear/fluff/koyo_box path = /obj/item/storage/box/fluff/koyoakimomi display_name = "Koyo's Box" @@ -1239,6 +1245,13 @@ ckeywhitelist = list("satinisle") character_name = list("Parriz Tavakdavi") +/datum/gear/fluff/dark_tarot + path = /obj/item/deck/dark_tarot + display_name = "dark rose tarot deck" + ckeywhitelist = list("satinisle") + character_name = list("Millie Orlen") + + // T CKEYS /datum/gear/fluff/ascian_medal path = /obj/item/clothing/accessory/medal/silver/unity/tabiranth diff --git a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm index 3909acf199a..86a89ddfa83 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm @@ -56,7 +56,6 @@ toytype["Big Red Button"] = /obj/item/toy/redbutton toytype["Garden gnome"] = /obj/item/toy/gnome toytype["Toy AI"] = /obj/item/toy/AI - toytype["Hand buzzer"] = /obj/item/clothing/gloves/ring/buzzer/toy toytype["Toy nuke"] = /obj/item/toy/nuke toytype["Toy gibber"] = /obj/item/toy/minigibber toytype["Toy xeno"] = /obj/item/toy/toy_xeno diff --git a/code/modules/client/preference_setup/loadout/loadout_gloves.dm b/code/modules/client/preference_setup/loadout/loadout_gloves.dm index 859d6a0c4cd..29f22840e69 100644 --- a/code/modules/client/preference_setup/loadout/loadout_gloves.dm +++ b/code/modules/client/preference_setup/loadout/loadout_gloves.dm @@ -58,7 +58,7 @@ /datum/gear/gloves/fingerless display_name = "fingerless gloves" - description = "A pair of gloves that don't actually cover the fingers. Available in classic black or recolourable white." + description = "A pair of gloves that don't actually cover the fingers. Available in classic black or recolourable white, with or without cutouts." path = /obj/item/clothing/gloves/fingerless /datum/gear/gloves/fingerless/New() @@ -66,7 +66,8 @@ var/list/selector_uniforms = list( "black"=/obj/item/clothing/gloves/fingerless, "black, alt" =/obj/item/clothing/gloves/fingerless/alt, - "recolourable white"=/obj/item/clothing/gloves/fingerless_recolourable + "recolourable white"=/obj/item/clothing/gloves/fingerless_recolourable, + "recolourable, alt"=/obj/item/clothing/gloves/fingerless_recolourable/alt ) gear_tweaks += new/datum/gear_tweak/path(sortAssoc(selector_uniforms)) gear_tweaks += gear_tweak_free_color_choice @@ -74,27 +75,27 @@ /datum/gear/gloves/ring display_name = "ring selection" description = "Choose from a number of rings." - path = /obj/item/clothing/gloves/ring + path = /obj/item/clothing/accessory/ring cost = 1 /datum/gear/gloves/ring/New() ..() var/ringtype = list() - ringtype["CTI ring"] = /obj/item/clothing/gloves/ring/cti - ringtype["Mariner University ring"] = /obj/item/clothing/gloves/ring/mariner - ringtype["engagement ring"] = /obj/item/clothing/gloves/ring/engagement - ringtype["signet ring"] = /obj/item/clothing/gloves/ring/seal/signet - ringtype["masonic ring"] = /obj/item/clothing/gloves/ring/seal/mason - ringtype["ring, glass"] = /obj/item/clothing/gloves/ring/material/glass - ringtype["ring, wood"] = /obj/item/clothing/gloves/ring/material/wood - ringtype["ring, plastic"] = /obj/item/clothing/gloves/ring/material/plastic - ringtype["ring, iron"] = /obj/item/clothing/gloves/ring/material/iron - ringtype["ring, bronze"] = /obj/item/clothing/gloves/ring/material/bronze - ringtype["ring, steel"] = /obj/item/clothing/gloves/ring/material/steel - ringtype["ring, copper"] = /obj/item/clothing/gloves/ring/material/copper - ringtype["ring, silver"] = /obj/item/clothing/gloves/ring/material/silver - ringtype["ring, gold"] = /obj/item/clothing/gloves/ring/material/gold - ringtype["ring, platinum"] = /obj/item/clothing/gloves/ring/material/platinum + ringtype["CTI ring"] = /obj/item/clothing/accessory/ring/cti + ringtype["Mariner University ring"] = /obj/item/clothing/accessory/ring/mariner + ringtype["engagement ring"] = /obj/item/clothing/accessory/ring/engagement + ringtype["signet ring"] = /obj/item/clothing/accessory/ring/seal/signet + ringtype["masonic ring"] = /obj/item/clothing/accessory/ring/seal/mason + ringtype["ring, glass"] = /obj/item/clothing/accessory/ring/material/glass + ringtype["ring, wood"] = /obj/item/clothing/accessory/ring/material/wood + ringtype["ring, plastic"] = /obj/item/clothing/accessory/ring/material/plastic + ringtype["ring, iron"] = /obj/item/clothing/accessory/ring/material/iron + ringtype["ring, bronze"] = /obj/item/clothing/accessory/ring/material/bronze + ringtype["ring, steel"] = /obj/item/clothing/accessory/ring/material/steel + ringtype["ring, copper"] = /obj/item/clothing/accessory/ring/material/copper + ringtype["ring, silver"] = /obj/item/clothing/accessory/ring/material/silver + ringtype["ring, gold"] = /obj/item/clothing/accessory/ring/material/gold + ringtype["ring, platinum"] = /obj/item/clothing/accessory/ring/material/platinum gear_tweaks += new/datum/gear_tweak/path(ringtype) @@ -105,14 +106,14 @@ /datum/gear/gloves/watch display_name = "wristwatch selector" description = "Pick from a range of wristwatches." - path = /obj/item/clothing/gloves/watch + path = /obj/item/clothing/accessory/watch /datum/gear/gloves/watch/New() ..() var/list/selector_watches = list( - "plain plastic"=/obj/item/clothing/gloves/watch, - "silver"=/obj/item/clothing/gloves/watch/silver, - "gold"=/obj/item/clothing/gloves/watch/gold, - "survival"=/obj/item/clothing/gloves/watch/survival + "plain plastic"=/obj/item/clothing/accessory/watch, + "silver"=/obj/item/clothing/accessory/watch/silver, + "gold"=/obj/item/clothing/accessory/watch/gold, + "survival"=/obj/item/clothing/accessory/watch/survival ) gear_tweaks += new/datum/gear_tweak/path(sortAssoc(selector_watches)) diff --git a/code/modules/client/preference_setup/loadout/loadout_gloves_vr.dm b/code/modules/client/preference_setup/loadout/loadout_gloves_vr.dm index cfc0a6b1053..fd25064e85b 100644 --- a/code/modules/client/preference_setup/loadout/loadout_gloves_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_gloves_vr.dm @@ -1,10 +1,10 @@ /datum/gear/gloves/goldring display_name = "wedding ring, gold" - path = /obj/item/clothing/gloves/ring/wedding + path = /obj/item/clothing/accessory/ring/wedding /datum/gear/gloves/silverring display_name = "wedding ring, silver" - path = /obj/item/clothing/gloves/ring/wedding/silver + path = /obj/item/clothing/accessory/ring/wedding/silver /datum/gear/gloves/colored display_name = "gloves, colorable" diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm index 1aa899e744e..d43fb0529c2 100644 --- a/code/modules/client/preference_setup/preference_setup.dm +++ b/code/modules/client/preference_setup/preference_setup.dm @@ -7,11 +7,6 @@ sort_order = 1 category_item_type = /datum/category_item/player_setup_item/general -/datum/category_group/player_setup_category/skill_preferences - name = "Skills" - sort_order = 2 - category_item_type = /datum/category_item/player_setup_item/skills - /datum/category_group/player_setup_category/occupation_preferences name = "Occupation" sort_order = 3 diff --git a/code/modules/client/preference_setup/skills/skills.dm b/code/modules/client/preference_setup/skills/skills.dm deleted file mode 100644 index a77254d6383..00000000000 --- a/code/modules/client/preference_setup/skills/skills.dm +++ /dev/null @@ -1,89 +0,0 @@ -/datum/category_item/player_setup_item/skills - name = "Skills" - sort_order = 1 - -/datum/category_item/player_setup_item/skills/load_character(list/save_data) - pref.skills = check_list_copy(save_data["skills"]) - pref.used_skillpoints = save_data["used_skillpoints"] - pref.skill_specialization = save_data["skill_specialization"] - -/datum/category_item/player_setup_item/skills/save_character(list/save_data) - save_data["skills"] = check_list_copy(pref.skills) - save_data["used_skillpoints"] = pref.used_skillpoints - save_data["skill_specialization"] = pref.skill_specialization - -/datum/category_item/player_setup_item/skills/sanitize_character() - if(SKILLS == null) setup_skills() - if(!pref.skills) pref.skills = list() - if(!pref.skills.len) pref.ZeroSkills() - if(pref.used_skillpoints < 0) pref.used_skillpoints = 0 - -// Moved from /datum/preferences/proc/copy_to() -/datum/category_item/player_setup_item/skills/copy_to_mob(var/mob/living/carbon/human/character) - character.skills = pref.skills - character.used_skillpoints = pref.used_skillpoints - -/datum/category_item/player_setup_item/skills/content() - . = list() - . += span_bold("Select your Skills") + "
" - . += "Current skill level: [pref.GetSkillClass(pref.used_skillpoints)] ([pref.used_skillpoints])
" - . += "Use preconfigured skillset
" - . += "
" - for(var/V in SKILLS) - . += "" - for(var/datum/skill/S in SKILLS[V]) - var/level = pref.skills[S.ID] - . += "" - . += "" - . += skill_to_button(S, "Untrained", level, SKILL_NONE) - // secondary skills don't have an amateur level - if(S.secondary) - . += "" - else - . += skill_to_button(S, "Amateur", level, SKILL_BASIC) - . += skill_to_button(S, "Trained", level, SKILL_ADEPT) - . += skill_to_button(S, "Professional", level, SKILL_EXPERT) - . += "" - . += "
[V]" - . += "
[S.name]
" - . = jointext(.,null) - -/datum/category_item/player_setup_item/proc/skill_to_button(var/skill, var/level_name, var/current_level, var/selection_level) - if(current_level == selection_level) - return "" + span_linkOn("[level_name]") + "" - return "[level_name]" - -/datum/category_item/player_setup_item/skills/OnTopic(href, href_list, user) - if(href_list["skillinfo"]) - var/datum/skill/S = locate(href_list["skillinfo"]) - var/HTML = span_bold("[S.name]") + "
[S.desc]" - user << browse(HTML, "window=\ref[user]skillinfo") - return TOPIC_HANDLED - - else if(href_list["setskill"]) - var/datum/skill/S = locate(href_list["setskill"]) - var/value = text2num(href_list["newvalue"]) - pref.skills[S.ID] = value - pref.CalculateSkillPoints() - return TOPIC_REFRESH - - else if(href_list["preconfigured"]) - var/selected = tgui_input_list(user, "Select a skillset", "Skillset", SKILL_PRE) - if(!selected || !CanUseTopic(user)) return - - pref.ZeroSkills(1) - for(var/V in SKILL_PRE[selected]) - if(V == "field") - pref.skill_specialization = SKILL_PRE[selected]["field"] - continue - pref.skills[V] = SKILL_PRE[selected][V] - pref.CalculateSkillPoints() - - return TOPIC_REFRESH - - else if(href_list["setspecialization"]) - pref.skill_specialization = href_list["setspecialization"] - pref.CalculateSkillPoints() - return TOPIC_REFRESH - - return ..() diff --git a/code/modules/client/preference_setup/volume_sliders/01_volume.dm b/code/modules/client/preference_setup/volume_sliders/01_volume.dm index 219a4750cb2..eb07af33cc0 100644 --- a/code/modules/client/preference_setup/volume_sliders/01_volume.dm +++ b/code/modules/client/preference_setup/volume_sliders/01_volume.dm @@ -40,7 +40,7 @@ var/channel = href_list["change_volume"] if(!(channel in pref.volume_channels)) pref.volume_channels["[channel]"] = 1 - var/value = tgui_input_number(usr, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0) + var/value = tgui_input_number(user, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0) if(isnum(value)) value = CLAMP(value, 0, 200) pref.volume_channels["[channel]"] = (value / 100) @@ -79,14 +79,14 @@ data["volume_channels"] = user.client.prefs.volume_channels return data -/datum/volume_panel/tgui_act(action, params) +/datum/volume_panel/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!usr?.client?.prefs) + if(!ui.user?.client?.prefs) return TRUE - var/datum/preferences/P = usr.client.prefs + var/datum/preferences/P = ui.user.client.prefs switch(action) if("adjust_volume") var/channel = params["channel"] diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 2614b6a8f4f..6fca6775683 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -63,6 +63,9 @@ var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","s . += link + (trait_prefs[identifier] ? "Enabled" : "Disabled") if (2) //TRAIT_PREF_TYPE_COLOR . += " " + color_square(hex = trait_prefs[identifier]) + link + "Change" + if (3) //TRAIT_PREF_TYPE_STRING + var/string = trait_prefs[identifier] + . += link + (length(string) > 0 ? string : "\[Empty\]") . += "" . += "" if (altered) @@ -101,6 +104,9 @@ var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","s var/new_color = input(user, "Choose the color for this trait preference:", "Trait Preference", trait_prefs[preference]) as color|null if (new_color) trait_prefs[preference] = new_color + if (3) //TRAIT_PREF_TYPE_STRING + var/new_string = instance.apply_sanitization_to_string(preference, tgui_input_text(user, "What should the new value be?", instance.has_preferences[preference][2], trait_prefs[preference], MAX_NAME_LEN)) + trait_prefs[preference] = new_string // Definition of the stuff for Ears /datum/category_item/player_setup_item/vore/traits diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a6fbe938813..f2d0f5b2da4 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -47,6 +47,7 @@ var/list/preferences_datums = list() var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2). var/b_type = "A+" //blood type (not-chooseable) var/blood_reagents = "default" //blood restoration reagents + var/headset = 1 //headset type var/backbag = 2 //backpack type var/pdachoice = 1 //PDA type var/shoe_hater = FALSE //RS ADD - if true, will spawn with no shoes @@ -121,10 +122,6 @@ var/list/preferences_datums = list() //Keeps track of preferrence for not getting any wanted jobs var/alternate_option = 1 - var/used_skillpoints = 0 - var/skill_specialization = null - var/list/skills = list() // skills can range from 0 to 3 - // maps each organ to either null(intact), "cyborg" or "amputated" // will probably not be able to do this for head and torso ;) var/list/organ_data = list() @@ -232,58 +229,6 @@ var/list/preferences_datums = list() value_cache = null return ..() -/datum/preferences/proc/ZeroSkills(var/forced = 0) - for(var/V in SKILLS) for(var/datum/skill/S in SKILLS[V]) - if(!skills.Find(S.ID) || forced) - skills[S.ID] = SKILL_NONE - -/datum/preferences/proc/CalculateSkillPoints() - used_skillpoints = 0 - for(var/V in SKILLS) for(var/datum/skill/S in SKILLS[V]) - var/multiplier = 1 - switch(skills[S.ID]) - if(SKILL_NONE) - used_skillpoints += 0 * multiplier - if(SKILL_BASIC) - used_skillpoints += 1 * multiplier - if(SKILL_ADEPT) - // secondary skills cost less - if(S.secondary) - used_skillpoints += 1 * multiplier - else - used_skillpoints += 3 * multiplier - if(SKILL_EXPERT) - // secondary skills cost less - if(S.secondary) - used_skillpoints += 3 * multiplier - else - used_skillpoints += 6 * multiplier - -/datum/preferences/proc/GetSkillClass(points) - return CalculateSkillClass(points, age) - -/proc/CalculateSkillClass(points, age) - if(points <= 0) return "Unconfigured" - // skill classes describe how your character compares in total points - points -= min(round((age - 20) / 2.5), 4) // every 2.5 years after 20, one extra skillpoint - if(age > 30) - points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint - switch(points) - if(-1000 to 3) - return "Terrifying" - if(4 to 6) - return "Below Average" - if(7 to 10) - return "Average" - if(11 to 14) - return "Above Average" - if(15 to 18) - return "Exceptional" - if(19 to 24) - return "Genius" - if(24 to 1000) - return "God" - /datum/preferences/proc/ShowChoices(mob/user) if(!user || !user.client) return diff --git a/code/modules/client/preferences_tgui.dm b/code/modules/client/preferences_tgui.dm index 69361e14785..9e3b430f68f 100644 --- a/code/modules/client/preferences_tgui.dm +++ b/code/modules/client/preferences_tgui.dm @@ -63,7 +63,7 @@ var/value = params["value"] for(var/datum/preference_middleware/preference_middleware as anything in middleware) - if(preference_middleware.pre_set_preference(usr, requested_preference_key, value)) + if(preference_middleware.pre_set_preference(ui.user, requested_preference_key, value)) return TRUE var/datum/preference/requested_preference = GLOB.preference_entries_by_key[requested_preference_key] @@ -82,7 +82,7 @@ for(var/datum/preference_middleware/preference_middleware as anything in middleware) var/delegation = preference_middleware.action_delegations[action] if(!isnull(delegation)) - return call(preference_middleware, delegation)(params, usr) + return call(preference_middleware, delegation)(params, ui.user) return FALSE diff --git a/code/modules/client/record_updater.dm b/code/modules/client/record_updater.dm new file mode 100644 index 00000000000..de802eedcf2 --- /dev/null +++ b/code/modules/client/record_updater.dm @@ -0,0 +1,129 @@ +var/global/client_record_update_lock = FALSE + +// Manually updating records from medical console to a player's save. +/proc/get_current_mob_from_record(var/datum/data/record/active) + var/datum/transcore_db/db = SStranscore.db_by_mind_name(active.fields["name"]) + if(db) + var/datum/transhuman/mind_record/record = db.backed_up[active.fields["name"]] + if(record.mind_ref) + var/datum/mind/D = record.mind_ref + if(D.current) + var/client/C = D.current.client + if(C && C.ckey != record.ckey) + return null + return D.current + return null + + +/proc/client_update_record(var/obj/machinery/computer/COM, var/user) + if(!COM || QDELETED(COM)) + return "Invalid console" + + if(jobban_isbanned(user, "Records") ) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization denied (OOC: You are banned from editing records)" + + var/record_string = "" + var/datum/data/record/active + var/console_path = null + if(istype(COM,/obj/machinery/computer/med_data)) + var/obj/machinery/computer/med_data/MCOM = COM + active = MCOM.active2 + record_string = "medical" + console_path = /obj/machinery/computer/med_data + if(istype(COM,/obj/machinery/computer/skills)) + var/obj/machinery/computer/skills/ECOM = COM + active = ECOM.active1 + record_string = "employment" + console_path = /obj/machinery/computer/skills + if(istype(COM,/obj/machinery/computer/secure_data)) + var/obj/machinery/computer/secure_data/SCOM = COM + active = SCOM.active2 + record_string = "security" + console_path = /obj/machinery/computer/secure_data + + if(client_record_update_lock) + to_chat(user,"Update already in progress! Please wait a moment...") + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update already in progress! Please wait a moment..." + client_record_update_lock = TRUE + spawn(60 SECONDS) + client_record_update_lock = FALSE + + if(!active || !console_path) + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Record or console destroyed)" + + to_chat(user,"Update sent! Please wait for a response...") + message_admins("[user] pushed [record_string] record update to [active.fields["name"]].") + + var/mob/M = get_current_mob_from_record(active) + if(!M) + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Client mob does not exist, has no mind record, or is possesssed)" + + var/client/C = M.client + if(!C) + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Record's owner is offline)" + + var/choice = tgui_alert(M, "Your [record_string] record has been updated from the a records console by [user]. Please review the changes made to your [record_string] record. Accepting these changes will SAVE your CURRENT character slot! If your new [record_string] record has errors, it is recomended to have it corrected IC instead of editing it yourself.", "Record Updated", list("Review Changes","Refuse Update")) + if(choice == "Refuse Update") + message_admins("[active.fields["name"]] refused [record_string] record update from [user] without review.") + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Client refused without review)" + + var/datum/preferences/P = C.prefs + var/new_data = strip_html_simple(tgui_input_text(M,"Please review [user]'s changes to your [record_string] record before confirming. Confirming will SAVE your CURRENT character slot! If your new [record_string] record major errors, it is recomended to have it corrected IC instead of editing it yourself.","Character Preference", html_decode(active.fields["notes"]), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH) + if(!new_data) + message_admins("[active.fields["name"]] refused [record_string] record update from [user] with review.") + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Client refused with review)" + if(!M || !M.client || !P) + message_admins("[active.fields["name"]]'s [record_string] record could not be updated, client disconnected.") + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] buzzes!")) + playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) + return "Update syncronization failed (OOC: Client does not exist)" + + // Update records in the consoles, remember this can happen a while after a record is closed on the console... Use cached data. + switch(console_path) + if(/obj/machinery/computer/med_data) + P.med_record = new_data + if(active) + active.fields["notes"] = new_data + if(/obj/machinery/computer/skills) + P.gen_record = new_data + if(active) + active.fields["notes"] = new_data + if(/obj/machinery/computer/secure_data) + P.sec_record = new_data + if(active) + active.fields["notes"] = new_data + + // Update player record + P.save_preferences() + P.save_character() + if(M) + to_chat(M,span_notice("Your [record_string] record for [active.fields["name"]] has been updated.")) + message_admins("[active.fields["name"]] accepted the [record_string] record update from [user].") + + // ding! + if(COM && !QDELETED(COM)) + COM.visible_message(span_notice("\The [COM] dings!")) + playsound(COM, 'sound/machines/ding.ogg', 50, 1) + + return "Record syncronized." diff --git a/code/modules/client/verbs/advanced_who.dm b/code/modules/client/verbs/advanced_who.dm index 4c4af542a48..3e39936cf5d 100644 --- a/code/modules/client/verbs/advanced_who.dm +++ b/code/modules/client/verbs/advanced_who.dm @@ -7,7 +7,7 @@ var/list/Lines = list() - if(holder) + if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,src)) for(var/client/C in GLOB.clients) var/entry = "[C.key]" if(C.holder && C.holder.fakekey) diff --git a/code/modules/client/verbs/character_directory.dm b/code/modules/client/verbs/character_directory.dm index c35b2954696..b58334b06c7 100644 --- a/code/modules/client/verbs/character_directory.dm +++ b/code/modules/client/verbs/character_directory.dm @@ -136,14 +136,14 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) if(action == "refresh") // This is primarily to stop malicious users from trying to lag the server by spamming this verb - if(!usr.checkMoveCooldown()) - to_chat(usr, span_warning("Don't spam character directory refresh.")) + if(!ui.user.checkMoveCooldown()) + to_chat(ui.user, span_warning("Don't spam character directory refresh.")) return - usr.setMoveCooldown(10) - update_tgui_static_data(usr, ui) + ui.user.setMoveCooldown(10) + update_tgui_static_data(ui.user, ui) return TRUE else - return check_for_mind_or_prefs(usr, action, params["overwrite_prefs"]) + return check_for_mind_or_prefs(ui.user, action, params["overwrite_prefs"]) /datum/character_directory/proc/check_for_mind_or_prefs(mob/user, action, overwrite_prefs) if (!user.client) @@ -156,12 +156,12 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) return switch(action) if ("setTag") - var/list/new_tag = tgui_input_list(usr, "Pick a new Vore tag for the character directory", "Character Tag", GLOB.char_directory_tags) + var/list/new_tag = tgui_input_list(user, "Pick a new Vore tag for the character directory", "Character Tag", GLOB.char_directory_tags) if(!new_tag) return return set_for_mind_or_prefs(user, action, new_tag, can_set_prefs, can_set_mind) if ("setErpTag") - var/list/new_erptag = tgui_input_list(usr, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags) + var/list/new_erptag = tgui_input_list(user, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags) if(!new_erptag) return return set_for_mind_or_prefs(user, action, new_erptag, can_set_prefs, can_set_mind) @@ -171,11 +171,11 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) visible = user.mind.show_in_directory else if (can_set_prefs) visible = user.client.prefs.show_in_directory - to_chat(usr, span_notice("You are now [!visible ? "shown" : "not shown"] in the directory.")) + to_chat(user, span_notice("You are now [!visible ? "shown" : "not shown"] in the directory.")) return set_for_mind_or_prefs(user, action, !visible, can_set_prefs, can_set_mind) if ("editAd") - var/current_ad = (can_set_mind ? usr.mind.directory_ad : null) || (can_set_prefs ? usr.client.prefs.directory_ad : null) - var/new_ad = sanitize(tgui_input_text(usr, "Change your character ad", "Character Ad", current_ad, multiline = TRUE, prevent_enter = TRUE), extra = 0) + var/current_ad = (can_set_mind ? user.mind.directory_ad : null) || (can_set_prefs ? user.client.prefs.directory_ad : null) + var/new_ad = sanitize(tgui_input_text(user, "Change your character ad", "Character Ad", current_ad, multiline = TRUE, prevent_enter = TRUE), extra = 0) if(isnull(new_ad)) return return set_for_mind_or_prefs(user, action, new_ad, can_set_prefs, can_set_mind) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 63d7793ce86..b07704693e0 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -3,9 +3,6 @@ set name = "OOC" set category = "OOC.Chat" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_warning("Speech is currently admin-disabled.")) - return if(!mob) return if(IsGuestKey(key)) @@ -86,10 +83,6 @@ set desc = "Local OOC, seen only by those in view." set category = "OOC.Chat" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - if(!mob) return diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/accessories/accessory.dm similarity index 80% rename from code/modules/clothing/under/accessories/accessory.dm rename to code/modules/clothing/accessories/accessory.dm index 7c4b968b093..7610687a9a0 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/accessories/accessory.dm @@ -12,6 +12,8 @@ var/image/inv_overlay = null // Overlay used when attached to clothing. var/image/mob_overlay = null var/overlay_state = null + var/punch_force = 0 // added melee damage + var/punch_damtype = BRUTE // added melee damage type var/concealed_holster = 0 var/mob/living/carbon/human/wearer = null // To check if the wearer changes, so species spritesheets change properly. var/list/on_rolled = list() // Used when jumpsuit sleevels are rolled ("rolled" entry) or it's rolled down ("down"). Set to "none" to hide in those states. @@ -82,6 +84,11 @@ src.forceMove(S) has_suit.add_overlay(get_inv_overlay()) + has_suit.force += force + if(istype(S,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/has_gloves = S + has_gloves.punch_force = has_gloves.punch_force + punch_force + if(user) to_chat(user, span_notice("You attach \the [src] to \the [has_suit].")) add_fingerprint(user) @@ -90,6 +97,10 @@ if(!has_suit) return has_suit.cut_overlay(get_inv_overlay()) + has_suit.force = initial(has_suit.force) + if(istype(has_suit,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/has_gloves = has_suit + has_gloves.punch_force = initial(has_gloves.punch_force) has_suit = null if(user) usr.put_in_hands(src) @@ -376,85 +387,6 @@ icon_state = "tesh_neckscarf" species_restricted = list(SPECIES_TESHARI) -//bracelets - -/obj/item/clothing/accessory/bracelet - name = "bracelet" - desc = "A simple silver bracelet with a clasp." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "bracelet" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/bracelet/friendship - name = "friendship bracelet" - desc = "A beautiful friendship bracelet in all the colors of the rainbow." - icon_state = "friendbracelet" - -/obj/item/clothing/accessory/bracelet/friendship/verb/dedicate_bracelet() - set name = "Dedicate Bracelet" - set category = "Object" - set desc = "Dedicate your friendship bracelet to a special someone." - var/mob/M = usr - if(!M.mind) - return 0 - - var/input = sanitizeSafe(input(usr, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN) - - if(src && input && !M.stat && in_range(M,src)) - desc = "A beautiful friendship bracelet in all the colors of the rainbow. It's dedicated to [input]." - to_chat(M, "You dedicate the bracelet to [input], remembering the times you've had together.") - return 1 - - -/obj/item/clothing/accessory/bracelet/material - icon_state = "materialbracelet" - -/obj/item/clothing/accessory/bracelet/material/New(var/newloc, var/new_material) - ..(newloc) - if(!new_material) - new_material = MAT_STEEL - material = get_material_by_name(new_material) - if(!istype(material)) - qdel(src) - return - name = "[material.display_name] bracelet" - desc = "A bracelet made from [material.display_name]." - color = material.icon_colour - -/obj/item/clothing/accessory/bracelet/material/get_material() - return material - -/obj/item/clothing/accessory/bracelet/material/wood/New(var/newloc) - ..(newloc, "wood") - -/obj/item/clothing/accessory/bracelet/material/plastic/New(var/newloc) - ..(newloc, "plastic") - -/obj/item/clothing/accessory/bracelet/material/iron/New(var/newloc) - ..(newloc, "iron") - -/obj/item/clothing/accessory/bracelet/material/steel/New(var/newloc) - ..(newloc, "steel") - -/obj/item/clothing/accessory/bracelet/material/silver/New(var/newloc) - ..(newloc, "silver") - -/obj/item/clothing/accessory/bracelet/material/gold/New(var/newloc) - ..(newloc, "gold") - -/obj/item/clothing/accessory/bracelet/material/platinum/New(var/newloc) - ..(newloc, "platinum") - -/obj/item/clothing/accessory/bracelet/material/phoron/New(var/newloc) - ..(newloc, "phoron") - -/obj/item/clothing/accessory/bracelet/material/glass/New(var/newloc) - ..(newloc, "glass") - - ..() - /obj/item/clothing/accessory/halfcape name = "half cape" desc = "A tasteful half-cape, suitible for European nobles and retro anime protagonists." @@ -473,78 +405,6 @@ icon_state = "sash" slot = ACCESSORY_SLOT_OVER -/obj/item/clothing/accessory/wristband - name = "wristband" - desc = "A simple plastic wristband." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection/pink - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection2" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection/les - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection3" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection/trans - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection4" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection/bi - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection5" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristbandcollection/ace - name = "wristband collection" - desc = "A mix of colourable plastic wristbands." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_collection6" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - -/obj/item/clothing/accessory/wristband_spiked - name = "wristband (spiked)" - desc = "A black wristband with short spikes around it." - icon = 'icons/inventory/accessory/item.dmi' - icon_state = "wristband_spiked" - w_class = ITEMSIZE_TINY - slot_flags = SLOT_TIE - slot = ACCESSORY_SLOT_DECOR - //Gaiter scarves /obj/item/clothing/accessory/gaiter name = "red neck gaiter" diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/accessories/accessory_vr.dm similarity index 96% rename from code/modules/clothing/under/accessories/accessory_vr.dm rename to code/modules/clothing/accessories/accessory_vr.dm index 4c8e2c61432..78aaf8354e0 100644 --- a/code/modules/clothing/under/accessories/accessory_vr.dm +++ b/code/modules/clothing/accessories/accessory_vr.dm @@ -5,7 +5,7 @@ /obj/item/clothing/accessory/choker //A colorable, tagless choker name = "plain choker" slot_flags = SLOT_TIE | SLOT_OCLOTHING - desc = "A simple, plain choker. Or maybe it's a collar? Use in-hand to customize it." + desc = "A simple, plain choker. Or maybe it's a collar?" icon = 'icons/inventory/accessory/item_vr.dmi' icon_override = 'icons/inventory/accessory/mob_vr.dmi' icon_state = "choker_cst" @@ -44,18 +44,6 @@ /obj/item/clothing/accessory/choker/dropped() icon_override = icon_previous_override -/obj/item/clothing/accessory/choker/attack_self(mob/user as mob) - if(!customized) - var/design = tgui_input_list(user,"Descriptor?","Pick descriptor","Descriptor", list("plain","simple","ornate","elegant","opulent")) - var/material = tgui_input_list(user,"Material?","Pick material","Material", list("leather","velvet","lace","fabric","latex","plastic","metal","chain","silver","gold","platinum","steel","bead","ruby","sapphire","emerald","diamond")) - var/type = tgui_input_list(user,"Type?","Pick type","Type", list("choker","collar","necklace")) - name = "[design] [material] [type]" - desc = "A [type], made of [material]. It's rather [design]." - customized = 1 - to_chat(usr,span_notice("[src] has now been customized.")) - else - to_chat(usr,span_notice("[src] has already been customized!")) - /obj/item/clothing/accessory/collar slot_flags = SLOT_TIE | SLOT_OCLOTHING icon = 'icons/inventory/accessory/item_vr.dmi' @@ -207,16 +195,16 @@ icon_state = "collar_shk[on]" . = TRUE if("tag") - var/sanitized = tgui_input_text(usr, "Tag text?", "Set Tag", "", MAX_NAME_LEN, encode = TRUE) + var/sanitized = tgui_input_text(ui.user, "Tag text?", "Set Tag", "", MAX_NAME_LEN, encode = TRUE) if(isnull(sanitized)) return if(!length(sanitized)) - to_chat(usr, span_notice("[src]'s tag set to blank.")) + to_chat(ui.user, span_notice("[src]'s tag set to blank.")) name = initial(name) desc = initial(desc) else - to_chat(usr, span_notice("[src]'s tag set to '[sanitized]'.")) + to_chat(ui.user, span_notice("[src]'s tag set to '[sanitized]'.")) name = initial(name) + " ([sanitized])" desc = initial(desc) + " The tag says \"[sanitized]\"." . = TRUE @@ -378,9 +366,9 @@ switch(action) if("size") target_size = clamp((params["size"]/100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) - to_chat(usr, span_notice("You set the size to [target_size * 100]%")) + to_chat(ui.user, span_notice("You set the size to [target_size * 100]%")) if(target_size < RESIZE_MINIMUM || target_size > RESIZE_MAXIMUM) - to_chat(usr, span_notice("Note: Resizing limited to 25-200% automatically while outside dormatory areas.")) //hint that we clamp it in resize + to_chat(ui.user, span_notice("Note: Resizing limited to 25-200% automatically while outside dormatory areas.")) //hint that we clamp it in resize . = TRUE /obj/item/clothing/accessory/collar/shock/bluespace/receive_signal(datum/signal/signal) diff --git a/code/modules/clothing/under/accessories/altevian_vr.dm b/code/modules/clothing/accessories/altevian_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/altevian_vr.dm rename to code/modules/clothing/accessories/altevian_vr.dm diff --git a/code/modules/clothing/under/accessories/armband.dm b/code/modules/clothing/accessories/armband.dm similarity index 100% rename from code/modules/clothing/under/accessories/armband.dm rename to code/modules/clothing/accessories/armband.dm diff --git a/code/modules/clothing/under/accessories/armor.dm b/code/modules/clothing/accessories/armor.dm similarity index 100% rename from code/modules/clothing/under/accessories/armor.dm rename to code/modules/clothing/accessories/armor.dm diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/accessories/badges.dm similarity index 100% rename from code/modules/clothing/under/accessories/badges.dm rename to code/modules/clothing/accessories/badges.dm diff --git a/code/modules/clothing/under/accessories/badges_vr.dm b/code/modules/clothing/accessories/badges_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/badges_vr.dm rename to code/modules/clothing/accessories/badges_vr.dm diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/accessories/clothing.dm similarity index 100% rename from code/modules/clothing/under/accessories/clothing.dm rename to code/modules/clothing/accessories/clothing.dm diff --git a/code/modules/clothing/under/accessories/clothing_vr.dm b/code/modules/clothing/accessories/clothing_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/clothing_vr.dm rename to code/modules/clothing/accessories/clothing_vr.dm diff --git a/code/modules/clothing/accessories/hands.dm b/code/modules/clothing/accessories/hands.dm new file mode 100644 index 00000000000..2ac4386e6a2 --- /dev/null +++ b/code/modules/clothing/accessories/hands.dm @@ -0,0 +1,141 @@ +/obj/item/clothing/accessory/knuckledusters + name = "knuckle dusters" + desc = "A pair of brass knuckles. Generally used to enhance the user's punches." + icon_state = "knuckledusters" + slot = ACCESSORY_SLOT_RING + slot_flags = SLOT_GLOVES + matter = list(MAT_STEEL = 500) + attack_verb = list("punched", "beaten", "struck") + siemens_coefficient = 1 + force = 10 //base punch strength is 5 + punch_force = 5 //added to base punch strength when added as a glove accessory + icon = 'icons/inventory/hands/item.dmi' + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi', + ) + drop_sound = 'sound/items/drop/metalboots.ogg' + pickup_sound = 'sound/items/pickup/toolbox.ogg' + +//bracelets + +/obj/item/clothing/accessory/bracelet + name = "bracelet" + desc = "A simple silver bracelet with a clasp." + icon = 'icons/inventory/accessory/item.dmi' + icon_state = "bracelet" + w_class = ITEMSIZE_TINY + slot_flags = SLOT_GLOVES | SLOT_TIE + slot = ACCESSORY_SLOT_WRIST + +/obj/item/clothing/accessory/bracelet/friendship + name = "friendship bracelet" + desc = "A beautiful friendship bracelet in all the colors of the rainbow." + icon_state = "friendbracelet" + +/obj/item/clothing/accessory/bracelet/friendship/verb/dedicate_bracelet() + set name = "Dedicate Bracelet" + set category = "Object" + set desc = "Dedicate your friendship bracelet to a special someone." + var/mob/M = usr + if(!M.mind) + return 0 + + var/input = sanitizeSafe(input(usr, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN) + + if(src && input && !M.stat && in_range(M,src)) + desc = "A beautiful friendship bracelet in all the colors of the rainbow. It's dedicated to [input]." + to_chat(M, "You dedicate the bracelet to [input], remembering the times you've had together.") + return 1 + + +/obj/item/clothing/accessory/bracelet/material + icon_state = "materialbracelet" + +/obj/item/clothing/accessory/bracelet/material/New(var/newloc, var/new_material) + ..(newloc) + if(!new_material) + new_material = MAT_STEEL + material = get_material_by_name(new_material) + if(!istype(material)) + qdel(src) + return + name = "[material.display_name] bracelet" + desc = "A bracelet made from [material.display_name]." + color = material.icon_colour + +/obj/item/clothing/accessory/bracelet/material/get_material() + return material + +/obj/item/clothing/accessory/bracelet/material/wood/New(var/newloc) + ..(newloc, "wood") + +/obj/item/clothing/accessory/bracelet/material/plastic/New(var/newloc) + ..(newloc, "plastic") + +/obj/item/clothing/accessory/bracelet/material/iron/New(var/newloc) + ..(newloc, "iron") + +/obj/item/clothing/accessory/bracelet/material/steel/New(var/newloc) + ..(newloc, "steel") + +/obj/item/clothing/accessory/bracelet/material/silver/New(var/newloc) + ..(newloc, "silver") + +/obj/item/clothing/accessory/bracelet/material/gold/New(var/newloc) + ..(newloc, "gold") + +/obj/item/clothing/accessory/bracelet/material/platinum/New(var/newloc) + ..(newloc, "platinum") + +/obj/item/clothing/accessory/bracelet/material/phoron/New(var/newloc) + ..(newloc, "phoron") + +/obj/item/clothing/accessory/bracelet/material/glass/New(var/newloc) + ..(newloc, "glass") + +//wristbands + +/obj/item/clothing/accessory/wristband + name = "wristband" + desc = "A simple plastic wristband." + icon = 'icons/inventory/accessory/item.dmi' + icon_state = "wristband" + w_class = ITEMSIZE_TINY + slot_flags = SLOT_GLOVES | SLOT_TIE + slot = ACCESSORY_SLOT_WRIST + +/obj/item/clothing/accessory/wristband/spiked + name = "wristband (spiked)" + desc = "A black wristband with short spikes around it." + icon_state = "wristband_spiked" + +/obj/item/clothing/accessory/wristband/collection + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection" + +/obj/item/clothing/accessory/wristband/collection/pink + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection2" + +/obj/item/clothing/accessory/wristband/collection/les + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection3" + +/obj/item/clothing/accessory/wristband/collection/trans + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection4" + +/obj/item/clothing/accessory/wristband/collection/bi + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection5" + +/obj/item/clothing/accessory/wristband/collection/ace + name = "wristband collection" + desc = "A mix of colourable plastic wristbands." + icon_state = "wristband_collection6" diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/accessories/holster.dm similarity index 100% rename from code/modules/clothing/under/accessories/holster.dm rename to code/modules/clothing/accessories/holster.dm diff --git a/code/modules/clothing/under/accessories/holster_vr.dm b/code/modules/clothing/accessories/holster_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/holster_vr.dm rename to code/modules/clothing/accessories/holster_vr.dm diff --git a/code/modules/clothing/under/accessories/lockets.dm b/code/modules/clothing/accessories/lockets.dm similarity index 100% rename from code/modules/clothing/under/accessories/lockets.dm rename to code/modules/clothing/accessories/lockets.dm diff --git a/code/modules/clothing/under/accessories/permits.dm b/code/modules/clothing/accessories/permits.dm similarity index 100% rename from code/modules/clothing/under/accessories/permits.dm rename to code/modules/clothing/accessories/permits.dm diff --git a/code/modules/clothing/under/accessories/permits_vr.dm b/code/modules/clothing/accessories/permits_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/permits_vr.dm rename to code/modules/clothing/accessories/permits_vr.dm diff --git a/code/modules/clothing/accessories/rings.dm b/code/modules/clothing/accessories/rings.dm new file mode 100644 index 00000000000..361c87c854d --- /dev/null +++ b/code/modules/clothing/accessories/rings.dm @@ -0,0 +1,204 @@ +//Generic Ring + +/obj/item/clothing/accessory/ring + name = "generic ring" + desc = "Torus shaped finger decoration." + icon_state = "material" + drop_sound = 'sound/items/drop/ring.ogg' + slot = ACCESSORY_SLOT_RING + slot_flags = SLOT_GLOVES + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi', + ) + gender = PLURAL + w_class = ITEMSIZE_SMALL + icon = 'icons/inventory/hands/item.dmi' + drop_sound = 'sound/items/drop/ring.ogg' + pickup_sound = 'sound/items/pickup/ring.ogg' + force = 7 //base punch strength is 5 + punch_force = 2 //added to base punch strength when added as a glove accessory + siemens_coefficient = 1 + +///////////////////////////////////////// +//Standard Rings +/obj/item/clothing/accessory/ring/engagement + name = "engagement ring" + desc = "An engagement ring. It certainly looks expensive." + icon_state = "diamond" + +/obj/item/clothing/accessory/ring/engagement/attack_self(mob/user) + user.visible_message(span_warning("\The [user] gets down on one knee, presenting \the [src]."),span_warning("You get down on one knee, presenting \the [src].")) + +/obj/item/clothing/accessory/ring/cti + name = "CTI ring" + desc = "A ring commemorating graduation from CTI." + icon_state = "cti-grad" + +/obj/item/clothing/accessory/ring/mariner + name = "Mariner University ring" + desc = "A ring commemorating graduation from Mariner University." + icon_state = "mariner-grad" + + +///////////////////////////////////////// +//Reagent Rings + +/obj/item/clothing/accessory/ring/reagent + flags = OPENCONTAINER + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 4) + +/obj/item/clothing/accessory/ring/reagent/Initialize() + . = ..() + create_reagents(15) + +/obj/item/clothing/accessory/ring/reagent/equipped(var/mob/living/carbon/human/H) + ..() + if(istype(H) && H.gloves==src) + + if(reagents.total_volume) + to_chat(H, span_danger("You feel a prick as you slip on \the [src].")) + if(H.reagents) + var/contained = reagents.get_reagents() + var/trans = reagents.trans_to_mob(H, 15, CHEM_BLOOD) + add_attack_logs(usr, H, "Injected with [name] containing [contained] transferred [trans] units") + return + +//Sleepy Ring +/obj/item/clothing/accessory/ring/reagent/sleepy + name = "silver ring" + desc = "A ring made from what appears to be silver." + icon_state = "material" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + +/obj/item/clothing/accessory/ring/reagent/sleepy/Initialize() + . = ..() + reagents.add_reagent("chloralhydrate", 15) // Less than a sleepy-pen, but still enough to knock someone out + +///////////////////////////////////////// +//Seals and Signet Rings + +/obj/item/clothing/accessory/ring/seal + var/stamptext = null + +/obj/item/clothing/accessory/ring/seal/secgen + name = "Secretary-General's official seal" + desc = "The official seal of the Secretary-General of the Sol Central Government, featured prominently on a silver ring." + icon_state = "seal-secgen" + +/obj/item/clothing/accessory/ring/seal/mason + name = "\improper Masonic ring" + desc = "The Square and Compasses feature prominently on this Masonic ring." + icon_state = "seal-masonic" + +/obj/item/clothing/accessory/ring/seal/signet + name = "signet ring" + desc = "A signet ring, for when you're too sophisticated to sign letters." + icon_state = "seal-signet" + var/nameset = FALSE + +/obj/item/clothing/accessory/ring/seal/signet/attack_self(mob/user) + if(nameset) + to_chat(user, span_notice("The [src] has already been claimed!")) + return + + to_chat(user, span_notice("You claim the [src] as your own!")) + change_name(user) + nameset = TRUE + +/obj/item/clothing/accessory/ring/seal/signet/proc/change_name(var/signet_name = "Unknown") + name = "[signet_name]'s signet ring" + desc = "A signet ring belonging to [signet_name], for when you're too sophisticated to sign letters." + +/obj/item/clothing/accessory/ring/wedding + name = "golden wedding ring" + desc = "For showing your devotion to another person. It has a golden glimmer to it." + icon = 'icons/inventory/hands/item_vr.dmi' + icon_state = "wedring_g" + item_state = "wedring_g" + var/partnername = "" + +/obj/item/clothing/accessory/ring/wedding/attack_self(mob/user) + partnername = copytext(sanitize(input(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae") as null|text),1,MAX_NAME_LEN) + name = "[initial(name)] - [partnername]" + +/obj/item/clothing/accessory/ring/wedding/silver + name = "silver wedding ring" + desc = "For showing your devotion to another person. It has a silver glimmer to it." + icon_state = "wedring_s" + item_state = "wedring_s" + +///////////////////////////////////////// +//Material Rings +/obj/item/clothing/accessory/ring/material + icon = 'icons/inventory/hands/item.dmi' + icon_state = "material" + +/obj/item/clothing/accessory/ring/material/New(var/newloc, var/new_material) + ..(newloc) + if(!new_material) + new_material = MAT_STEEL + material = get_material_by_name(new_material) + if(!istype(material)) + qdel(src) + return + name = "[material.display_name] ring" + desc = "A ring made from [material.display_name]." + color = material.icon_colour + +/obj/item/clothing/accessory/ring/material/get_material() + return material + +/obj/item/clothing/accessory/ring/material/wood/New(var/newloc) + ..(newloc, MAT_WOOD) + +/obj/item/clothing/accessory/ring/material/plastic/New(var/newloc) + ..(newloc, MAT_PLASTIC) + +/obj/item/clothing/accessory/ring/material/iron/New(var/newloc) + ..(newloc, MAT_IRON) + +/obj/item/clothing/accessory/ring/material/glass/New(var/newloc) + ..(newloc, MAT_GLASS) + +/obj/item/clothing/accessory/ring/material/steel/New(var/newloc) + ..(newloc, MAT_STEEL) + +/obj/item/clothing/accessory/ring/material/silver/New(var/newloc) + ..(newloc, MAT_SILVER) + +/obj/item/clothing/accessory/ring/material/gold/New(var/newloc) + ..(newloc, MAT_GOLD) + +/obj/item/clothing/accessory/ring/material/platinum/New(var/newloc) + ..(newloc, MAT_PLATINUM) + +/obj/item/clothing/accessory/ring/material/phoron/New(var/newloc) + ..(newloc, MAT_PHORON) + +/obj/item/clothing/accessory/ring/material/titanium/New(var/newloc) + ..(newloc, MAT_TITANIUM) + +/obj/item/clothing/accessory/ring/material/copper/New(var/newloc) + ..(newloc, MAT_COPPER) + +/obj/item/clothing/accessory/ring/material/bronze/New(var/newloc) + ..(newloc, MAT_BRONZE) + +/obj/item/clothing/accessory/ring/material/uranium/New(var/newloc) + ..(newloc, MAT_URANIUM) + +/obj/item/clothing/accessory/ring/material/osmium/New(var/newloc) + ..(newloc, MAT_OSMIUM) + +/obj/item/clothing/accessory/ring/material/lead/New(var/newloc) + ..(newloc, MAT_LEAD) + +/obj/item/clothing/accessory/ring/material/diamond/New(var/newloc) + ..(newloc, MAT_DIAMOND) + +/obj/item/clothing/accessory/ring/material/tin/New(var/newloc) + ..(newloc, MAT_TIN) + +/obj/item/clothing/accessory/ring/material/void_opal/New(var/newloc) + ..(newloc, MAT_VOPAL) diff --git a/code/modules/clothing/under/accessories/shiny_vr.dm b/code/modules/clothing/accessories/shiny_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/shiny_vr.dm rename to code/modules/clothing/accessories/shiny_vr.dm diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/accessories/storage.dm similarity index 100% rename from code/modules/clothing/under/accessories/storage.dm rename to code/modules/clothing/accessories/storage.dm diff --git a/code/modules/clothing/under/accessories/storage_vr.dm b/code/modules/clothing/accessories/storage_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/storage_vr.dm rename to code/modules/clothing/accessories/storage_vr.dm diff --git a/code/modules/clothing/under/accessories/temperature/poncho.dm b/code/modules/clothing/accessories/temperature/poncho.dm similarity index 100% rename from code/modules/clothing/under/accessories/temperature/poncho.dm rename to code/modules/clothing/accessories/temperature/poncho.dm diff --git a/code/modules/clothing/under/accessories/torch.dm b/code/modules/clothing/accessories/torch.dm similarity index 100% rename from code/modules/clothing/under/accessories/torch.dm rename to code/modules/clothing/accessories/torch.dm diff --git a/code/modules/clothing/under/accessories/torch_vr.dm b/code/modules/clothing/accessories/torch_vr.dm similarity index 100% rename from code/modules/clothing/under/accessories/torch_vr.dm rename to code/modules/clothing/accessories/torch_vr.dm diff --git a/code/modules/clothing/accessories/watches.dm b/code/modules/clothing/accessories/watches.dm new file mode 100644 index 00000000000..5a93cb94f0e --- /dev/null +++ b/code/modules/clothing/accessories/watches.dm @@ -0,0 +1,72 @@ +/obj/item/clothing/accessory/watch + name = "wristwatch" + desc = "A cheap plastic quartz-based wristwatch. Painfully archaic by modern standards, but there's something charming about it all the same." + icon_state = "wristwatch_basic" + siemens_coefficient = 1 + gender = "neuter" + slot = ACCESSORY_SLOT_WRIST + slot_flags = SLOT_GLOVES + icon = 'icons/inventory/hands/item.dmi' + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi', + ) + sprite_sheets = list( + SPECIES_TESHARI = 'icons/inventory/hands/mob_teshari.dmi', + SPECIES_VOX = 'icons/inventory/hands/mob_vox.dmi' + ) + +/obj/item/clothing/accessory/watch/examine(mob/user) + . = ..() + + if(Adjacent(user)) + . += span_notice("The current station time is [stationtime2text()].") + +/obj/item/clothing/accessory/watch/silver + name = "silver wristwatch" + desc = "A humble silver (or maybe chrome) plated wristwatch. It's quite archaic, but nonetheless classy in its own way." + icon_state = "wristwatch_silver" + +/obj/item/clothing/accessory/watch/gold + name = "gold wristwatch" + desc = "A very fancy gold-plated wristwatch. For when you want to casually show off just how wealthy you are. It even tells the time!" + icon_state = "wristwatch_gold" + +/obj/item/clothing/accessory/watch/survival + name = "survival watch" + desc = "An overengineered wristwatch that purports to be both space and water proof, and includes a compass, micro GPS beacon, and temperature and pressure sensors. The beacon is off by default, and can only transmit its location: it cannot scan for other signals." + description_fluff = "Hold ALT whilst left-clicking on the survival watch to toggle the status of its micro-beacon." + icon_state = "wristwatch_survival" + + var/obj/item/gps/gps = null + +/obj/item/clothing/accessory/watch/survival/examine(mob/user) + . = ..() + + if(Adjacent(user)) + . += span_notice("You are currently facing [dir2text(user.dir)]. The micro beacon is [gps.tracking ? "on" : "off"].") + var/TB = user.loc + if(istype(TB, /turf/)) //no point returning light level if we're not on a turf (might be *in* someone!) + var/turf/TL = TB + var/light_level = TL.get_lumcount() + if(light_level) + . += span_notice("Light Level: [TL.get_lumcount()]") + else + . += span_notice("It's too dark to see the light level!") + if(istype(TB, /turf/simulated)) //no point returning atmospheric data from unsimulated tiles (they don't track pressure anyway, only temperature) + var/turf/simulated/T = TB + var/datum/gas_mixture/env = T.return_air() + . += span_notice("Pressure: [env.return_pressure()]kPa / Temperature: [env.temperature]K ") + +/obj/item/clothing/accessory/watch/survival/New() + gps = new/obj/item/gps/watch(src) + +/obj/item/gps/watch + gps_tag = "SRV-WTCH" + +/obj/item/clothing/accessory/watch/survival/AltClick(mob/user) + . = ..() + + if(Adjacent(user)) + gps.tracking = !gps.tracking + to_chat(user,span_notice("You turn the micro beacon [gps.tracking ? "on" : "off"].")) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 45f808a1488..9f8d9e9db24 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -326,6 +326,13 @@ drop_sound = 'sound/items/drop/gloves.ogg' pickup_sound = 'sound/items/pickup/gloves.ogg' + valid_accessory_slots = (\ + ACCESSORY_SLOT_RING\ + |ACCESSORY_SLOT_WRIST) + restricted_accessory_slots = (\ + ACCESSORY_SLOT_RING\ + |ACCESSORY_SLOT_WRIST) + /obj/item/clothing/proc/set_clothing_index() return @@ -422,8 +429,6 @@ if(special_attack_type && ispath(special_attack_type)) special_attack = new special_attack_type - - ///////////////////////////////////////////////////////////////////// //Rings @@ -849,7 +854,9 @@ |ACCESSORY_SLOT_TIE\ |ACCESSORY_SLOT_RANK\ |ACCESSORY_SLOT_DEPT\ - |ACCESSORY_SLOT_OVER) + |ACCESSORY_SLOT_OVER\ + |ACCESSORY_SLOT_RING\ + |ACCESSORY_SLOT_WRIST) restricted_accessory_slots = (\ ACCESSORY_SLOT_UTILITY\ |ACCESSORY_SLOT_WEAPON\ diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 572f45c0b5d..f2002c95c65 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -422,6 +422,7 @@ BLIND // can't see anything icon_state = "blindfold" item_state_slots = list(slot_r_hand_str = "blindfold", slot_l_hand_str = "blindfold") flash_protection = FLASH_PROTECTION_MAJOR + body_parts_covered = EYES tint = BLIND drop_sound = 'sound/items/drop/gloves.ogg' pickup_sound = 'sound/items/pickup/gloves.ogg' @@ -436,6 +437,7 @@ BLIND // can't see anything desc = "A thin blindfold to help protect sensitive eyes while still allowing some sight" icon_state = "blindfoldwhite" flash_protection = FLASH_PROTECTION_MODERATE //not as thick, only offers some protection + body_parts_covered = EYES tint = TINT_HEAVY /obj/item/clothing/glasses/sunglasses/blindfold/tape @@ -445,6 +447,7 @@ BLIND // can't see anything icon_state = "tape_cross" item_state_slots = list(slot_r_hand_str = null, slot_l_hand_str = null) w_class = ITEMSIZE_TINY + body_parts_covered = EYES /obj/item/clothing/glasses/sunglasses/prescription name = "prescription sunglasses" diff --git a/code/modules/clothing/gloves/antagonist.dm b/code/modules/clothing/gloves/antagonist.dm index 83e595a0ddd..34574e2e538 100644 --- a/code/modules/clothing/gloves/antagonist.dm +++ b/code/modules/clothing/gloves/antagonist.dm @@ -88,70 +88,3 @@ if(proximity && istype(usr, /mob/living/carbon/human) && do_after(usr, 1 SECOND, A)) return pickpocket(usr, A, proximity) return 0 - -// Buzzer Ring - Traitor, Merc. -/obj/item/clothing/gloves/ring/buzzer - name = "ring" - desc = "A plain metal band." - description_antag = "This morphium-alloy ring continually generates an electric field, capable of electrocuting a target while not injuring the wearer.\ - The device is also capable of 'frankenstein'-ing a corpse, long after normal technology would be able to save them. The body will still be tied to the\ - normal damage limits for survival, however, so care must be taken." - icon_state = "material" - var/battery_type = /obj/item/cell/device/weapon/recharge - var/obj/item/cell/battery = null - -/obj/item/clothing/gloves/ring/buzzer/get_cell() - return battery - -/obj/item/clothing/gloves/ring/buzzer/Initialize() - . = ..() - if(!battery) - battery = new battery_type(src) - -/obj/item/clothing/gloves/ring/buzzer/Touch(var/atom/A, var/proximity) - if(proximity && istype(usr, /mob/living/carbon/human)) - return zap(usr, A, proximity) - return 0 - -/obj/item/clothing/gloves/ring/buzzer/proc/zap(var/mob/living/carbon/human/user, var/atom/movable/target, var/proximity) - . = FALSE - if(user.a_intent == I_HURT && battery.percent() >= 50) - if(isliving(target)) - var/mob/living/L = target - - if(ishuman(L) && battery.percent() >= 90) // Silent text-wise, for maximum potential for gimmicks. - var/mob/living/carbon/human/H = L - - if(H.stat == DEAD) - . = TRUE - - do_defib(H) - - to_chat(L, span_warning("You feel a powerful shock!")) - if(!.) - playsound(L, 'sound/effects/sparks7.ogg', 40, 1) - L.electrocute_act(battery.percent() * 0.25, src) - battery.emp_act(2) - return . - - return 0 - -/obj/item/clothing/gloves/ring/buzzer/proc/do_defib(var/mob/living/carbon/human/H = null) - if(!istype(H)) - return 0 - - dead_mob_list.Remove(H) - if((H in living_mob_list) || (H in dead_mob_list)) - WARNING("Mob [H] was ring-defibbed but already in the living or dead list still!") - living_mob_list += H - - H.timeofdeath = 0 - H.set_stat(UNCONSCIOUS) - H.failed_last_breath = 0 - H.reload_fullscreen() - - H.emote("gasp") - H.Weaken(rand(10,25)) - H.updatehealth() - - battery.emp_act(1) diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 32012ed330c..f71010a2325 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -100,3 +100,6 @@ name = "fingerless gloves" icon_state = "fingerlessgloves_rc" fingerprint_chance = 100 + +/obj/item/clothing/gloves/fingerless_recolourable/alt + icon_state = "fingerlessgloves_rc_alt" diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 3862469c857..31e641348a5 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -121,21 +121,6 @@ heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE -/obj/item/clothing/gloves/knuckledusters - name = "knuckle dusters" - desc = "A pair of brass knuckles. Generally used to enhance the user's punches." - icon_state = "knuckledusters" - matter = list(MAT_STEEL = 500) - attack_verb = list("punched", "beaten", "struck") - flags = THICKMATERIAL // Stops rings from increasing hit strength - siemens_coefficient = 1 - fingerprint_chance = 100 - overgloves = 1 - force = 5 - punch_force = 5 - drop_sound = 'sound/items/drop/metalboots.ogg' - pickup_sound = 'sound/items/pickup/toolbox.ogg' - /obj/item/clothing/gloves/ranger var/glovecolor = "white" name = "ranger gloves" @@ -172,65 +157,3 @@ name = "water wings" desc = "Swim aids designed to help a wearer float in water and learn to swim." icon_state = "waterwings" - -/obj/item/clothing/gloves/watch - name = "wristwatch" - desc = "A cheap plastic quartz-based wristwatch. Painfully archaic by modern standards, but there's something charming about it all the same." - icon_state = "wristwatch_basic" - siemens_coefficient = 1 - gender = "neuter" - -/obj/item/clothing/gloves/watch/examine(mob/user) - . = ..() - - if(Adjacent(user)) - . += span_notice("The current station time is [stationtime2text()].") - -/obj/item/clothing/gloves/watch/silver - name = "silver wristwatch" - desc = "A humble silver (or maybe chrome) plated wristwatch. It's quite archaic, but nonetheless classy in its own way." - icon_state = "wristwatch_silver" - -/obj/item/clothing/gloves/watch/gold - name = "gold wristwatch" - desc = "A very fancy gold-plated wristwatch. For when you want to casually show off just how wealthy you are. It even tells the time!" - icon_state = "wristwatch_gold" - -/obj/item/clothing/gloves/watch/survival - name = "survival watch" - desc = "An overengineered wristwatch that purports to be both space and water proof, and includes a compass, micro GPS beacon, and temperature and pressure sensors. The beacon is off by default, and can only transmit its location: it cannot scan for other signals." - description_fluff = "Hold ALT whilst left-clicking on the survival watch to toggle the status of its micro-beacon." - icon_state = "wristwatch_survival" - - var/obj/item/gps/gps = null - -/obj/item/clothing/gloves/watch/survival/examine(mob/user) - . = ..() - - if(Adjacent(user) && src.loc == user) - . += span_notice("You are currently facing [dir2text(user.dir)]. The micro beacon is [gps.tracking ? "on" : "off"].") - var/TB = src.loc.loc - if(istype(TB, /turf/)) //no point returning light level if we're not on a turf (might be *in* someone!) - var/turf/TL = TB - var/light_level = TL.get_lumcount() - if(light_level) - . += span_notice("Light Level: [TL.get_lumcount()]") - else - . += span_notice("It's too dark to see the light level!") - if(istype(TB, /turf/simulated)) //no point returning atmospheric data from unsimulated tiles (they don't track pressure anyway, only temperature) - var/turf/simulated/T = TB - var/datum/gas_mixture/env = T.return_air() - . += span_notice("Pressure: [env.return_pressure()]kPa / Temperature: [env.temperature]K ") - -/obj/item/clothing/gloves/watch/survival/New() - gps = new/obj/item/gps/watch(src) - -/obj/item/gps/watch - gps_tag = "SRV-WTCH" - -/obj/item/clothing/gloves/watch/survival/AltClick(mob/user) - . = ..() - - if(Adjacent(user)) - gps.tracking = !gps.tracking - to_chat(user,span_notice("You turn the micro beacon [gps.tracking ? "on" : "off"].")) diff --git a/code/modules/clothing/rings/material.dm b/code/modules/clothing/rings/material.dm deleted file mode 100644 index 30242fef66e..00000000000 --- a/code/modules/clothing/rings/material.dm +++ /dev/null @@ -1,74 +0,0 @@ -///////////////////////////////////////// -//Material Rings -/obj/item/clothing/gloves/ring/material - icon = 'icons/inventory/hands/item.dmi' - icon_state = "material" - -/obj/item/clothing/gloves/ring/material/New(var/newloc, var/new_material) - ..(newloc) - if(!new_material) - new_material = MAT_STEEL - material = get_material_by_name(new_material) - if(!istype(material)) - qdel(src) - return - name = "[material.display_name] ring" - desc = "A ring made from [material.display_name]." - color = material.icon_colour - -/obj/item/clothing/gloves/ring/material/get_material() - return material - -/obj/item/clothing/gloves/ring/material/wood/New(var/newloc) - ..(newloc, MAT_WOOD) - -/obj/item/clothing/gloves/ring/material/plastic/New(var/newloc) - ..(newloc, MAT_PLASTIC) - -/obj/item/clothing/gloves/ring/material/iron/New(var/newloc) - ..(newloc, MAT_IRON) - -/obj/item/clothing/gloves/ring/material/glass/New(var/newloc) - ..(newloc, MAT_GLASS) - -/obj/item/clothing/gloves/ring/material/steel/New(var/newloc) - ..(newloc, MAT_STEEL) - -/obj/item/clothing/gloves/ring/material/silver/New(var/newloc) - ..(newloc, MAT_SILVER) - -/obj/item/clothing/gloves/ring/material/gold/New(var/newloc) - ..(newloc, MAT_GOLD) - -/obj/item/clothing/gloves/ring/material/platinum/New(var/newloc) - ..(newloc, MAT_PLATINUM) - -/obj/item/clothing/gloves/ring/material/phoron/New(var/newloc) - ..(newloc, MAT_PHORON) - -/obj/item/clothing/gloves/ring/material/titanium/New(var/newloc) - ..(newloc, MAT_TITANIUM) - -/obj/item/clothing/gloves/ring/material/copper/New(var/newloc) - ..(newloc, MAT_COPPER) - -/obj/item/clothing/gloves/ring/material/bronze/New(var/newloc) - ..(newloc, MAT_BRONZE) - -/obj/item/clothing/gloves/ring/material/uranium/New(var/newloc) - ..(newloc, MAT_URANIUM) - -/obj/item/clothing/gloves/ring/material/osmium/New(var/newloc) - ..(newloc, MAT_OSMIUM) - -/obj/item/clothing/gloves/ring/material/lead/New(var/newloc) - ..(newloc, MAT_LEAD) - -/obj/item/clothing/gloves/ring/material/diamond/New(var/newloc) - ..(newloc, MAT_DIAMOND) - -/obj/item/clothing/gloves/ring/material/tin/New(var/newloc) - ..(newloc, MAT_TIN) - -/obj/item/clothing/gloves/ring/material/void_opal/New(var/newloc) - ..(newloc, MAT_VOPAL) \ No newline at end of file diff --git a/code/modules/clothing/rings/rings.dm b/code/modules/clothing/rings/rings.dm deleted file mode 100644 index 34678198e74..00000000000 --- a/code/modules/clothing/rings/rings.dm +++ /dev/null @@ -1,96 +0,0 @@ -//Generic Ring - -/obj/item/clothing/gloves/ring - name = "generic ring" - desc = "Torus shaped finger decoration." - icon_state = "material" - drop_sound = 'sound/items/drop/ring.ogg' - -///////////////////////////////////////// -//Standard Rings -/obj/item/clothing/gloves/ring/engagement - name = "engagement ring" - desc = "An engagement ring. It certainly looks expensive." - icon_state = "diamond" - -/obj/item/clothing/gloves/ring/engagement/attack_self(mob/user) - user.visible_message(span_warning("\The [user] gets down on one knee, presenting \the [src]."),span_warning("You get down on one knee, presenting \the [src].")) - -/obj/item/clothing/gloves/ring/cti - name = "CTI ring" - desc = "A ring commemorating graduation from CTI." - icon_state = "cti-grad" - -/obj/item/clothing/gloves/ring/mariner - name = "Mariner University ring" - desc = "A ring commemorating graduation from Mariner University." - icon_state = "mariner-grad" - - -///////////////////////////////////////// -//Reagent Rings - -/obj/item/clothing/gloves/ring/reagent - flags = OPENCONTAINER - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 4) - -/obj/item/clothing/gloves/ring/reagent/New() - ..() - create_reagents(15) - -/obj/item/clothing/gloves/ring/reagent/equipped(var/mob/living/carbon/human/H) - ..() - if(istype(H) && H.gloves==src) - - if(reagents.total_volume) - to_chat(H, span_danger("You feel a prick as you slip on \the [src].")) - if(H.reagents) - var/contained = reagents.get_reagents() - var/trans = reagents.trans_to_mob(H, 15, CHEM_BLOOD) - add_attack_logs(usr, H, "Injected with [name] containing [contained] transferred [trans] units") - return - -//Sleepy Ring -/obj/item/clothing/gloves/ring/reagent/sleepy - name = "silver ring" - desc = "A ring made from what appears to be silver." - icon_state = "material" - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - -/obj/item/clothing/gloves/ring/reagent/sleepy/New() - ..() - reagents.add_reagent("chloralhydrate", 15) // Less than a sleepy-pen, but still enough to knock someone out - -///////////////////////////////////////// -//Seals and Signet Rings - -/obj/item/clothing/gloves/ring/seal - var/stamptext = null -/obj/item/clothing/gloves/ring/seal/secgen - name = "Secretary-General's official seal" - desc = "The official seal of the Secretary-General of the Sol Central Government, featured prominently on a silver ring." - icon_state = "seal-secgen" - -/obj/item/clothing/gloves/ring/seal/mason - name = "\improper Masonic ring" - desc = "The Square and Compasses feature prominently on this Masonic ring." - icon_state = "seal-masonic" - -/obj/item/clothing/gloves/ring/seal/signet - name = "signet ring" - desc = "A signet ring, for when you're too sophisticated to sign letters." - icon_state = "seal-signet" - var/nameset = FALSE - -/obj/item/clothing/gloves/ring/seal/signet/attack_self(mob/user) - if(nameset) - to_chat(user, span_notice("The [src] has already been claimed!")) - return - - to_chat(user, span_notice("You claim the [src] as your own!")) - change_name(user) - nameset = TRUE - -/obj/item/clothing/gloves/ring/seal/signet/proc/change_name(var/signet_name = "Unknown") - name = "[signet_name]'s signet ring" - desc = "A signet ring belonging to [signet_name], for when you're too sophisticated to sign letters." diff --git a/code/modules/clothing/rings/rings_vr.dm b/code/modules/clothing/rings/rings_vr.dm deleted file mode 100644 index 45306a7acc1..00000000000 --- a/code/modules/clothing/rings/rings_vr.dm +++ /dev/null @@ -1,17 +0,0 @@ -/obj/item/clothing/gloves/ring/wedding - name = "golden wedding ring" - desc = "For showing your devotion to another person. It has a golden glimmer to it." - icon = 'icons/inventory/hands/item_vr.dmi' - icon_state = "wedring_g" - item_state = "wedring_g" - var/partnername = "" - -/obj/item/clothing/gloves/ring/wedding/attack_self(mob/user) - partnername = copytext(sanitize(input(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae") as null|text),1,MAX_NAME_LEN) - name = "[initial(name)] - [partnername]" - -/obj/item/clothing/gloves/ring/wedding/silver - name = "silver wedding ring" - desc = "For showing your devotion to another person. It has a silver glimmer to it." - icon_state = "wedring_s" - item_state = "wedring_s" diff --git a/code/modules/clothing/spacesuits/rig/rig_tgui.dm b/code/modules/clothing/spacesuits/rig/rig_tgui.dm index 94bc0186088..2aa11cd8595 100644 --- a/code/modules/clothing/spacesuits/rig/rig_tgui.dm +++ b/code/modules/clothing/spacesuits/rig/rig_tgui.dm @@ -11,7 +11,7 @@ /obj/item/rig/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui, datum/tgui_state/custom_state) ui = SStgui.try_update_ui(user, src, ui) if(!ui) - ui = new(user, src, (loc != usr ? ai_interface_path : interface_path), interface_title) + ui = new(user, src, (loc != user ? ai_interface_path : interface_path), interface_title) ui.open() if(custom_state) ui.set_state(custom_state) @@ -120,19 +120,19 @@ /* * tgui_act() is the TGUI equivelent of Topic(). It's responsible for all of the "actions" you can take in the UI. */ -/obj/item/rig/tgui_act(action, params) +/obj/item/rig/tgui_act(action, params, datum/tgui/ui) // This parent call is very important, as it's responsible for invoking tgui_status and checking our state's rules. if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("toggle_seals") - toggle_seals(usr) + toggle_seals(ui.user) . = TRUE if("toggle_cooling") - toggle_cooling(usr) // cooling toggles have its own to_chats, tbf + toggle_cooling(ui.user) // cooling toggles have its own to_chats, tbf . = TRUE if("toggle_ai_control") ai_override_enabled = !ai_override_enabled @@ -142,9 +142,9 @@ locked = !locked . = TRUE if("toggle_piece") - if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying)) + if(ishuman(ui.user) && (ui.user.stat || ui.user.stunned || ui.user.lying)) return FALSE - toggle_piece(params["piece"], usr) + toggle_piece(params["piece"], ui.user) . = TRUE if("interact_module") var/module_index = text2num(params["module"]) @@ -168,5 +168,5 @@ module.charge_selected = params["charge_type"] . = TRUE if("tank_settings") - air_supply?.attack_self(usr) + air_supply?.attack_self(ui.user) . = TRUE diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index 3539153b7bb..788128c299c 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -60,7 +60,7 @@ data["bloodsamp_desc"] = (bloodsamp ? (bloodsamp.desc ? bloodsamp.desc : "No information on record.") : "") return data -/obj/machinery/dnaforensics/tgui_act(action, list/params) +/obj/machinery/dnaforensics/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE @@ -77,10 +77,10 @@ if(bloodsamp) scanner_progress = 0 scanning = TRUE - to_chat(usr, span_notice("Scan initiated.")) + to_chat(ui.user, span_notice("Scan initiated.")) update_icon() else - to_chat(usr, span_warning("Insert an item to scan.")) + to_chat(ui.user, span_warning("Insert an item to scan.")) . = TRUE if("ejectItem") diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 652b23757a2..914dfbf9485 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -93,7 +93,7 @@ log transactions var/obj/item/card/id/idcard = I if(!held_card) - usr.drop_item() + user.drop_item() idcard.loc = src held_card = idcard if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number) @@ -187,20 +187,20 @@ log transactions // This is also a logout if("insert_card") if(held_card) - release_held_id(usr) + release_held_id(ui.user) else if(emagged > 0) - to_chat(usr, span_boldwarning("[icon2html(src, usr.client)] The ATM card reader rejected your ID because this machine has been sabotaged!")) + to_chat(ui.user, span_boldwarning("[icon2html(src, ui.user.client)] The ATM card reader rejected your ID because this machine has been sabotaged!")) else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item(src) + ui.user.drop_item(src) held_card = I . = TRUE if("logout") if(held_card) - release_held_id(usr) + release_held_id(ui.user) authenticated_account = null . = TRUE @@ -294,7 +294,7 @@ log transactions // check if they have low security enabled if(!tried_account_num) - scan_user(usr) + scan_user(ui.user) else authenticated_account = attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1) @@ -317,11 +317,11 @@ log transactions T.time = stationtime2text() failed_account.transaction_log.Add(T) else - to_chat(usr, span_warning("[icon2html(src, usr.client)] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining.")) + to_chat(ui.user, span_warning("[icon2html(src, ui.user.client)] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining.")) previous_account_number = tried_account_num playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1) else - to_chat(usr, span_warning("[icon2html(src, usr.client)] incorrect pin/account combination entered.")) + to_chat(ui.user, span_warning("[icon2html(src, ui.user.client)] incorrect pin/account combination entered.")) number_incorrect_tries = 0 else playsound(src, 'sound/machines/twobeep.ogg', 50, 1) @@ -337,7 +337,7 @@ log transactions T.time = stationtime2text() authenticated_account.transaction_log.Add(T) - to_chat(usr, span_notice("[icon2html(src, usr.client)] Access granted. Welcome user '[authenticated_account.owner_name].'")) + to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Access granted. Welcome user '[authenticated_account.owner_name].'")) previous_account_number = tried_account_num . = TRUE @@ -348,12 +348,12 @@ log transactions var/transfer_amount = text2num(params["funds_amount"]) transfer_amount = round(transfer_amount, 0.01) if(transfer_amount <= 0) - tgui_alert_async(usr, "That is not a valid amount.") + tgui_alert_async(ui.user, "That is not a valid amount.") else if(transfer_amount <= authenticated_account.money) var/target_account_number = text2num(params["target_acc_number"]) var/transfer_purpose = params["purpose"] if(charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount)) - to_chat(usr, "[icon2html(src, usr.client)]" + span_info("Funds transfer successful.")) + to_chat(ui.user, "[icon2html(src, ui.user.client)]" + span_info("Funds transfer successful.")) authenticated_account.money -= transfer_amount //create an entry in the account transaction log @@ -366,17 +366,17 @@ log transactions T.amount = "([transfer_amount])" authenticated_account.transaction_log.Add(T) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Funds transfer failed.")) + to_chat(ui.user, "[icon2html(src, ui.user.client)]" + span_warning("Funds transfer failed.")) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("You don't have enough funds to do that!")) + to_chat(ui.user, "[icon2html(src, ui.user.client)]" + span_warning("You don't have enough funds to do that!")) . = TRUE if("e_withdrawal") var/amount = max(text2num(params["funds_amount"]),0) amount = round(amount, 0.01) if(amount <= 0) - tgui_alert_async(usr, "That is not a valid amount.") + tgui_alert_async(ui.user, "That is not a valid amount.") return if(!authenticated_account) @@ -389,7 +389,7 @@ log transactions authenticated_account.money -= amount // spawn_money(amount,src.loc) - spawn_ewallet(amount,src.loc,usr) + spawn_ewallet(amount,src.loc,ui.user) //create an entry in the account transaction log var/datum/transaction/T = new() @@ -401,14 +401,14 @@ log transactions T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("You don't have enough funds to do that!")) + to_chat(ui.user, "[icon2html(src, ui.user.client)]" + span_warning("You don't have enough funds to do that!")) . = TRUE if("withdrawal") var/amount = max(text2num(params["funds_amount"]),0) amount = round(amount, 0.01) if(amount <= 0) - tgui_alert_async(usr, "That is not a valid amount.") + tgui_alert_async(ui.user, "That is not a valid amount.") return if(!authenticated_account) @@ -420,7 +420,7 @@ log transactions //remove the money authenticated_account.money -= amount - spawn_money(amount,src.loc,usr) + spawn_money(amount,src.loc,ui.user) //create an entry in the account transaction log var/datum/transaction/T = new() @@ -432,7 +432,7 @@ log transactions T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("You don't have enough funds to do that!")) + to_chat(ui.user, "[icon2html(src, ui.user.client)]" + span_warning("You don't have enough funds to do that!")) . = TRUE if(.) diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 65573cdc57f..c0b352d790e 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -127,12 +127,12 @@ creating_new_account = 1 if("add_funds") - var/amount = tgui_input_number(usr, "Enter the amount you wish to add", "Silently add funds") + var/amount = tgui_input_number(ui.user, "Enter the amount you wish to add", "Silently add funds") if(detailed_account_view) detailed_account_view.money = min(detailed_account_view.money + amount, fund_cap) if("remove_funds") - var/amount = tgui_input_number(usr, "Enter the amount you wish to remove", "Silently remove funds") + var/amount = tgui_input_number(ui.user, "Enter the amount you wish to remove", "Silently remove funds") if(detailed_account_view) detailed_account_view.money = max(detailed_account_view.money - amount, -fund_cap) @@ -164,15 +164,15 @@ if(held_card) held_card.loc = src.loc - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(held_card) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(held_card) held_card = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) var/obj/item/card/id/C = I - usr.drop_item() + ui.user.drop_item() C.loc = src held_card = C @@ -278,4 +278,4 @@ "} P.info = text - state("The terminal prints out a report.") \ No newline at end of file + state("The terminal prints out a report.") diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index 6a4506a3624..a397da77b7f 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -294,8 +294,8 @@ GLOBAL_LIST_EMPTY(vending_products) * Takes payment for whatever is the currently_vending item. Returns 1 if * successful, 0 if failed. */ -/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet) - visible_message(span_info("\The [usr] swipes \the [wallet] through \the [src].")) +/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet, mob/user) + visible_message(span_info("\The [user] swipes \the [wallet] through \the [src].")) playsound(src, 'sound/machines/id_swipe.ogg', 50, 1) if(currently_vending.price > wallet.worth) to_chat(usr, span_warning("Insufficient funds on chargecard.")) @@ -327,7 +327,7 @@ GLOBAL_LIST_EMPTY(vending_products) // Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is // empty at high security levels if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) - var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction") + var/attempt_pin = tgui_input_number(M, "Enter pin code", "Vendor transaction") customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2) if(!customer_account) @@ -472,10 +472,10 @@ GLOBAL_LIST_EMPTY(vending_products) return data -/obj/machinery/vending/tgui_act(action, params) +/obj/machinery/vending/tgui_act(action, params, datum/tgui/ui) if(stat & (BROKEN|NOPOWER)) return - if(usr.stat || usr.restrained()) + if(ui.user.stat || ui.user.restrained()) return if(..()) return TRUE @@ -483,32 +483,32 @@ GLOBAL_LIST_EMPTY(vending_products) . = TRUE switch(action) if("remove_coin") - if(issilicon(usr)) + if(issilicon(ui.user)) return FALSE if(!coin) - to_chat(usr, span_filter_notice("There is no coin in this machine.")) + to_chat(ui.user, span_filter_notice("There is no coin in this machine.")) return coin.forceMove(src.loc) - if(!usr.get_active_hand()) - usr.put_in_hands(coin) + if(!ui.user.get_active_hand()) + ui.user.put_in_hands(coin) - to_chat(usr, span_notice("You remove \the [coin] from \the [src].")) + to_chat(ui.user, span_notice("You remove \the [coin] from \the [src].")) coin = null categories &= ~CAT_COIN return TRUE if("vend") if(!vend_ready) - to_chat(usr, span_warning("[src] is busy!")) + to_chat(ui.user, span_warning("[src] is busy!")) return - if(!allowed(usr) && !emagged && scan_id) - to_chat(usr, span_warning("Access denied.")) //Unless emagged of course + if(!allowed(ui.user) && !emagged && scan_id) + to_chat(ui.user, span_warning("Access denied.")) //Unless emagged of course flick("[icon_state]-deny",src) playsound(src, 'sound/machines/deniedbeep.ogg', 50, 0) return if(panel_open) - to_chat(usr, span_warning("[src] cannot dispense products while its service panel is open!")) + to_chat(ui.user, span_warning("[src] cannot dispense products while its service panel is open!")) return var/key = text2num(params["vend"]) @@ -518,27 +518,27 @@ GLOBAL_LIST_EMPTY(vending_products) if(!(R.category & categories)) return - if(!can_buy(R, usr)) + if(!can_buy(R, ui.user)) return if(R.price <= 0) - vend(R, usr) - add_fingerprint(usr) + vend(R, ui.user) + add_fingerprint(ui.user) return TRUE - if(issilicon(usr)) //If the item is not free, provide feedback if a synth is trying to buy something. - to_chat(usr, span_danger("Lawed unit recognized. Lawed units cannot complete this transaction. Purchase canceled.")) + if(issilicon(ui.user)) //If the item is not free, provide feedback if a synth is trying to buy something. + to_chat(ui.user, span_danger("Lawed unit recognized. Lawed units cannot complete this transaction. Purchase canceled.")) return - if(!ishuman(usr)) + if(!ishuman(ui.user)) return vend_ready = FALSE // From this point onwards, vendor is locked to performing this transaction only, until it is resolved. - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = ui.user var/obj/item/card/id/C = H.GetIdCard() if(!vendor_account || vendor_account.suspended) - to_chat(usr, span_filter_notice("Vendor account offline. Unable to process transaction.")) + to_chat(ui.user, span_filter_notice("Vendor account offline. Unable to process transaction.")) flick("[icon_state]-deny",src) vend_ready = TRUE return @@ -547,27 +547,27 @@ GLOBAL_LIST_EMPTY(vending_products) var/paid = FALSE - if(istype(usr.get_active_hand(), /obj/item/spacecash)) - var/obj/item/spacecash/cash = usr.get_active_hand() - paid = pay_with_cash(cash, usr) - else if(istype(usr.get_active_hand(), /obj/item/spacecash/ewallet)) - var/obj/item/spacecash/ewallet/wallet = usr.get_active_hand() - paid = pay_with_ewallet(wallet) + if(istype(ui.user.get_active_hand(), /obj/item/spacecash)) + var/obj/item/spacecash/cash = ui.user.get_active_hand() + paid = pay_with_cash(cash, ui.user) + else if(istype(ui.user.get_active_hand(), /obj/item/spacecash/ewallet)) + var/obj/item/spacecash/ewallet/wallet = ui.user.get_active_hand() + paid = pay_with_ewallet(wallet, ui.user) else if(istype(C, /obj/item/card)) - paid = pay_with_card(C, usr) - /*else if(usr.can_advanced_admin_interact()) - to_chat(usr, span_notice("Vending object due to admin interaction.")) + paid = pay_with_card(C, ui.user) + /*else if(ui.user.can_advanced_admin_interact()) + to_chat(ui.user, span_notice("Vending object due to admin interaction.")) paid = TRUE*/ else - to_chat(usr, span_warning("Payment failure: you have no ID or other method of payment.")) + to_chat(ui.user, span_warning("Payment failure: you have no ID or other method of payment.")) vend_ready = TRUE flick("[icon_state]-deny",src) return TRUE // we set this because they shouldn't even be able to get this far, and we want the UI to update. if(paid) - vend(currently_vending, usr) // vend will handle vend_ready + vend(currently_vending, ui.user) // vend will handle vend_ready . = TRUE else - to_chat(usr, span_warning("Payment failure: unable to process payment.")) + to_chat(ui.user, span_warning("Payment failure: unable to process payment.")) vend_ready = TRUE if("togglevoice") diff --git a/code/modules/economy/vending_machines.dm b/code/modules/economy/vending_machines.dm index 7942381c9d1..4663e9bb54f 100644 --- a/code/modules/economy/vending_machines.dm +++ b/code/modules/economy/vending_machines.dm @@ -415,7 +415,12 @@ /obj/item/stack/medical/advanced/ointment = 6, /obj/item/stack/medical/splint = 4, /obj/item/storage/pill_bottle/carbon = 2, - /obj/item/clothing/mask/chewable/candy/lolli = 15) + /obj/item/clothing/mask/chewable/candy/lolli = 15, + /obj/item/storage/box/khcrystal = 4, + /obj/item/backup_implanter = 3, + /obj/item/clothing/glasses/omnihud/med = 4, + /obj/item/glasses_kit = 1, + /obj/item/storage/quickdraw/syringe_case = 4) contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/stox = 4, /obj/item/reagent_containers/pill/antitox = 6) @@ -448,7 +453,8 @@ products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, - /obj/item/healthanalyzer = 1) + /obj/item/healthanalyzer = 1, + /obj/item/bodybag/cryobag = 2) contraband = list(/obj/item/reagent_containers/syringe/antitoxin = 4, /obj/item/reagent_containers/syringe/antiviral = 4, /obj/item/reagent_containers/pill/tox = 1) @@ -467,14 +473,19 @@ /obj/item/reagent_containers/syringe/antitoxin = 3, /obj/item/stack/medical/bruise_pack = 3, /obj/item/stack/medical/ointment =3, - /obj/item/healthanalyzer = 3) + /obj/item/healthanalyzer = 3, + /obj/item/bodybag/cryobag = 3) contraband = list(/obj/item/reagent_containers/pill/tox = 3) req_log_access = access_cmo has_logs = 1 can_rotate = 0 /obj/machinery/vending/wallmed1/public - products = list(/obj/item/stack/medical/bruise_pack = 8,/obj/item/stack/medical/ointment = 8,/obj/item/reagent_containers/hypospray/autoinjector = 16,/obj/item/healthanalyzer = 4) + products = list(/obj/item/stack/medical/bruise_pack = 8, + /obj/item/stack/medical/ointment = 8, + /obj/item/reagent_containers/hypospray/autoinjector = 16, + /obj/item/healthanalyzer = 4, + /obj/item/bodybag/cryobag = 4) /obj/machinery/vending/security name = "SecTech" @@ -488,9 +499,15 @@ /obj/item/flash = 5, /obj/item/reagent_containers/food/snacks/donut/plain = 6, /obj/item/reagent_containers/food/snacks/donut/plain/jelly = 6, - /obj/item/storage/box/evidence = 6) + /obj/item/storage/box/evidence = 6, + /obj/item/gun/energy/taser = 8, + /obj/item/gun/energy/stunrevolver = 4, + /obj/item/reagent_containers/spray/pepper = 6, + /obj/item/taperoll/police = 6, + /obj/item/clothing/glasses/omnihud/sec = 6) contraband = list(/obj/item/clothing/glasses/sunglasses = 2, - /obj/item/storage/box/donut = 2) + /obj/item/storage/box/donut = 2, + /obj/item/implanter/compliance = 1) req_log_access = access_armory has_logs = 1 @@ -553,7 +570,9 @@ /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/plastiseed = 3, - /obj/item/seeds/riceseed = 3) + /obj/item/seeds/riceseed = 3, + /obj/item/seeds/shrinkshroom = 3, + /obj/item/seeds/megashroom = 3) contraband = list(/obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/libertymycelium = 2, @@ -652,7 +671,8 @@ /obj/item/flashlight/glowstick/red = 3, /obj/item/flashlight/glowstick/blue = 3, /obj/item/flashlight/glowstick/orange =3, - /obj/item/flashlight/glowstick/yellow = 3) + /obj/item/flashlight/glowstick/yellow = 3, + /obj/item/reagent_containers/spray/windowsealant = 5) contraband = list(/obj/item/weldingtool/hugetank = 2, /obj/item/clothing/gloves/fyellow = 2) premium = list(/obj/item/clothing/gloves/heavy_engineer = 1) //VOREStation Edit - yellow gloves are common in engineering, let's make "premium" actually mean something @@ -695,8 +715,10 @@ /obj/item/circuitboard/body_scanner, /obj/item/circuitboard/medical_kiosk, /obj/item/circuitboard/sleeper, - /obj/item/circuitboard/dna_analyzer) - contraband = list(/obj/item/cell/potato = 3) + /obj/item/circuitboard/dna_analyzer, + /obj/item/clothing/glasses/omnihud/eng = 6) + contraband = list(/obj/item/cell/potato = 3, + /obj/item/rms = 5) premium = list(/obj/item/storage/belt/utility = 3) product_records = list() req_log_access = access_ce @@ -1615,7 +1637,7 @@ /obj/item/clothing/head/soft/purple = 5, /obj/item/clothing/head/beret/purple = 5, /obj/item/clothing/head/headband/maid = 5, - /obj/item/radio/headset/headset_service = 5, + /obj/item/radio/headset/service = 5, /obj/item/clothing/under/rank/janitor = 5, /obj/item/clothing/under/dress/maid/janitor = 5, /obj/item/clothing/suit/storage/hooded/wintercoat/janitor = 5, diff --git a/code/modules/economy/vending_machines_vr.dm b/code/modules/economy/vending_machines_vr.dm index c62361aee99..2daee26fa91 100644 --- a/code/modules/economy/vending_machines_vr.dm +++ b/code/modules/economy/vending_machines_vr.dm @@ -1,41 +1,3 @@ -//Tweaked existing vendors -/obj/machinery/vending/hydroseeds/New() - products += list(/obj/item/seeds/shrinkshroom = 3,/obj/item/seeds/megashroom = 3) - ..() - -/obj/machinery/vending/security/New() - products += list(/obj/item/gun/energy/taser = 8,/obj/item/gun/energy/stunrevolver = 4, - /obj/item/reagent_containers/spray/pepper = 6,/obj/item/taperoll/police = 6, - /obj/item/clothing/glasses/omnihud/sec = 6) - contraband += list(/obj/item/implanter/compliance = 1) - ..() - -/obj/machinery/vending/tool/New() - products += list(/obj/item/reagent_containers/spray/windowsealant = 5) - ..() - -/obj/machinery/vending/engivend/New() - products += list(/obj/item/clothing/glasses/omnihud/eng = 6) - contraband += list(/obj/item/rms = 5) - ..() - -/obj/machinery/vending/medical/New() - products += list(/obj/item/storage/box/khcrystal = 4,/obj/item/backup_implanter = 3, - /obj/item/clothing/glasses/omnihud/med = 4, /obj/item/glasses_kit = 1, /obj/item/storage/quickdraw/syringe_case = 4) - ..() - -/obj/machinery/vending/wallmed1/New() - products += list(/obj/item/bodybag/cryobag = 2) - ..() - -/obj/machinery/vending/wallmed2/New() - products += list(/obj/item/bodybag/cryobag = 3) - ..() - -/obj/machinery/vending/wallmed1/public/New() - products += list(/obj/item/bodybag/cryobag = 4) - ..() - // Food Machines (for event/away maps) //I want this not just as part of the zoo. ;v @@ -343,7 +305,7 @@ /obj/item/storage/box/syndie_kit/chameleon = 1, /obj/item/clothing/mask/bandana = 1, /obj/item/clothing/glasses/sunglasses = 1, - /obj/item/radio/headset/syndicate/alt = 1, + /obj/item/radio/headset/syndicate = 1, /obj/item/pda = 1, /obj/item/communicator = 1, /obj/item/tape_roll = 2, @@ -519,7 +481,7 @@ /obj/item/clothing/under/color/yellow = 5, /obj/item/clothing/shoes/black = 20, /obj/item/clothing/shoes/white = 20, - /obj/item/clothing/gloves/watch = 20 + /obj/item/clothing/accessory/watch = 20 ) prices = list() @@ -614,13 +576,13 @@ /obj/item/clothing/accessory/wcoat/swvest/blue = 5, /obj/item/clothing/accessory/wcoat/swvest/red = 5, /obj/item/clothing/accessory/wristband = 5, - /obj/item/clothing/accessory/wristbandcollection = 5, - /obj/item/clothing/accessory/wristbandcollection/pink = 5, - /obj/item/clothing/accessory/wristbandcollection/les = 5, - /obj/item/clothing/accessory/wristbandcollection/bi = 5, - /obj/item/clothing/accessory/wristbandcollection/trans = 5, - /obj/item/clothing/accessory/wristbandcollection/ace = 5, - /obj/item/clothing/accessory/wristband_spiked = 5, + /obj/item/clothing/accessory/wristband/collection = 5, + /obj/item/clothing/accessory/wristband/collection/pink = 5, + /obj/item/clothing/accessory/wristband/collection/les = 5, + /obj/item/clothing/accessory/wristband/collection/bi = 5, + /obj/item/clothing/accessory/wristband/collection/trans = 5, + /obj/item/clothing/accessory/wristband/collection/ace = 5, + /obj/item/clothing/accessory/wristband/spiked = 5, /obj/item/clothing/accessory/belt = 5, /obj/item/clothing/accessory/belt/thick = 5, /obj/item/clothing/accessory/belt/strap = 5, @@ -636,13 +598,13 @@ /obj/item/clothing/ears/earmuffs/headphones = 5, /obj/item/clothing/ears/earring/stud = 5, /obj/item/clothing/ears/earring/dangle = 5, - /obj/item/clothing/gloves/ring/mariner = 5, - /obj/item/clothing/gloves/ring/engagement = 5, - /obj/item/clothing/gloves/ring/seal/signet = 5, - /obj/item/clothing/gloves/ring/seal/mason = 5, - /obj/item/clothing/gloves/ring/material/plastic = 5, - /obj/item/clothing/gloves/ring/material/steel = 5, - /obj/item/clothing/gloves/ring/material/gold = 5, + /obj/item/clothing/accessory/ring/mariner = 5, + /obj/item/clothing/accessory/ring/engagement = 5, + /obj/item/clothing/accessory/ring/seal/signet = 5, + /obj/item/clothing/accessory/ring/seal/mason = 5, + /obj/item/clothing/accessory/ring/material/plastic = 5, + /obj/item/clothing/accessory/ring/material/steel = 5, + /obj/item/clothing/accessory/ring/material/gold = 5, /obj/item/clothing/glasses/eyepatch = 5, /obj/item/clothing/glasses/gglasses = 5, /obj/item/clothing/glasses/regular/hipster = 5, @@ -670,9 +632,9 @@ /obj/item/clothing/accessory/pride/lesbian = 5, /obj/item/clothing/accessory/pride/intersex = 5, /obj/item/clothing/accessory/pride/vore = 5, - /obj/item/clothing/gloves/watch = 5, - /obj/item/clothing/gloves/watch/silver = 5, - /obj/item/clothing/gloves/watch/gold = 5 + /obj/item/clothing/accessory/watch = 5, + /obj/item/clothing/accessory/watch/silver = 5, + /obj/item/clothing/accessory/watch/gold = 5 ) prices = list(/obj/item/clothing/accessory = 50, /obj/item/clothing/accessory/armband/med/color = 50, @@ -759,13 +721,13 @@ /obj/item/clothing/accessory/wcoat/swvest/blue = 50, /obj/item/clothing/accessory/wcoat/swvest/red = 50, /obj/item/clothing/accessory/wristband = 10, - /obj/item/clothing/accessory/wristbandcollection = 30, - /obj/item/clothing/accessory/wristbandcollection/pink = 30, - /obj/item/clothing/accessory/wristbandcollection/les = 30, - /obj/item/clothing/accessory/wristbandcollection/bi = 30, - /obj/item/clothing/accessory/wristbandcollection/trans = 30, - /obj/item/clothing/accessory/wristbandcollection/ace = 30, - /obj/item/clothing/accessory/wristband_spiked = 20, + /obj/item/clothing/accessory/wristband/collection = 30, + /obj/item/clothing/accessory/wristband/collection/pink = 30, + /obj/item/clothing/accessory/wristband/collection/les = 30, + /obj/item/clothing/accessory/wristband/collection/bi = 30, + /obj/item/clothing/accessory/wristband/collection/trans = 30, + /obj/item/clothing/accessory/wristband/collection/ace = 30, + /obj/item/clothing/accessory/wristband/spiked = 20, /obj/item/clothing/accessory/belt = 50, /obj/item/clothing/accessory/belt/thick = 50, /obj/item/clothing/accessory/belt/strap = 50, @@ -781,13 +743,13 @@ /obj/item/clothing/ears/earmuffs/headphones = 50, /obj/item/clothing/ears/earring/stud = 50, /obj/item/clothing/ears/earring/dangle = 50, - /obj/item/clothing/gloves/ring/mariner = 50, - /obj/item/clothing/gloves/ring/engagement = 50, - /obj/item/clothing/gloves/ring/seal/signet = 50, - /obj/item/clothing/gloves/ring/seal/mason = 50, - /obj/item/clothing/gloves/ring/material/plastic = 50, - /obj/item/clothing/gloves/ring/material/steel = 50, - /obj/item/clothing/gloves/ring/material/gold = 100, + /obj/item/clothing/accessory/ring/mariner = 50, + /obj/item/clothing/accessory/ring/engagement = 50, + /obj/item/clothing/accessory/ring/seal/signet = 50, + /obj/item/clothing/accessory/ring/seal/mason = 50, + /obj/item/clothing/accessory/ring/material/plastic = 50, + /obj/item/clothing/accessory/ring/material/steel = 50, + /obj/item/clothing/accessory/ring/material/gold = 100, /obj/item/clothing/glasses/eyepatch = 50, /obj/item/clothing/glasses/gglasses = 50, /obj/item/clothing/glasses/regular/hipster = 50, @@ -811,9 +773,9 @@ /obj/item/clothing/accessory/pride/lesbian = 50, /obj/item/clothing/accessory/pride/intersex = 50, /obj/item/clothing/accessory/pride/vore = 50, - /obj/item/clothing/gloves/watch = 50, - /obj/item/clothing/gloves/watch/silver = 100, - /obj/item/clothing/gloves/watch/gold = 200 + /obj/item/clothing/accessory/watch = 50, + /obj/item/clothing/accessory/watch/silver = 100, + /obj/item/clothing/accessory/watch/gold = 200 ) premium = list(/obj/item/bedsheet/rainbow = 1) contraband = list(/obj/item/clothing/mask/gas/clown_hat = 1, @@ -2001,13 +1963,13 @@ /obj/item/clothing/ears/earmuffs/headphones = 5, /obj/item/clothing/ears/earring/stud = 5, /obj/item/clothing/ears/earring/dangle = 5, - /obj/item/clothing/gloves/ring/mariner = 5, - /obj/item/clothing/gloves/ring/engagement = 5, - /obj/item/clothing/gloves/ring/seal/signet = 5, - /obj/item/clothing/gloves/ring/seal/mason = 5, - /obj/item/clothing/gloves/ring/material/plastic = 5, - /obj/item/clothing/gloves/ring/material/steel = 5, - /obj/item/clothing/gloves/ring/material/gold = 5, + /obj/item/clothing/accessory/ring/mariner = 5, + /obj/item/clothing/accessory/ring/engagement = 5, + /obj/item/clothing/accessory/ring/seal/signet = 5, + /obj/item/clothing/accessory/ring/seal/mason = 5, + /obj/item/clothing/accessory/ring/material/plastic = 5, + /obj/item/clothing/accessory/ring/material/steel = 5, + /obj/item/clothing/accessory/ring/material/gold = 5, /obj/item/clothing/glasses/eyepatch = 5, /obj/item/clothing/glasses/gglasses = 5, /obj/item/clothing/glasses/regular/hipster = 5, diff --git a/code/modules/emotes/definitions/synthetics.dm b/code/modules/emotes/definitions/synthetics.dm index de1d8d34ed7..e4024fc8e9b 100644 --- a/code/modules/emotes/definitions/synthetics.dm +++ b/code/modules/emotes/definitions/synthetics.dm @@ -78,3 +78,21 @@ emote_message_3p = "chirps." emote_sound = 'sound/voice/robochirp.ogg' sound_vary = TRUE + +/decl/emote/audible/synth/ding + key = "ding" + emote_message_1p = "You ding at TARGET!" + emote_message_1p = "You ding." + emote_message_3p_target = "dings at TARGET!" + emote_message_3p = "dings." + emote_sound = 'sound/machines/ding.ogg' + sound_vary = TRUE + +/decl/emote/audible/synth/microwave + key = "microwave" + emote_message_1p = "You make microwave noises at TARGET!" + emote_message_1p = "You make microwave noises." + emote_message_3p_target = "makes microwave noises at TARGET!" + emote_message_3p = "makes microwave noises." + emote_sound = 'sound/machines/kitchen/microwave/microwave-mid2.ogg' + sound_vary = TRUE diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 1fc894d5302..8c63ecbfc98 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -83,7 +83,7 @@ var/decl/emote/use_emote = get_emote_by_key(act) if(!istype(use_emote)) - to_chat(src, span_warning("Unknown emote '[act]'. Type say *help for a list of usable emotes.")) + to_chat(src, span_warning("Unknown emote '[act]'. Type " + span_bold("say *help") + " for a list of usable emotes. ([act] [message])")) // Add full message in the event you used * instead of ! or something like that return if(!use_emote.mob_can_use(src)) @@ -210,6 +210,7 @@ var/turf/T = get_turf(src) if(!T) return + if(client) playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds) @@ -224,7 +225,11 @@ message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]") if(usr && usr.client && M && !(get_z(usr) == get_z(M))) message = span_multizsay("[message]") - M.show_message(message, m_type) + // If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind + if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M))) + M.show_message(message) + else + M.show_message(message, m_type) M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE)) for(var/obj/O as anything in o_viewers) diff --git a/code/modules/eventkit/gm_interfaces/mob_spawner.dm b/code/modules/eventkit/gm_interfaces/mob_spawner.dm index 85adcecc3fd..5b0a3004e40 100644 --- a/code/modules/eventkit/gm_interfaces/mob_spawner.dm +++ b/code/modules/eventkit/gm_interfaces/mob_spawner.dm @@ -31,9 +31,9 @@ /datum/eventkit/mob_spawner/tgui_static_data(mob/user) var/list/data = list() - data["initial_x"] = usr.x; - data["initial_y"] = usr.y; - data["initial_z"] = usr.z; + data["initial_x"] = user.x; + data["initial_y"] = user.y; + data["initial_z"] = user.z; return data @@ -43,9 +43,9 @@ data["loc_lock"] = loc_lock if(loc_lock) - data["loc_x"] = usr.x - data["loc_y"] = usr.y - data["loc_z"] = usr.z + data["loc_x"] = user.x + data["loc_y"] = user.y + data["loc_z"] = user.z data["use_custom_ai"] = use_custom_ai if(new_path) @@ -81,16 +81,16 @@ return data -/datum/eventkit/mob_spawner/tgui_act(action, list/params) +/datum/eventkit/mob_spawner/tgui_act(action, list/params, datum/tgui/ui) . = ..() if(.) return - if(!check_rights_for(usr.client, R_SPAWN)) + if(!check_rights_for(ui.user.client, R_SPAWN)) return switch(action) if("select_path") var/list/choices = typesof(/mob) - var/newPath = tgui_input_list(usr, "Please select the new path of the mob you want to spawn.", items = choices) + var/newPath = tgui_input_list(ui.user, "Please select the new path of the mob you want to spawn.", items = choices) path = newPath new_path = TRUE @@ -99,20 +99,20 @@ use_custom_ai = !use_custom_ai return TRUE if("set_faction") - faction = sanitize(tgui_input_text(usr, "Please input your mobs' faction", "Faction", (faction ? faction : "neutral"))) + faction = sanitize(tgui_input_text(ui.user, "Please input your mobs' faction", "Faction", (faction ? faction : "neutral"))) return TRUE if("set_intent") - intent = tgui_input_list(usr, "Please select preferred intent", "Select Intent", list(I_HELP, I_HURT), (intent ? intent : I_HELP)) + intent = tgui_input_list(ui.user, "Please select preferred intent", "Select Intent", list(I_HELP, I_HURT), (intent ? intent : I_HELP)) return TRUE if("set_ai_path") - ai_type = tgui_input_list(usr, "Select AI path. Not all subtypes are compatible!", "AI type", \ + ai_type = tgui_input_list(ui.user, "Select AI path. Not all subtypes are compatible!", "AI type", \ typesof(/datum/ai_holder/), (ai_type ? ai_type : /datum/ai_holder/simple_mob/inert)) return TRUE if("loc_lock") loc_lock = !loc_lock return TRUE if("start_spawn") - var/confirm = tgui_alert(usr, "Are you sure that you want to start spawning your custom mobs?", "Confirmation", list("Yes", "Cancel")) + var/confirm = tgui_alert(ui.user, "Are you sure that you want to start spawning your custom mobs?", "Confirmation", list("Yes", "Cancel")) if(confirm != "Yes") return FALSE @@ -124,12 +124,12 @@ var/z = params["z"] if(!name) - to_chat(usr, span_warning("Name cannot be empty.")) + to_chat(ui.user, span_warning("Name cannot be empty.")) return FALSE var/turf/T = locate(x, y, z) if(!T) - to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map.")) + to_chat(ui.user, span_warning("Those coordinates are outside the boundaries of the map.")) return FALSE for(var/i = 0, i < amount, i++) @@ -137,7 +137,7 @@ var/turf/TU = get_turf(locate(x, y, z)) TU.ChangeTurf(path) else - var/mob/M = new path(usr.loc) + var/mob/M = new path(ui.user.loc) M.name = sanitize(name) M.desc = sanitize(params["desc"]) @@ -161,7 +161,7 @@ L.initialize_ai_holder() L.AdjustSleeping(-100) else - to_chat(usr, span_notice("You can only set AI for subtypes of mob/living!")) + to_chat(ui.user, span_notice("You can only set AI for subtypes of mob/living!")) @@ -180,7 +180,7 @@ M.size_multiplier = size_mul M.update_icon() else - to_chat(usr, span_warning("Size Multiplier not applied: ([size_mul]) is not a valid input.")) + to_chat(ui.user, span_warning("Size Multiplier not applied: ([size_mul]) is not a valid input.")) M.forceMove(T) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 25e1ea5c4f1..6f5e2b9497b 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -24,7 +24,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases) else stack_trace("Disease Outbreak: Invalid Event Level [severity]. Expected: 1-2") virus = /datum/disease/cold - chosen_disease = new virus() + chosen_disease = new virus else if(severity == EVENT_LEVEL_MAJOR) chosen_disease = create_virus(severity * pick(2,3)) //50% chance for a major disease instead of a moderate one @@ -37,7 +37,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases) GLOB.current_pending_diseases += chosen_disease var/list/candidates = list() - for(var/mob/living/carbon/human/G in player_list) + for(var/mob/living/carbon/human/G in human_mob_list) if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind)) var/area/A = get_area(G) if(!A) @@ -48,17 +48,18 @@ GLOBAL_LIST_EMPTY(current_pending_diseases) continue if(isbelly(G.loc)) continue - if(!G.CanContractDisease()) + if(G.species.virus_immune) continue candidates += G var/chosen_infect = rand(3, 5) while(chosen_infect) - var/mob/living/carbon/human/H = pick(candidates) - H.ContractDisease(chosen_disease) - candidates -= H - + if(!isemptylist(candidates)) + var/mob/living/carbon/human/H = pick(candidates) + H.ForceContractDisease(chosen_disease) + candidates -= H + chosen_infect-- //Creates a virus with a harmful effect, guaranteed to be spreadable by contact or airborne /datum/event/disease_outbreak/proc/create_virus(max_severity = 6) diff --git a/code/modules/events/event_container_vr.dm b/code/modules/events/event_container_vr.dm index 71911302b78..1410f4b17cd 100644 --- a/code/modules/events/event_container_vr.dm +++ b/code/modules/events/event_container_vr.dm @@ -108,6 +108,7 @@ new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 10, list(ASSIGNMENT_ENGINEER = 60), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 30, list(ASSIGNMENT_ENGINEER = 15), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Supply Demand", /datum/event/supply_demand, 0, list(ASSIGNMENT_ANY = 5, ASSIGNMENT_SCIENCE = 15, ASSIGNMENT_GARDENER = 10, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_MEDICAL = 15), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)), )) #undef ASSIGNMENT_ANY diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index 12cbdb770ce..ff11cb9c33b 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -127,10 +127,8 @@ . = ..() if(!victim) return - var/skill = victim.get_helm_skill() var/speed = victim.get_speed() - if(skill >= SKILL_PROF) - . = round(. * 0.5) + . = round(. * 0.5) if(victim.is_still()) //Standing still means less shit flies your way . = round(. * 0.1) if(speed < SHIP_SPEED_SLOW) //Slow and steady @@ -140,10 +138,4 @@ //Smol ship evasion if(victim.vessel_size < SHIP_SIZE_LARGE && speed < SHIP_SPEED_FAST) - var/skill_needed = SKILL_PROF - if(speed < SHIP_SPEED_SLOW) - skill_needed = SKILL_ADEPT - if(victim.vessel_size < SHIP_SIZE_SMALL) - skill_needed = skill_needed - 1 - if(skill >= max(skill_needed, victim.skill_needed)) - . = round(. * 0.5) + . = round(. * 0.5) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 08d40416daf..814ce55adc1 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -334,10 +334,14 @@ S.food_inserted_micros = list() S.food_inserted_micros += F food_inserted_micros -= F + on_slice_extra() qdel(src) return +/obj/item/reagent_containers/food/snacks/proc/on_slice_extra() + return + /obj/item/reagent_containers/food/snacks/MouseDrop_T(mob/living/M, mob/user) if(!user.stat && istype(M) && (M == user) && Adjacent(M) && (M.get_effective_size(TRUE) <= 0.50) && food_can_insert_micro) if(!food_inserted_micros) @@ -3510,6 +3514,7 @@ trash = /obj/item/trash/plate bitesize = 2 +/* OLD RECIPE /obj/item/reagent_containers/food/snacks/sliceable/turkey name = "turkey" desc = "Tastes like chicken." @@ -3536,6 +3541,51 @@ icon_state = "turkey_drumstick" trash = /obj/item/trash/plate bitesize = 2 +*/ + +/obj/item/reagent_containers/food/snacks/sliceable/turkey + name = "turkey" + desc = "Tastes like chicken." + icon = 'icons/obj/food.dmi' + icon_state = "roastturkey" + slice_path = /obj/item/reagent_containers/food/snacks/turkeyslice + slices_num = 6 + w_class = 2 + nutriment_amt = 20 + nutriment_desc = list("turkey" = 20) + bitesize = 5 + trash = /obj/item/trash/turkeybones + var/list/extra_product = list(/obj/item/reagent_containers/food/snacks/turkeydrumstick = 2, + /obj/item/trash/turkeybones = 1) + +/obj/item/reagent_containers/food/snacks/sliceable/turkey/Initialize() + . = ..() + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("cookingoil", 1) + +/obj/item/reagent_containers/food/snacks/sliceable/turkey/on_slice_extra() + for(var/i in extra_product) + for(var/j=1 to extra_product[i]) + new i(src.loc) + +/obj/item/reagent_containers/food/snacks/turkeyslice + name = "turkey'n'mash" + desc = "Turkey slices with some delicious stuffing." + icon = 'icons/obj/food.dmi' + icon_state = "roastturkeynmash" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/reagent_containers/food/snacks/turkeydrumstick + name = "turkey drumstick" + desc = "The best part!" + icon = 'icons/obj/food.dmi' + icon_state = "roastturkeydrumstick" + trash = null + nutriment_amt = 8 + nutriment_desc = list("turkey" = 20) + bitesize = 2 /obj/item/reagent_containers/food/snacks/sliceable/suppermatter name = "suppermatter" diff --git a/code/modules/food/food/snacks/meat.dm b/code/modules/food/food/snacks/meat.dm index 1cd1671a5f6..c08b33b8865 100644 --- a/code/modules/food/food/snacks/meat.dm +++ b/code/modules/food/food/snacks/meat.dm @@ -131,6 +131,16 @@ reagents.add_reagent("spidertoxin",6) reagents.remove_reagent("pacid",6) +/obj/item/reagent_containers/food/snacks/rawturkey + name = "raw turkey" + desc = "Naked and hollow." + icon_state = "rawturkey" + bitesize = 2.5 + +/obj/item/reagent_containers/food/snacks/rawturkey/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + /obj/item/reagent_containers/food/snacks/meat/fox name = "foxmeat" desc = "The fox doesn't say a goddamn thing, now." diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 5a37e9fb7bd..6d95e881cd7 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -43,6 +43,11 @@ var/combine_first = FALSE // If TRUE, this appliance will do combination cooking before checking recipes var/food_safety = FALSE //RS ADD - If true, the appliance automatically ejects food instead of burning it + var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject") + var/static/radial_power = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_power") + var/static/radial_safety = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_safety") + var/static/radial_output = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_change_output") + /obj/machinery/appliance/Initialize() . = ..() @@ -611,8 +616,31 @@ if(..()) return - if(cooking_objs.len) - removal_menu(user) + interact(user) + +/obj/machinery/appliance/interact(mob/user) + var/list/options = list( + "power" = radial_power, + "safety" = radial_safety, + ) + + if(LAZYLEN(cooking_objs)) + options["remove"] = radial_eject + + if(LAZYLEN(output_options)) + options["select_output"] = radial_output + + var/choice = show_radial_menu(user, src, options, require_near = !issilicon(user)) + + switch(choice) + if("power") + toggle_power() + if("safety") + toggle_safety() + if("remove") + removal_menu(user) + if("select_output") + choose_output() /obj/machinery/appliance/proc/removal_menu(var/mob/user) if (can_remove_items(user)) diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm index a8c1c25080d..50c9ea2ba3b 100644 --- a/code/modules/food/kitchen/cooking_machines/_cooker.dm +++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm @@ -26,11 +26,15 @@ /obj/machinery/appliance/cooker/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() + data["on"] = !(stat & POWEROFF) + data["safety"] = food_safety data["temperature"] = round(temperature - T0C, 0.1) data["optimalTemp"] = round(optimal_temp - T0C, 0.1) data["temperatureEnough"] = temperature >= min_temp data["efficiency"] = round(get_efficiency(), 0.1) data["containersRemovable"] = can_remove_items(user, show_warning = FALSE) + data["selected_option"] = selected_option + data["show_selected_option"] = LAZYLEN(output_options) var/list/our_contents = list() for(var/i in 1 to max_contents) @@ -56,19 +60,28 @@ return TRUE switch(action) + if("toggle_power") + attempt_toggle_power(usr) + return TRUE + if("toggle_safety") + toggle_safety() + return TRUE + if("change_output") + choose_output() + return TRUE if("slot") var/slot = params["slot"] - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(slot <= LAZYLEN(cooking_objs)) // Inserting var/datum/cooking_item/CI = cooking_objs[slot] if(istype(I) && can_insert(I)) // Why do hard work when we can just make them smack us? - attackby(I, usr) + attackby(I, ui.user) else if(istype(CI)) - eject(CI, usr) + eject(CI, ui.user) return TRUE if(istype(I)) // Why do hard work when we can just make them smack us? - attackby(I, usr) + attackby(I, ui.user) return TRUE /obj/machinery/appliance/cooker/examine(var/mob/user) diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index 41a01ee608e..eeadee61e78 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -138,6 +138,7 @@ user.visible_message( \ span_notice("\The [user] has added one of [O] to \the [src]."), \ span_notice("You add one of [O] to \the [src].")) + update_static_data_for_all_viewers() return else // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - Man whoever you are, it's been years. o7 @@ -145,7 +146,7 @@ user.visible_message( \ span_notice("\The [user] has added \the [O] to \the [src]."), \ span_notice("You add \the [O] to \the [src].")) - SStgui.update_uis(src) + update_static_data_for_all_viewers() return else if (istype(O,/obj/item/storage/bag/plants)) // There might be a better way about making plant bags dump their contents into a microwave, but it works. var/obj/item/storage/bag/plants/bag = O @@ -173,6 +174,7 @@ to_chat(user, "You fill \the [src] from \the [O].") SStgui.update_uis(src) + update_static_data_for_all_viewers() return 0 else if(istype(O,/obj/item/reagent_containers/glass) || \ @@ -185,6 +187,8 @@ if (!(R.id in acceptable_reagents)) to_chat(user, span_warning("Your [O] contains components unsuitable for cookery.")) return 1 + // gotta let afterattack resolve + addtimer(CALLBACK(src, TYPE_PROC_REF(/datum, update_static_data_for_all_viewers)), 1 SECOND) return else if(istype(O,/obj/item/grab)) var/obj/item/grab/G = O @@ -219,6 +223,11 @@ ..() SStgui.update_uis(src) +/obj/machinery/microwave/tgui_status(mob/user) + if(user == paicard?.pai) + return STATUS_INTERACTIVE + . = ..() + /obj/machinery/microwave/tgui_state(mob/user) return GLOB.tgui_physical_state @@ -242,6 +251,20 @@ ui = new(user, src, "Microwave", name) ui.open() +/obj/machinery/microwave/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/spritesheet/kitchen_recipes) + ) + +/obj/machinery/microwave/tgui_static_data(mob/user) + var/list/data = ..() + + var/datum/recipe/recipe = select_recipe(available_recipes,src) + data["recipe"] = recipe ? sanitize_css_class_name("[recipe.type]") : null + data["recipe_name"] = recipe ? initial(recipe.result:name) : null + + return data + /obj/machinery/microwave/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() @@ -250,6 +273,21 @@ data["dirty"] = dirty == 100 data["items"] = get_items_list() + var/list/reagents_data = list() + for(var/datum/reagent/R in reagents.reagent_list) + var/display_name = R.name + if(R.id == "capsaicin") + display_name = "Hotsauce" + if(R.id == "frostoil") + display_name = "Coldsauce" + UNTYPED_LIST_ADD(reagents_data, list( + "name" = display_name, + "amt" = R.volume, + "extra" = "unit[R.volume > 1 ? "s" : ""]", + "color" = R.color, + )) + data["reagents"] = reagents_data + return data /obj/machinery/microwave/proc/get_items_list() @@ -258,7 +296,8 @@ var/list/items_counts = list() var/list/items_measures = list() var/list/items_measures_p = list() - //for(var/obj/O in ((contents - component_parts) - circuit)) + var/list/icons = list() + for(var/obj/O in cookingContents()) var/display_name = O.name if(istype(O,/obj/item/reagent_containers/food/snacks/egg)) @@ -278,33 +317,26 @@ items_measures[display_name] = "fillet of meat" items_measures_p[display_name] = "fillets of meat" items_counts[display_name]++ + icons[display_name] = list("icon" = O.icon, "icon_state" = O.icon_state) + for(var/O in items_counts) var/N = items_counts[O] + var/icon = icons[O] if(!(O in items_measures)) data.Add(list(list( "name" = capitalize(O), "amt" = N, "extra" = "[lowertext(O)][N > 1 ? "s" : ""]", + "icon" = icon, ))) else data.Add(list(list( "name" = capitalize(O), "amt" = N, "extra" = N == 1 ? items_measures[O] : items_measures_p[O], + "icon" = icon, ))) - for(var/datum/reagent/R in reagents.reagent_list) - var/display_name = R.name - if(R.id == "capsaicin") - display_name = "Hotsauce" - if(R.id == "frostoil") - display_name = "Coldsauce" - data.Add(list(list( - "name" = display_name, - "amt" = R.volume, - "extra" = "unit[R.volume > 1 ? "s" : ""]" - ))) - return data /obj/machinery/microwave/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) @@ -322,69 +354,6 @@ if("dispose") dispose() return TRUE -/* -/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu - var/dat = "" - if(src.broken > 0) - dat = {"Bzzzzttttt"} - else if(src.operating) - dat = {"Microwaving in progress!
Please wait...!
"} - else if(src.dirty==100) - dat = {"This microwave is dirty!
Please clean it before use!
"} - else - var/list/items_counts = new - var/list/items_measures = new - var/list/items_measures_p = new - for (var/obj/O in ((contents - component_parts) - circuit)) - var/display_name = O.name - if (istype(O,/obj/item/reagent_containers/food/snacks/egg)) - items_measures[display_name] = "egg" - items_measures_p[display_name] = "eggs" - if (istype(O,/obj/item/reagent_containers/food/snacks/tofu)) - items_measures[display_name] = "tofu chunk" - items_measures_p[display_name] = "tofu chunks" - if (istype(O,/obj/item/reagent_containers/food/snacks/meat)) //any meat - items_measures[display_name] = "slab of meat" - items_measures_p[display_name] = "slabs of meat" - if (istype(O,/obj/item/reagent_containers/food/snacks/donkpocket)) - display_name = "Turnovers" - items_measures[display_name] = "turnover" - items_measures_p[display_name] = "turnovers" - if (istype(O,/obj/item/reagent_containers/food/snacks/carpmeat)) - items_measures[display_name] = "fillet of meat" - items_measures_p[display_name] = "fillets of meat" - items_counts[display_name]++ - for (var/O in items_counts) - var/N = items_counts[O] - if (!(O in items_measures)) - dat += span_bold("[capitalize(O)]:") + " [N] [lowertext(O)]\s
" - else - if (N==1) - dat += span_bold("[capitalize(O)]:") + " [N] [items_measures[O]]
" - else - dat += span_bold("[capitalize(O)]:") + " [N] [items_measures_p[O]]
" - - for (var/datum/reagent/R in reagents.reagent_list) - var/display_name = R.name - if (R.id == "capsaicin") - display_name = "Hotsauce" - if (R.id == "frostoil") - display_name = "Coldsauce" - dat += span_bold("[display_name]:") + " [R.volume] unit\s
" - - if (items_counts.len==0 && reagents.reagent_list.len==0) - dat = span_bold("The microwave is empty") + "
" - else - dat = span_bold("Ingredients:") + "
[dat]" - dat += {"

\ -Turn on!
\ -
Eject ingredients!
\ -"} - - user << browse("Microwave Controls[dat]", "window=microwave") - onclose(user, "microwave") - return -*/ /*********************************** * Microwave Menu Handling/Cooking diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 86d3cabe8d1..b9b81e8c5c5 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -212,20 +212,20 @@ .["locked"] = locked .["secure"] = is_secure -/obj/machinery/smartfridge/tgui_act(action, params) +/obj/machinery/smartfridge/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("Release") var/amount = 0 if(params["amount"]) amount = params["amount"] else - amount = tgui_input_number(usr, "How many items?", "How many items would you like to take out?", 1) + amount = tgui_input_number(ui.user, "How many items?", "How many items would you like to take out?", 1) - if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src)) + if(QDELETED(src) || QDELETED(ui.user) || !ui.user.Adjacent(src)) return FALSE var/index = text2num(params["index"]) @@ -261,11 +261,11 @@ /* * Secure Smartfridges */ -/obj/machinery/smartfridge/secure/tgui_act(action, params) +/obj/machinery/smartfridge/secure/tgui_act(action, params, datum/tgui/ui) if(stat & (NOPOWER|BROKEN)) return TRUE - if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) - if((!allowed(usr) && scan_id) && !emagged && locked != -1 && action == "Release") - to_chat(usr, span_warning("Access denied.")) + if(ui.user.contents.Find(src) || (in_range(src, ui.user) && istype(loc, /turf))) + if((!allowed(ui.user) && scan_id) && !emagged && locked != -1 && action == "Release") + to_chat(ui.user, span_warning("Access denied.")) return TRUE return ..() diff --git a/code/modules/food/recipes_oven.dm b/code/modules/food/recipes_oven.dm index c8e043ecd5c..57a58cb57d5 100644 --- a/code/modules/food/recipes_oven.dm +++ b/code/modules/food/recipes_oven.dm @@ -33,6 +33,7 @@ reagent_mix = RECIPE_REAGENT_REPLACE result = /obj/item/reagent_containers/food/snacks/ribplate +/* OLD RECIPE /datum/recipe/turkey appliance = OVEN reagents = list("sodiumchloride" = 1, "blackpepper" = 1) @@ -41,6 +42,17 @@ /obj/item/reagent_containers/food/snacks/stuffing ) result = /obj/item/reagent_containers/food/snacks/sliceable/turkey +*/ + +/datum/recipe/turkey + appliance = OVEN + fruit = list("potato" = 1) + reagents = list("sodiumchloride" = 1, "blackpepper" = 1) + items = list( + /obj/item/reagent_containers/food/snacks/rawturkey, + /obj/item/reagent_containers/food/snacks/stuffing + ) + result = /obj/item/reagent_containers/food/snacks/sliceable/turkey /datum/recipe/tofurkey appliance = OVEN diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 448ea34b5f3..df4e50d63ba 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -211,8 +211,8 @@ ..() -/obj/item/deck/attack_self() - shuffle() +/obj/item/deck/attack_self(mob/user) + shuffle(user) /obj/item/deck/verb/verb_shuffle() @@ -220,10 +220,9 @@ set name = "Shuffle" set desc = "Shuffle the cards in the deck." set src in view(1) - shuffle() + shuffle(usr) -/obj/item/deck/proc/shuffle() - var/mob/living/user = usr +/obj/item/deck/proc/shuffle(mob/user) if (cooldown < world.time - 10) // 15 ticks cooldown var/list/newcards = list() while(cards.len) diff --git a/code/modules/games/tarot.dm b/code/modules/games/tarot.dm index 44407c9ca2d..5489bb05fd5 100644 --- a/code/modules/games/tarot.dm +++ b/code/modules/games/tarot.dm @@ -41,3 +41,58 @@ cooldown = world.time else return + +///Fluff item, using a separate item rather than a subitem to customise New() + +/obj/item/deck/dark_tarot + name = "dark rose tarot deck" + desc = "A limited edition tarot deck for the scene-girl inclined!" + icon_state = "dark_tarot" + +/obj/item/deck/dark_tarot/New() + ..() + + var/datum/playingcard/P + for(var/name in list("fool","magician","high priestess","empress","emperor","hierophant","lovers","chariot","strength","hermit","wheel of fortune","justice","hanged man","death","temperance","devil","tower","star","moon","sun","judgement","world","white dragon with blue eyes","charred lizard","dark lotus","bash","reverse","rules","acid","abyss","maw")) + P = new() + P.name = "[name]" + if(name == "high priestess") + P.card_icon = "dark_high_priestess" + else if(name == "wheel of fortune") + P.card_icon = "dark_wheel" + else if(name == "hanged man") + P.card_icon = "dark_hanged" + else if(name == "white dragon with blue eyes") + P.card_icon = "dark_dragon" + else if(name == "charred lizard") + P.card_icon = "dark_lizard" + else if(name == "dark lotus") + P.card_icon = "dark_lotus" + else + P.card_icon = "dark_[name]" + P.back_icon = "dark_back_tarot" + cards += P + for(var/suit in list("wands","pentacles","cups","swords")) + for(var/number in list("ace","two","three","four","five","six","seven","eight","nine","ten","page","knight","queen","king")) + P = new() + P.name = "[number] of [suit]" + P.card_icon = "dark_[suit]" + P.back_icon = "dark_back_tarot" + cards += P + +/obj/item/deck/dark_tarot/shuffle(mob/user) + if (cooldown < world.time - 10) + var/list/newcards = list() + while(cards.len) + var/datum/playingcard/P = pick(cards) + P.name = replacetext(P.name," reversed","") + if(prob(50)) + P.name += " reversed" + newcards += P + cards -= P + cards = newcards + playsound(src, 'sound/items/cardshuffle.ogg', 50, 1) + user.visible_message("\The [user] shuffles [src].") + cooldown = world.time + else + return diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index aeb36adb320..7781f145e9f 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -137,7 +137,7 @@ return TRUE if("AIoverride") - if(!issilicon(usr)) + if(!issilicon(ui.user)) return if(safety_disabled && emagged) @@ -146,18 +146,18 @@ safety_disabled = !safety_disabled update_projections() if(safety_disabled) - message_admins("[key_name_admin(usr)] overrode the holodeck's safeties") - log_game("[key_name(usr)] overrided the holodeck's safeties") + message_admins("[key_name_admin(ui.user)] overrode the holodeck's safeties") + log_game("[key_name(ui.user)] overrided the holodeck's safeties") else - message_admins("[key_name_admin(usr)] restored the holodeck's safeties") - log_game("[key_name(usr)] restored the holodeck's safeties") + message_admins("[key_name_admin(ui.user)] restored the holodeck's safeties") + log_game("[key_name(ui.user)] restored the holodeck's safeties") return TRUE if("gravity") toggleGravity(linkedholodeck) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob) playsound(src, 'sound/effects/sparks4.ogg', 75, 1) @@ -168,7 +168,7 @@ update_projections() to_chat(user, span_notice("You vastly increase projector power and override the safety and security protocols.")) to_chat(user, "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call [using_map.company_name] maintenance and do not use the simulator.") - log_game("[key_name(usr)] emagged the Holodeck Control Computer") + log_game("[key_name(user)] emagged the Holodeck Control Computer") return 1 return diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 61b2ae4df5b..150e345db6c 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -254,11 +254,11 @@ var/no_los var/turf/last_turf = origin_turf for(var/turf/target_turf in getline(origin_turf,neighbor)) - if(air_master.air_blocked(last_turf, target_turf)) + if(SSair.air_blocked(last_turf, target_turf)) no_los = 1 break last_turf = target_turf - if(!no_los && air_master.air_blocked(origin_turf, neighbor)) + if(!no_los && SSair.air_blocked(origin_turf, neighbor)) no_los = 1 if(no_los) closed_turfs |= neighbor diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index f7073d13a16..f3bd60c6740 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -175,8 +175,8 @@ if(..()) return TRUE - usr.set_machine(src) - add_fingerprint(usr) + ui.user.set_machine(src) + add_fingerprint(ui.user) switch(action) if("eject_packet") diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index fb5ad1e90f6..41329703f71 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -66,7 +66,7 @@ switch(action) if("print") - print_report(usr) + print_report(ui.user) return TRUE if("close") last_seed = null diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 5c4a36f48e9..3cdf488b52c 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -97,17 +97,17 @@ switch(action) // Actual assembly actions if("rename") - rename(usr) + rename(ui.user) return TRUE if("remove_cell") if(!battery) - to_chat(usr, span_warning("There's no power cell to remove from \the [src].")) + to_chat(ui.user, span_warning("There's no power cell to remove from \the [src].")) return FALSE var/turf/T = get_turf(src) battery.forceMove(T) playsound(T, 'sound/items/Crowbar.ogg', 50, 1) - to_chat(usr, span_notice("You pull \the [battery] out of \the [src]'s power supplier.")) + to_chat(ui.user, span_notice("You pull \the [battery] out of \the [src]'s power supplier.")) battery = null return TRUE @@ -158,14 +158,14 @@ var/obj/item/integrated_circuit/C = locate(params["ref"]) in contents if(!istype(C)) return - C.tgui_interact(usr, null, ui) + C.tgui_interact(ui.user, null, ui) return TRUE if("remove_circuit") var/obj/item/integrated_circuit/C = locate(params["ref"]) in contents if(!istype(C)) return - C.remove(usr) + C.remove(ui.user) return TRUE return FALSE diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index ba3dbc709cc..abfe7ff0150 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -149,12 +149,12 @@ a creative player the means to solve many problems. Circuits are held inside an if(params["link"]) linked = locate(params["link"]) in pin.linked - var/obj/held_item = usr.get_active_hand() + var/obj/held_item = ui.user.get_active_hand() . = TRUE switch(action) if("rename") - rename_component(usr) + rename_component(ui.user) return if("wire", "pin_name", "pin_data", "pin_unwire") @@ -162,37 +162,37 @@ a creative player the means to solve many problems. Circuits are held inside an var/obj/item/multitool/M = held_item switch(action) if("pin_name") - M.wire(pin, usr) + M.wire(pin, ui.user) if("pin_data") var/datum/integrated_io/io = pin - io.ask_for_pin_data(usr, held_item) // The pins themselves will determine how to ask for data, and will validate the data. + io.ask_for_pin_data(ui.user, held_item) // The pins themselves will determine how to ask for data, and will validate the data. if("pin_unwire") - M.unwire(pin, linked, usr) + M.unwire(pin, linked, ui.user) else if(istype(held_item, /obj/item/integrated_electronics/wirer)) var/obj/item/integrated_electronics/wirer/wirer = held_item if(linked) - wirer.wire(linked, usr) + wirer.wire(linked, ui.user) else if(pin) - wirer.wire(pin, usr) + wirer.wire(pin, ui.user) else if(istype(held_item, /obj/item/integrated_electronics/debugger)) var/obj/item/integrated_electronics/debugger/debugger = held_item if(pin) - debugger.write_data(pin, usr) + debugger.write_data(pin, ui.user) else - to_chat(usr, span_warning("You can't do a whole lot without the proper tools.")) + to_chat(ui.user, span_warning("You can't do a whole lot without the proper tools.")) return if("scan") if(istype(held_item, /obj/item/integrated_electronics/debugger)) var/obj/item/integrated_electronics/debugger/D = held_item if(D.accepting_refs) - D.afterattack(src, usr, TRUE) + D.afterattack(src, ui.user, TRUE) else - to_chat(usr, span_warning("The Debugger's 'ref scanner' needs to be on.")) + to_chat(ui.user, span_warning("The Debugger's 'ref scanner' needs to be on.")) else - to_chat(usr, span_warning("You need a multitool/debugger set to 'ref' mode to do that.")) + to_chat(ui.user, span_warning("You need a multitool/debugger set to 'ref' mode to do that.")) return @@ -200,12 +200,12 @@ a creative player the means to solve many problems. Circuits are held inside an var/obj/item/integrated_circuit/examined = locate(params["ref"]) if(istype(examined) && (examined.loc == loc)) if(ui.parent_ui) - examined.tgui_interact(usr, null, ui.parent_ui) + examined.tgui_interact(ui.user, null, ui.parent_ui) else - examined.tgui_interact(usr) + examined.tgui_interact(ui.user) if("remove") - remove(usr) + remove(ui.user) return return FALSE diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index d9ba4ec9be0..6781b90d792 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -183,7 +183,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("build") @@ -209,15 +209,15 @@ return if(!debug) - if(!Adjacent(usr)) - to_chat(usr, span_notice("You are too far away from \the [src].")) + if(!Adjacent(ui.user)) + to_chat(ui.user, span_notice("You are too far away from \the [src].")) if(metal - cost < 0) - to_chat(usr, span_warning("You need [cost] metal to build that!.")) + to_chat(ui.user, span_warning("You need [cost] metal to build that!.")) return 1 metal -= cost var/obj/item/built = new build_type(get_turf(loc)) - usr.put_in_hands(built) - to_chat(usr, span_notice("[capitalize(built.name)] printed.")) + ui.user.put_in_hands(built) + to_chat(ui.user, span_notice("[capitalize(built.name)] printed.")) playsound(src, 'sound/items/jaws_pry.ogg', 50, TRUE) return TRUE diff --git a/code/modules/looking_glass/lg_console.dm b/code/modules/looking_glass/lg_console.dm index a1648cc1df8..4b7d2ab6495 100644 --- a/code/modules/looking_glass/lg_console.dm +++ b/code/modules/looking_glass/lg_console.dm @@ -112,14 +112,14 @@ my_area.toggle_optional(immersion) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/looking_glass/emag_act(var/remaining_charges, var/mob/user as mob) if (!emagged) playsound(src, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 to_chat(user, span_notice("You unlock several programs that were hidden somewhere in memory.")) - log_game("[key_name(usr)] emagged the [name]") + log_game("[key_name(user)] emagged the [name]") return 1 return diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index ca710cb04f1..322e5d7beaf 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -361,7 +361,7 @@ var/list/name_to_material new /datum/stack_recipe("[display_name] armor plate", /obj/item/material/armor_plating, 1, time = 20, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] armor plate insert", /obj/item/material/armor_plating/insert, 2, time = 40, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] grave marker", /obj/item/material/gravemarker, 5, time = 50, supplied_material = "[name]", pass_stack_color = TRUE), - new /datum/stack_recipe("[display_name] ring", /obj/item/clothing/gloves/ring/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), + new /datum/stack_recipe("[display_name] ring", /obj/item/clothing/accessory/ring/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] bracelet", /obj/item/clothing/accessory/bracelet/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE) ) diff --git a/code/modules/materials/materials/organic/leather.dm b/code/modules/materials/materials/organic/leather.dm index fe291e4d8d5..607361d07e2 100644 --- a/code/modules/materials/materials/organic/leather.dm +++ b/code/modules/materials/materials/organic/leather.dm @@ -33,7 +33,7 @@ new /datum/stack_recipe("pouch, melee", /obj/item/storage/pouch/baton, 10, time = 20 SECONDS, pass_stack_color = FALSE, recycle_material = "[name]"), //vorestation Add new /datum/stack_recipe("crude [display_name] bandage", /obj/item/stack/medical/crude_pack, 1, time = 2 SECONDS, pass_stack_color = TRUE, recycle_material = "[name]"), new /datum/stack_recipe("[display_name] net", /obj/item/material/fishing_net, 10, time = 5 SECONDS, supplied_material = "[name]", pass_stack_color = TRUE), - new /datum/stack_recipe("[display_name] ring", /obj/item/clothing/gloves/ring/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), + new /datum/stack_recipe("[display_name] ring", /obj/item/clothing/accessory/ring/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] bracelet", /obj/item/clothing/accessory/bracelet/material, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] armor plate", /obj/item/material/armor_plating, 1, time = 20, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("empty sandbag", /obj/item/stack/emptysandbag, 2, time = 2 SECONDS, pass_stack_color = TRUE, supplied_material = "[name]"), diff --git a/code/modules/media/walkpod.dm b/code/modules/media/walkpod.dm index 6ea3552d64c..eadc493a82e 100644 --- a/code/modules/media/walkpod.dm +++ b/code/modules/media/walkpod.dm @@ -216,7 +216,7 @@ return TRUE if("play") if(current_track == null) - to_chat(usr, "No track selected.") + to_chat(ui.user, "No track selected.") else StartPlaying() return TRUE diff --git a/code/modules/mentor/mentorhelp.dm b/code/modules/mentor/mentorhelp.dm index d801effd6eb..2d748823ce1 100644 --- a/code/modules/mentor/mentorhelp.dm +++ b/code/modules/mentor/mentorhelp.dm @@ -420,10 +420,6 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new) set category = "Admin" set name = "Mentorhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted).")) diff --git a/code/modules/mining/abandonedcrates_vr.dm b/code/modules/mining/abandonedcrates_vr.dm index 7d7ed2ad983..a443839f9b5 100644 --- a/code/modules/mining/abandonedcrates_vr.dm +++ b/code/modules/mining/abandonedcrates_vr.dm @@ -30,6 +30,7 @@ list(/obj/item/melee/classic_baton, 6) = 3, list(/obj/item/rig/industrial, 6) = 3, list(/obj/item/multitool/hacktool, 5) = 3, + list(/obj/item/multitool/hacktool/modified, 4) = 4, list(/obj/item/toy/katana, 1) = 2, list(/obj/item/clothing/head/kitty, 1) = 2, list(pick(subtypesof(/obj/item/soap)), 1) = 2, diff --git a/code/modules/mining/machinery/machine_processing.dm b/code/modules/mining/machinery/machine_processing.dm index 4d03ae6a72c..df23a27a6ef 100644 --- a/code/modules/mining/machinery/machine_processing.dm +++ b/code/modules/mining/machinery/machine_processing.dm @@ -90,17 +90,17 @@ return data -/obj/machinery/mineral/processing_unit_console/tgui_act(action, list/params) +/obj/machinery/mineral/processing_unit_console/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("toggleSmelting") var/ore = params["ore"] var/new_setting = params["set"] if(new_setting == null) - new_setting = tgui_input_list(usr, "What setting do you wish to use for processing [ore]]?", "Process Setting", list("Smelting","Compressing","Alloying","Nothing")) + new_setting = tgui_input_list(ui.user, "What setting do you wish to use for processing [ore]]?", "Process Setting", list("Smelting","Compressing","Alloying","Nothing")) if(!new_setting) return switch(new_setting) @@ -119,7 +119,7 @@ if("logoff") if(!inserted_id) return - usr.put_in_hands(inserted_id) + ui.user.put_in_hands(inserted_id) inserted_id = null . = TRUE if("claim") @@ -128,16 +128,16 @@ inserted_id.mining_points += machine.points machine.points = 0 else - to_chat(usr, span_warning("Required access not found.")) + to_chat(ui.user, span_warning("Required access not found.")) . = TRUE if("insert") - var/obj/item/card/id/I = usr.get_active_hand() + var/obj/item/card/id/I = ui.user.get_active_hand() if(istype(I)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) inserted_id = I else - to_chat(usr, span_warning("No valid ID.")) + to_chat(ui.user, span_warning("No valid ID.")) . = TRUE if("speed_toggle") machine.toggle_speed() diff --git a/code/modules/mining/machinery/machine_stacking.dm b/code/modules/mining/machinery/machine_stacking.dm index c01007c6364..9b74555e7a8 100644 --- a/code/modules/mining/machinery/machine_stacking.dm +++ b/code/modules/mining/machinery/machine_stacking.dm @@ -49,7 +49,7 @@ data["stackingAmt"] = machine.stack_amt return data -/obj/machinery/mineral/stacking_unit_console/tgui_act(action, list/params) +/obj/machinery/mineral/stacking_unit_console/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE @@ -66,7 +66,7 @@ machine.stack_storage[stack] = 0 . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /**********************Mineral stacking unit**************************/ diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 3bab28eae20..f679591e2d6 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -173,8 +173,8 @@ var/list/mining_overlay_cache = list() recalculate_directional_opacity() if(ticker && ticker.current_state == GAME_STATE_PLAYING) reconsider_lights() - if(air_master) - air_master.mark_for_update(src) + if(SSair) + SSair.mark_for_update(src) /turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32) //Cache miss diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index ab46d4df935..798c8eea576 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -257,7 +257,7 @@ ui.set_autoupdate(FALSE) -/obj/machinery/mineral/equipment_vendor/tgui_act(action, params) +/obj/machinery/mineral/equipment_vendor/tgui_act(action, params, datum/tgui/ui) if(..()) return @@ -266,7 +266,7 @@ if("logoff") if(!inserted_id) return - usr.put_in_hands(inserted_id) + ui.user.put_in_hands(inserted_id) inserted_id = null if("purchase") if(!inserted_id) @@ -279,7 +279,7 @@ return var/datum/data/mining_equipment/prize = prize_list[category][name] if(prize.cost > get_points(inserted_id)) // shouldn't be able to access this since the button is greyed out, but.. - to_chat(usr, span_danger("You have insufficient points.")) + to_chat(ui.user, span_danger("You have insufficient points.")) flick(icon_deny, src) //VOREStation Add return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 83a81d2c36d..cea6d489830 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -187,6 +187,27 @@ Works together with spawning an observer, noted above. handle_regular_hud_updates() handle_vision() + check_area() //RS Port #658 + +//RS Port #658 Start +/mob/observer/dead/proc/check_area() + if(client?.holder) + return + if(!isturf(loc)) + return + var/area/A = get_area(src) + if(A.block_ghosts) + to_chat(src, span_warning("Ghosts can't enter this location.")) + return_to_spawn() + +/mob/observer/dead/proc/return_to_spawn() + if(following) + stop_following() + var/obj/O = locate("landmark*Observer-Start") + if(istype(O)) + to_chat(src, span_notice("Now teleporting.")) + forceMove(O.loc) +//RS Port #658 End /mob/proc/ghostize(var/can_reenter_corpse = 1) if(key) @@ -223,7 +244,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp announce_ghost_joinleave(ghostize(1)) else var/response - if(src.client && src.client.holder) + if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,src)) //No need to sanity check for client and holder here as that is part of check_rights response = tgui_alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", list("Admin Ghost", "Ghost", "Stay in body")) if(response == "Admin Ghost") if(!src.client) @@ -429,6 +450,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp stop_following() return + //RS Port #658 Start + var/area/A = get_area(destination) + if(A.block_ghosts) + to_chat(src,span_warning("Sorry, that area does not allow ghosts.")) + if(following) + stop_following() + return + //RS Port #658 End return ..() /mob/observer/dead/Move(atom/newloc, direct = 0, movetime) diff --git a/code/modules/mob/language/language.dm b/code/modules/mob/language/language.dm index 41f1b65066a..44626f5e0e2 100644 --- a/code/modules/mob/language/language.dm +++ b/code/modules/mob/language/language.dm @@ -302,7 +302,7 @@ else var/datum/language/L = locate(href_list["default_lang"]) if(L && (L in languages)) - set_default_language(L) + apply_default_language(L) check_languages() return 1 else if(href_list["set_lang_key"]) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index f5bcb70f4ee..fdaea498df2 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -201,8 +201,8 @@ /mob/living/bot/cleanbot/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - usr.set_machine(src) - add_fingerprint(usr) + ui.user.set_machine(src) + add_fingerprint(ui.user) switch(action) if("start") if(on) @@ -222,11 +222,11 @@ . = TRUE if("wet_floors") wet_floors = !wet_floors - to_chat(usr, span_notice("You twiddle the screw.")) + to_chat(ui.user, span_notice("You twiddle the screw.")) . = TRUE if("spray_blood") spray_blood = !spray_blood - to_chat(usr, span_notice("You press the weird button.")) + to_chat(ui.user, span_notice("You press the weird button.")) . = TRUE /mob/living/bot/cleanbot/emag_act(var/remaining_uses, var/mob/user) @@ -272,6 +272,6 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && src.loc != user) return created_name = t diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm index 02e0150ed2c..1aaeb0bbe4c 100644 --- a/code/modules/mob/living/bot/edCLNbot.dm +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -87,15 +87,15 @@ switch(action) if("red_switch") red_switch = !red_switch - to_chat(usr, span_notice("You flip the red switch [red_switch ? "on" : "off"].")) + to_chat(ui.user, span_notice("You flip the red switch [red_switch ? "on" : "off"].")) . = TRUE if("green_switch") green_switch = !green_switch - to_chat(usr, span_notice("You flip the green switch [green_switch ? "on" : "off"].")) + to_chat(ui.user, span_notice("You flip the green switch [green_switch ? "on" : "off"].")) . = TRUE if("blue_switch") blue_switch = !blue_switch - to_chat(usr, span_notice("You flip the blue switch [blue_switch ? "on" : "off"].")) + to_chat(ui.user, span_notice("You flip the blue switch [blue_switch ? "on" : "off"].")) . = TRUE /mob/living/bot/cleanbot/edCLN/emag_act(var/remaining_uses, var/mob/user) @@ -124,7 +124,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && src.loc != user) return created_name = t return diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index af680093616..edf17d09957 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -84,11 +84,11 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("power") - if(!access_scanner.allowed(usr)) + if(!access_scanner.allowed(ui.user)) return FALSE if(on) turn_off() @@ -413,7 +413,7 @@ t = sanitize(t, MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 95ef2818466..918fc30134a 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -86,7 +86,7 @@ turn_on() . = TRUE - if(locked && !issilicon(usr)) + if(locked && !issilicon(ui.user)) return switch(action) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 8220da54090..205952f0a00 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -269,20 +269,20 @@ if(..()) return TRUE - usr.set_machine(src) - add_fingerprint(usr) + ui.user.set_machine(src) + add_fingerprint(ui.user) . = TRUE switch(action) if("power") - if(!access_scanner.allowed(usr)) + if(!access_scanner.allowed(ui.user)) return FALSE if(on) turn_off() else turn_on() - if(locked && !issilicon(usr)) + if(locked && !issilicon(ui.user)) return TRUE switch(action) @@ -538,7 +538,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return created_name = t else diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index 89fc3a8706a..c835e11a967 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -82,43 +82,43 @@ data["safety"] = safety return data -/mob/living/bot/mulebot/tgui_act(action, params) +/mob/living/bot/mulebot/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("power") if(on) turn_off() else turn_on() - visible_message("[usr] switches [on ? "on" : "off"] [src].") + visible_message("[ui.user] switches [on ? "on" : "off"] [src].") . = TRUE if("stop") - obeyCommand("Stop") + obeyCommand(ui.user, "Stop") . = TRUE if("go") - obeyCommand("GoTD") + obeyCommand(ui.user, "GoTD") . = TRUE if("home") - obeyCommand("Home") + obeyCommand(ui.user, "Home") . = TRUE if("destination") - obeyCommand("SetD") + obeyCommand(ui.user, "SetD") . = TRUE if("sethome") var/new_dest var/list/beaconlist = GetBeaconList() if(beaconlist.len) - new_dest = tgui_input_list(usr, "Select new home tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist) + new_dest = tgui_input_list(ui.user, "Select new home tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist) else - tgui_alert_async(usr, "No destination beacons available.") + tgui_alert_async(ui.user, "No destination beacons available.") if(new_dest) home = get_turf(beaconlist[new_dest]) homeName = new_dest @@ -144,7 +144,7 @@ ..() update_icons() -/mob/living/bot/mulebot/proc/obeyCommand(var/command) +/mob/living/bot/mulebot/proc/obeyCommand(mob/user, var/command) switch(command) if("Home") resetTarget() @@ -154,9 +154,9 @@ var/new_dest var/list/beaconlist = GetBeaconList() if(beaconlist.len) - new_dest = tgui_input_list(usr, "Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist) + new_dest = tgui_input_list(user, "Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist) else - tgui_alert_async(usr, "No destination beacons available.") + tgui_alert_async(user, "No destination beacons available.") if(new_dest) resetTarget() target = get_turf(beaconlist[new_dest]) diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index aa5fcfc8738..c9ee5783647 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -129,11 +129,11 @@ if(..()) return - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("power") - if(!access_scanner.allowed(usr)) + if(!access_scanner.allowed(ui.user)) return FALSE if(on) turn_off() @@ -141,7 +141,7 @@ turn_on() . = TRUE - if(locked && !issilicon(usr)) + if(locked && !issilicon(ui.user)) return TRUE switch(action) diff --git a/code/modules/mob/living/butchering.dm b/code/modules/mob/living/butchering.dm index 05e064acbe8..ad1eecfba60 100644 --- a/code/modules/mob/living/butchering.dm +++ b/code/modules/mob/living/butchering.dm @@ -3,6 +3,7 @@ /mob/living var/meat_amount = 0 // How much meat to drop from this mob when butchered var/obj/meat_type // The meat object to drop + var/name_the_meat = TRUE var/gib_on_butchery = FALSE var/butchery_drops_organs = TRUE // Do we spawn and/or drop organs when butchered? @@ -17,7 +18,8 @@ being_butchered = TRUE while(meat_amount > 0 && do_after(user, 0.5 SECONDS * (mob_size / 10), src)) var/obj/item/meat = new meat_type(get_turf(src)) - meat.name = "[src.name] [meat.name]" + if(name_the_meat) + meat.name = "[src.name] [meat.name]" new /obj/effect/decal/cleanable/blood/splatter(get_turf(src)) meat_amount-- being_butchered = FALSE diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index f4d90e97120..009667dbf4b 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -2,7 +2,7 @@ //Start of a breath chain, calls breathe() /mob/living/carbon/handle_breathing() - if(air_master.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath + if(SSair.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath breathe() /mob/living/carbon/proc/breathe() diff --git a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm index 7beb0276635..54df0bdb0b8 100644 --- a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm +++ b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm @@ -22,7 +22,7 @@ var/to_wear_r_radio = null var/to_wear_uniform = /obj/item/clothing/under/color/grey var/to_wear_suit = /obj/item/clothing/suit/armor/material/makeshift/glass - var/to_wear_gloves = /obj/item/clothing/gloves/ring/material/platinum + var/to_wear_gloves = /obj/item/clothing/accessory/ring/material/platinum var/to_wear_shoes = /obj/item/clothing/shoes/galoshes var/to_wear_belt = /obj/item/storage/belt/utility/full var/to_wear_l_pocket = /obj/item/soap @@ -126,7 +126,7 @@ to_wear_helmet = /obj/item/clothing/head/helmet/dermal to_wear_glasses = /obj/item/clothing/glasses/goggles to_wear_mask = /obj/item/clothing/mask/gas/half - to_wear_l_radio = /obj/item/radio/headset/headset_rob + to_wear_l_radio = /obj/item/radio/headset to_wear_r_radio = null to_wear_uniform = /obj/item/clothing/under/color/grey to_wear_suit = /obj/item/clothing/suit/armor/vest diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 21e87074bf3..90156f2f5ef 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -9,6 +9,8 @@ var/list/_human_default_emotes = list( /decl/emote/audible/synth/dwoop, /decl/emote/audible/synth/boop, /decl/emote/audible/synth/robochirp, + /decl/emote/audible/synth/ding, + /decl/emote/audible/synth/microwave, /decl/emote/visible/nod, /decl/emote/visible/shake, /decl/emote/visible/shiver, diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 73913ba2951..80dabf789d2 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -107,12 +107,10 @@ if(w_uniform && !(skip_gear & EXAMINE_SKIPJUMPSUIT) && w_uniform.show_examine) //Ties var/tie_msg - var/tie_msg_warn if(istype(w_uniform,/obj/item/clothing/under) && !(skip_gear & EXAMINE_SKIPTIE)) var/obj/item/clothing/under/U = w_uniform if(LAZYLEN(U.accessories)) tie_msg += ". Attached to it is" - tie_msg_warn += "! Attached to it is" var/list/accessory_descs = list() if(skip_gear & EXAMINE_SKIPHOLSTER) for(var/obj/item/clothing/accessory/A in U.accessories) @@ -139,12 +137,10 @@ //suit/armour if(wear_suit) var/tie_msg - var/tie_msg_warn if(istype(wear_suit,/obj/item/clothing/suit)) var/obj/item/clothing/suit/U = wear_suit if(LAZYLEN(U.accessories)) tie_msg += ". Attached to it is" - tie_msg_warn += "! Attached to it is" var/list/accessory_descs = list() for(var/accessory in U.accessories) accessory_descs += "
\a [accessory]" @@ -185,10 +181,21 @@ //gloves if(gloves && !(skip_gear & EXAMINE_SKIPGLOVES) && gloves.show_examine) + var/gloves_acc_msg + if(istype(gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = gloves + if(LAZYLEN(G.accessories)) + gloves_acc_msg += ". Attached to it is" + var/list/accessory_descs = list() + for(var/obj/item/clothing/accessory/A in G.accessories) + accessory_descs += "\a [A]" + + gloves_acc_msg += " [lowertext(english_list(accessory_descs))]." if(gloves.blood_DNA) - msg += span_warning("[T.He] [T.has] [icon2html(gloves,user.client)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != "#030303") ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands!") + msg += span_warning("[T.He] [T.has] [icon2html(gloves,user.client)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != "#030303") ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands![gloves_acc_msg]") else - msg += "[T.He] [T.has] [icon2html(gloves,user.client)] \a [gloves] on [T.his] hands." + msg += "[T.He] [T.has] [icon2html(gloves,user.client)] \a [gloves] on [T.his] hands.[gloves_acc_msg]" + else if(blood_DNA && !(skip_body & EXAMINE_SKIPHANDS)) msg += span_warning("[T.He] [T.has] [(hand_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained hands!") diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 542dafb6f68..7911b330397 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -272,8 +272,12 @@ var/obj/item/clothing/gloves/G = H.gloves real_damage += G.punch_force hit_dam_type = G.punch_damtype - if(H.pulling_punches && !attack.sharp && !attack.edge) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN, BUT YOU CAN'T "PULL" A KNIFE - hit_dam_type = AGONY + else if(istype(H.gloves, /obj/item/clothing/accessory)) + var/obj/item/clothing/accessory/G = H.gloves + real_damage += G.punch_force + hit_dam_type = G.punch_damtype + if(H.pulling_punches && !attack.sharp && !attack.edge) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN, BUT YOU CAN'T "PULL" A KNIFE + hit_dam_type = AGONY real_damage *= damage_multiplier rand_damage *= damage_multiplier if(HULK in H.mutations) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index d182593d1f0..b1244ee799d 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -54,6 +54,7 @@ var/list/all_underwear = list() var/list/all_underwear_metadata = list() var/list/hide_underwear = list() + var/headset = 1 //Which headset type the player has chosen. var/backbag = 2 //Which backpack type the player has chosen. var/pdachoice = 1 //Which PDA type the player has chosen. @@ -81,10 +82,6 @@ var/obj/item/l_store = null var/obj/item/s_store = null - var/used_skillpoints = 0 - var/skill_specialization = null - var/list/skills = list() - var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life() var/special_voice = "" // For changing our voice. Used by a symptom. diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 3d071559965..7f7b2d7aadb 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1780,7 +1780,7 @@ stomach_contents.Remove(M) qdel(M) continue - if(air_master.current_cycle%3==1) + if(SSair.current_cycle%3==1) if(!(M.status_flags & GODMODE)) M.adjustBruteLoss(5) adjust_nutrition(10) diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm index 3d62d0d033f..d0eb62be532 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm @@ -31,6 +31,13 @@ set desc = "Shift yourself out of alignment with realspace to travel quickly to different areas." set category = "Abilities.Shadekin" + //RS Port #658 Start + var/area/A = get_area(src) + if(!client?.holder && A.block_phase_shift) + to_chat(src, span_warning("You can't do that here!")) + return + //RS Port #658 End + var/ability_cost = 100 var/darkness = 1 @@ -76,19 +83,30 @@ to_chat(src,span_warning("You can't use that here!")) return FALSE - forceMove(T) - var/original_canmove = canmove - SetStunned(0) - SetWeakened(0) - if(buckled) - buckled.unbuckle_mob() - if(pulledby) - pulledby.stop_pulling() - stop_pulling() - canmove = FALSE - //Shifting in if(ability_flags & AB_PHASE_SHIFTED) + phase_in(T) + //Shifting out + else + phase_out(T) + + +/mob/living/carbon/human/proc/phase_in(var/turf/T) + if(ability_flags & AB_PHASE_SHIFTED) + + // pre-change + forceMove(T) + var/original_canmove = canmove + SetStunned(0) + SetWeakened(0) + if(buckled) + buckled.unbuckle_mob() + if(pulledby) + pulledby.stop_pulling() + stop_pulling() + + // change + canmove = FALSE ability_flags &= ~AB_PHASE_SHIFTED ability_flags |= AB_PHASE_SHIFTING mouse_opacity = 1 @@ -137,8 +155,22 @@ L.broken() else L.flicker(10) - //Shifting out - else + +/mob/living/carbon/human/proc/phase_out(var/turf/T) + if(!(ability_flags & AB_PHASE_SHIFTED)) + // pre-change + forceMove(T) + var/original_canmove = canmove + SetStunned(0) + SetWeakened(0) + if(buckled) + buckled.unbuckle_mob() + if(pulledby) + pulledby.stop_pulling() + stop_pulling() + canmove = FALSE + + // change ability_flags |= AB_PHASE_SHIFTED ability_flags |= AB_PHASE_SHIFTING mouse_opacity = 0 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 72b4396d61a..863e6cd0a99 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -212,6 +212,9 @@ var/can_space_freemove = FALSE // Can we freely move in space? var/can_zero_g_move = FALSE // What about just in zero-g non-space? + var/swim_mult = 1 //multiplier to our z-movement rate for swimming + var/climb_mult = 1 //multiplier to our z-movement rate for lattices/catwalks + var/item_slowdown_mod = 1 // How affected by item slowdown the species is. var/primitive_form // Lesser form, if any (ie. monkey for humans) var/greater_form // Greater form, if any, ie. human for monkeys. diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index cc02a1f64a4..d4f5912d53e 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -25,11 +25,9 @@ edge = TRUE /datum/unarmed_attack/claws/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) - var/skill = user.skills["combat"] var/obj/item/organ/external/affecting = target.get_organ(zone) var/datum/gender/T = gender_datums[user.get_visible_gender()] var/datum/gender/TT = gender_datums[target.get_visible_gender()] - if(!skill) skill = 1 attack_damage = CLAMP(attack_damage, 1, 5) if(target == user) diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index a4bdf523a45..0b7e542bc98 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -300,7 +300,7 @@ last_special = world.time + 25 - var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", color) as null|color + var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", color) as null|color if(!new_skin) return color = new_skin diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index b9043316123..9a7953ce2f0 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -272,7 +272,7 @@ to_chat(src,span_warning("You must be awake and standing to perform this action!")) return - var/new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", GLOB.playable_species) + var/new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", GLOB.playable_species) if(new_species) species?.base_species = new_species // Really though you better have a species regenerate_icons() //Expensive, but we need to recrunch all the icons we're wearing diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index c2d52b273b9..cce23f93615 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -242,6 +242,8 @@ reagent_tag = IS_TAJARA allergens = ALLERGEN_STIMULANT + climb_mult = 0.75 + move_trail = /obj/effect/decal/cleanable/blood/tracks/paw heat_discomfort_level = 292 diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index 0eba8870997..fb8f73b9529 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -4,15 +4,15 @@ // Sanity is mostly handled in chimera_regenerate() if(stat == DEAD) - var/confirm = tgui_alert(usr, "Are you sure you want to regenerate your corpse? This process can take up to thirty minutes.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to regenerate your corpse? This process can take up to thirty minutes.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() else if (quickcheckuninjured()) - var/confirm = tgui_alert(usr, "Are you sure you want to regenerate? As you are uninjured this will only take 30 seconds and match your appearance to your character slot.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to regenerate? As you are uninjured this will only take 30 seconds and match your appearance to your character slot.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() else - var/confirm = tgui_alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to fifteen minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to completely reconstruct your form? This process can take up to fifteen minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() @@ -113,7 +113,7 @@ remove_verb(src, /mob/living/carbon/human/proc/hatch) return - var/confirm = tgui_alert(usr, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") //Dead when hatching @@ -830,13 +830,13 @@ if(!T_ext) //Picking something here is critical. return if(T_ext.vital) - if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") + if(tgui_alert(src, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //Any internal organ, if there are any var/obj/item/organ/internal/T_int = tgui_input_list(src,"Do you wish to severely damage an internal organ, as well? If not, click 'cancel'", "Organ Choice", T_ext.internal_organs) if(T_int && T_int.vital) - if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") + if(tgui_alert(src, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //And a belly, if they want @@ -1112,7 +1112,7 @@ to_chat(src, span_warning("You are not a weaver! How are you doing this? Tell a developer!")) return - var/new_silk_color = input(usr, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color + var/new_silk_color = input(src, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color if(new_silk_color) species.silk_color = new_silk_color @@ -1274,11 +1274,11 @@ return if(choice == "Color") //Easy way to set color so we don't bloat up the menu with even more buttons. - var/new_color = input(usr, "Choose a color to set your appendage to!", "", appendage_color) as color|null + var/new_color = input(src, "Choose a color to set your appendage to!", "", appendage_color) as color|null if(new_color) appendage_color = new_color if(choice == "Functionality") //Easy way to set color so we don't bloat up the menu with even more buttons. - var/choice2 = tgui_alert(usr, "Choose if you want to be pulled to the target or pull them to you!", "Functionality Setting", list("Pull target to self", "Pull self to target")) + var/choice2 = tgui_alert(src, "Choose if you want to be pulled to the target or pull them to you!", "Functionality Setting", list("Pull target to self", "Pull self to target")) if(!choice2) return if(choice2 == "Pull target to self") @@ -1564,19 +1564,19 @@ return if(choice == "Change reagent") - var/reagent_choice = tgui_input_list(usr, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents) + var/reagent_choice = tgui_input_list(src, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents) if(reagent_choice) trait_injection_selected = reagent_choice to_chat(src, span_notice("You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]")) return if(choice == "Change amount") - var/amount_choice = tgui_input_number(usr, "How much of the reagent do you want to inject? (Up to 5 units) (Can select 0 for a bite that doesn't inject venom!)", "How much?", trait_injection_amount, 5, 0, round_value = FALSE) + var/amount_choice = tgui_input_number(src, "How much of the reagent do you want to inject? (Up to 5 units) (Can select 0 for a bite that doesn't inject venom!)", "How much?", trait_injection_amount, 5, 0, round_value = FALSE) if(amount_choice >= 0) trait_injection_amount = amount_choice to_chat(src, span_notice("You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]")) return if(choice == "Change verb") - var/verb_choice = tgui_input_text(usr, "Choose the percieved manner of injection, such as 'bites' or 'stings', don't be misleading or abusive. This will show up in game as ('X' 'Verb' 'Y'. Example: X bites Y.)", "How are you injecting?", trait_injection_verb, max_length = 60) //Whoaa there cowboy don't put a novel in there. + var/verb_choice = tgui_input_text(src, "Choose the percieved manner of injection, such as 'bites' or 'stings', don't be misleading or abusive. This will show up in game as ('X' 'Verb' 'Y'. Example: X bites Y.)", "How are you injecting?", trait_injection_verb, max_length = 60) //Whoaa there cowboy don't put a novel in there. if(verb_choice) trait_injection_verb = verb_choice to_chat(src, span_notice("You will [trait_injection_verb] your targets.")) @@ -1611,7 +1611,7 @@ You can also bite synthetics, but due to how synths work, they won't have anything injected into them.
"} - usr << browse(output,"window=chemicalrefresher") + src << browse(output,"window=chemicalrefresher") return else var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. AND KEEP COPYPASTING IT (Pointing Rick Dalton: "That's my code!" ~CL) @@ -1657,7 +1657,7 @@ add_attack_logs(src,target,"Injection trait ([trait_injection_selected], [trait_injection_amount])") if(target.reagents && (trait_injection_amount > 0) && !synth) target.reagents.add_reagent(trait_injection_selected, trait_injection_amount) - var/ourmsg = "[usr] [trait_injection_verb] [target] " + var/ourmsg = "[src] [trait_injection_verb] [target] " switch(zone_sel.selecting) if(BP_HEAD) ourmsg += "on the head!" diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm index e2a346158a3..997aac129f9 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm @@ -384,6 +384,8 @@ silk_reserve = 500 silk_max_reserve = 1000 + climb_mult = 0.75 + /datum/species/spider/handle_environment_special(var/mob/living/carbon/human/H) if(H.stat == DEAD) // If they're dead they won't need anything. return diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index e623591f576..6532e7c7492 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -110,6 +110,7 @@ water_breather = TRUE water_movement = -4 //Negates shallow. Halves deep. + swim_mult = 0.5 flesh_color = "#AFA59E" base_color = "#777777" diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/_traits.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/_traits.dm index 46a4b4c1d57..1c906b501bc 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/_traits.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/_traits.dm @@ -8,6 +8,7 @@ #define TRAIT_PREF_TYPE_BOOLEAN 1 #define TRAIT_PREF_TYPE_COLOR 2 +#define TRAIT_PREF_TYPE_STRING 3 #define TRAIT_NO_VAREDIT_TARGET 0 #define TRAIT_VAREDIT_TARGET_SPECIES 1 diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm index 84fba1d1cba..ffd9f10b88b 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm @@ -188,7 +188,9 @@ /datum/trait/negative/bad_swimmer name = "Bad Swimmer" - desc = "You can't swim very well, all water slows you down a lot and you drown in deep water." + desc = "You can't swim very well, all water slows you down a lot and you drown in deep water. You also swim up and down 25% slower." cost = -1 custom_only = FALSE - var_changes = list("bad_swimmer" = 1, "water_movement" = 4) + var_changes = list("bad_swimmer" = 1, "water_movement" = 4, "swim_mult" = 1.25) + varchange_type = TRAIT_VARCHANGE_LESS_BETTER + excludes = list(/datum/trait/positive/good_swimmer) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 441fddafa08..b69a65d13bb 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -1171,3 +1171,48 @@ /datum/trait/neutral/agraviaphobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) ..() H.phobias |= AGRAVIAPHOBIA + +/datum/trait/neutral/gargoyle + name = "Gargoyle (Adjustable)" + desc = "You turn into a statue (or similar) at will, but also whenever you run out of energy. Being a statue replenishes your energy slowly." + cost = 0 + custom_only = FALSE //slimes, xenochimera, diona, proteans, etc, basically anything but custom doesn't make sense (as much as I wanna play a petrifying slime) + //Nah makes perfect sense, they could just be gene modded, not to mention we can expand this to have the statue and description of it renameable as well as color adjustable, to support general petrification + has_preferences = list("identifier" = list(TRAIT_PREF_TYPE_STRING, "Identifier", TRAIT_NO_VAREDIT_TARGET, "statue"), + "material" = list(TRAIT_PREF_TYPE_STRING, "Material", TRAIT_NO_VAREDIT_TARGET, "stone"), + "tint" = list(TRAIT_PREF_TYPE_COLOR, "Statue color", TRAIT_NO_VAREDIT_TARGET, "#FFFFFF"), + "adjective" = list(TRAIT_PREF_TYPE_STRING, "Adjective", TRAIT_NO_VAREDIT_TARGET, "hardens")/*, + "pickupable" = list(TRAIT_PREF_TYPE_BOOLEAN, "Can be picked up", TRAIT_NO_VAREDIT_TARGET, FALSE)*/) + +/datum/trait/neutral/gargoyle/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/list/trait_prefs) + ..() + var/datum/component/gargoyle/G = H.LoadComponent(/datum/component/gargoyle) + if (trait_prefs) + G.tint = trait_prefs["tint"] + G.material = lowertext(trait_prefs["material"]) + G.identifier = lowertext(trait_prefs["identifier"]) + G.adjective = lowertext(trait_prefs["adjective"]) + +/datum/trait/neutral/gargoyle/apply_sanitization_to_string(var/pref, var/input) + if (has_preferences[pref][1] != TRAIT_PREF_TYPE_STRING || length(input) <= 0) + return + input = sanitizeSafe(input, 25) + if (length(input) <= 0) + return default_value_for_pref(pref) + input = lowertext(input) + if (pref == "adjective") + if (copytext_char(input, -1) != "s") + switch(copytext_char(input, -2)) + if ("ss") + input += "es" + if ("sh") + input += "es" + if ("ch") + input += "es" + else + switch(copytext_char(input, -1)) + if("s", "x", "z") + input += "es" + else + input += "s" + return input diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index 7551915c9dc..d3df8f312a9 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -121,6 +121,7 @@ name = "Winged Flight" desc = "Allows you to fly by using your wings. Don't forget to bring them!" cost = 0 + custom_only = FALSE has_preferences = list("flight_vore" = list(TRAIT_PREF_TYPE_BOOLEAN, "Flight Vore enabled on spawn", TRAIT_VAREDIT_TARGET_MOB, FALSE)) /datum/trait/positive/winged_flight/apply(var/datum/species/S,var/mob/living/carbon/human/H) @@ -241,12 +242,9 @@ cost = 1 var_changes = list("throwforce_absorb_threshold" = 10) - - - /datum/trait/positive/wall_climber name = "Climber, Amateur" - desc = "You can climb certain walls without tools! This is likely a personal skill you developed." + desc = "You can climb certain walls without tools! This is likely a personal skill you developed. You can also climb lattices and ladders a little bit faster than everyone else." tutorial = "You must approach a wall and right click it and select the \ 'climb wall' verb to climb it. You suffer from a movement delay of 1.5 with this trait.\n \ Your total climb time is expected to be 17.5 seconds. Tools may reduce this. \n\n \ @@ -255,12 +253,12 @@ cost = 1 custom_only = FALSE banned_species = list(SPECIES_TAJ, SPECIES_VASILISSAN) // They got unique climbing delay. - var_changes = list("can_climb" = TRUE) + var_changes = list("can_climb" = TRUE, "climb_mult" = 0.75) excludes = list(/datum/trait/positive/wall_climber_pro, /datum/trait/positive/wall_climber_natural) /datum/trait/positive/wall_climber_natural name = "Climber, Natural" - desc = "You can climb certain walls without tools! This is likely due to the unique anatomy of your species. CUSTOM AND XENOCHIM ONLY" + desc = "You can climb certain walls without tools! This is likely due to the unique anatomy of your species. You can climb lattices and ladders slightly faster than everyone else. CUSTOM AND XENOCHIM ONLY" tutorial = "You must approach a wall and right click it and select the \ 'climb wall' verb to climb it. You suffer from a movement delay of 1.5 with this trait.\n \ Your total climb time is expected to be 17.5 seconds. Tools may reduce this. \n\n \ @@ -268,13 +266,13 @@ a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" cost = 0 custom_only = FALSE - var_changes = list("can_climb" = TRUE) + var_changes = list("can_climb" = TRUE, "climb_mult" = 0.75) allowed_species = list(SPECIES_XENOCHIMERA, SPECIES_CUSTOM) //So that we avoid needless bloat for xenochim excludes = list(/datum/trait/positive/wall_climber_pro, /datum/trait/positive/wall_climber) /datum/trait/positive/wall_climber_pro name = "Climber, Professional" - desc = "You can climb certain walls without tools! You are a professional rock climber at this, letting you climb almost twice as fast!" + desc = "You can climb certain walls without tools! You are a professional rock climber at this, letting you climb almost twice as fast! You can also climb lattices and ladders a fair bit faster than everyone else!" tutorial = "You must approach a wall and right click it and select the \ 'climb wall' verb to climb it. Your movement delay is just 1.25 with this trait.\n \ Your climb time is expected to be 9 seconds. Tools may reduce this. \n\n \ @@ -282,7 +280,7 @@ a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" cost = 2 custom_only = FALSE - var_changes = list("climbing_delay" = 1.25) + var_changes = list("climbing_delay" = 1.25, "climb_mult" = 0.5) varchange_type = TRAIT_VARCHANGE_LESS_BETTER excludes = list(/datum/trait/positive/wall_climber,/datum/trait/positive/wall_climber_natural) @@ -292,3 +290,14 @@ /datum/trait/positive/wall_climber_pro/apply(var/datum/species/S,var/mob/living/carbon/human/H) ..() S.can_climb = TRUE + +/datum/trait/positive/good_swimmer + name = "Pro Swimmer" + desc = "You were top of your group in swimming class! This is of questionable usefulness on most planets, but hey, maybe you'll get to visit a nice beach world someday?" + tutorial = "You move faster in water, and can move up and down z-levels faster than other swimmers!" + cost = 1 + custom_only = FALSE + var_changes = list("water_movement" = -2, "swim_mult" = 0.5) + varchange_type = TRAIT_VARCHANGE_LESS_BETTER + excludes = list(/datum/trait/negative/bad_swimmer) + banned_species = list(SPECIES_AKULA) // They already swim better than this diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm index d47eda0a34e..fb02575361a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm @@ -75,4 +75,14 @@ return TRUE if(TRAIT_PREF_TYPE_COLOR) //color return "#ffffff" + if(TRAIT_PREF_TYPE_STRING) //string + return "" return + +/datum/trait/proc/apply_sanitization_to_string(var/pref, var/input) + if (has_preferences[pref][1] != TRAIT_PREF_TYPE_STRING || length(input) <= 0) + return default_value_for_pref(pref) + input = sanitizeSafe(input, MAX_NAME_LEN) + if (length(input) <= 0) + return default_value_for_pref(pref) + return input diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 388600f0764..b39101d98a3 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -27,7 +27,7 @@ toggle_sensors(user) return if("internals") - visible_message(span_danger("\The [usr] is trying to set \the [src]'s internals!")) + visible_message(span_danger("\The [user] is trying to set \the [src]'s internals!")) if(do_after(user,HUMAN_STRIP_DELAY,src)) toggle_internals(user) return @@ -38,7 +38,7 @@ var/obj/item/clothing/accessory/A = suit.accessories[1] if(!istype(A)) return - visible_message(span_danger("\The [usr] is trying to remove \the [src]'s [A.name]!")) + visible_message(span_danger("\The [user] is trying to remove \the [src]'s [A.name]!")) if(!do_after(user,HUMAN_STRIP_DELAY,src)) return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 116c3121763..968f62939b0 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -57,52 +57,6 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() cut_overlay(I) overlays_standing[cache_index] = null -// These are used as the layers for the icons, as well as indexes in a list that holds onto them. -// Technically the layers used are all -100+layer to make them FLOAT_LAYER overlays. -//Human Overlays Indexes///////// -#define MUTATIONS_LAYER 1 //Mutations like fat, and lasereyes -#define SKIN_LAYER 2 //Skin things added by a call on species -#define BLOOD_LAYER 3 //Bloodied hands/feet/anything else -#define MOB_DAM_LAYER 4 //Injury overlay sprites like open wounds -#define SURGERY_LAYER 5 //Overlays for open surgical sites -#define UNDERWEAR_LAYER 6 //Underwear/bras/etc -#define TAIL_LOWER_LAYER 7 //Tail as viewed from the south -#define WING_LOWER_LAYER 8 //Wings as viewed from the south -#define SHOES_LAYER_ALT 9 //Shoe-slot item (when set to be under uniform via verb) -#define UNIFORM_LAYER 10 //Uniform-slot item -#define ID_LAYER 11 //ID-slot item -#define SHOES_LAYER 12 //Shoe-slot item -#define GLOVES_LAYER 13 //Glove-slot item -#define BELT_LAYER 14 //Belt-slot item -#define SUIT_LAYER 15 //Suit-slot item -#define TAIL_UPPER_LAYER 16 //Some species have tails to render (As viewed from the N, E, or W) -#define GLASSES_LAYER 17 //Eye-slot item -#define BELT_LAYER_ALT 18 //Belt-slot item (when set to be above suit via verb) -#define SUIT_STORE_LAYER 19 //Suit storage-slot item -#define BACK_LAYER 20 //Back-slot item -#define HAIR_LAYER 21 //The human's hair -#define HAIR_ACCESSORY_LAYER 22 //VOREStation edit. Simply move this up a number if things are added. -#define EARS_LAYER 23 //Both ear-slot items (combined image) -#define EYES_LAYER 24 //Mob's eyes (used for glowing eyes) -#define FACEMASK_LAYER 25 //Mask-slot item -#define GLASSES_LAYER_ALT 26 //So some glasses can appear on top of hair and things -#define HEAD_LAYER 27 //Head-slot item -#define HANDCUFF_LAYER 28 //Handcuffs, if the human is handcuffed, in a secret inv slot -#define LEGCUFF_LAYER 29 //Same as handcuffs, for legcuffs -#define L_HAND_LAYER 30 //Left-hand item -#define R_HAND_LAYER 31 //Right-hand item -#define WING_LAYER 32 //Wings or protrusions over the suit. -#define TAIL_UPPER_LAYER_ALT 33 //Modified tail-sprite layer. Tend to be larger. -#define MODIFIER_EFFECTS_LAYER 34 //Effects drawn by modifiers -#define FIRE_LAYER 35 //'Mob on fire' overlay layer -// # define MOB_WATER_LAYER 36 //'Mob submerged' overlay layer // Moved to global defines -#define TARGETED_LAYER 37 //'Aimed at' overlay layer -#define VORE_BELLY_LAYER 38 -#define VORE_TAIL_LAYER 39 - -#define TOTAL_LAYERS 39 //VOREStation edit. <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list. -////////////////////////////////// - /mob/living/carbon/human var/list/overlays_standing[TOTAL_LAYERS] var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed @@ -245,6 +199,8 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(QDESTROYING(src)) return + remove_layer(BODYPARTS_LAYER) + var/husk_color_mod = rgb(96,88,80) var/hulk_color_mod = rgb(48,224,40) @@ -427,6 +383,13 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() //END CACHED ICON GENERATION. stand_icon.Blend(base_icon,ICON_OVERLAY) + + var/image/body = image(stand_icon) + if (body) + body.layer = BODY_LAYER + BODYPARTS_LAYER + overlays_standing[BODYPARTS_LAYER] = body + apply_layer(BODYPARTS_LAYER) + icon = stand_icon //tail diff --git a/code/modules/mob/living/inventory.dm b/code/modules/mob/living/inventory.dm index 00116666ff2..8f412c4c1b5 100644 --- a/code/modules/mob/living/inventory.dm +++ b/code/modules/mob/living/inventory.dm @@ -294,7 +294,7 @@ switch(action) if("targetSlot") - H.handle_strip(params["slot"], usr) + H.handle_strip(params["slot"], ui.user) return TRUE diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 94d1e093fca..4680a975fd6 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -149,7 +149,7 @@ var/list/channel_to_radio_key = new if(client) if(message) client.handle_spam_prevention(MUTE_IC) - if((client.prefs.muted & MUTE_IC) || say_disabled) + if((client.prefs.muted & MUTE_IC)) to_chat(src, span_warning("You cannot speak in IC (Muted).")) return @@ -371,7 +371,7 @@ var/list/channel_to_radio_key = new if(M && src) //If we still exist, when the spawn processes //VOREStation Add - Ghosts don't hear whispers if(whispering && isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ - (!client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !M.client?.holder))) + (!(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) && !M.client?.holder))) M.show_message(span_game(span_say(span_name(src.name) + " [w_not_heard].")), 2) return //VOREStation Add End @@ -432,7 +432,7 @@ var/list/channel_to_radio_key = new /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/verb_understood="gestures", var/datum/language/language, var/type = 1) var/turf/T = get_turf(src) //We're in something, gesture to people inside the same thing - if(loc != T) + if(loc != T && !istype(loc, /obj/item/holder)) // Partially fixes sign language while being held. for(var/mob/M in loc) M.hear_signlang(message, verb, verb_understood, language, src, type) diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm index 1a82c320cfc..e791b2ee6a8 100644 --- a/code/modules/mob/living/silicon/emote.dm +++ b/code/modules/mob/living/silicon/emote.dm @@ -9,6 +9,8 @@ var/list/_silicon_default_emotes = list( /decl/emote/audible/synth/dwoop, /decl/emote/audible/synth/boop, /decl/emote/audible/synth/robochirp, + /decl/emote/audible/synth/ding, + /decl/emote/audible/synth/microwave, /decl/emote/audible/synth/security, /decl/emote/audible/synth/security/halt ) diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index eda552040e2..1fa7a3b6e6b 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -291,6 +291,16 @@ if(I_GRAB) pai_nom(A) +// Allow card inhabited machines to be interacted with +// This has to override ClickOn because of storage depth nonsense with how pAIs are in cards in machines +/mob/living/silicon/pai/ClickOn(var/atom/A, var/params) + if(istype(A, /obj/machinery)) + var/obj/machinery/M = A + if(M.paicard == card) + M.attack_ai(src) + return + return ..() + /mob/living/silicon/pai/proc/hug(var/mob/living/silicon/pai/H, var/mob/living/target) var/t_him = "them" diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 8c2f5117916..68881bea4d1 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -50,7 +50,7 @@ return data /datum/pai_software/directives/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) - var/mob/living/silicon/pai/P = usr + var/mob/living/silicon/pai/P = ui.user if(!istype(P)) return TRUE if(..()) @@ -160,7 +160,7 @@ /datum/pai_software/med_records/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) . = ..() - var/mob/living/silicon/pai/P = usr + var/mob/living/silicon/pai/P = ui.user if(!istype(P)) return @@ -216,7 +216,7 @@ /datum/pai_software/sec_records/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) . = ..() - var/mob/living/silicon/pai/P = usr + var/mob/living/silicon/pai/P = ui.user if(!istype(P)) return @@ -267,7 +267,7 @@ return data /datum/pai_software/door_jack/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) - var/mob/living/silicon/pai/P = usr + var/mob/living/silicon/pai/P = ui.user if(!istype(P) || ..()) return TRUE @@ -482,7 +482,7 @@ if(..()) return TRUE - var/mob/living/silicon/pai/user = usr + var/mob/living/silicon/pai/user = ui.user if(istype(user)) var/obj/item/radio/integrated/signal/R = user.sradio diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 6c573330d47..0baa98d422b 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -579,7 +579,7 @@ 'sound/vore/digest12.ogg') playsound(src, churnsound, vol = 100, vary = 1, falloff = 0.1, ignore_walls = TRUE, preference = /datum/preference/toggle/digestion_noises) //If the timing is right, and there are items to be touched - if(air_master.current_cycle%3==1 && length(touchable_items)) + if(SSair.current_cycle%3==1 && length(touchable_items)) //Burn all the mobs or add them to the exclusion list for(var/mob/living/T in (touchable_items)) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index fd1132d05a8..c7c1a1a2fbc 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -203,9 +203,6 @@ var/list/mob_hat_cache = list() can_pick_shell = FALSE update_icon() -/mob/living/silicon/robot/drone/choose_icon() - return - /mob/living/silicon/robot/drone/pick_module() return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index ae1a1076f6d..a67f571e1f4 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -64,7 +64,7 @@ return data -/obj/machinery/computer/drone_control/tgui_act(action, params) +/obj/machinery/computer/drone_control/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -75,10 +75,10 @@ return drone_call_area = t_area - to_chat(usr, span_notice("You set the area selector to [drone_call_area].")) + to_chat(ui.user, span_notice("You set the area selector to [drone_call_area].")) if("ping") - to_chat(usr, span_notice("You issue a maintenance request for all active drones, highlighting [drone_call_area].")) + to_chat(ui.user, span_notice("You issue a maintenance request for all active drones, highlighting [drone_call_area].")) for(var/mob/living/silicon/robot/drone/D in player_list) if(D.stat == 0) to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].") @@ -87,16 +87,16 @@ var/mob/living/silicon/robot/drone/D = locate(params["ref"]) if(D.stat != 2) - to_chat(usr, span_danger("You issue a law synchronization directive for the drone.")) + to_chat(ui.user, span_danger("You issue a law synchronization directive for the drone.")) D.law_resync() if("shutdown") var/mob/living/silicon/robot/drone/D = locate(params["ref"]) if(D.stat != 2) - to_chat(usr, span_danger("You issue a kill command for the unfortunate drone.")) - message_admins("[key_name_admin(usr)] issued kill order for drone [key_name_admin(D)] from control console.") - log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.") + to_chat(ui.user, span_danger("You issue a kill command for the unfortunate drone.")) + message_admins("[key_name_admin(ui.user)] issued kill order for drone [key_name_admin(D)] from control console.") + log_game("[key_name(ui.user)] issued kill order for [key_name(src)] from control console.") D.shut_down() if("search_fab") @@ -108,10 +108,10 @@ continue dronefab = fab - to_chat(usr, span_notice("Drone fabricator located.")) + to_chat(ui.user, span_notice("Drone fabricator located.")) return - to_chat(usr, span_danger("Unable to locate drone fabricator.")) + to_chat(ui.user, span_danger("Unable to locate drone fabricator.")) if("toggle_fab") if(!dronefab) @@ -119,8 +119,8 @@ if(get_dist(src,dronefab) > 3) dronefab = null - to_chat(usr, span_danger("Unable to locate drone fabricator.")) + to_chat(ui.user, span_danger("Unable to locate drone fabricator.")) return dronefab.produce_drones = !dronefab.produce_drones - to_chat(usr, span_notice("You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.")) + to_chat(ui.user, span_notice("You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.")) 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 667fd23abb1..bb9db800610 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -177,6 +177,23 @@ /obj/item/material/gravemarker ) +/obj/item/gripper/scene + name = "misc gripper" + desc = "A simple grasping tool that can hold a variety of 'general' objects..." + + can_hold = list( + /obj/item/capture_crystal, + /obj/item/clothing, + /obj/item/implanter, + /obj/item/disk/nifsoft/compliance, + /obj/item/handcuffs, + /obj/item/toy, + /obj/item/petrifier, + /obj/item/dice, + /obj/item/casino_platinum_chip, + /obj/item/spacecasinocash + ) + /obj/item/gripper/no_use/organ name = "organ gripper" icon_state = "gripper-flesh" diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index 60a0bea5ab7..6f92802684b 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -25,6 +25,8 @@ var/list/_robot_default_emotes = list( /decl/emote/audible/synth/dwoop, /decl/emote/audible/synth/boop, /decl/emote/audible/synth/robochirp, + /decl/emote/audible/synth/ding, + /decl/emote/audible/synth/microwave, /decl/emote/audible/synth/security, /decl/emote/audible/synth/security/halt, //VOREStation Add diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 89a136223e2..ef25b1bece0 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -11,11 +11,6 @@ repick_laws() // Forces synths to select an icon relevant to their module - if(!icon_selected) - icon_selection_tries = SSrobot_sprites.get_module_sprites_len(modtype, src) + 1 - choose_icon(icon_selection_tries) - - if(sprite_datum && module) - sprite_datum.do_equipment_glamour(module) + pick_module() plane_holder.set_vis(VIS_AUGMENTED, TRUE) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a79310c02be..d10451a5201 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -31,8 +31,7 @@ //Icon stuff var/datum/robot_sprite/sprite_datum // Sprite datum, holding all our sprite data - var/icon_selected = 1 // If icon selection has been completed yet - var/icon_selection_tries = 0 // Remaining attempts to select icon before a selection is forced + var/icon_selected = FALSE // If icon selection has been completed yet var/list/sprite_extra_customization = list() var/rest_style = "Default" var/notransform @@ -47,6 +46,9 @@ var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not var/obj/screen/robot_modules_background + var/ui_theme + var/selecting_module = FALSE + //3 Modules can be activated at any one time. var/obj/item/robot_module/module = null var/module_active = null @@ -336,46 +338,17 @@ return module_sprites */ /mob/living/silicon/robot/proc/pick_module() + if(icon_selected) + return if(module) - return - var/list/modules = list() - //VOREStatation Edit Start: shell restrictions - if(shell) - if(restrict_modules_to.len > 0) - modules.Add(restrict_modules_to) - else - modules.Add(shell_module_types) - else - if(restrict_modules_to.len > 0) - modules.Add(restrict_modules_to) - else - modules.Add(robot_module_types) - if(crisis || security_level == SEC_LEVEL_RED || crisis_override) - to_chat(src, span_red("Crisis mode active. Combat module available.")) - modules |= emergency_module_types - for(var/module_name in whitelisted_module_types) - if(is_borg_whitelisted(src, module_name)) - modules |= module_name - //VOREStatation Edit End: shell restrictions - modtype = tgui_input_list(usr, "Please, select a module!", "Robot module", modules) - - if(module) - return - if(!(modtype in robot_modules)) - return - if(!is_borg_whitelisted(src, modtype)) - return - - var/module_type = robot_modules[modtype] - transform_with_anim() //VOREStation edit: sprite animation - new module_type(src) - - hands.icon_state = get_hud_module_icon() - feedback_inc("cyborg_[lowertext(modtype)]",1) - updatename() - hud_used.update_robot_modules_display() - notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name) - robotact?.update_static_data_for_all_viewers() + var/list/module_sprites = SSrobot_sprites.get_module_sprites(module, src) + if(module_sprites.len == 1 || !client) + sprite_datum = module_sprites[1] + sprite_datum.do_equipment_glamour(module) + return + if(!selecting_module) + var/datum/tgui_module/robot_ui_module/ui = new(src) + ui.tgui_interact(src) /mob/living/silicon/robot/proc/update_braintype() if(istype(mmi, /obj/item/mmi/digital/posibrain)) @@ -436,15 +409,12 @@ to_chat(usr, "You can't pick another custom name. [isshell(src) ? "" : "Go ask for a name change."]") return 0 - spawn(0) - var/newname - newname = sanitizeSafe(tgui_input_text(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) - if (newname) - custom_name = newname - sprite_name = newname + var/newname = sanitizeSafe(tgui_input_text(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) + if (newname) + custom_name = newname + sprite_name = newname - updatename() - update_icon() + updatename() /mob/living/silicon/robot/verb/extra_customization() set name = "Customize Appearance" @@ -744,6 +714,8 @@ to_chat(usr, span_filter_notice("You must access the borgs internals!")) else if(!src.module && U.require_module) to_chat(usr, span_filter_notice("The borg must choose a module before it can be upgraded!")) + else if(user == src && istype(W,/obj/item/borg/upgrade/utility/reset)) + to_chat(usr, span_warning("You are restricted from reseting your own module.")) else if(U.locked) to_chat(usr, span_filter_notice("The upgrade is locked and cannot be used yet!")) else @@ -796,6 +768,7 @@ notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, module.name) module.Reset(src) qdel(module) + icon_selected = FALSE module = null updatename("Default") has_recoloured = FALSE @@ -903,7 +876,7 @@ else if(istype(M, /mob/living/silicon/robot)) var/mob/living/silicon/robot/R = M if(check_access(R.get_active_hand()) || istype(R.get_active_hand(), /obj/item/card/robot)) - return 1 + return TRUE return 0 /mob/living/silicon/robot/proc/check_access(obj/item/I) @@ -1088,60 +1061,6 @@ return -/mob/living/silicon/robot/proc/choose_icon(var/triesleft) - var/robot_species = null - if(!SSrobot_sprites) - to_chat(src, "Robot Sprites have not been initialized yet. How are you choosing a sprite? Harass a coder.") - return - - var/list/module_sprites = SSrobot_sprites.get_module_sprites(modtype, src) - if(!module_sprites || !module_sprites.len) - to_chat(src, "Your module appears to have no sprite options. Harass a coder.") - return - - icon_selected = 0 - icon_selection_tries = triesleft - if(module_sprites.len == 1 || !client) - if(!(sprite_datum in module_sprites)) - sprite_datum = module_sprites[1] - else - var/selection = tgui_input_list(src, "Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", module_sprites) - if(selection) - sprite_datum = selection - else - sprite_datum = module_sprites[1] - if(!istype(src,/mob/living/silicon/robot/drone)) - robot_species = sprite_datum.name - if(notransform) - to_chat(src, "Your current transformation has not finished yet!") - choose_icon(icon_selection_tries) - return - else - transform_with_anim() - - var/tempheight = vis_height - update_icon() - // This is bad but I dunno other way to 'reset' our resize offset based on vis_height changes other than resizing to normal and back. - if(tempheight != vis_height) - var/tempsize = size_multiplier - resize(1) - resize(tempsize) - - - if (module_sprites.len > 1 && triesleft >= 1 && client) - icon_selection_tries-- - var/choice = tgui_alert(usr, "Look at your icon - is this what you want?", "Icon Choice", list("Yes","No")) - if(choice == "No") - choose_icon(icon_selection_tries) - return - - icon_selected = 1 - icon_selection_tries = 0 - sprite_type = robot_species - if(hands) - update_hud() - to_chat(src, span_filter_notice("Your icon has been set. You now require a module reset to change it.")) - /mob/living/silicon/robot/proc/set_default_module_icon() if(!SSrobot_sprites) return diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index 8f8c0757e0c..5a4c4ea64cc 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -73,7 +73,7 @@ var/global/list/robot_modules = list( R.radio.recalculateChannels() R.set_default_module_icon() - R.choose_icon(SSrobot_sprites.get_module_sprites_len(R.modtype, R) + 1) + R.pick_module() if(!R.client) R.icon_selected = FALSE // It wasnt a player selecting icon? Let them do it later! @@ -93,7 +93,7 @@ var/global/list/robot_modules = list( if(R.radio) R.radio.recalculateChannels() - R.choose_icon(0) + R.set_default_module_icon() R.scrubbing = FALSE @@ -208,6 +208,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/flash/robot(src) src.modules += new /obj/item/extinguisher(src) src.modules += new /obj/item/tool/crowbar/cyborg(src) + src.modules += new /obj/item/gripper/scene(src) /obj/item/robot_module/robot/standard name = "standard robot module" diff --git a/code/modules/mob/living/silicon/robot/robot_ui.dm b/code/modules/mob/living/silicon/robot/robot_ui.dm index 7262f45364a..8cec2aa5425 100644 --- a/code/modules/mob/living/silicon/robot/robot_ui.dm +++ b/code/modules/mob/living/silicon/robot/robot_ui.dm @@ -52,6 +52,10 @@ var/mob/living/silicon/robot/R = host data["module_name"] = R.module ? "[R.module]" : null + if(R.emagged) + data["theme"] = "syndicate" + else if (R.ui_theme) + data["theme"] = R.ui_theme if(!R.module) return data @@ -104,7 +108,7 @@ return data -/datum/tgui_module/robot_ui/tgui_act(action, params) +/datum/tgui_module/robot_ui/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return @@ -126,13 +130,13 @@ if(istype(C)) C.toggled = !C.toggled if(C.toggled) - to_chat(usr, span_notice("You enable [C].")) + to_chat(ui.user, span_notice("You enable [C].")) else - to_chat(usr, span_warning("You disable [C].")) + to_chat(ui.user, span_warning("You disable [C].")) . = TRUE if("toggle_module") if(R.weapon_lock) - to_chat(usr, span_danger("Error: Modules locked.")) + to_chat(ui.user, span_danger("Error: Modules locked.")) return var/obj/item/module = locate(params["ref"]) if(istype(module)) diff --git a/code/modules/mob/living/silicon/robot/robot_ui_module.dm b/code/modules/mob/living/silicon/robot/robot_ui_module.dm new file mode 100644 index 00000000000..1554549633e --- /dev/null +++ b/code/modules/mob/living/silicon/robot/robot_ui_module.dm @@ -0,0 +1,179 @@ +// Robot module selection +/datum/tgui_module/robot_ui_module + name = "Robot Module Configurator" + tgui_id = "RobotChoose" + var/selected_module + var/new_name + var/datum/robot_sprite/sprite_datum + +/datum/tgui_module/robot_ui_module/tgui_state(mob/user) + return GLOB.tgui_self_state + +/datum/tgui_module/robot_ui_module/tgui_close(mob/user) + . = ..() + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.selecting_module = FALSE + +/datum/tgui_module/robot_ui_module/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui) + . = ..() + if(isrobot(user) && ui) + var/mob/living/silicon/robot/R = user + R.selecting_module = TRUE + +/datum/tgui_module/robot_ui_module/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/spritesheet/robot_icons) + ) + +/datum/tgui_module/robot_ui_module/tgui_static_data() + var/list/data = ..() + + var/mob/living/silicon/robot/R = host + + var/list/modules = list() + if(R.module) + modules = list(R.modtype) + selected_module = R.modtype + else + if(LAZYLEN(R.restrict_modules_to) > 0) + modules.Add(R.restrict_modules_to) + else if(R.shell) + modules.Add(shell_module_types) + else + modules.Add(robot_module_types) + if(R.crisis || security_level == SEC_LEVEL_RED || R.crisis_override) + to_chat(R, span_red("Crisis mode active. Combat module available.")) + modules |= emergency_module_types + for(var/module_name in whitelisted_module_types) + if(is_borg_whitelisted(R, module_name)) + modules |= module_name + data["possible_modules"] = modules + if(R.emagged) + data["theme"] = "syndicate" + else if (R.ui_theme) + data["theme"] = R.ui_theme + + return data + +/datum/tgui_module/robot_ui_module/tgui_data() + var/list/data = ..() + + var/mob/living/silicon/robot/R = host + var/datum/asset/spritesheet/robot_icons/spritesheet = get_asset_datum(/datum/asset/spritesheet/robot_icons) + + data["currentName"] = new_name ? new_name : R.name + data["isDefaultName"] = !new_name + + if(selected_module) + data["selected_module"] = selected_module + if(!SSrobot_sprites) + to_chat(R, span_warning("Robot Sprites have not been initialized yet. How are you choosing a sprite? Harass a coder.")) + selected_module = null + return + + var/list/module_sprites = SSrobot_sprites.get_module_sprites(selected_module, R) + if(!module_sprites || !module_sprites.len) + to_chat(R, span_warning("Your module appears to have no sprite options. Harass a coder.")) + selected_module = null + return + var/list/available_sprites = list() + for(var/datum/robot_sprite/S in module_sprites) + var/model_type = "def" + if(istype(S, /datum/robot_sprite/dogborg)) + model_type = "wide" + if(istype(S, /datum/robot_sprite/dogborg/tall)) + model_type = "tall" + available_sprites += list(list("sprite" = S.name, "belly" = S.has_vore_belly_sprites, "type" = model_type)) + + data["possible_sprites"] = available_sprites + data["sprite_datum"] = sprite_datum + data["sprite_datum_class"] = null + data["sprite_datum_size"] = null + if(sprite_datum) + data["sprite_datum_class"] = sanitize_css_class_name("[sprite_datum.type]") + data["sprite_datum_size"] = spritesheet.icon_size_id(data["sprite_datum_class"] + "S") // just get the south icon's size, the rest will be the same + + return data + +/datum/tgui_module/robot_ui_module/tgui_act(action, params) + . = ..() + if(.) + return + + var/mob/living/silicon/robot/R = host + + switch(action) + if("pick_module") + if(R.module) + return + var/new_module = params["value"] + if(!(new_module in robot_modules)) + return + if(!is_borg_whitelisted(R, new_module)) + return + selected_module = new_module + if(sprite_datum) + var/new_datum + var/list/module_sprites = SSrobot_sprites.get_module_sprites(selected_module, R) + for(var/datum/robot_sprite/S in module_sprites) + if(S.name == sprite_datum.name) + new_datum = S + break + sprite_datum = new_datum + . = TRUE + if("pick_icon") + var/sprite = params["value"] + if(!sprite) + return + var/list/module_sprites = SSrobot_sprites.get_module_sprites(selected_module, R) + for(var/datum/robot_sprite/S in module_sprites) + if(S.name == sprite) + sprite_datum = S + break + . = TRUE + if("rename") + var/name = params["value"] + if(name) + new_name = sanitizeSafe(name, MAX_NAME_LEN) + . = TRUE + if("confirm") + R.apply_name(new_name) + R.apply_module(sprite_datum, selected_module) + R.transform_module() + close_ui() + . = TRUE + +/mob/living/silicon/robot/proc/apply_name(var/new_name) + if(!custom_name) + if (new_name) + custom_name = new_name + sprite_name = new_name + +/mob/living/silicon/robot/proc/apply_module(var/datum/robot_sprite/new_datum, var/new_module) + icon_selected = TRUE + var/module_type = robot_modules[new_module] + modtype = new_module + module = new module_type(src) + feedback_inc("cyborg_[lowertext(new_module)]",1) + updatename() + hud_used.update_robot_modules_display() + notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name) + robotact?.update_static_data_for_all_viewers() + sprite_datum = new_datum + if(!istype(src,/mob/living/silicon/robot/drone)) + sprite_type = sprite_datum.name + +/mob/living/silicon/robot/proc/transform_module() + transform_with_anim() + var/tempheight = vis_height + update_icon() + // This is bad but I dunno other way to 'reset' our resize offset based on vis_height changes other than resizing to normal and back. + if(tempheight != vis_height) + var/tempsize = size_multiplier + resize(1) + resize(tempsize) + if(hands) + update_hud() + sprite_datum.do_equipment_glamour(module) + to_chat(src, span_filter_notice("Your icon has been set. You now require a module reset to change it.")) diff --git a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm index 73357c10711..ccf1908c166 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm @@ -9,6 +9,7 @@ icon_selected = FALSE can_be_antagged = FALSE restrict_modules_to = list("Gravekeeper") + ui_theme = "malfunction" /mob/living/silicon/robot/gravekeeper/init() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm index 24e449c411c..9f0aa11446c 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm @@ -9,6 +9,7 @@ icon_selected = FALSE restrict_modules_to = list("Lost") var/law_retries = 5 + ui_theme = "malfunction" /mob/living/silicon/robot/lost/init() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) diff --git a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm index 5dd72332e44..15a8257a499 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm @@ -8,6 +8,7 @@ idcard_type = /obj/item/card/id/syndicate icon_selected = FALSE restrict_modules_to = list("Protector", "Mechanist", "Combat Medic") + ui_theme = "syndicate" /mob/living/silicon/robot/syndicate/init() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spookyghost.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spookyghost.dm index 5d2084d0f0c..6991ecb70e0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spookyghost.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spookyghost.dm @@ -97,7 +97,8 @@ /mob/living/simple_mob/vore/alienanimals/space_ghost/apply_melee_effects(var/atom/A) var/mob/living/L = A - L.hallucination += 50 + if(L.hallucination <= 100) + L.hallucination += rand(1,10) /mob/living/simple_mob/vore/alienanimals/space_ghost/shoot(atom/A) //We're shooting ghosts at people and need them to have the same faction as their parent, okay? if(!projectiletype) @@ -209,7 +210,8 @@ /mob/living/simple_mob/vore/alienanimals/spooky_ghost/apply_melee_effects(var/atom/A) var/mob/living/L = A if(L && istype(L)) - L.hallucination += rand(1,50) + if(L.hallucination <= 100) + L.hallucination += rand(1,10) /mob/living/simple_mob/vore/alienanimals/spooky_ghost/Life() . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/turkeygirl.dm b/code/modules/mob/living/simple_mob/subtypes/animal/turkeygirl.dm new file mode 100644 index 00000000000..9c29db15a3a --- /dev/null +++ b/code/modules/mob/living/simple_mob/subtypes/animal/turkeygirl.dm @@ -0,0 +1,101 @@ +//turkey - sprites and writing done by VerySoft +/mob/living/simple_mob/vore/turkeygirl + name = "turkeygirl" + desc = "A feathered woman! She looks like some kind of plump turkey!" + tt_desc = "Meleagris gallopian" + icon = 'icons/mob/turkey.dmi' + icon_state = "turkeygirl" + icon_living = "turkeygirl" + icon_dead = "turkeygirl-dead" + + health = 100 + maxHealth = 100 + + has_hands = TRUE + + faction = "turkey" + + response_help = "hugs" + response_disarm = "pushes" + response_harm = "punches" + attacktext = list("pecked") + + has_langs = list(LANGUAGE_GALCOM , LANGUAGE_ANIMAL) + + meat_amount = 100 + meat_type = /obj/item/reagent_containers/food/snacks/meat/chicken + + ai_holder_type = /datum/ai_holder/simple_mob/passive + + say_list_type = /datum/say_list/turkey + + vore_active = 1 + vore_capacity = 2 + vore_bump_chance = 10 + vore_pounce_chance = 10 + vore_pounce_maxhealth = 999 + vore_ignores_undigestable = 0 + vore_default_mode = DM_SELECT + vore_icons = SA_ICON_LIVING + vore_stomach_name = "Stomach" + vore_default_contamination_flavor = "Wet" + vore_default_contamination_color = "grey" + vore_default_item_mode = IM_DIGEST + vore_standing_too = TRUE + +/mob/living/simple_mob/vore/turkeygirl/init_vore() + ..() + var/obj/belly/B = vore_selected + B.name = "stomach" + B.desc = "The hot churning stomach of a turkey girl! The doughy flesh presses inward to form to your figure, thick slime coating everything, and very shortly that includes you as well! There isn't any escaping that constant full body motion, as her body works to ball yours up into a tight little package. Gurgling and glubbing with every shifting movement, while her pulse throbs through the flesh all around you with every beat of her heart. All in all, one thing is for certain! You've become turkey stuffing! Oh no..." + B.mode_flags = DM_FLAG_THICKBELLY | DM_FLAG_NUMBING + B.belly_fullscreen = "anibelly" + B.digest_brute = 1 + B.digest_burn = 6 + B.digestchance = 0 + B.absorbchance = 0 + B.escapechance = 15 + B.colorization_enabled = TRUE + B.belly_fullscreen_color = "#521717" + +/datum/say_list/turkey + speak = list("Gobble!", "Gobble gobble!", "Gobble gobble gobble!", "Give me something to be thankful for~", "Could use something to gobble~", "Why don't you make a pilgrimage over here and give me something good to eat?", "I want a treat... I could bite you too if you like~", "What's your favorite time of year?", "Autumn is the best time of year~", "You just gonna let a girl go hungry?") + +/mob/living/simple_mob/vore/turkeygirl/update_icon() + . = ..() + if(stat == DEAD) + return + if(vore_fullness == 2 || nutrition >= 5000) + icon_state = "[icon_living]-2" + + else if(vore_fullness == 1 || nutrition >= 2500) + icon_state = "[icon_living]-1" + if(resting) + icon_state = "[icon_state]-resting" + +/mob/living/simple_mob/vore/turkeygirl/attackby(var/obj/item/reagent_containers/food/snacks/O as obj, var/mob/user as mob) + if(stat) + return ..() + + if(!istype(O, /obj/item/reagent_containers/food/snacks)) + return ..() + + if(nutrition >= max_nutrition) + if(user == src) + to_chat(src, span_notice("You're too full to eat another bite.")) + return + to_chat(user, span_notice("\The [src] seems too full to eat.")) + return + + user.setClickCooldown(user.get_attack_speed(O)) + if(O.reagents) + O.reagents.trans_to_mob(src, O.bitesize, CHEM_INGEST) + adjust_nutrition(O.bitesize * 20) + O.bitecount ++ + O.On_Consume(src) + if(O) + to_chat(user, span_notice("\The [src] takes a bite of \the [O].")) + if(user != src) + to_chat(src, span_notice("\The [user] feeds \the [O] to you.")) + playsound(src, 'sound/items/eatfood.ogg', 75, 1) + update_icon() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm b/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm index dacbebb57da..3e340e0abca 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm @@ -32,6 +32,12 @@ ai_holder_type = /datum/ai_holder/simple_mob/melee +/mob/living/simple_mob/vore/aggressive/macrophage/proc/deathcheck() + if(locate(/mob/living/carbon/human) in vore_selected) + addtimer(CALLBACK(src, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, deathcheck)), 3000) + else + dust() + /mob/living/simple_mob/vore/aggressive/macrophage/green icon_state = "macrophage-2" @@ -47,7 +53,7 @@ contamination_color = "green" vore_verb = "absorb" escapable = TRUE - escapable = 5 + escapable = 20 desc = "In an attempt to get away from the giant virus, it's oversized envelope proteins dragged you right past it's matrix, encapsulating you deep inside it's capsid... The strange walls kneading and keeping you tight along within it's nucleoprotein." belly_fullscreen = "VBO_gematically_angular" belly_fullscreen_color = "#87d8d8" diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm b/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm index 430e6efd4a3..73005bc9b9b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm @@ -9,7 +9,7 @@ icon_rest = "wah_rest" icon = 'icons/mob/vore.dmi' - faction = FACTION_REDPANDA //stop naming stuff vaguely + faction = FACTION_REDPANDA maxHealth = 30 health = 30 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm index 09bebbd3a48..b45c3608b72 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm @@ -1,23 +1,39 @@ // Phase shifting procs (and related procs) /mob/living/simple_mob/shadekin/proc/phase_shift() var/turf/T = get_turf(src) + var/area/A = T.loc //RS Port #658 if(!T.CanPass(src,T) || loc != T) to_chat(src,span_warning("You can't use that here!")) return FALSE - - forceMove(T) - var/original_canmove = canmove - SetStunned(0) - SetWeakened(0) - if(buckled) - buckled.unbuckle_mob() - if(pulledby) - pulledby.stop_pulling() - stop_pulling() - canmove = FALSE + //RS Port #658 Start + if(!client?.holder && A.block_phase_shift) + to_chat(src,span_warning("You can't use that here!")) + return FALSE + //RS Port #658 End //Shifting in if(ability_flags & AB_PHASE_SHIFTED) + phase_in(T) + //Shifting out + else + phase_out(T) + +/mob/living/simple_mob/shadekin/proc/phase_in(var/turf/T) + if(ability_flags & AB_PHASE_SHIFTED) + + // pre-change + forceMove(T) + var/original_canmove = canmove + SetStunned(0) + SetWeakened(0) + if(buckled) + buckled.unbuckle_mob() + if(pulledby) + pulledby.stop_pulling() + stop_pulling() + canmove = FALSE + + // change ability_flags &= ~AB_PHASE_SHIFTED mouse_opacity = 1 name = real_name @@ -67,8 +83,22 @@ else L.flicker(10) - //Shifting out - else +/mob/living/simple_mob/shadekin/proc/phase_out(var/turf/T) + if(!(ability_flags & AB_PHASE_SHIFTED)) + + // pre-change + forceMove(T) + var/original_canmove = canmove + SetStunned(0) + SetWeakened(0) + if(buckled) + buckled.unbuckle_mob() + if(pulledby) + pulledby.stop_pulling() + stop_pulling() + canmove = FALSE + + // change ability_flags |= AB_PHASE_SHIFTED mouse_opacity = 0 custom_emote(1,"phases out!") diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 763e7386ab5..f1c2ef76417 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -88,7 +88,7 @@ var/global/list/grub_machine_overlays = list() return if(istype(loc, /obj/machinery)) - if(machine_effect && air_master.current_cycle%30) + if(machine_effect && SSair.current_cycle%30) for(var/mob/M in player_list) M << machine_effect if(prob(10)) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/turkey.dm b/code/modules/mob/living/simple_mob/subtypes/vore/turkey.dm new file mode 100644 index 00000000000..1b599f74f82 --- /dev/null +++ b/code/modules/mob/living/simple_mob/subtypes/vore/turkey.dm @@ -0,0 +1,43 @@ +/mob/living/simple_mob/vore/turkey + name = "turkey" + desc = "A large turkey, all ready for stuffing." + tt_desc = "Meleagris gallopavo" + + icon_state = "turkey" + icon_living = "turkey" + icon_dead = "turkeydead" + icon_rest = "turkeyrest" + icon = 'icons/mob/vore.dmi' + + faction = FACTION_TURKEY + maxHealth = 25 + health = 25 + + meat_amount = 1 + meat_type = /obj/item/reagent_containers/food/snacks/rawturkey + name_the_meat = FALSE + + response_help = "pats" + response_disarm = "gently pushes aside" + response_harm = "hits" + + harm_intent_damage = 3 + melee_damage_lower = 3 + melee_damage_upper = 1 + attacktext = list("pecked") + + say_list_type = /datum/say_list/turkey + ai_holder_type = /datum/ai_holder/simple_mob/passive + + allow_mind_transfer = TRUE + + vore_active = 1 + vore_bump_chance = 10 + vore_bump_emote = "greedily leaps at" + vore_default_mode = DM_HOLD + vore_icons = SA_ICON_LIVING + +/datum/say_list/turkey + speak = list("GOBBLEGOBBLE!","Gobble?","Gobblegobble...") + emote_hear = list("gobbles!") + emote_see = list("flaps its wings","pecks something on the floor","puffs up its feathers") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9413f822560..dfbb6097270 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -126,6 +126,17 @@ /atom/proc/drain_power(var/drain_check,var/surge, var/amount = 0) return -1 + // used for petrification machines +/atom/proc/get_ultimate_mob() + var/mob/ultimate_mob + var/atom/to_check = loc + var/n = 0 + while (to_check && !isturf(to_check) && n++ < 16) + if (ismob(to_check)) + ultimate_mob = to_check + to_check = to_check.loc + return ultimate_mob + // Show a message to all mobs and objects in earshot of this one // This would be for audible actions by the src mob // message is the message output to anyone who can hear. diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 5ff11814f6d..a942c558498 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -350,14 +350,27 @@ switch(mob.incorporeal_move) if(1) var/turf/T = get_step(mob, direct) + var/area/A = T.loc //RS Port #658 if(!T) return if(mob.check_holy(T)) to_chat(mob, span_warning("You cannot get past holy grounds while you are in this plane of existence!")) return - else - mob.forceMove(get_step(mob, direct)) - mob.dir = direct + //RS Port #658 Start + if(!holder) + if(isliving(mob) && A.block_phase_shift) + to_chat(mob, span_warning("Something blocks you from entering this location while phased out.")) + return + if(isobserver(mob) && A.block_ghosts) + to_chat(mob, span_warning("Ghosts can't enter this location.")) + var/area/our_area = mobloc.loc + if(our_area.block_ghosts) + var/mob/observer/dead/D = mob + D.return_to_spawn() + return + mob.forceMove(get_step(mob, direct)) + mob.dir = direct + //RS Port #658 End if(2) if(prob(50)) var/locx diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 54a5f2cf296..b2a03e9cf98 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -29,6 +29,7 @@ all_underwear[WRC.name] = WRI.name + headset = rand(1,3) backbag = rand(1,6) pdachoice = rand(1,7) age = rand(current_species.min_age, current_species.max_age) diff --git a/code/modules/mob/new_player/skill.dm b/code/modules/mob/new_player/skill.dm deleted file mode 100644 index 98361e4bb69..00000000000 --- a/code/modules/mob/new_player/skill.dm +++ /dev/null @@ -1,213 +0,0 @@ -var/global/const - SKILL_NONE = 0 - SKILL_BASIC = 1 - SKILL_ADEPT = 2 - SKILL_EXPERT = 3 - SKILL_PROF = 4 - -/datum/skill/var - ID = "none" // ID of the skill, used in code - name = "None" // name of the skill - desc = "Placeholder skill" // detailed description of the skill - field = "Misc" // the field under which the skill will be listed - secondary = 0 // secondary skills only have two levels and cost significantly less - -var/global/list/SKILLS = null -var/list/SKILL_ENGINEER = list("field" = "Engineering", "EVA" = SKILL_BASIC, "construction" = SKILL_ADEPT, "electrical" = SKILL_BASIC, "engines" = SKILL_ADEPT) -var/list/SKILL_ORGAN_ROBOTICIST = list("field" = "Science", "devices" = SKILL_ADEPT, "electrical" = SKILL_BASIC, "computer" = SKILL_ADEPT, "anatomy" = SKILL_BASIC) -var/list/SKILL_SECURITY_OFFICER = list("field" = "Security", "combat" = SKILL_BASIC, "weapons" = SKILL_ADEPT, "law" = SKILL_ADEPT, "forensics" = SKILL_BASIC) -var/list/SKILL_CHEMIST = list("field" = "Science", "chemistry" = SKILL_ADEPT, "science" = SKILL_ADEPT, "medical" = SKILL_BASIC, "devices" = SKILL_BASIC) -var/global/list/SKILL_PRE = list(JOB_ENGINEER = SKILL_ENGINEER, JOB_ROBOTICIST = SKILL_ORGAN_ROBOTICIST, JOB_SECURITY_OFFICER = SKILL_SECURITY_OFFICER, JOB_CHEMIST = SKILL_CHEMIST) - -/datum/skill/management - ID = "management" - name = "Command" - desc = "Your ability to manage and commandeer other crew members." - -/datum/skill/combat - ID = "combat" - name = "Close Combat" - desc = "This skill describes your training in hand-to-hand combat or melee weapon usage. While expertise in this area is rare in the era of firearms, experts still exist among athletes." - field = "Security" - -/datum/skill/weapons - ID = "weapons" - name = "Weapons Expertise" - desc = "This skill describes your expertise with and knowledge of weapons. A low level in this skill implies knowledge of simple weapons, for example tazers and flashes. A high level in this skill implies knowledge of complex weapons, such as grenades, riot shields, pulse rifles or bombs. A low level in this skill is typical for security officers, a high level of this skill is typical for special agents and soldiers." - field = "Security" - -/datum/skill/EVA - ID = "EVA" - name = "Extra-vehicular activity" - desc = "This skill describes your skill and knowledge of space-suits and working in vacuum." - field = "Engineering" - secondary = 1 - -/datum/skill/forensics - ID = "forensics" - name = "Forensics" - desc = "Describes your skill at performing forensic examinations and identifying vital evidence. Does not cover analytical abilities, and as such isn't the only indicator for your investigation skill. Note that in order to perform autopsy, the surgery skill is also required." - field = "Security" - -/datum/skill/construction - ID = "construction" - name = "Construction" - desc = "Your ability to construct various buildings, such as walls, floors, tables and so on. Note that constructing devices such as APCs additionally requires the Electronics skill. A low level of this skill is typical for janitors, a high level of this skill is typical for engineers." - field = "Engineering" - -/datum/skill/management - ID = "management" - name = "Command" - desc = "Your ability to manage and commandeer other crew members." - -/datum/skill/knowledge/law - ID = "law" - name = "Corporate Law" - desc = "Your knowledge of corporate law and procedures. This includes Corporate Regulations, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for Site Managers." - field = "Security" - secondary = 1 - -/datum/skill/devices - ID = "devices" - name = "Complex Devices" - desc = "Describes the ability to assemble complex devices, such as computers, circuits, printers, robots or gas tank assemblies(bombs). Note that if a device requires electronics or programming, those skills are also required in addition to this skill." - field = "Science" - -/datum/skill/electrical - ID = "electrical" - name = "Electrical Engineering" - desc = "This skill describes your knowledge of electronics and the underlying physics. A low level of this skill implies you know how to lay out wiring and configure powernets, a high level of this skill is required for working complex electronic devices such as circuits or bots." - field = "Engineering" - -/datum/skill/atmos - ID = "atmos" - name = "Atmospherics" - desc = "Describes your knowledge of piping, air distribution and gas dynamics." - field = "Engineering" - -/datum/skill/engines - ID = "engines" - name = "Engines" - desc = "Describes your knowledge of the various engine types common on space stations, such as the singularity or anti-matter engine." - field = "Engineering" - secondary = 1 - -/datum/skill/computer - ID = "computer" - name = "Information Technology" - desc = "Describes your understanding of computers, software and communication. Not a requirement for using computers, but definitely helps. Used in telecommunications and programming of computers and AIs." - field = "Science" - -/datum/skill/pilot - ID = "pilot" - name = "Heavy Machinery Operation" - desc = "Describes your experience and understanding of operating heavy machinery, which includes mechs and other large exosuits. Used in piloting mechs." - field = "Engineering" - -/datum/skill/medical - ID = "medical" - name = "Medicine" - desc = "Covers an understanding of the human body and medicine. At a low level, this skill gives a basic understanding of applying common types of medicine, and a rough understanding of medical devices like the health analyzer. At a high level, this skill grants exact knowledge of all the medicine available on the station, as well as the ability to use complex medical devices like the body scanner or mass spectrometer." - field = "Medical" - -/datum/skill/anatomy - ID = "anatomy" - name = "Anatomy" - desc = "Gives you a detailed insight of the human body. A high skill in this is required to perform surgery.This skill may also help in examining alien biology." - field = "Medical" - -/datum/skill/virology - ID = "virology" - name = "Virology" - desc = "This skill implies an understanding of microorganisms and their effects on humans." - field = "Medical" - -/datum/skill/genetics - ID = "genetics" - name = "Genetics" - desc = "Implies an understanding of how DNA works and the structure of the human DNA." - field = "Science" - -/datum/skill/chemistry - ID = "chemistry" - name = "Chemistry" - desc = "Experience with mixing chemicals, and an understanding of what the effect will be. This doesn't cover an understanding of the effect of chemicals on the human body, as such the medical skill is also required for medical chemists." - field = "Science" - -/datum/skill/botany - ID = "botany" - name = "Botany" - desc = "Describes how good a character is at growing and maintaining plants." - -/datum/skill/cooking - ID = "cooking" - name = "Cooking" - desc = "Describes a character's skill at preparing meals and other consumable goods. This includes mixing alcoholic beverages." - -/datum/skill/science - ID = "science" - name = "Science" - desc = "Your experience and knowledge with scientific methods and processes." - field = "Science" - -/datum/attribute/var - ID = "none" - name = "None" - desc = "This is a placeholder" - - -/proc/setup_skills() - if(SKILLS == null) - SKILLS = list() - for(var/T in subtypesof(/datum/skill)) - var/datum/skill/S = new T - if(S.ID != "none") - if(!SKILLS.Find(S.field)) - SKILLS[S.field] = list() - var/list/L = SKILLS[S.field] - L += S - - -/mob/living/carbon/human/proc/GetSkillClass(points) - return CalculateSkillClass(points, age) - -/proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M) - if(!istype(M)) return - if(SKILLS == null) - setup_skills() - - if(!M.skills || M.skills.len == 0) - to_chat(user, "There are no skills to display.") - return - - var/HTML = "" - HTML += span_bold("Select your Skills") + "
" - HTML += "Current skill level: [M.GetSkillClass(M.used_skillpoints)] ([M.used_skillpoints])
" - HTML += "" - for(var/V in SKILLS) - HTML += "" - for(var/datum/skill/S in SKILLS[V]) - var/level = M.skills[S.ID] - HTML += "" - HTML += "" - HTML += "" - // secondary skills don't have an amateur level - if(S.secondary) - HTML += "" - else - HTML += "" - HTML += "" - HTML += "" - HTML += "" - HTML += "
" + span_bold("[V]") - HTML += "
[S.name]\[Untrained\]\[Amateur\]\[Trained\]\[Professional\]
" - - user << browse(null, "window=preferences") - user << browse(HTML, "window=show_skills;size=600x800") - return - -/mob/living/carbon/human/verb/show_skills() - set category = "IC.Game" - set name = "Show Own Skills" - - show_skill_window(src, src) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index e7b71271632..a57a2daa988 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -3,7 +3,6 @@ /mob/verb/whisper(message as text) set name = "Whisper" - set category = "IC.Subtle" set hidden = 1 //VOREStation Addition Start if(forced_psay) @@ -15,8 +14,9 @@ /mob/verb/say_verb(message as text) set name = "Say" - set category = "IC.Chat" set hidden = 1 + set instant = TRUE + //VOREStation Addition Start if(forced_psay) psay(message) @@ -24,17 +24,16 @@ //VOREStation Addition End client?.stop_thinking() - usr.say(message) + //queue this message because verbs are scheduled to process after SendMaps in the tick and speech is pretty expensive when it happens. + //by queuing this for next tick the mc can compensate for its cost instead of having speech delay the start of the next tick + if(message) + QUEUE_OR_CALL_VERB_FOR(VERB_CALLBACK(src, TYPE_PROC_REF(/mob, say), message), SSspeech_controller) /mob/verb/me_verb(message as message) set name = "Me" - set category = "IC.Chat" set desc = "Emote to nearby people (and your pred/prey)" set hidden = 1 - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_red("Speech is currently admin-disabled.")) - return //VOREStation Addition Start if(forced_psay) pme(message) @@ -56,10 +55,6 @@ usr.emote(message) /mob/proc/say_dead(var/message) - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - if(!client) return // Clientless mobs shouldn't be trying to talk in deadchat. @@ -112,7 +107,19 @@ if(speaking.flags & NONVERBAL) if(sdisabilities & BLIND || blinded) return FALSE - if(!other || !(other in view(src))) + if(!other) + return FALSE + // Fixes seeing non-verbal languages while being held + if(istype(other.loc, /obj/item/holder)) + if(istype(src.loc, /obj/item/holder)) + if(!(other.loc in view(src.loc.loc))) + return FALSE + else if(!(other.loc in view(src))) + return FALSE + else if(istype(src.loc, /obj/item/holder)) + if((!other) in view(src.loc.loc)) + return FALSE + else if((!other) in view(src)) return FALSE //Language check. diff --git a/code/modules/mob/say_old.dm b/code/modules/mob/say_old.dm new file mode 100644 index 00000000000..f67ffb58b5b --- /dev/null +++ b/code/modules/mob/say_old.dm @@ -0,0 +1,82 @@ +// Allows the usage of old style chat inputs even with TG Say enabled +/mob/verb/say_verb_old() + set name = "Say Old" + set category = "IC.Chat" + + client?.start_thinking() + client?.start_typing() + var/message = tgui_input_text(usr, "Speak to people in sight.\nType your message:", "Say") + client?.stop_thinking() + + if(message) + say_verb(message) + +/mob/verb/me_verb_old() + set name = "Me Old" + set category = "IC.Chat" + set desc = "Emote to nearby people (and your pred/prey)" + + client?.start_thinking() + client?.start_typing() + var/message = tgui_input_text(usr, "Emote to people in sight (and your pred/prey).\nType your message:", "Emote", multiline = TRUE) + client?.stop_thinking() + + if(message) + me_verb(message) + +/mob/verb/whisper_old() + set name = "Whisper Old" + set category = "IC.Subtle" + + var/message = tgui_input_text(usr, "Speak to nearby people.\nType your message:", "Whisper") + + if(message) + whisper(message) + + +/mob/verb/me_verb_subtle_old() + set name = "Subtle Old" + set category = "IC.Subtle" + set desc = "Emote to nearby people (and your pred/prey)" + + var/message = tgui_input_text(usr, "Emote to nearby people (and your pred/prey).\nType your message:", "Subtle", multiline = TRUE) + + if(message) + me_verb_subtle(message) + +/mob/verb/me_verb_subtle_custom_old() + set name = "Subtle (Custom) Old" + set category = "IC.Subtle" + set desc = "Emote to nearby people, with ability to choose which specific portion of people you wish to target." + + var/message = tgui_input_text(usr, "Emote to nearby people, with ability to choose which specific portion of people you wish to target.\nType your message:", "Subtle (Custom)", multiline = TRUE) + + if(message) + me_verb_subtle_custom(message) + +/mob/verb/psay_old() + set name = "Psay Old" + set category = "IC.Subtle" + + var/message = tgui_input_text(usr, "Talk to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Psay") + + if(message) + psay(message) + +/mob/verb/pme_old() + set name = "Pme Old" + set category = "IC.Subtle" + + var/message = tgui_input_text(usr, "Emote to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Pme") + + if(message) + pme(message) + +/mob/living/verb/player_narrate_ch() + set name = "Narrate (Player) Old" + set category = "IC.Chat" + + var/message = tgui_input_text(usr, "Narrate an action or event! An alternative to emoting, for when your emote shouldn't start with your name!\nType your message:", "Narrate (Player)") + + if(message) + player_narrate(message) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 2c2a928deb3..08014a82901 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -4,13 +4,9 @@ /mob/verb/me_verb_subtle(message as message) //This would normally go in say.dm set name = "Subtle" - set category = "IC.Subtle" set desc = "Emote to nearby people (and your pred/prey)" set hidden = 1 - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return if(forced_psay) pme(message) return @@ -27,12 +23,8 @@ /mob/verb/me_verb_subtle_custom(message as message) // Literally same as above but with mode_selection set to true set name = "Subtle (Custom)" - set category = "IC.Subtle" set desc = "Emote to nearby people, with ability to choose which specific portion of people you wish to target." - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return if(forced_psay) pme(message) return @@ -203,7 +195,7 @@ continue if(src.client && M && !(get_z(src) == get_z(M))) message = span_multizsay("[message]") - if(isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ + if(isobserver(M) && (!(M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || (isbelly(M.loc) && src == M.loc:owner)) || \ !client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !M.client?.holder)) spawn(0) M.show_message(undisplayed_message, 2) @@ -260,7 +252,6 @@ ///// PSAY ///// /mob/verb/psay(message as text) - set category = "IC.Subtle" set name = "Psay" set desc = "Talk to people affected by complete absorbed or dominate predator/prey." @@ -358,7 +349,6 @@ ///// PME ///// /mob/verb/pme(message as message) - set category = "IC.Subtle" set name = "Pme" set desc = "Emote to people affected by complete absorbed or dominate predator/prey." @@ -454,7 +444,6 @@ M.me_verb(message) /mob/living/verb/player_narrate(message as message) - set category = "IC.Chat" set name = "Narrate (Player)" set desc = "Narrate an action or event! An alternative to emoting, for when your emote shouldn't start with your name!" diff --git a/code/modules/mob/skillset.dm b/code/modules/mob/skillset.dm deleted file mode 100644 index 3afb7a97aaf..00000000000 --- a/code/modules/mob/skillset.dm +++ /dev/null @@ -1,12 +0,0 @@ - -// We don't actually have a skills system, so return max skill for everything. -/mob/proc/get_skill_value(skill_path) - return SKILL_EXPERT - -// A generic way of modifying success probabilities via skill values. Higher factor means skills have more effect. fail_chance is the chance at SKILL_NONE. -/mob/proc/skill_fail_chance(skill_path, fail_chance, no_more_fail = SKILL_EXPERT, factor = 1) - var/points = get_skill_value(skill_path) - if(points >= no_more_fail) - return 0 - else - return fail_chance * 2 ** (factor*(SKILL_BASIC - points)) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index a686e35de7b..5d018586f1d 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -190,7 +190,6 @@ O.custom_speech_bubble = B.custom_speech_bubble callHook("borgify", list(O)) - O.namepick() spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned qdel(src) diff --git a/code/modules/modular_computers/computers/modular_computer/ui.dm b/code/modules/modular_computers/computers/modular_computer/ui.dm index c058e8e04e5..570175c2213 100644 --- a/code/modules/modular_computers/computers/modular_computer/ui.dm +++ b/code/modules/modular_computers/computers/modular_computer/ui.dm @@ -89,12 +89,10 @@ shutdown_computer() return TRUE if("PC_minimize") - var/mob/user = usr - minimize_program(user) + minimize_program(ui.user) if("PC_killprogram") var/prog = params["name"] var/datum/computer_file/program/P = null - var/mob/user = usr if(hard_drive) P = hard_drive.find_file_by_name(prog) @@ -102,7 +100,7 @@ return P.kill_program(1) - to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.")) + to_chat(ui.user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.")) return TRUE if("PC_runprogram") return run_program(params["name"]) @@ -115,7 +113,7 @@ var/param = params["name"] switch(param) if("ID") - proc_eject_id(usr) + proc_eject_id(ui.user) return TRUE else return diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index cc5167b9064..045ac9fbcfc 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -206,7 +206,6 @@ ui.close() return 1 if("PC_minimize") - var/mob/user = usr if(!computer.active_program) return @@ -217,8 +216,8 @@ computer.update_icon() ui.close() - if(user && istype(user)) - computer.tgui_interact(user) // Re-open the UI on this computer. It should show the main screen now. + if(ui.user && istype(ui.user)) + computer.tgui_interact(ui.user) // Re-open the UI on this computer. It should show the main screen now. diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 8acc4dda446..0d4098e2928 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -30,7 +30,7 @@ if("PRG_newtextfile") if(!HDD) return - var/newname = sanitize(tgui_input_text(usr, "Enter file name or leave blank to cancel:", "File rename")) + var/newname = sanitize(tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "File rename")) if(!newname) return if(HDD.find_file_by_name(newname)) @@ -60,13 +60,13 @@ var/datum/computer_file/data/F = computer.find_file_by_uid(open_file) if(!F || !istype(F)) return - if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) != "Yes")) + if(F.do_not_edit && (tgui_alert(ui.user, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) != "Yes")) return var/oldtext = html_decode(F.stored_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file [F.filename].[F.filetype]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(ui.user, "Editing file [F.filename].[F.filetype]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return diff --git a/code/modules/modular_computers/file_system/programs/generic/game.dm b/code/modules/modular_computers/file_system/programs/generic/game.dm index 8cf049aff72..73ea3a1b6e0 100644 --- a/code/modules/modular_computers/file_system/programs/generic/game.dm +++ b/code/modules/modular_computers/file_system/programs/generic/game.dm @@ -39,7 +39,6 @@ if(istype(computer)) computer.update_icon() ticket_count += 1 - // user?.mind?.adjust_experience(/datum/skill/gaming, 50) sleep(10) else if(player_hp <= 0 || player_mp <= 0) heads_up = "You have been defeated... how will the station survive?" @@ -48,7 +47,6 @@ program_icon_state = "arcade_off" if(istype(computer)) computer.update_icon() - // user?.mind?.adjust_experience(/datum/skill/gaming, 10) sleep(10) // This handles the boss "AI". @@ -107,7 +105,7 @@ /** * This is tgui's replacement for Topic(). It handles any user input from the UI. */ -/datum/computer_file/program/game/tgui_act(action, list/params) +/datum/computer_file/program/game/tgui_act(action, list/params, datum/tgui/ui) if(..()) // Always call parent in tgui_act, it handles making sure the user is allowed to interact with the UI. return TRUE @@ -115,8 +113,6 @@ if(computer) printer = computer.nano_printer - // var/gamerSkillLevel = usr.mind?.get_skill_level(/datum/skill/gaming) - // var/gamerSkill = usr.mind?.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER) switch(action) if("Attack") var/attackamt = 0 //Spam prevention. @@ -162,20 +158,20 @@ return TRUE if("Dispense_Tickets") if(!printer) - to_chat(usr, span_notice("Hardware error: A printer is required to redeem tickets.")) + to_chat(ui.user, span_notice("Hardware error: A printer is required to redeem tickets.")) return if(printer.stored_paper <= 0) - to_chat(usr, span_notice("Hardware error: Printer is out of paper.")) + to_chat(ui.user, span_notice("Hardware error: Printer is out of paper.")) return else computer.visible_message(span_infoplain(span_bold("\The [computer]") + " prints out paper.")) if(ticket_count >= 1) new /obj/item/stack/arcadeticket((get_turf(computer)), 1) - to_chat(usr, span_notice("[src] dispenses a ticket!")) + to_chat(ui.user, span_notice("[src] dispenses a ticket!")) ticket_count -= 1 printer.stored_paper -= 1 else - to_chat(usr, span_notice("You don't have any stored tickets!")) + to_chat(ui.user, span_notice("You don't have any stored tickets!")) return TRUE if("Start_Game") game_active = TRUE diff --git a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm index c9ae5cf3609..7bd348b6216 100644 --- a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm @@ -106,7 +106,7 @@ if(downloading || !loaded_article) return - var/savename = sanitize(tgui_input_text(usr, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename)) + var/savename = sanitize(tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename)) if(!savename) return TRUE var/obj/item/computer_hardware/hard_drive/HDD = computer.hard_drive diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index b9c1a8a9731..d3b0feb67fe 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -26,7 +26,7 @@ /datum/computer_file/program/chatclient/New() username = "DefaultUser[rand(100, 999)]" -/datum/computer_file/program/chatclient/tgui_act(action, params) +/datum/computer_file/program/chatclient/tgui_act(action, params, datum/tgui/ui) if(..()) return @@ -47,8 +47,7 @@ return TRUE channel.add_message(message, username) - // var/mob/living/user = usr - // user.log_talk(message, LOG_CHAT, tag="as [username] to channel [channel.title]") + // ui.user.log_talk(message, LOG_CHAT, tag="as [username] to channel [channel.title]") return TRUE if("PRG_joinchannel") var/new_target = text2num(params["id"]) @@ -85,8 +84,7 @@ if(channel) channel.remove_client(src) // We shouldn't be in channel's user list, but just in case... return TRUE - var/mob/living/user = usr - if(can_run(user, TRUE, access_network)) + if(isliving(ui.user) && can_run(ui.user, TRUE, access_network)) for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels) chan.remove_client(src) netadmin_mode = TRUE diff --git a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm index f89558e78fb..4d7a6959910 100644 --- a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm +++ b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm @@ -134,7 +134,7 @@ var/global/nttransfer_uid = 0 if(!remote || !remote.provided_file) return if(remote.server_password) - var/pass = sanitize(tgui_input_text(usr, "Code 401 Unauthorized. Please enter password:", "Password required")) + var/pass = sanitize(tgui_input_text(ui.user, "Code 401 Unauthorized. Please enter password:", "Password required")) if(pass != remote.server_password) error = "Incorrect Password" return @@ -152,7 +152,7 @@ var/global/nttransfer_uid = 0 provided_file = null return TRUE if("PRG_setpassword") - var/pass = sanitize(tgui_input_text(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none")) + var/pass = sanitize(tgui_input_text(ui.user, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none")) if(!pass) return if(pass == "none") diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm index 95b61bd5bbd..1511ce15c0b 100644 --- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm +++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm @@ -74,11 +74,11 @@ switch(action) if("PRG_txtrpeview") - show_browser(usr,"[open_file][pencode2html(loaded_data)]", "window=[open_file]") + show_browser(ui.user,"[open_file][pencode2html(loaded_data)]", "window=[open_file]") return TRUE if("PRG_taghelp") - to_chat(usr, span_notice("The hologram of a googly-eyed paper clip helpfully tells you:")) + to_chat(ui.user, span_notice("The hologram of a googly-eyed paper clip helpfully tells you:")) var/help = {" \[br\] : Creates a linebreak. \[center\] - \[/center\] : Centers the text. @@ -104,7 +104,7 @@ \[redlogo\] - Inserts red NT logo image. \[sglogo\] - Inserts Solgov insignia image."} - to_chat(usr, help) + to_chat(ui.user, help) return TRUE if("PRG_closebrowser") @@ -121,7 +121,7 @@ if("PRG_openfile") if(is_edited) - if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") + if(tgui_alert(ui.user, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") save_file(open_file) browsing = 0 if(!open_file(params["PRG_openfile"])) @@ -130,10 +130,10 @@ if("PRG_newfile") if(is_edited) - if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") + if(tgui_alert(ui.user, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes") save_file(open_file) - var/newname = sanitize(tgui_input_text(usr, "Enter file name:", "New File")) + var/newname = sanitize(tgui_input_text(ui.user, "Enter file name:", "New File")) if(!newname) return TRUE var/datum/computer_file/data/F = create_file(newname) @@ -146,7 +146,7 @@ return TRUE if("PRG_saveasfile") - var/newname = sanitize(tgui_input_text(usr, "Enter file name:", "Save As")) + var/newname = sanitize(tgui_input_text(ui.user, "Enter file name:", "Save As")) if(!newname) return TRUE var/datum/computer_file/data/F = create_file(newname, loaded_data) @@ -158,7 +158,7 @@ if("PRG_savefile") if(!open_file) - open_file = sanitize(tgui_input_text(usr, "Enter file name:", "Save As")) + open_file = sanitize(tgui_input_text(ui.user, "Enter file name:", "Save As")) if(!open_file) return 0 if(!save_file(open_file)) @@ -169,7 +169,7 @@ var/oldtext = html_decode(loaded_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(ui.user, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return loaded_data = newtext diff --git a/code/modules/modular_computers/file_system/programs/research/email_administration.dm b/code/modules/modular_computers/file_system/programs/research/email_administration.dm index 77297ef041d..cf3b7e1bd15 100644 --- a/code/modules/modular_computers/file_system/programs/research/email_administration.dm +++ b/code/modules/modular_computers/file_system/programs/research/email_administration.dm @@ -66,7 +66,7 @@ return TRUE // High security - can only be operated when the user has an ID with access on them. - var/obj/item/card/id/I = usr.GetIdCard() + var/obj/item/card/id/I = ui.user.GetIdCard() if(!istype(I) || !(access_network in I.GetAccess())) return TRUE @@ -93,7 +93,7 @@ if(!current_account) return TRUE - var/newpass = sanitize(tgui_input_text(usr,"Enter new password for account [current_account.login]", "Password", null, 100), 100) + var/newpass = sanitize(tgui_input_text(ui.user,"Enter new password for account [current_account.login]", "Password", null, 100), 100) if(!newpass) return TRUE current_account.password = newpass @@ -118,10 +118,10 @@ return TRUE if("newaccount") - var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds)) + var/newdomain = sanitize(tgui_input_list(ui.user,"Pick domain:", "Domain name", using_map.usable_email_tlds)) if(!newdomain) return TRUE - var/newlogin = sanitize(tgui_input_text(usr,"Pick account name (@[newdomain]):", "Account name", null, 100), 100) + var/newlogin = sanitize(tgui_input_text(ui.user,"Pick account name (@[newdomain]):", "Account name", null, 100), 100) if(!newlogin) return TRUE diff --git a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm index c74d927b9f8..35089223357 100644 --- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm @@ -60,8 +60,8 @@ ntnet_global.setting_disabled = FALSE return TRUE - var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No")) - if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/response = tgui_alert(ui.user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No")) + if(response == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE) ntnet_global.setting_disabled = TRUE return TRUE if("purgelogs") @@ -81,14 +81,14 @@ if("ban_nid") if(!ntnet_global) return - var/nid = tgui_input_number(usr,"Enter NID of device which you want to block from the network:", "Enter NID") - if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to block from the network:", "Enter NID") + if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE) ntnet_global.banned_nids |= nid return TRUE if("unban_nid") if(!ntnet_global) return - var/nid = tgui_input_number(usr,"Enter NID of device which you want to unblock from the network:", "Enter NID") - if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to unblock from the network:", "Enter NID") + if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE) ntnet_global.banned_nids -= nid return TRUE diff --git a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm index 39ee1e7f13a..85f8ceb0877 100644 --- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm +++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm @@ -72,19 +72,19 @@ var/warrant_uid = 0 // The following actions will only be possible if the user has an ID with security access equipped. This is in line with modular computer framework's authentication methods, // which also use RFID scanning to allow or disallow access to some functions. Anyone can view warrants, editing requires ID. This also prevents situations where you show a tablet // to someone who is to be arrested, which allows them to change the stuff there. - var/obj/item/card/id/I = usr.GetIdCard() + var/obj/item/card/id/I = ui.user.GetIdCard() if(!istype(I) || !I.registered_name || !(access_security in I.GetAccess())) - to_chat(usr, "Authentication error: Unable to locate ID with appropriate access to allow this operation.") + to_chat(ui.user, "Authentication error: Unable to locate ID with appropriate access to allow this operation.") return switch(action) if("addwarrant") . = TRUE var/datum/data/record/warrant/W = new() - var/temp = tgui_alert(usr, "Do you want to create a search-, or an arrest warrant?", "Warrant Type", list("Search","Arrest","Cancel")) + var/temp = tgui_alert(ui.user, "Do you want to create a search-, or an arrest warrant?", "Warrant Type", list("Search","Arrest","Cancel")) if(!temp) return - if(tgui_status(usr, state) == STATUS_INTERACTIVE) + if(tgui_status(ui.user, state) == STATUS_INTERACTIVE) if(temp == "Arrest") W.fields["namewarrant"] = "Unknown" W.fields["charges"] = "No charges present" @@ -112,24 +112,24 @@ var/warrant_uid = 0 var/namelist = list() for(var/datum/data/record/t in data_core.general) namelist += t.fields["name"] - var/new_name = sanitize(tgui_input_list(usr, "Please input name:", "Name Choice", namelist)) - if(tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_name = sanitize(tgui_input_list(ui.user, "Please input name:", "Name Choice", namelist)) + if(tgui_status(ui.user, state) == STATUS_INTERACTIVE) if (!new_name) return activewarrant.fields["namewarrant"] = new_name if("editwarrantnamecustom") . = TRUE - var/new_name = sanitize(tgui_input_text(usr, "Please input name")) - if(tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_name = sanitize(tgui_input_text(ui.user, "Please input name")) + if(tgui_status(ui.user, state) == STATUS_INTERACTIVE) if (!new_name) return activewarrant.fields["namewarrant"] = new_name if("editwarrantcharges") . = TRUE - var/new_charges = sanitize(tgui_input_text(usr, "Please input charges", "Charges", activewarrant.fields["charges"])) - if(tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_charges = sanitize(tgui_input_text(ui.user, "Please input charges", "Charges", activewarrant.fields["charges"])) + if(tgui_status(ui.user, state) == STATUS_INTERACTIVE) if (!new_charges) return activewarrant.fields["charges"] = new_charges @@ -137,6 +137,6 @@ var/warrant_uid = 0 if("editwarrantauth") . = TRUE if(!(access_hos in I.GetAccess())) // VOREStation edit begin - to_chat(usr, span_warning("You don't have the access to do this!")) + to_chat(ui.user, span_warning("You don't have the access to do this!")) return // VOREStation edit end activewarrant.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]" diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 78aceeebaa1..b62b8600c84 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -250,7 +250,7 @@ var/obj/item/card/id/I = W.GetID() // Awaiting payment state if(state == 2) - if(process_payment(I,W)) + if(process_payment(user, I,W)) fabricate_and_recalc_price(1) if((devtype == 1) && fabricated_laptop) if(fabricated_laptop.battery_module) @@ -274,18 +274,18 @@ return ..() // Simplified payment processing, returns 1 on success. -/obj/machinery/lapvend/proc/process_payment(var/obj/item/card/id/I, var/obj/item/ID_container) +/obj/machinery/lapvend/proc/process_payment(mob/user, var/obj/item/card/id/I, var/obj/item/ID_container) if(I==ID_container || ID_container == null) - visible_message(span_info("\The [usr] swipes \the [I] through \the [src].")) + visible_message(span_info("\The [user] swipes \the [I] through \the [src].")) else - visible_message(span_info("\The [usr] swipes \the [ID_container] through \the [src].")) + visible_message(span_info("\The [user] swipes \the [ID_container] through \the [src].")) var/datum/money_account/customer_account = get_account(I.associated_account_number) if (!customer_account || customer_account.suspended) ping("Connection error. Unable to connect to account.") return 0 if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) - var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction") + var/attempt_pin = tgui_input_number(user, "Enter pin code", "Vendor transaction") customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2) if(!customer_account) diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm index db56742c036..7822a87d80f 100644 --- a/code/modules/multiz/ladders.dm +++ b/code/modules/multiz/ladders.dm @@ -107,7 +107,12 @@ target_ladder.audible_message(span_notice("You hear something coming [direction] \the [src]"), runemessage = "clank clank") - if(do_after(M, climb_time, src)) + var/climb_modifier = 1 + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/MS = M + climb_modifier = MS.species.climb_mult + + if(do_after(M, (climb_time * climb_modifier), src)) var/turf/T = get_turf(target_ladder) for(var/atom/A in T) if(!A.CanPass(M, M.loc, 1.5, 0)) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 41c026076f6..64fc76ae390 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -19,6 +19,13 @@ var/obj/mecha/mech = loc return mech.relaymove(src,direction) + var/swim_modifier = 1 + var/climb_modifier = 1 + if(istype(src,/mob/living/carbon/human)) + var/mob/living/carbon/human/MS = src + swim_modifier = MS.species.swim_mult + climb_modifier = MS.species.climb_mult + if(!can_ztravel()) to_chat(src, span_warning("You lack means of travel in that direction.")) return @@ -49,7 +56,7 @@ if(direction == DOWN) var/turf/simulated/floor/water/deep/ocean/diving/sink = start if(istype(sink) && !destination.density) - var/pull_up_time = max(3 SECONDS + (src.movement_delay() * 10), 1) + var/pull_up_time = max((3 SECONDS + (src.movement_delay() * 10) * swim_modifier), 1) to_chat(src, span_notice("You start diving underwater...")) src.audible_message(span_notice("[src] begins to dive under the water."), runemessage = "splish splosh") if(do_after(src, pull_up_time)) @@ -72,10 +79,9 @@ if(direction == UP) var/obj/structure/lattice/lattice = locate() in destination.contents var/obj/structure/catwalk/catwalk = locate() in destination.contents - var/turf/simulated/floor/water/deep/ocean/diving/surface = destination if(lattice) - var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1) + var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * climb_modifier), 1) to_chat(src, span_notice("You grab \the [lattice] and start pulling yourself upward...")) src.audible_message(span_notice("[src] begins climbing up \the [lattice]."), runemessage = "clank clang") if(do_after(src, pull_up_time)) @@ -84,8 +90,8 @@ to_chat(src, span_warning("You gave up on pulling yourself up.")) return 0 - else if(istype(surface)) - var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1) + else if(istype(destination, /turf/simulated/floor/water/deep/ocean/diving)) + var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * swim_modifier), 1) to_chat(src, span_notice("You start swimming upwards...")) src.audible_message(span_notice("[src] begins to swim towards the surface."), runemessage = "splish splosh") if(do_after(src, pull_up_time)) @@ -95,7 +101,7 @@ return 0 else if(catwalk?.hatch_open) - var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1) + var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * climb_modifier), 1) to_chat(src, span_notice("You grab the edge of \the [catwalk] and start pulling yourself upward...")) var/old_dest = destination destination = get_step(destination, dir) // mob's dir @@ -109,6 +115,12 @@ to_chat(src, span_warning("You gave up on pulling yourself up.")) return 0 + //RS Port #661 Start, Prevents noclipping + else if(!istype(destination, /turf/simulated/open)) + to_chat(src, span_warning("Something solid above stops you from passing.")) + return 0 + //RS Port #661 End + else if(isliving(src)) //VOREStation Edit Start. Are they a mob, and are they currently flying?? var/mob/living/H = src if(H.flying) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 72b24602f9e..3364d330680 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -250,7 +250,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5 B.data["viruses"] = list() for(var/datum/disease/D in GetViruses()) - if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS) + if(D.spread_flags & SPECIAL) continue B.data["viruses"] |= D.Copy() diff --git a/code/modules/organs/internal/augment/armmounted.dm b/code/modules/organs/internal/augment/armmounted.dm index 28804311a0b..3845de10722 100644 --- a/code/modules/organs/internal/augment/armmounted.dm +++ b/code/modules/organs/internal/augment/armmounted.dm @@ -62,6 +62,10 @@ icon_state = "augment_box" w_class = ITEMSIZE_SMALL + // Needs to be redefined here, or the switch statement beneath with no default case can never change target limb... Also prevents putting it in your shoulder when it's a hand implant. + organ_tag = O_AUG_R_HAND + parent_organ = BP_R_HAND + target_slot = slot_r_hand integrated_object_type = /obj/item/portable_scanner diff --git a/code/modules/overmap/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm index 928180711fe..f5791352377 100644 --- a/code/modules/overmap/disperser/disperser_console.dm +++ b/code/modules/overmap/disperser/disperser_console.dm @@ -6,9 +6,6 @@ icon_state = "computer" circuit = /obj/item/circuitboard/disperser - core_skill = /datum/skill/pilot - var/skill_offset = SKILL_ADEPT - 1 //After which skill level it starts to matter. -1, because we have to index from zero - icon_keyboard = "rd_key" icon_screen = "teleport" @@ -151,7 +148,6 @@ data["range"] = range data["next_shot"] = round(get_next_shot_seconds()) data["nopower"] = !data["faillink"] && (!front.powered() || !middle.powered() || !back.powered()) - data["skill"] = user.get_skill_value(core_skill) > skill_offset var/charge = "UNKNOWN ERROR" if(get_charge_type() == OVERMAP_WEAKNESS_NONE) @@ -177,34 +173,34 @@ . = TRUE if("calibration") - var/input = tgui_input_number(usr, "0-9", "disperser calibration", 0, 9, 0) + var/input = tgui_input_number(ui.user, "0-9", "disperser calibration", 0, 9, 0) if(!isnull(input)) //can be zero so we explicitly check for null var/calnum = sanitize_integer(text2num(params["calibration"]), 0, caldigit)//sanitiiiiize calibration[calnum + 1] = sanitize_integer(input, 0, 9, 0)//must add 1 because js indexes from 0 . = TRUE if("skill_calibration") - for(var/i = 1 to min(caldigit, usr.get_skill_value(core_skill) - skill_offset)) + for(var/i = 1 to 2) calibration[i] = calexpected[i] . = TRUE if("strength") - var/input = tgui_input_number(usr, "1-5", "disperser strength", 1, 5, 1) - if(input && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/input = tgui_input_number(ui.user, "1-5", "disperser strength", 1, 5, 1) + if(input && tgui_status(ui.user, state) == STATUS_INTERACTIVE) strength = sanitize_integer(input, 1, 5, 1) middle.update_idle_power_usage(strength * range * 100) . = TRUE if("range") - var/input = tgui_input_number(usr, "1-5", "disperser radius", 1, 5, 1) - if(input && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/input = tgui_input_number(ui.user, "1-5", "disperser radius", 1, 5, 1) + if(input && tgui_status(ui.user, state) == STATUS_INTERACTIVE) range = sanitize_integer(input, 1, 5, 1) middle.update_idle_power_usage(strength * range * 100) . = TRUE if("fire") - fire(usr) + fire(ui.user) . = TRUE - if(. && !issilicon(usr)) + if(. && !issilicon(ui.user)) playsound(src, "terminal_type", 50, 1) diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm index 4ef8a9be386..ac9c5711847 100644 --- a/code/modules/overmap/overmap_shuttle.dm +++ b/code/modules/overmap/overmap_shuttle.dm @@ -9,8 +9,6 @@ var/obj/effect/overmap/visitable/ship/landable/myship //my overmap ship object category = /datum/shuttle/autodock/overmap - var/skill_needed = SKILL_BASIC - var/operator_skill = SKILL_BASIC /datum/shuttle/autodock/overmap/New(var/_name, var/obj/effect/shuttle_landmark/start_waypoint) ..(_name, start_waypoint) @@ -54,15 +52,7 @@ /datum/shuttle/autodock/overmap/get_travel_time() var/distance_mod = get_dist(waypoint_sector(current_location),waypoint_sector(next_location)) - var/skill_mod = 0.2*(skill_needed - operator_skill) - return move_time * (1 + distance_mod + skill_mod) - -/datum/shuttle/autodock/overmap/process_launch() - if(prob(10*max(0, skill_needed - operator_skill))) - var/places = get_possible_destinations() - var/place = pick(places) - set_destination(places[place]) - ..() + return move_time * (1 + distance_mod) /datum/shuttle/autodock/overmap/proc/set_destination(var/obj/effect/shuttle_landmark/A) if(A != current_location) @@ -187,4 +177,4 @@ // Walls hide stuff inside them, but we want to be visible. /obj/structure/fuel_port/hide() - return \ No newline at end of file + return diff --git a/code/modules/overmap/ships/computers/computer_shims.dm b/code/modules/overmap/ships/computers/computer_shims.dm index fd0d3abaefc..449f3bd4be5 100644 --- a/code/modules/overmap/ships/computers/computer_shims.dm +++ b/code/modules/overmap/ships/computers/computer_shims.dm @@ -49,7 +49,6 @@ // Skills // /obj/machinery/computer/ship - var/core_skill = /datum/skill/devices //The skill used for skill checks for this machine (mostly so subtypes can use different skills). var/ai_control = TRUE //VOREStation Edit // diff --git a/code/modules/overmap/ships/computers/engine_control.dm b/code/modules/overmap/ships/computers/engine_control.dm index aef04282312..49f1e617c54 100644 --- a/code/modules/overmap/ships/computers/engine_control.dm +++ b/code/modules/overmap/ships/computers/engine_control.dm @@ -62,8 +62,8 @@ . = TRUE if("set_global_limit") - var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0, round_value = FALSE) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newlim = tgui_input_number(ui.user, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0, round_value = FALSE) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE linked.thrust_limit = clamp(newlim/100, 0, 1) for(var/datum/ship_engine/E in linked.engines) @@ -78,8 +78,8 @@ if("set_limit") var/datum/ship_engine/E = locate(params["engine"]) - var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0, round_value = FALSE) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newlim = tgui_input_number(ui.user, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0, round_value = FALSE) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE var/limit = clamp(newlim/100, 0, 1) if(istype(E)) @@ -99,5 +99,5 @@ E.toggle() . = TRUE - if(. && !issilicon(usr)) + if(. && !issilicon(ui.user)) playsound(src, "terminal_type", 50, 1) diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index 5895b3bb849..0473457bdcf 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -20,7 +20,6 @@ GLOBAL_LIST_EMPTY(all_waypoints) icon_screen = "helm" light_color = "#7faaff" circuit = /obj/item/circuitboard/helm - core_skill = /datum/skill/pilot var/autopilot = 0 var/autopilot_disabled = TRUE var/list/known_sectors = list() @@ -77,13 +76,10 @@ GLOBAL_LIST_EMPTY(all_waypoints) // All other cases, move toward direction else if(speed + acceleration <= speedlimit) linked.accelerate(direction, accellimit) - linked.operator_skill = null//if this is on you can't dodge meteors return /obj/machinery/computer/ship/helm/relaymove(var/mob/user, direction) if(viewing_overmap(user) && linked) - if(prob(user.skill_fail_chance(/datum/skill/pilot, 50, linked.skill_needed, factor = 1))) - direction = turn(direction,pick(90,-90)) linked.relaymove(user, direction, accellimit) return 1 @@ -173,33 +169,33 @@ GLOBAL_LIST_EMPTY(all_waypoints) switch(action) if("update_camera_view") if(TIMER_COOLDOWN_RUNNING(src, COOLDOWN_SHIP_REFRESH)) - to_chat(usr, span_warning("You cannot refresh the map so often.")) + to_chat(ui.user, span_warning("You cannot refresh the map so often.")) return update_map() TIMER_COOLDOWN_START(src, COOLDOWN_SHIP_REFRESH, 5 SECONDS) . = TRUE if("add") var/datum/computer_file/data/waypoint/R = new() - var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]", MAX_NAME_LEN) + var/sec_name = tgui_input_text(ui.user, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]", MAX_NAME_LEN) sec_name = sanitize(sec_name,MAX_NAME_LEN) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE if(!sec_name) sec_name = "Sector #[known_sectors.len]" R.fields["name"] = sec_name if(sec_name in known_sectors) - to_chat(usr, span_warning("Sector with that name already exists, please input a different name.")) + to_chat(ui.user, span_warning("Sector with that name already exists, please input a different name.")) return TRUE switch(params["add"]) if("current") R.fields["x"] = linked.x R.fields["y"] = linked.y if("new") - var/newx = tgui_input_number(usr, "Input new entry x coordinate", "Coordinate input", linked.x, world.maxx, 1) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newx = tgui_input_number(ui.user, "Input new entry x coordinate", "Coordinate input", linked.x, world.maxx, 1) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return TRUE - var/newy = tgui_input_number(usr, "Input new entry y coordinate", "Coordinate input", linked.y, world.maxy, 1) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newy = tgui_input_number(ui.user, "Input new entry y coordinate", "Coordinate input", linked.y, world.maxy, 1) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE R.fields["x"] = CLAMP(newx, 1, world.maxx) R.fields["y"] = CLAMP(newy, 1, world.maxy) @@ -215,15 +211,15 @@ GLOBAL_LIST_EMPTY(all_waypoints) if("setcoord") if(params["setx"]) - var/newx = tgui_input_number(usr, "Input new destiniation x coordinate", "Coordinate input", dx, world.maxx, 1) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newx = tgui_input_number(ui.user, "Input new destiniation x coordinate", "Coordinate input", dx, world.maxx, 1) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return if(newx) dx = CLAMP(newx, 1, world.maxx) if(params["sety"]) - var/newy = tgui_input_number(usr, "Input new destiniation y coordinate", "Coordinate input", dy, world.maxy, 1) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/newy = tgui_input_number(ui.user, "Input new destiniation y coordinate", "Coordinate input", dy, world.maxy, 1) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return if(newy) dy = CLAMP(newy, 1, world.maxy) @@ -240,21 +236,19 @@ GLOBAL_LIST_EMPTY(all_waypoints) . = TRUE if("speedlimit") - var/newlimit = tgui_input_number(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000, 100000, round_value = FALSE) + var/newlimit = tgui_input_number(ui.user, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000, 100000, round_value = FALSE) if(newlimit) speedlimit = CLAMP(newlimit/1000, 0, 100) . = TRUE if("accellimit") - var/newlimit = tgui_input_number(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000, round_value = FALSE) + var/newlimit = tgui_input_number(ui.user, "Input new acceleration limit", "Acceleration limit", accellimit*1000, round_value = FALSE) if(newlimit) accellimit = max(newlimit/1000, 0) . = TRUE if("move") var/ndir = text2num(params["dir"]) - if(prob(usr.skill_fail_chance(/datum/skill/pilot, 50, linked.skill_needed, factor = 1))) - ndir = turn(ndir,pick(90,-90)) linked.relaymove(usr, ndir, accellimit) . = TRUE @@ -275,11 +269,11 @@ GLOBAL_LIST_EMPTY(all_waypoints) . = TRUE if("manual") - viewing_overmap(usr) ? unlook(usr) : look(usr) + viewing_overmap(ui.user) ? unlook(ui.user) : look(ui.user) . = TRUE - add_fingerprint(usr) - if(. && !issilicon(usr)) + add_fingerprint(ui.user) + if(. && !issilicon(ui.user)) playsound(src, "terminal_type", 50, 1) diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index 92965c4fd28..718a78e0344 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -88,8 +88,8 @@ switch(action) if("viewing") - if(usr && !isAI(usr)) - viewing_overmap(usr) ? unlook(usr) : look(usr) + if(ui.user && !isAI(ui.user)) + viewing_overmap(ui.user) ? unlook(ui.user) : look(ui.user) . = TRUE if("link") @@ -99,15 +99,15 @@ if("scan") var/obj/effect/overmap/O = locate(params["scan"]) if(istype(O) && !QDELETED(O) && (O in view(7,linked))) - new/obj/item/paper/(get_turf(src), O.get_scan_data(usr), "paper (Sensor Scan - [O])") + new/obj/item/paper/(get_turf(src), O.get_scan_data(ui.user), "paper (Sensor Scan - [O])") playsound(src, "sound/machines/printer.ogg", 30, 1) . = TRUE if(sensors) switch(action) if("range") - var/nrange = tgui_input_number(usr, "Set new sensors range", "Sensor range", sensors.range, world.view, round_value = FALSE ) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/nrange = tgui_input_number(ui.user, "Set new sensors range", "Sensor range", sensors.range, world.view, round_value = FALSE ) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE if(nrange) sensors.set_range(CLAMP(nrange, 1, world.view)) @@ -116,7 +116,7 @@ sensors.toggle() . = TRUE - if(. && !issilicon(usr)) + if(. && !issilicon(ui.user)) playsound(src, "terminal_type", 50, 1) /obj/machinery/computer/ship/sensors/process() diff --git a/code/modules/overmap/ships/computers/ship.dm b/code/modules/overmap/ships/computers/ship.dm index 15df9bab59e..2b63f95b9a2 100644 --- a/code/modules/overmap/ships/computers/ship.dm +++ b/code/modules/overmap/ships/computers/ship.dm @@ -55,11 +55,11 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov return TRUE switch(action) if("sync") - sync_linked(usr) + sync_linked(ui.user) return TRUE if("close") - unlook(usr) - usr.unset_machine() + unlook(ui.user) + ui.user.unset_machine() return TRUE return FALSE diff --git a/code/modules/overmap/ships/computers/shuttle.dm b/code/modules/overmap/ships/computers/shuttle.dm index 5ad197e0500..8f46266d3db 100644 --- a/code/modules/overmap/ships/computers/shuttle.dm +++ b/code/modules/overmap/ships/computers/shuttle.dm @@ -25,28 +25,24 @@ "fuel_span" = fuel_span ) -/obj/machinery/computer/shuttle_control/explore/tgui_act(action, list/params) +/obj/machinery/computer/shuttle_control/explore/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE var/datum/shuttle/autodock/overmap/shuttle = SSshuttles.shuttles[shuttle_tag] if(!istype(shuttle)) - to_chat(usr, span_warning("Unable to establish link with the shuttle.")) + to_chat(ui.user, span_warning("Unable to establish link with the shuttle.")) return TRUE - if(ismob(usr)) - var/mob/user = usr - shuttle.operator_skill = user.get_skill_value(/datum/skill/pilot) - switch(action) if("pick") var/list/possible_d = shuttle.get_possible_destinations() var/D if(possible_d.len) - D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d) + D = tgui_input_list(ui.user, "Choose shuttle destination", "Shuttle Destination", possible_d) else - to_chat(usr,span_warning("No valid landing sites in range.")) + to_chat(ui.user,span_warning("No valid landing sites in range.")) possible_d = shuttle.get_possible_destinations() - if(CanInteract(usr, GLOB.tgui_default_state) && (D in possible_d)) + if(CanInteract(ui.user, GLOB.tgui_default_state) && (D in possible_d)) shuttle.set_destination(possible_d[D]) return TRUE diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index 8394744fc35..cbacd0cb3e9 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -39,8 +39,6 @@ var/engines_state = 0 //global on/off toggle for all engines var/thrust_limit = 1 //global thrust limit for all engines, 0..1 var/halted = 0 //admin halt or other stop. - var/skill_needed = SKILL_ADEPT //piloting skill needed to steer it without going in random dir - var/operator_skill //VOREStation add var/last_sound = 0 //The last time a ship sound was played //VOREStation add var/sound_cooldown = 10 SECONDS //VOREStation add @@ -67,7 +65,6 @@ /obj/effect/overmap/visitable/ship/relaymove(mob/user, direction, accel_limit) accelerate(direction, accel_limit) - operator_skill = user.get_skill_value(/datum/skill/pilot) /obj/effect/overmap/visitable/ship/proc/is_still() return !MOVING(speed[1]) && !MOVING(speed[2]) @@ -285,9 +282,6 @@ if(!SSshuttles.overmap_halted) halted = 0 -/obj/effect/overmap/visitable/ship/proc/get_helm_skill()//delete this mover operator skill to overmap obj - return operator_skill - /obj/effect/overmap/visitable/ship/populate_sector_objects() ..() for(var/obj/machinery/computer/ship/S in global.machines) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 45892c176c3..aedfd802709 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -179,13 +179,13 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null else - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() if(istype(I, /obj/item/card/id)) - usr.drop_item() + ui.user.drop_item() I.forceMove(src) scan = I return TRUE @@ -195,30 +195,30 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" return TRUE if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null return TRUE if("remove") if(copyitem) - if(get_dist(usr, src) >= 2) - to_chat(usr, "\The [copyitem] is too far away for you to remove it.") + if(get_dist(ui.user, src) >= 2) + to_chat(ui.user, "\The [copyitem] is too far away for you to remove it.") return copyitem.forceMove(loc) - usr.put_in_hands(copyitem) - to_chat(usr, span_notice("You take \the [copyitem] out of \the [src].")) + ui.user.put_in_hands(copyitem) + to_chat(ui.user, span_notice("You take \the [copyitem] out of \the [src].")) copyitem = null if("send_automated_staff_request") request_roles() @@ -229,7 +229,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins switch(action) if("rename") if(copyitem) - var/new_name = tgui_input_text(usr, "Enter new paper title", "This will show up in the preview for staff chat on discord when sending \ + var/new_name = tgui_input_text(ui.user, "Enter new paper title", "This will show up in the preview for staff chat on discord when sending \ to central.", copyitem.name, MAX_NAME_LEN) if(!new_name) return @@ -237,9 +237,9 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if("send") if(copyitem) if (destination in admin_departments) - if(check_if_default_title_and_rename()) + if(check_if_default_title_and_rename(ui.user)) return - send_admin_fax(usr, destination) + send_admin_fax(ui.user, destination) else sendfax(destination) @@ -249,14 +249,14 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if("dept") var/lastdestination = destination - destination = tgui_input_list(usr, "Which department?", "Choose a department", (alldepartments + admin_departments)) + destination = tgui_input_list(ui.user, "Which department?", "Choose a department", (alldepartments + admin_departments)) if(!destination) destination = lastdestination return TRUE -/obj/machinery/photocopier/faxmachine/proc/check_if_default_title_and_rename() +/obj/machinery/photocopier/faxmachine/proc/check_if_default_title_and_rename(mob/user) /* Returns TRUE only on "Cancel" or invalid newname, else returns null/false Extracted to its own procedure for easier logic handling with paper bundles. @@ -276,13 +276,13 @@ Extracted to its own procedure for easier logic handling with paper bundles. else if(copyitem.name != initial(copyitem.name)) return FALSE - var/choice = tgui_alert(usr, "[question_text] improve response time from staff when sending to discord. \ + var/choice = tgui_alert(user, "[question_text] improve response time from staff when sending to discord. \ Renaming it changes its preview in staff chat.", \ "Default name detected", list("Change Title","Continue", "Cancel")) if(!choice || choice == "Cancel") return TRUE else if(choice == "Change Title") - var/new_name = tgui_input_text(usr, "Enter new fax title", "This will show up in the preview for staff chat on discord when sending \ + var/new_name = tgui_input_text(user, "Enter new fax title", "This will show up in the preview for staff chat on discord when sending \ to central.", copyitem.name, MAX_NAME_LEN) if(!new_name) return TRUE @@ -295,9 +295,9 @@ Extracted to its own procedure for easier logic handling with paper bundles. O.forceMove(src) scan = O else if(O.has_tool_quality(TOOL_MULTITOOL) && panel_open) - var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department)) + var/input = sanitize(tgui_input_text(user, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department)) if(!input) - to_chat(usr, "No input found. Please hang up and try your call again.") + to_chat(user, "No input found. Please hang up and try your call again.") return department = input if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) && !(department == "Unknown")) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 2fed2a87421..8ef985f147b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -99,15 +99,15 @@ return list("contents" = files) -/obj/structure/filingcabinet/tgui_act(action, params) +/obj/structure/filingcabinet/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("retrieve") var/obj/item/P = locate(params["ref"]) - if(istype(P) && (P.loc == src) && usr.Adjacent(src)) - usr.put_in_hands(P) + if(istype(P) && (P.loc == src) && ui.user.Adjacent(src)) + ui.user.put_in_hands(P) open_animation() SStgui.update_uis(src) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 0b11efd1303..883a4bd6626 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -597,7 +597,7 @@ user << browse("[name][info_links][stamps]", "window=[name]") return - else if(istype(P, /obj/item/stamp) || istype(P, /obj/item/clothing/gloves/ring/seal)) + else if(istype(P, /obj/item/stamp) || istype(P, /obj/item/clothing/accessory/ring/seal)) if(istype(P, /obj/item/stamp)) var/obj/item/stamp/the_stamp = P if(the_stamp.stamptext) @@ -605,7 +605,7 @@ else stamps += (stamps=="" ? "
" : "
") + span_italics("This paper has been stamped with the [the_stamp.name].") else - var/obj/item/clothing/gloves/ring/seal/the_stamp = P + var/obj/item/clothing/accessory/ring/seal/the_stamp = P if(the_stamp.stamptext) stamps += (stamps=="" ? "
" : "
") + span_italics("[the_stamp.stamptext]") else diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 5e4dfd32827..0794fecf38c 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -61,13 +61,13 @@ switch(action) if("make_copy") - addtimer(CALLBACK(src, PROC_REF(copy_operation), usr), 0) + addtimer(CALLBACK(src, PROC_REF(copy_operation), ui.user), 0) . = TRUE if("remove") if(copyitem) - copyitem.loc = usr.loc - usr.put_in_hands(copyitem) - to_chat(usr, span_notice("You take \the [copyitem] out of \the [src].")) + copyitem.loc = ui.user.loc + ui.user.put_in_hands(copyitem) + to_chat(ui.user, span_notice("You take \the [copyitem] out of \the [src].")) copyitem = null else if(has_buckled_mobs()) to_chat(buckled_mobs[1], span_notice("You feel a slight pressure on your ass.")) // It can't eject your asscheeks, but it'll try. @@ -76,13 +76,13 @@ copies = clamp(text2num(params["num_copies"]), 1, maxcopies) . = TRUE if("ai_photo") - if(!issilicon(usr)) + if(!issilicon(ui.user)) return if(stat & (BROKEN|NOPOWER)) return if(toner >= 5) - var/mob/living/silicon/tempAI = usr + var/mob/living/silicon/tempAI = ui.user var/obj/item/camera/siliconcam/camera = tempAI.aiCamera if(!camera) @@ -376,7 +376,7 @@ if(M.item_is_in_hands(C)) continue if((C.body_parts_covered & LOWER_TORSO) && !istype(C,/obj/item/clothing/under/permit)) - to_chat(usr, span_warning("One needs to not be wearing pants to photocopy one's ass...")) + to_chat(M, span_warning("One needs to not be wearing pants to photocopy one's ass...")) return FALSE return TRUE diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index 5354620628b..adde8261782 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -33,7 +33,7 @@ else switch(text2num(params["option"])) if(1) // Configure pAI device - pda.pai.attack_self(usr) + pda.pai.attack_self(ui.user) if(2) // Eject pAI device var/turf/T = get_turf_or_move(pda.loc) if(T) @@ -72,105 +72,105 @@ return TRUE switch(action) if("Edit") - var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) - if(pda.loc == usr) + var/n = tgui_input_text(ui.user, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) + if(pda.loc == ui.user) note = adminscrub(n) notehtml = html_decode(note) note = replacetext(note, "\n", "
") else - pda.close(usr) + pda.close(ui.user) return TRUE if("Titleset") - var/n = tgui_input_text(usr, "Please enter title", name, notetitle, multiline = FALSE) - if(pda.loc == usr) + var/n = tgui_input_text(ui.user, "Please enter title", name, notetitle, multiline = FALSE) + if(pda.loc == ui.user) notetitle = adminscrub(n) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Print") - if(pda.loc == usr) - printnote() + if(pda.loc == ui.user) + printnote(ui.user) else - pda.close(usr) + pda.close(ui.user) return TRUE // dumb way to do this, but i don't know how to easily parse this without a lot of silly code outside the switch! if("Note1") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(1) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note2") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(2) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note3") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(3) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note4") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(4) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note5") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(5) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note6") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(6) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note7") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(7) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note8") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(8) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note9") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(9) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note10") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(10) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note11") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(11) else - pda.close(usr) + pda.close(ui.user) return TRUE if("Note12") - if(pda.loc == usr) + if(pda.loc == ui.user) changetonote(12) else - pda.close(usr) + pda.close(ui.user) return TRUE -/datum/data/pda/app/notekeeper/proc/printnote() +/datum/data/pda/app/notekeeper/proc/printnote(mob/user) // get active hand of person holding PDA, and print the page to the paper in it - if(istype( usr, /mob/living/carbon/human )) - var/mob/living/carbon/human/H = usr + if(istype( user, /mob/living/carbon/human )) + var/mob/living/carbon/human/H = user var/obj/item/I = H.get_active_hand() if(istype(I,/obj/item/paper)) var/obj/item/paper/P = I @@ -178,12 +178,12 @@ var/titlenote = "Note [alphabet_uppercase[currentnote]]" if(!isnull(notetitle) && notetitle != "") titlenote = notetitle - to_chat(usr, span_notice("Successfully printed [titlenote]!")) + to_chat(user, span_notice("Successfully printed [titlenote]!")) P.set_content( pencode2html(note), titlenote) else - to_chat(usr, span_notice("You can only print to empty paper!")) + to_chat(user, span_notice("You can only print to empty paper!")) else - to_chat(usr, span_notice("You must be holding paper for the pda to print to!")) + to_chat(user, span_notice("You must be holding paper for the pda to print to!")) /datum/data/pda/app/notekeeper/proc/changetonote(var/noteindex) diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index 15c0f2227a1..b9d84fbe289 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -86,7 +86,7 @@ active_conversation = null if("Message") var/obj/item/pda/P = locate(params["target"]) - create_message(usr, P) + create_message(ui.user, P) if(params["target"] in conversations) // Need to make sure the message went through, if not welp. active_conversation = params["target"] if("Select Conversation") @@ -100,12 +100,12 @@ var/obj/item/pda/P = locate(params["target"]) if(!P) - to_chat(usr, "PDA not found.") + to_chat(ui.user, "PDA not found.") var/datum/data/pda/messenger_plugin/plugin = locate(params["plugin"]) if(plugin && (plugin in pda.cartridge.messenger_plugins)) plugin.messenger = src - plugin.user_act(usr, P) + plugin.user_act(ui.user, P) if("Back") active_conversation = null @@ -142,7 +142,7 @@ if(last_text && world.time < last_text + 5) return - if(!pda.can_use(usr)) + if(!pda.can_use(U)) return last_text = world.time @@ -181,7 +181,7 @@ PM.receive_message(list("sent" = 0, "owner" = "[pda.owner]", "job" = "[pda.ownjob]", "message" = "[t]", "target" = "\ref[pda]"), "\ref[pda]") SStgui.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message - log_pda("(PDA: [src.name]) sent \"[t]\" to [P.name]", usr) + log_pda("(PDA: [src.name]) sent \"[t]\" to [P.name]", U) to_chat(U, "[icon2html(pda,U.client)] Sent message to [P.owner] ([P.ownjob]), \"[t]\"") else to_chat(U, span_notice("ERROR: Messaging server is not responding.")) diff --git a/code/modules/pda/pda_tgui.dm b/code/modules/pda/pda_tgui.dm index 40cf2154949..5fa161170d5 100644 --- a/code/modules/pda/pda_tgui.dm +++ b/code/modules/pda/pda_tgui.dm @@ -63,8 +63,8 @@ if(..()) return TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) if(!touch_silent) playsound(src, 'sound/machines/pda_click.ogg', 20) @@ -99,7 +99,7 @@ cartridge = null update_shortcuts() if("Authenticate")//Checks for ID - id_check(usr, 1) + id_check(ui.user, 1) if("Retro") retro_mode = !retro_mode if("TouchSounds") diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm index 62261ae0d83..7282ac3e265 100644 --- a/code/modules/persistence/noticeboard.dm +++ b/code/modules/persistence/noticeboard.dm @@ -56,7 +56,7 @@ /obj/structure/noticeboard/attackby(obj/item/I, mob/user) if(I.has_tool_quality(TOOL_SCREWDRIVER)) - var/choice = tgui_input_list(usr, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset")) + var/choice = tgui_input_list(user, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset")) if(choice && Adjacent(user) && I.loc == user && !user.incapacitated()) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) switch(choice) @@ -127,7 +127,7 @@ data["notices"] = tgui_notices return data -/obj/structure/noticeboard/tgui_act(action, params) +/obj/structure/noticeboard/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -135,36 +135,36 @@ if("read") var/obj/item/paper/P = locate(params["ref"]) if(P && P.loc == src) - P.show_content(usr) + P.show_content(ui.user) . = TRUE if("look") var/obj/item/photo/P = locate(params["ref"]) if(P && P.loc == src) - P.show(usr) + P.show(ui.user) . = TRUE if("remove") - if(!in_range(src, usr)) + if(!in_range(src, ui.user)) return FALSE var/obj/item/I = locate(params["ref"]) remove_paper(I) if(istype(I)) - usr.put_in_hands(I) - add_fingerprint(usr) + ui.user.put_in_hands(I) + add_fingerprint(ui.user) . = TRUE if("write") - if(!in_range(src, usr)) + if(!in_range(src, ui.user)) return FALSE var/obj/item/P = locate(params["ref"]) if((P && P.loc == src)) //if the paper's on the board - var/mob/living/M = usr + var/mob/living/M = ui.user if(istype(M)) var/obj/item/pen/E = M.get_type_in_hands(/obj/item/pen) if(E) add_fingerprint(M) - P.attackby(E, usr) + P.attackby(E, ui.user) else to_chat(M, span_notice("You'll need something to write with!")) . = TRUE diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 0fd0cdfc0c5..f66a2afe203 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -565,7 +565,7 @@ GLOBAL_LIST_EMPTY(apcs) if(do_after(user, 20)) if(C.get_amount() >= 10 && !terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) var/obj/structure/cable/N = T.get_cable_node() - if(prob(50) && electrocute_mob(usr, N, N)) + if(prob(50) && electrocute_mob(user, N, N)) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() @@ -587,11 +587,11 @@ GLOBAL_LIST_EMPTY(apcs) playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 50 * W.toolspeed)) if(terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) - if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) + if(prob(50) && electrocute_mob(user, terminal.powernet, terminal)) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - if(usr.stunned) + if(user.stunned) return new /obj/item/stack/cable_coil(loc,10) to_chat(user, span_notice("You cut the cables and dismantle the power terminal.")) @@ -914,18 +914,18 @@ GLOBAL_LIST_EMPTY(apcs) return 0 return 1 -/obj/machinery/power/apc/tgui_act(action, params) - if(..() || !can_use(usr, TRUE)) +/obj/machinery/power/apc/tgui_act(action, params, datum/tgui/ui) + if(..() || !can_use(ui.user, TRUE)) return TRUE // There's a handful of cases where we want to allow users to bypass the `locked` variable. // If can_admin_interact() wasn't only defined on observers, this could just be part of a single-line // conditional. var/locked_exception = FALSE - if(issilicon(usr) || action == "nightshift") + if(issilicon(ui.user) || action == "nightshift") locked_exception = TRUE - if(isobserver(usr)) - var/mob/observer/dead/D = usr + if(isobserver(ui.user)) + var/mob/observer/dead/D = ui.user if(D.can_admin_interact()) locked_exception = TRUE @@ -937,7 +937,7 @@ GLOBAL_LIST_EMPTY(apcs) if("lock") if(locked_exception) // Yay code reuse if(emagged || (stat & (BROKEN|MAINT))) - to_chat(usr, "The APC does not respond to the command.") + to_chat(ui.user, "The APC does not respond to the command.") return locked = !locked update_icon() @@ -947,7 +947,7 @@ GLOBAL_LIST_EMPTY(apcs) toggle_breaker() if("nightshift") if(last_nightshift_switch > world.time - 10 SECONDS) // don't spam... - to_chat(usr, span_warning("[src]'s night lighting circuit breaker is still cycling!")) + to_chat(ui.user, span_warning("[src]'s night lighting circuit breaker is still cycling!")) return 0 last_nightshift_switch = world.time nightshift_setting = params["nightshift"] diff --git a/code/modules/power/gravitygenerator_vr.dm b/code/modules/power/gravitygenerator_vr.dm index cce29f07c59..489583cf029 100644 --- a/code/modules/power/gravitygenerator_vr.dm +++ b/code/modules/power/gravitygenerator_vr.dm @@ -261,14 +261,14 @@ GLOBAL_LIST_EMPTY(gravity_generators) return data -/obj/machinery/gravity_generator/main/tgui_act(action, params) +/obj/machinery/gravity_generator/main/tgui_act(action, params, datum/tgui/ui) if((..())) return TRUE switch(action) if("gentoggle") breaker = !breaker - investigate_log("was toggled [breaker ? "ON" : "OFF"] by [key_name(usr)].", "gravity") + investigate_log("was toggled [breaker ? "ON" : "OFF"] by [key_name(ui.user)].", "gravity") set_power() return TOPIC_REFRESH diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index b3a4f6ee929..f3b16206260 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -350,11 +350,11 @@ return data -/obj/machinery/power/port_gen/pacman/tgui_act(action, params) +/obj/machinery/power/port_gen/pacman/tgui_act(action, params, datum/tgui/ui) if(..()) return - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("toggle_power") TogglePower() diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 990cbb4780b..944915f209d 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -82,26 +82,26 @@ part.strength = strength part.update_icon() -/obj/machinery/particle_accelerator/control_box/proc/add_strength(var/s) +/obj/machinery/particle_accelerator/control_box/proc/add_strength(mob/user, var/s) if(assembled) strength++ if(strength > strength_upper_limit) strength = strength_upper_limit else - message_admins("PA Control Computer increased to [strength] by [key_name(usr, usr.client)][ADMIN_QUE(usr)] in [ADMIN_COORDJMP(src)]",0,1) - log_game("PACCEL([x],[y],[z]) [key_name(usr)] increased to [strength]") - investigate_log("increased to [strength] by [usr.key]","singulo") + message_admins("PA Control Computer increased to [strength] by [key_name(user, user.client)][ADMIN_QUE(user)] in [ADMIN_COORDJMP(src)]",0,1) + log_game("PACCEL([x],[y],[z]) [key_name(user)] increased to [strength]") + investigate_log("increased to [strength] by [user.key]","singulo") strength_change() -/obj/machinery/particle_accelerator/control_box/proc/remove_strength(var/s) +/obj/machinery/particle_accelerator/control_box/proc/remove_strength(mob/user, var/s) if(assembled) strength-- if(strength < 0) strength = 0 else - message_admins("PA Control Computer decreased to [strength] by [key_name(usr, usr.client)][ADMIN_QUE(usr)] in [ADMIN_COORDJMP(src)]",0,1) - log_game("PACCEL([x],[y],[z]) [key_name(usr)] decreased to [strength]") - investigate_log("decreased to [strength] by [usr.key]","singulo") + message_admins("PA Control Computer decreased to [strength] by [key_name(user, user.client)][ADMIN_QUE(user)] in [ADMIN_COORDJMP(src)]",0,1) + log_game("PACCEL([x],[y],[z]) [key_name(user)] decreased to [strength]") + investigate_log("decreased to [strength] by [user.key]","singulo") strength_change() /obj/machinery/particle_accelerator/control_box/power_change() @@ -118,7 +118,7 @@ //a part is missing! if( length(connected_parts) < 6 ) log_game("PACCEL([x],[y],[z]) Failed due to missing parts.") - investigate_log("lost a connected part; It powered down.","singulo") + investigate_log("lost a connected part; It " + span_red("powered down") + ".","singulo") toggle_power() return //emit some particles @@ -181,11 +181,11 @@ return 0 -/obj/machinery/particle_accelerator/control_box/proc/toggle_power() +/obj/machinery/particle_accelerator/control_box/proc/toggle_power(mob/user) active = !active - investigate_log("turned [active?"ON":"OFF"] by [usr ? usr.key : "outside forces"]","singulo") - message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [usr ? key_name(usr, usr.client) : "outside forces"][ADMIN_QUE(usr)] in [ADMIN_COORDJMP(src)]",0,1) - log_game("PACCEL([x],[y],[z]) [usr ? key_name(usr, usr.client) : "outside forces"] turned [active?"ON":"OFF"].") + investigate_log("turned [active?"ON":"OFF"] by [user ? user.key : "outside forces"]","singulo") + message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [user ? key_name(user, user.client) : "outside forces"][ADMIN_QUE(user)] in [ADMIN_COORDJMP(src)]",0,1) + log_game("PACCEL([x],[y],[z]) [user ? key_name(user, user.client) : "outside forces"] turned [active?"ON":"OFF"].") if(active) update_use_power(USE_POWER_ACTIVE) for(var/obj/structure/particle_accelerator/part in connected_parts) @@ -226,7 +226,7 @@ data["strength"] = strength return data -/obj/machinery/particle_accelerator/control_box/tgui_act(action, params) +/obj/machinery/particle_accelerator/control_box/tgui_act(action, params, datum/tgui/ui) if(..()) return @@ -234,7 +234,7 @@ if("power") if(wires.is_cut(WIRE_POWER)) return - toggle_power() + toggle_power(ui.user) . = TRUE if("scan") part_scan() @@ -242,12 +242,12 @@ if("add_strength") if(wires.is_cut(WIRE_PARTICLE_STRENGTH)) return - add_strength() + add_strength(ui.user) . = TRUE if("remove_strength") if(wires.is_cut(WIRE_PARTICLE_STRENGTH)) return - remove_strength() + remove_strength(ui.user) . = TRUE update_icon() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index e8ffacc8f52..6d7da776df6 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -445,10 +445,10 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) /obj/singularity/proc/smwave() for(var/mob/living/M in view(10, src.loc)) if(prob(67)) - to_chat(M, span_warning("You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) + to_chat(M, span_warning("You hear an unearthly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) to_chat(M, span_notice("Miraculously, it fails to kill you.")) else - to_chat(M, span_danger("You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) + to_chat(M, span_danger("You hear an unearthly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) to_chat(M, span_danger("You don't even have a moment to react as you are reduced to ashes by the intense radiation.")) M.dust() SSradiation.radiate(src, rand(energy)) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index d873de88bc6..1eceed8782a 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -338,12 +338,12 @@ GLOBAL_LIST_EMPTY(smeses) to_chat(user, span_filter_notice(span_notice("You begin to cut the cables..."))) playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 50 * W.toolspeed)) - if (prob(50) && electrocute_mob(usr, term.powernet, term)) + if (prob(50) && electrocute_mob(user, term.powernet, term)) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() building_terminal = FALSE - if(usr.stunned) + if(user.stunned) return FALSE new /obj/item/stack/cable_coil(loc,10) user.visible_message(\ diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index faacf250538..b7a59fd2c8d 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -124,7 +124,7 @@ if(default_deconstruction_crowbar(user, W)) return if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", name, comp_id, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", name, comp_id, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) comp_id = new_ident @@ -338,7 +338,7 @@ /obj/machinery/computer/turbine_computer/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", name, id, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", name, id, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) id = new_ident diff --git a/code/modules/projectiles/broken.dm b/code/modules/projectiles/broken.dm index 6d90e68fef7..3eda477814c 100644 --- a/code/modules/projectiles/broken.dm +++ b/code/modules/projectiles/broken.dm @@ -98,34 +98,37 @@ /obj/item/broken_gun/proc/can_repair_with(obj/item/I, mob/user) for(var/path in material_needs) - if(ispath(path) && istype(I, path)) - if(material_needs[path] > 0) - if(istype(I, /obj/item/stack)) - var/obj/item/stack/S = I - if(S.can_use(material_needs[path])) - return TRUE - else - to_chat(user, span_notice("You do not have enough [path] to continue repairs.")) - else - return TRUE - + if(!ispath(path) || !istype(I, path)) + continue + if(material_needs[path] <= 0) + continue + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + if(S.can_use(material_needs[path])) + return TRUE + else + to_chat(user, span_notice("You do not have enough [I] to continue repairs.")) + else + return TRUE return FALSE /obj/item/broken_gun/proc/repair_with(obj/item/I, mob/user) for(var/path in material_needs) - if(ispath(path) && istype(I, path)) - if(material_needs[path] > 0) - if(istype(I, /obj/item/stack)) - var/obj/item/stack/S = I - if(S.can_use(material_needs[path])) - S.use(material_needs[path]) - material_needs[path] = 0 - to_chat(user, span_notice("You repair some damage on \the [src] with \the [S].")) - else - material_needs[path] = max(0, material_needs[path] - 1) - user.drop_from_inventory(I) - to_chat(user, span_notice("You repair some damage on \the [src] with \the [I].")) - qdel(I) + if(!ispath(path) || !istype(I, path)) + continue + if(material_needs[path] <= 0) + continue + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + if(S.can_use(material_needs[path])) + S.use(material_needs[path]) + material_needs[path] = 0 + to_chat(user, span_notice("You repair some damage on \the [src] with \the [S].")) + else + material_needs[path] = max(0, material_needs[path] - 1) + user.drop_from_inventory(I) + to_chat(user, span_notice("You repair some damage on \the [src] with \the [I].")) + qdel(I) check_complete_repair(user) diff --git a/code/modules/reagents/machinery/chem_master.dm b/code/modules/reagents/machinery/chem_master.dm index 1d74de01318..88157336717 100644 --- a/code/modules/reagents/machinery/chem_master.dm +++ b/code/modules/reagents/machinery/chem_master.dm @@ -300,7 +300,7 @@ var/amount_per_pill = CLAMP(reagents.total_volume / count, 0, MAX_UNITS_PER_PILL) while(count--) if(reagents.total_volume <= 0) - to_chat(usr, span_notice("Not enough reagents to create these pills!")) + to_chat(ui.user, span_notice("Not enough reagents to create these pills!")) return var/obj/item/reagent_containers/pill/P = new(loc) @@ -336,7 +336,7 @@ // var/is_medical_patch = chemical_safety_check(reagents) while(count--) if(reagents.total_volume <= 0) - to_chat(usr, span_notice("Not enough reagents to create these patches!")) + to_chat(ui.user, span_notice("Not enough reagents to create these patches!")) return var/obj/item/reagent_containers/pill/patch/P = new(loc) @@ -363,7 +363,7 @@ var/amount_per_bottle = CLAMP(reagents.total_volume / count, 0, MAX_UNITS_PER_BOTTLE) while(count--) if(reagents.total_volume <= 0) - to_chat(usr, span_notice("Not enough reagents to create these bottles!")) + to_chat(ui.user, span_notice("Not enough reagents to create these bottles!")) return var/obj/item/reagent_containers/glass/bottle/P = new(loc) P.name = "[answer] bottle" @@ -393,8 +393,8 @@ if(tgui_act_modal(action, params, ui, state)) return TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) . = TRUE switch(action) @@ -403,8 +403,8 @@ if("ejectp") if(loaded_pill_bottle) loaded_pill_bottle.forceMove(get_turf(src)) - if(Adjacent(usr) && !issilicon(usr)) - usr.put_in_hands(loaded_pill_bottle) + if(Adjacent(ui.user) && !issilicon(ui.user)) + ui.user.put_in_hands(loaded_pill_bottle) loaded_pill_bottle = null if("print") if(printing || condi) @@ -463,8 +463,8 @@ if(!beaker) return beaker.forceMove(get_turf(src)) - if(Adjacent(usr) && !issilicon(usr)) - usr.put_in_hands(beaker) + if(Adjacent(ui.user) && !issilicon(ui.user)) + ui.user.put_in_hands(beaker) beaker = null reagents.clear_reagents() update_icon() diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index 058cbe26ea8..9e823fb51a2 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -1,6 +1,7 @@ /obj/structure/reagent_dispensers name = "Dispenser" desc = "..." + description_info = "The input can be opened by Alt-clicking it, allowing you to pour reagents inside." icon = 'icons/obj/chemical_tanks.dmi' icon_state = "tank" layer = TABLE_LAYER @@ -16,6 +17,8 @@ var/amount_per_transfer_from_this = 10 var/possible_transfer_amounts = list(10,25,50,100) + var/open_top = FALSE + /obj/structure/reagent_dispensers/attackby(obj/item/W as obj, mob/user as mob) return @@ -79,6 +82,19 @@ /obj/structure/reagent_dispensers/blob_act() qdel(src) +/obj/structure/reagent_dispensers/AltClick(mob/user) + if(!Adjacent(user)) + return + + if(flags & OPENCONTAINER) + to_chat(user, span_notice("You close the input on \the [src]")) + flags -= OPENCONTAINER + open_top = FALSE + else + to_chat(user, span_notice("You open the input on \the [src], allowing you to pour reagents in.")) + flags |= OPENCONTAINER + open_top = TRUE + /* * Tanks */ diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm index 096e89a9434..80a85443b84 100644 --- a/code/modules/reagents/machinery/grinder.dm +++ b/code/modules/reagents/machinery/grinder.dm @@ -1,3 +1,55 @@ +// Don't need a new list for every grinder in the game +var/global/list/sheet_reagents = list( //have a number of reagents divisible by REAGENTS_PER_SHEET (default 20) unless you like decimals. + /obj/item/stack/material/plastic = list("carbon","carbon","oxygen","chlorine","sulfur"), + /obj/item/stack/material/copper = list("copper"), + /obj/item/stack/material/wood = list("carbon","woodpulp","nitrogen","potassium","sodium"), + /obj/item/stack/material/stick = list("carbon","woodpulp","nitrogen","potassium","sodium"), + /obj/item/stack/material/log = list("carbon","woodpulp","nitrogen","potassium","sodium"), + /obj/item/stack/material/algae = list("carbon","nitrogen","nitrogen","phosphorus","phosphorus"), + /obj/item/stack/material/graphite = list("carbon"), + /obj/item/stack/material/aluminium = list("aluminum"), // The material is aluminium, but the reagent is aluminum... + /obj/item/stack/material/glass/reinforced = list("silicon","silicon","silicon","iron","carbon"), + /obj/item/stack/material/leather = list("carbon","carbon","protein","protein","triglyceride"), + /obj/item/stack/material/cloth = list("carbon","carbon","carbon","protein","sodium"), + /obj/item/stack/material/fiber = list("carbon","carbon","carbon","protein","sodium"), + /obj/item/stack/material/fur = list("carbon","carbon","carbon","sulfur","sodium"), + /obj/item/stack/material/deuterium = list("hydrogen"), + /obj/item/stack/material/glass/phoronrglass = list("silicon","silicon","silicon","phoron","phoron"), + /obj/item/stack/material/diamond = list("carbon"), + /obj/item/stack/material/durasteel = list("iron","iron","carbon","carbon","platinum"), + /obj/item/stack/material/wax = list("ethanol","triglyceride"), + /obj/item/stack/material/iron = list("iron"), + /obj/item/stack/material/uranium = list("uranium"), + /obj/item/stack/material/phoron = list("phoron"), + /obj/item/stack/material/gold = list("gold"), + /obj/item/stack/material/silver = list("silver"), + /obj/item/stack/material/platinum = list("platinum"), + /obj/item/stack/material/mhydrogen = list("hydrogen"), + /obj/item/stack/material/steel = list("iron", "carbon"), + /obj/item/stack/material/plasteel = list("iron", "iron", "carbon", "carbon", "platinum"), //8 iron, 8 carbon, 4 platinum, + /obj/item/stack/material/snow = list("water"), + /obj/item/stack/material/sandstone = list("silicon", "oxygen"), + /obj/item/stack/material/glass = list("silicon"), + /obj/item/stack/material/glass/phoronglass = list("platinum", "silicon", "silicon", "silicon"), //5 platinum, 15 silicon, + /obj/item/stack/material/supermatter = list("supermatter") + ) +var/global/list/ore_reagents = list( //have a number of reageents divisible by REAGENTS_PER_ORE (default 20) unless you like decimals. + /obj/item/ore/glass = list("silicon"), + /obj/item/ore/iron = list("iron"), + /obj/item/ore/coal = list("carbon"), + /obj/item/ore/phoron = list("phoron"), + /obj/item/ore/silver = list("silver"), + /obj/item/ore/gold = list("gold"), + /obj/item/ore/marble = list("silicon","aluminum","aluminum","sodium","calcium"), // Some nice variety here + /obj/item/ore/uranium = list("uranium"), + /obj/item/ore/diamond = list("carbon"), + /obj/item/ore/osmium = list("platinum"), // should contain osmium + /obj/item/ore/lead = list("lead"), + /obj/item/ore/hydrogen = list("hydrogen"), + /obj/item/ore/verdantium = list("radium","phoron","nitrogen","phosphorus","sodium"), // Some fun stuff to be useful with + /obj/item/ore/rutile = list("tungsten","oxygen") // Should be titanium +) + /obj/machinery/reagentgrinder name = "All-In-One Grinder" @@ -14,22 +66,6 @@ var/obj/item/reagent_containers/beaker = null var/limit = 10 var/list/holdingitems = list() - var/list/sheet_reagents = list( //have a number of reageents divisible by REAGENTS_PER_SHEET (default 20) unless you like decimals, - /obj/item/stack/material/iron = list("iron"), - /obj/item/stack/material/uranium = list("uranium"), - /obj/item/stack/material/phoron = list("phoron"), - /obj/item/stack/material/gold = list("gold"), - /obj/item/stack/material/silver = list("silver"), - /obj/item/stack/material/platinum = list("platinum"), - /obj/item/stack/material/mhydrogen = list("hydrogen"), - /obj/item/stack/material/steel = list("iron", "carbon"), - /obj/item/stack/material/plasteel = list("iron", "iron", "carbon", "carbon", "platinum"), //8 iron, 8 carbon, 4 platinum, - /obj/item/stack/material/snow = list("water"), - /obj/item/stack/material/sandstone = list("silicon", "oxygen"), - /obj/item/stack/material/glass = list("silicon"), - /obj/item/stack/material/glass/phoronglass = list("platinum", "silicon", "silicon", "silicon"), //5 platinum, 15 silicon, - /obj/item/stack/material/supermatter = list("supermatter") - ) var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine") var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject") @@ -137,7 +173,7 @@ return 0 - if(!sheet_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) + if(!global.sheet_reagents[O.type] && !global.ore_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) to_chat(user, "\The [O] is not suitable for blending.") return 1 @@ -173,14 +209,7 @@ if(length(holdingitems)) options["grind"] = radial_grind - var/choice - if(length(options) < 1) - return - if(length(options) == 1) - for(var/key in options) - choice = key - else - choice = show_radial_menu(user, src, options, require_near = !issilicon(user)) + var/choice = show_radial_menu(user, src, options, require_near = !issilicon(user), autopick_single_option = FALSE) // post choice verification if(inuse || (isAI(user) && stat & NOPOWER) || user.incapacitated()) @@ -228,10 +257,10 @@ if(remaining_volume <= 0) break - if(sheet_reagents[O.type]) + if(global.sheet_reagents[O.type]) var/obj/item/stack/stack = O if(istype(stack)) - var/list/sheet_components = sheet_reagents[stack.type] + var/list/sheet_components = global.sheet_reagents[stack.type] var/amount_to_take = max(0,min(stack.get_amount(),round(remaining_volume/REAGENTS_PER_SHEET))) if(amount_to_take) stack.use(amount_to_take) @@ -245,6 +274,21 @@ beaker.reagents.add_reagent(sheet_components, (amount_to_take*REAGENTS_PER_SHEET)) continue + if(global.ore_reagents[O.type]) + var/obj/item/ore/R = O + if(istype(R)) + var/list/ore_components = global.ore_reagents[R.type] + if(remaining_volume >= REAGENTS_PER_ORE) + holdingitems -= R + qdel(R) + if(islist(ore_components)) + var/amount_to_take = (REAGENTS_PER_ORE/(ore_components.len)) + for(var/i in ore_components) + beaker.reagents.add_reagent(i, amount_to_take) + else + beaker.reagents.add_reagent(ore_components, REAGENTS_PER_ORE) + continue + if(O.reagents) O.reagents.trans_to_obj(beaker, min(O.reagents.total_volume, remaining_volume)) if(O.reagents.total_volume == 0) diff --git a/code/modules/reagents/reagent_containers/_reagent_containers.dm b/code/modules/reagents/reagent_containers/_reagent_containers.dm index 33128f94a1b..2c40ca03cc3 100644 --- a/code/modules/reagents/reagent_containers/_reagent_containers.dm +++ b/code/modules/reagents/reagent_containers/_reagent_containers.dm @@ -48,6 +48,9 @@ if(!istype(target)) return 0 + if(target.open_top) + return 0 + if(!target.reagents || !target.reagents.total_volume) to_chat(user, span_notice("[target] is empty.")) return 1 diff --git a/code/modules/reagents/reagents/virology.dm b/code/modules/reagents/reagents/virology.dm index 4556b1ed09c..de6e77e3049 100644 --- a/code/modules/reagents/reagents/virology.dm +++ b/code/modules/reagents/reagents/virology.dm @@ -20,7 +20,7 @@ /datum/reagent/mutagen/mutagenvirusfood name = "Mutagenic agar" id = "mutagenvirusfood" - description = "mutates blood" + description = "Mutates viruses when mixed in blood. This one seems rather alright." color = "#A3C00F" /datum/reagent/mutagen/mutagenvirusfood/sugar @@ -32,16 +32,17 @@ /datum/reagent/medicine/adranol/adranolvirusfood name = "Virus rations" id = "adranolvirusfood" - description = "mutates blood" + description = "Mutates viruses when mixed in blood. This one seems rather weak." color = "#D18AA5" -/datum/reagent/phoron_dust/phoronvirusfood +/datum/reagent/toxin/phoron/phoronvirusfood name = "Phoronic virus food" id = "phoronvirusfood" - description = "mutates blood" + description = "Mutates viruses when mixed in blood. This one seems to be the strongest." color = "#A69DA9" -/datum/reagent/phoron_dust/phoronvirusfood/weak +/datum/reagent/toxin/phoron/phoronvirusfood/weak name = "Weakened phoronic virus food" id = "weakphoronvirusfood" + description = "Mutates viruses when mixed in blood. This one seems to have been weakened, but still strong." color = "#CEC3C6" diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index a3952a80aee..89bc7f2d881 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -113,8 +113,6 @@ for(var/atom/movable/A in affecting) if(istype(A,/obj/effect/abstract)) // Flashlight's lights are not physical objects continue - if(istype(A,/obj/effect/decal/jan_hud)) // Ignore these too - continue if(!A.anchored) if(A.loc == src.loc) // prevents the object from being affected if it's not currently here. step(A,movedir) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 4afa7be2d21..c31597b6e9f 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -121,9 +121,9 @@ if(istype(G)) // handle grabbed mob if(ismob(G.affecting)) var/mob/GM = G.affecting - for (var/mob/V in viewers(usr)) - V.show_message("[usr] starts putting [GM.name] into the disposal.", 3) - if(do_after(usr, 20)) + for (var/mob/V in viewers(user)) + V.show_message("[user] starts putting [GM.name] into the disposal.", 3) + if(do_after(user, 20)) if (GM.client) GM.client.perspective = EYE_PERSPECTIVE GM.client.eye = src @@ -169,13 +169,13 @@ src.add_fingerprint(user) var/target_loc = target.loc var/msg - for (var/mob/V in viewers(usr)) + for (var/mob/V in viewers(user)) if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) - V.show_message("[usr] starts climbing into the disposal.", 3) + V.show_message("[user] starts climbing into the disposal.", 3) if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) if(target.anchored) return - V.show_message("[usr] starts stuffing [target.name] into the disposal.", 3) - if(!do_after(usr, 20)) + V.show_message("[user] starts stuffing [target.name] into the disposal.", 3) + if(!do_after(user, 20)) return if(target_loc != target.loc) return @@ -265,18 +265,18 @@ if(..()) return - if(usr.loc == src) - to_chat(usr, span_warning("You cannot reach the controls from inside.")) + if(ui.user.loc == src) + to_chat(ui.user, span_warning("You cannot reach the controls from inside.")) return TRUE if(mode==-1 && action != "eject") // If the mode is -1, only allow ejection - to_chat(usr, span_warning("The disposal units power is disabled.")) + to_chat(ui.user, span_warning("The disposal units power is disabled.")) return if(stat & BROKEN) return - add_fingerprint(usr) + add_fingerprint(ui.user) if(flushing) return diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 45f788fc036..af1586c8ff7 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -40,9 +40,9 @@ to_chat(user, span_warning("You need to set a destination first!")) else if(istype(W, /obj/item/pen)) - switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) + switch(tgui_alert(user, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") - var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) + var/str = sanitizeSafe(tgui_input_text(user,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, span_warning(" Invalid text.")) return @@ -57,7 +57,7 @@ else nameset = 1 if("Description") - var/str = sanitize(tgui_input_text(usr,"Label text?","Set label","")) + var/str = sanitize(tgui_input_text(user,"Label text?","Set label","")) if(!str || !length(str)) to_chat(user, span_red("Invalid text.")) return @@ -151,9 +151,9 @@ to_chat(user, span_warning("You need to set a destination first!")) else if(istype(W, /obj/item/pen)) - switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) + switch(tgui_alert(user, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") - var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) + var/str = sanitizeSafe(tgui_input_text(user,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, span_warning(" Invalid text.")) return @@ -169,7 +169,7 @@ nameset = 1 if("Description") - var/str = sanitize(tgui_input_text(usr,"Label text?","Set label","")) + var/str = sanitize(tgui_input_text(user,"Label text?","Set label","")) if(!str || !length(str)) to_chat(user, span_red("Invalid text.")) return @@ -268,9 +268,9 @@ if(i > 5) P.icon_state = "deliverycrate5" P.name = "huge parcel" - P.add_fingerprint(usr) - O.add_fingerprint(usr) - src.add_fingerprint(usr) + P.add_fingerprint(user) + O.add_fingerprint(user) + src.add_fingerprint(user) src.amount -= 1 user.visible_message("\The [user] wraps \a [target] with \a [src].",\ span_notice("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\ @@ -374,10 +374,10 @@ /obj/item/destTagger/attack_self(mob/user as mob) tgui_interact(user) -/obj/item/destTagger/tgui_act(action, params) +/obj/item/destTagger/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("set_tag") var/new_tag = params["tag"] diff --git a/code/modules/research/rdconsole_tgui.dm b/code/modules/research/rdconsole_tgui.dm index 743de3d7c1a..c55894d63c3 100644 --- a/code/modules/research/rdconsole_tgui.dm +++ b/code/modules/research/rdconsole_tgui.dm @@ -297,26 +297,26 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("search") search = params["search"] - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("design_page") if(params["reset"]) design_page = 0 else design_page = max(design_page + (1 * params["reverse"]), 0) - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("builder_page") if(params["reset"]) builder_page = 0 else builder_page = max(builder_page + (1 * params["reverse"]), 0) - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("updt_tech") //Update the research holder with information from the technology disk. @@ -326,7 +326,7 @@ files.AddTech2Known(t_disk.stored) files.RefreshResearch() griefProtection() //Update CentCom too - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("clear_tech") //Erase data on the technology disk. @@ -351,7 +351,7 @@ busy_msg = null files.AddDesign2Known(d_disk.blueprint) griefProtection() //Update CentCom too - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("clear_design") //Erases data on the design disk. @@ -373,7 +373,7 @@ if("eject_item") //Eject the item inside the destructive analyzer. if(linked_destroy) if(linked_destroy.busy) - to_chat(usr, span_notice("The destructive analyzer is busy at the moment.")) + to_chat(ui.user, span_notice("The destructive analyzer is busy at the moment.")) return FALSE if(linked_destroy.loaded_item) @@ -387,7 +387,7 @@ return FALSE if(linked_destroy.busy) - to_chat(usr, span_notice("The destructive analyzer is busy at the moment.")) + to_chat(ui.user, span_notice("The destructive analyzer is busy at the moment.")) return linked_destroy.busy = 1 @@ -398,7 +398,7 @@ linked_destroy.busy = 0 busy_msg = null if(!linked_destroy.loaded_item) - to_chat(usr, span_notice("The destructive analyzer appears to be empty.")) + to_chat(ui.user, span_notice("The destructive analyzer appears to be empty.")) return if(istype(linked_destroy.loaded_item,/obj/item/stack))//Only deconsturcts one sheet at a time instead of the entire stack @@ -440,19 +440,19 @@ use_power(linked_destroy.active_power_usage) files.RefreshResearch() - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("lock") //Lock the console from use by anyone without tox access. - if(!allowed(usr)) - to_chat(usr, "Unauthorized Access.") + if(!allowed(ui.user)) + to_chat(ui.user, "Unauthorized Access.") return locked = !locked return TRUE if("sync") //Sync the research holder with all the R&D consoles in the game that aren't sync protected. if(!sync) - to_chat(usr, span_notice("You must connect to the network first.")) + to_chat(ui.user, span_notice("You must connect to the network first.")) return busy_msg = "Updating Database..." @@ -478,7 +478,7 @@ S.produce_heat() busy_msg = null files.RefreshResearch() - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("togglesync") //Prevents the console from being synced by other consoles. Can still send data. @@ -573,7 +573,7 @@ spawn(10) busy_msg = null SyncRDevices() - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) return TRUE if("disconnect") //The R&D console disconnects with a specific device. @@ -587,18 +587,18 @@ if("imprinter") linked_imprinter.linked_console = null linked_imprinter = null - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) if("reset") //Reset the R&D console's database. griefProtection() - var/choice = tgui_alert(usr, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", list("Continue", "Cancel")) + var/choice = tgui_alert(ui.user, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") busy_msg = "Updating Database..." qdel(files) files = new /datum/research(src) spawn(20) busy_msg = null - update_tgui_static_data(usr, ui) + update_tgui_static_data(ui.user, ui) if("print") //Print research information busy_msg = "Printing Research Information. Please Wait..." diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 3d6b1af8512..7857fb27878 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -219,7 +219,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("toggle_upload", "toggle_download") var/obj/machinery/r_n_d/server/S = locate(params["server"]) @@ -248,7 +248,7 @@ var/obj/machinery/r_n_d/server/target = locate(params["server"]) if(!istype(target)) return FALSE - var/choice = tgui_alert(usr, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel")) + var/choice = tgui_alert(ui.user, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") for(var/datum/tech/T in target.files.known_tech) if(T.id == params["tech"]) @@ -261,7 +261,7 @@ var/obj/machinery/r_n_d/server/target = locate(params["server"]) if(!istype(target)) return FALSE - var/choice = tgui_alert(usr, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", list("Continue", "Cancel")) + var/choice = tgui_alert(ui.user, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", list("Continue", "Cancel")) if(choice == "Continue") for(var/datum/design/D in target.files.known_designs) if(D.id == params["design"]) @@ -273,8 +273,8 @@ if("transfer_data") if(!badmin) // no href exploits, you've been r e p o r t e d - log_admin("Warning: [key_name(usr)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [COORD(src)]") - message_admins("Warning: [ADMIN_FULLMONTY(usr)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [ADMIN_COORDJMP(src)]") + log_admin("Warning: [key_name(ui.user)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [COORD(src)]") + message_admins("Warning: [ADMIN_FULLMONTY(ui.user)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [ADMIN_COORDJMP(src)]") return FALSE var/obj/machinery/r_n_d/server/from = locate(params["server"]) if(!istype(from)) diff --git a/code/modules/resleeving/computers.dm b/code/modules/resleeving/computers.dm index 26e9d5b7f5c..50c779a22bc 100644 --- a/code/modules/resleeving/computers.dm +++ b/code/modules/resleeving/computers.dm @@ -229,7 +229,7 @@ return data -/obj/machinery/computer/transhuman/resleeving/tgui_act(action, params) +/obj/machinery/computer/transhuman/resleeving/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return @@ -390,7 +390,7 @@ subtargets += H if(subtargets.len) var/oc_sanity = sleever.occupant - override = tgui_input_list(usr,"Multiple bodies detected. Select target for resleeving of [active_mr.mindname] manually. Sleeving of primary body is unsafe with sub-contents, and is not listed.", "Resleeving Target", subtargets) + override = tgui_input_list(ui.user,"Multiple bodies detected. Select target for resleeving of [active_mr.mindname] manually. Sleeving of primary body is unsafe with sub-contents, and is not listed.", "Resleeving Target", subtargets) if(!override || oc_sanity != sleever.occupant || !(override in sleever.occupant)) set_temp("Error: Target selection aborted.", "danger") active_mr = null diff --git a/code/modules/resleeving/designer.dm b/code/modules/resleeving/designer.dm index cf6ce54d811..544021adda3 100644 --- a/code/modules/resleeving/designer.dm +++ b/code/modules/resleeving/designer.dm @@ -215,20 +215,20 @@ return data -/obj/machinery/computer/transhuman/designer/tgui_act(action, params) +/obj/machinery/computer/transhuman/designer/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("debug_load_my_body") - active_br = new /datum/transhuman/body_record(usr, FALSE, FALSE) + active_br = new /datum/transhuman/body_record(ui.user, FALSE, FALSE) update_preview_icon() menu = MENU_SPECIFICRECORD if("view_brec") var/datum/transhuman/body_record/BR = locate(params["view_brec"]) if(BR && istype(BR.mydna)) - if(allowed(usr) || BR.ckey == usr.ckey) + if(allowed(ui.user) || BR.ckey == ui.user.ckey) active_br = new /datum/transhuman/body_record(BR) // Load a COPY! update_preview_icon() menu = MENU_SPECIFICRECORD @@ -281,9 +281,9 @@ temp = "" if("href_conversion") - PrefHrefMiddleware(params, usr) + PrefHrefMiddleware(params, ui.user) - add_fingerprint(usr) + add_fingerprint(ui.user) return 1 // Return 1 to refresh UI // diff --git a/code/modules/rogueminer_vr/zone_console.dm b/code/modules/rogueminer_vr/zone_console.dm index 62cb6449901..93f8ba2aac1 100644 --- a/code/modules/rogueminer_vr/zone_console.dm +++ b/code/modules/rogueminer_vr/zone_console.dm @@ -84,7 +84,7 @@ data["can_recall_shuttle"] = (shuttle_control && (shuttle_control.z in using_map.belter_belt_z) && !curZoneOccupied) return data -/obj/machinery/computer/roguezones/tgui_act(action, list/params) +/obj/machinery/computer/roguezones/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE switch(action) @@ -92,10 +92,10 @@ scan_for_new_zone() . = TRUE if("recall_shuttle") - failsafe_shuttle_recall() + failsafe_shuttle_recall(ui.user) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/roguezones/proc/scan_for_new_zone() if(scanning) @@ -132,7 +132,7 @@ return -/obj/machinery/computer/roguezones/proc/failsafe_shuttle_recall() +/obj/machinery/computer/roguezones/proc/failsafe_shuttle_recall(mob/user) if(!shuttle_control) return // Shuttle computer has been destroyed if (!(shuttle_control.z in using_map.belter_belt_z)) @@ -141,7 +141,7 @@ return // Not usable if shuttle is in occupied zone // Okay do it var/datum/shuttle/autodock/ferry/S = SSshuttles.shuttles["Belter"] - S.launch(usr) + S.launch(user) /obj/item/circuitboard/roguezones name = T_BOARD("asteroid belt scanning computer") @@ -160,4 +160,4 @@ When a new zone has been scanned, your station's shuttle destination will be updated to direct it to the newly discovered area automatically.
You can then travel to the new area to mine in that location.

- This technology produced under license from Thinktronic Systems, LTD."} \ No newline at end of file + This technology produced under license from Thinktronic Systems, LTD."} diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index eb65e2f4f7f..0e21db71e2f 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -114,14 +114,14 @@ time_since_fail = 0 //losing charge faster than we can draw from PN last_stored_charge = stored_charge -/obj/machinery/shield_capacitor/tgui_act(action, params) +/obj/machinery/shield_capacitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("toggle") if(!active && !anchored) - to_chat(usr, span_red("The [src] needs to be firmly secured to the floor first.")) + to_chat(ui.user, span_red("The [src] needs to be firmly secured to the floor first.")) return active = !active . = TRUE diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index e3a4392a004..a4abe5a1d7b 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -197,14 +197,14 @@ else average_field_strength = 0 -/obj/machinery/shield_gen/tgui_act(action, params) +/obj/machinery/shield_gen/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("toggle") if (!active && !anchored) - to_chat(usr, span_red("The [src] needs to be firmly secured to the floor first.")) + to_chat(ui.user, span_red("The [src] needs to be firmly secured to the floor first.")) return toggle() . = TRUE diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm index 86889ab3da9..72af36fff67 100644 --- a/code/modules/shieldgen/shield_generator.dm +++ b/code/modules/shieldgen/shield_generator.dm @@ -458,8 +458,8 @@ if("begin_shutdown") if(running < SHIELD_RUNNING) // Discharging or off return - var/alert = tgui_alert(usr, "Are you sure you wish to do this? It will drain the power inside the internal storage rapidly.", "Are you sure?", list("Yes", "No")) - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + var/alert = tgui_alert(ui.user, "Are you sure you wish to do this? It will drain the power inside the internal storage rapidly.", "Are you sure?", list("Yes", "No")) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return if(running < SHIELD_RUNNING) return @@ -485,7 +485,7 @@ if(!running) return TRUE - var/choice = tgui_alert(usr, "Are you sure that you want to initiate an emergency shield shutdown? This will instantly drop the shield, and may result in unstable release of stored electromagnetic energy. Proceed at your own risk.", "Confirmation", list("No", "Yes")) + var/choice = tgui_alert(ui.user, "Are you sure that you want to initiate an emergency shield shutdown? This will instantly drop the shield, and may result in unstable release of stored electromagnetic energy. Proceed at your own risk.", "Confirmation", list("No", "Yes")) if((choice != "Yes") || !running) return TRUE @@ -493,7 +493,7 @@ offline_for = round(current_energy / (SHIELD_SHUTDOWN_DISPERSION_RATE / 1.5)) var/old_energy = current_energy shutdown_field() - log_and_message_admins("has triggered \the [src]'s emergency shutdown!", usr) + log_and_message_admins("has triggered \the [src]'s emergency shutdown!", ui.user) spawn() empulse(src, old_energy / 60000000, old_energy / 32000000, 1) // If shields are charged at 450 MJ, the EMP will be 7.5, 14.0625. 90 MJ, 1.5, 2.8125 old_energy = 0 @@ -505,14 +505,14 @@ switch(action) if("set_range") - var/new_range = tgui_input_number(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius, world.maxx, 1) + var/new_range = tgui_input_number(ui.user, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius, world.maxx, 1) if(!new_range) return TRUE target_radius = between(1, new_range, world.maxx) return TRUE if("set_input_cap") - var/new_cap = round(tgui_input_number(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000))) + var/new_cap = round(tgui_input_number(ui.user, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000))) if(!new_cap) input_cap = 0 return diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 7e33f702721..e38354bb17b 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -82,27 +82,27 @@ return FALSE return TRUE -/obj/machinery/computer/shuttle_control/tgui_act(action, list/params) +/obj/machinery/computer/shuttle_control/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE if(skip_act) return - add_fingerprint(usr) + add_fingerprint(ui.user) var/datum/shuttle/autodock/shuttle = SSshuttles.shuttles[shuttle_tag] if(!istype(shuttle)) - to_chat(usr, span_warning("Unable to establish link with the shuttle.")) + to_chat(ui.user, span_warning("Unable to establish link with the shuttle.")) return TRUE switch(action) if("move") - if(can_move(shuttle, usr)) + if(can_move(shuttle, ui.user)) shuttle.launch(src) return TRUE if("force") - if(can_move(shuttle, usr)) + if(can_move(shuttle, ui.user)) shuttle.force_launch(src) return TRUE @@ -111,7 +111,7 @@ return TRUE if("set_codes") - var/newcode = tgui_input_text(usr, "Input new docking codes", "Docking codes", shuttle.docking_codes, MAX_NAME_LEN) + var/newcode = tgui_input_text(ui.user, "Input new docking codes", "Docking codes", shuttle.docking_codes, MAX_NAME_LEN) newcode = sanitize(newcode,MAX_NAME_LEN) if(newcode && !..()) shuttle.set_docking_codes(uppertext(newcode)) diff --git a/code/modules/shuttles/shuttle_console_multi.dm b/code/modules/shuttles/shuttle_console_multi.dm index 76f32f450f2..350fda94de2 100644 --- a/code/modules/shuttles/shuttle_console_multi.dm +++ b/code/modules/shuttles/shuttle_console_multi.dm @@ -14,20 +14,20 @@ // "engines_charging" = ((shuttle.last_move + (shuttle.cooldown SECONDS)) > world.time), // Replaced by longer warmup_time ) -/obj/machinery/computer/shuttle_control/multi/tgui_act(action, list/params) +/obj/machinery/computer/shuttle_control/multi/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE var/datum/shuttle/autodock/multi/shuttle = SSshuttles.shuttles[shuttle_tag] if(!istype(shuttle)) - to_chat(usr, span_warning("Unable to establish link with the shuttle.")) + to_chat(ui.user, span_warning("Unable to establish link with the shuttle.")) return TRUE switch(action) if("pick") - var/dest_key = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations()) - if(dest_key && CanInteract(usr, GLOB.tgui_default_state)) - shuttle.set_destination(dest_key, usr) + var/dest_key = tgui_input_list(ui.user, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations()) + if(dest_key && CanInteract(ui.user, GLOB.tgui_default_state)) + shuttle.set_destination(dest_key, ui.user) return TRUE if("toggle_cloaked") @@ -35,7 +35,7 @@ return TRUE shuttle.cloaked = !shuttle.cloaked if(shuttle.legit) - to_chat(usr, span_notice("Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival.")) + to_chat(ui.user, span_notice("Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival.")) else - to_chat(usr, span_warning("Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival.")) + to_chat(ui.user, span_warning("Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival.")) return TRUE diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index 55d9ba85af2..79c79d82ad5 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -290,7 +290,7 @@ return data -/obj/machinery/computer/shuttle_control/web/tgui_act(action, list/params) +/obj/machinery/computer/shuttle_control/web/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE @@ -300,22 +300,22 @@ return if(WS.moving_status != SHUTTLE_IDLE) - to_chat(usr, span_blue("[WS.visible_name] is busy moving.")) + to_chat(ui.user, span_blue("[WS.visible_name] is busy moving.")) return switch(action) if("rename_command") - WS.rename_shuttle(usr) + WS.rename_shuttle(ui.user) if("dock_command") if(WS.autopilot) - to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually.")) + to_chat(ui.user, span_warning("The autopilot must be disabled before you can control the vessel manually.")) return WS.dock() if("undock_command") if(WS.autopilot) - to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually.")) + to_chat(ui.user, span_warning("The autopilot must be disabled before you can control the vessel manually.")) return WS.undock() @@ -324,20 +324,20 @@ return WS.cloaked = !WS.cloaked if(WS.cloaked) - to_chat(usr, span_danger("Ship stealth systems have been activated. The station will not be warned of our arrival.")) + to_chat(ui.user, span_danger("Ship stealth systems have been activated. The station will not be warned of our arrival.")) else - to_chat(usr, span_danger("Ship stealth systems have been deactivated. The station will be warned of our arrival.")) + to_chat(ui.user, span_danger("Ship stealth systems have been deactivated. The station will be warned of our arrival.")) if("toggle_autopilot") WS.adjust_autopilot(!WS.autopilot) if("traverse") if(WS.autopilot) - to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually.")) + to_chat(ui.user, span_warning("The autopilot must be disabled before you can control the vessel manually.")) return if((WS.last_move + WS.cooldown) > world.time) - to_chat(usr, span_red("The ship's drive is inoperable while the engines are charging.")) + to_chat(ui.user, span_red("The ship's drive is inoperable while the engines are charging.")) return var/index = text2num(params["traverse"]) @@ -346,7 +346,7 @@ message_admins("ERROR: Shuttle computer was asked to traverse a nonexistant route.") return - if(!check_docking(WS)) + if(!check_docking(, ui.user, WS)) return TRUE var/datum/shuttle_destination/target_destination = new_route.get_other_side(WS.web_master.current_destination) @@ -355,11 +355,11 @@ return WS.next_location = target_destination.my_landmark - if(!can_move(WS, usr)) + if(!can_move(WS, ui.user)) return WS.web_master.future_destination = target_destination - to_chat(usr, span_notice("[WS.visible_name] flight computer received command.")) + to_chat(ui.user, span_notice("[WS.visible_name] flight computer received command.")) WS.web_master.reset_autopath() // Deviating from the path will almost certainly confuse the autopilot, so lets just reset its memory. var/travel_time = new_route.travel_time * WS.flight_time_modifier @@ -370,15 +370,15 @@ WS.short_jump(target_destination.my_landmark) //check if we're undocked, give option to force launch -/obj/machinery/computer/shuttle_control/web/proc/check_docking(datum/shuttle/autodock/MS) +/obj/machinery/computer/shuttle_control/web/proc/check_docking(mob/user, datum/shuttle/autodock/MS) if(MS.skip_docking_checks() || MS.check_undocked()) return 1 - var/choice = tgui_alert(usr, "The shuttle is currently docked! Please undock before continuing.","Error",list("Cancel","Force Launch")) + var/choice = tgui_alert(user, "The shuttle is currently docked! Please undock before continuing.","Error",list("Cancel","Force Launch")) if(!choice || choice == "Cancel") return 0 - choice = tgui_alert(usr, "Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", list("Force Launch", "Cancel")) + choice = tgui_alert(user, "Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", list("Force Launch", "Cancel")) if(choice || choice == "Cancel") return 0 diff --git a/code/modules/stockmarket/computer.dm b/code/modules/stockmarket/computer.dm index 6cdb2df0411..ae2e37b46ab 100644 --- a/code/modules/stockmarket/computer.dm +++ b/code/modules/stockmarket/computer.dm @@ -49,7 +49,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if ("logout") @@ -58,12 +58,12 @@ if("stocks_buy") var/datum/stock/S = locate(params["share"]) in GLOB.stockExchange.stocks if (S) - buy_some_shares(S, usr) + buy_some_shares(S, ui.user) if("stocks_sell") var/datum/stock/S = locate(params["share"]) in GLOB.stockExchange.stocks if (S) - sell_some_shares(S, usr) + sell_some_shares(S, ui.user) if("stocks_check") screen = "logs" @@ -82,7 +82,7 @@ if (S) //current_stock = S //screen = "graph" - S.displayValues(usr) + S.displayValues(ui.user) if("stocks_backbutton") current_stock = null diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 455c9e817ab..e966c6e1b6c 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -160,11 +160,11 @@ if("send") sending = 1 - teleport(usr) + teleport(ui.user) if("receive") sending = 0 - teleport(usr) + teleport(ui.user) if("recal") recalibrate() diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index 93c5fe81295..42c82412926 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -90,7 +90,7 @@ */ /datum/proc/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) SHOULD_CALL_PARENT(TRUE) - SEND_SIGNAL(src, COMSIG_UI_ACT, usr, action) + SEND_SIGNAL(src, COMSIG_UI_ACT, ui.user, action) // If UI is not interactive or usr calling Topic is not the UI user, bail. if(!ui || ui.status != STATUS_INTERACTIVE) return TRUE diff --git a/code/modules/tgui/modules/_base.dm b/code/modules/tgui/modules/_base.dm index 43e532b15bd..d5e754412d0 100644 --- a/code/modules/tgui/modules/_base.dm +++ b/code/modules/tgui/modules/_base.dm @@ -68,7 +68,7 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff if(istype(host)) . += host.get_header_data() -/datum/tgui_module/tgui_act(action, params) +/datum/tgui_module/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -81,7 +81,7 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff host.shutdown_computer() return TRUE if(action == "PC_minimize") - host.minimize_program(usr) + host.minimize_program(ui.user) return TRUE // Just a nice little default interact in case the subtypes don't need any special behavior here diff --git a/code/modules/tgui/modules/admin/player_notes.dm b/code/modules/tgui/modules/admin/player_notes.dm index 2b1d8be8d61..f198f00d44e 100644 --- a/code/modules/tgui/modules/admin/player_notes.dm +++ b/code/modules/tgui/modules/admin/player_notes.dm @@ -68,10 +68,10 @@ if("show_player_info") var/datum/tgui_module/player_notes_info/A = new(src) A.key = params["name"] - A.tgui_interact(usr) + A.tgui_interact(ui.user) if("filter_player_notes") - var/input = tgui_input_text(usr, "Filter string (case-insensitive regex)", "Player notes filter") + var/input = tgui_input_text(ui.user, "Filter string (case-insensitive regex)", "Player notes filter") current_filter = input if("set_page") @@ -123,10 +123,10 @@ switch(action) if("add_player_info") var/key = params["ckey"] - var/add = tgui_input_text(usr, "Write your comment below.", "Add Player Info", multiline = TRUE, prevent_enter = TRUE) + var/add = tgui_input_text(ui.user, "Write your comment below.", "Add Player Info", multiline = TRUE, prevent_enter = TRUE) if(!add) return - notes_add(key,add,usr) + notes_add(key,add,ui.user) if("remove_player_info") var/key = params["ckey"] diff --git a/code/modules/tgui/modules/admin_shuttle_controller.dm b/code/modules/tgui/modules/admin_shuttle_controller.dm index 6be6d05fd0a..4a599986982 100644 --- a/code/modules/tgui/modules/admin_shuttle_controller.dm +++ b/code/modules/tgui/modules/admin_shuttle_controller.dm @@ -39,15 +39,15 @@ if("adminobserve") var/datum/shuttle/S = locate(params["ref"]) if(istype(S)) - var/client/C = usr.client - if(!isobserver(usr)) + var/client/C = ui.user.client + if(!isobserver(ui.user)) C.admin_ghost() spawn(2) C.jumptoturf(get_turf(S.current_location)) else if(istype(S, /obj/effect/overmap/visitable)) var/obj/effect/overmap/visitable/V = S - var/client/C = usr.client - if(!isobserver(usr)) + var/client/C = ui.user.client + if(!isobserver(ui.user)) C.admin_ghost() spawn(2) var/atom/target @@ -68,34 +68,34 @@ var/datum/shuttle/S = locate(params["ref"]) if(istype(S, /datum/shuttle/autodock/multi)) var/datum/shuttle/autodock/multi/shuttle = S - var/dest_key = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations()) + var/dest_key = tgui_input_list(ui.user, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations()) if(dest_key) - shuttle.set_destination(dest_key, usr) + shuttle.set_destination(dest_key, ui.user) shuttle.launch(src) else if(istype(S, /datum/shuttle/autodock/overmap)) var/datum/shuttle/autodock/overmap/shuttle = S var/list/possible_d = shuttle.get_possible_destinations() var/D if(!LAZYLEN(possible_d)) - to_chat(usr, span_warning("There are no possible destinations for [shuttle] ([shuttle.type])")) + to_chat(ui.user, span_warning("There are no possible destinations for [shuttle] ([shuttle.type])")) return FALSE - D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d) + D = tgui_input_list(ui.user, "Choose shuttle destination", "Shuttle Destination", possible_d) if(D) shuttle.set_destination(possible_d[D]) shuttle.launch() else if(istype(S, /datum/shuttle/autodock)) var/datum/shuttle/autodock/shuttle = S - if(tgui_alert(usr, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", list("Yes", "No")) == "Yes") + if(tgui_alert(ui.user, "Are you sure you want to launch [shuttle]?", "Launching Shuttle", list("Yes", "No")) == "Yes") shuttle.launch(src) else - to_chat(usr, span_notice("The shuttle control panel isn't quite sure how to move [S] ([S?.type]).")) + to_chat(ui.user, span_notice("The shuttle control panel isn't quite sure how to move [S] ([S?.type]).")) return FALSE - to_chat(usr, span_notice("Launching shuttle [S].")) + to_chat(ui.user, span_notice("Launching shuttle [S].")) return TRUE if("overmap_control") var/obj/effect/overmap/visitable/ship/V = locate(params["ref"]) if(istype(V)) var/datum/tgui_module/ship/fullmonty/F = new(src, V) - F.tgui_interact(usr, null, ui) + F.tgui_interact(ui.user, null, ui) return TRUE diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 99f438416e3..80db43a4ef7 100644 --- a/code/modules/tgui/modules/agentcard.dm +++ b/code/modules/tgui/modules/agentcard.dm @@ -43,91 +43,91 @@ switch(action) if("electronic_warfare") S.electronic_warfare = !S.electronic_warfare - to_chat(usr, span_notice("Electronic warfare [S.electronic_warfare ? "enabled" : "disabled"].")) + to_chat(ui.user, span_notice("Electronic warfare [S.electronic_warfare ? "enabled" : "disabled"].")) . = TRUE if("age") - var/new_age = tgui_input_number(usr,"What age would you like to put on this card?","Agent Card Age", S.age) - if(!isnull(new_age) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_age = tgui_input_number(ui.user,"What age would you like to put on this card?","Agent Card Age", S.age) + if(!isnull(new_age) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) if(new_age < 0) S.age = initial(S.age) else S.age = new_age - to_chat(usr, span_notice("Age has been set to '[S.age]'.")) + to_chat(ui.user, span_notice("Age has been set to '[S.age]'.")) . = TRUE if("appearance") - var/datum/card_state/choice = tgui_input_list(usr, "Select the appearance for this card.", "Agent Card Appearance", id_card_states()) - if(choice && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/datum/card_state/choice = tgui_input_list(ui.user, "Select the appearance for this card.", "Agent Card Appearance", id_card_states()) + if(choice && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.icon_state = choice.icon_state S.item_state = choice.item_state S.sprite_stack = choice.sprite_stack S.update_icon() - to_chat(usr, span_notice("Appearance changed to [choice].")) + to_chat(ui.user, span_notice("Appearance changed to [choice].")) . = TRUE if("assignment") - var/new_job = sanitize(tgui_input_text(usr,"What assignment would you like to put on this card?\nChanging assignment will not grant or remove any access levels.","Agent Card Assignment", S.assignment)) - if(!isnull(new_job) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_job = sanitize(tgui_input_text(ui.user,"What assignment would you like to put on this card?\nChanging assignment will not grant or remove any access levels.","Agent Card Assignment", S.assignment)) + if(!isnull(new_job) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.assignment = new_job - to_chat(usr, span_notice("Occupation changed to '[new_job]'.")) + to_chat(ui.user, span_notice("Occupation changed to '[new_job]'.")) S.update_name() . = TRUE if("bloodtype") var/default = S.blood_type - if(default == initial(S.blood_type) && ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(default == initial(S.blood_type) && ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user if(H.dna) default = H.dna.b_type - var/new_blood_type = sanitize(tgui_input_text(usr,"What blood type would you like to be written on this card?","Agent Card Blood Type",default)) - if(!isnull(new_blood_type) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_blood_type = sanitize(tgui_input_text(ui.user,"What blood type would you like to be written on this card?","Agent Card Blood Type",default)) + if(!isnull(new_blood_type) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.blood_type = new_blood_type - to_chat(usr, span_notice("Blood type changed to '[new_blood_type]'.")) + to_chat(ui.user, span_notice("Blood type changed to '[new_blood_type]'.")) . = TRUE if("dnahash") var/default = S.dna_hash - if(default == initial(S.dna_hash) && ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(default == initial(S.dna_hash) && ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user if(H.dna) default = H.dna.unique_enzymes - var/new_dna_hash = sanitize(tgui_input_text(usr,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default)) - if(!isnull(new_dna_hash) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_dna_hash = sanitize(tgui_input_text(ui.user,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default)) + if(!isnull(new_dna_hash) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.dna_hash = new_dna_hash - to_chat(usr, span_notice("DNA hash changed to '[new_dna_hash]'.")) + to_chat(ui.user, span_notice("DNA hash changed to '[new_dna_hash]'.")) . = TRUE if("fingerprinthash") var/default = S.fingerprint_hash - if(default == initial(S.fingerprint_hash) && ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(default == initial(S.fingerprint_hash) && ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user if(H.dna) default = md5(H.dna.uni_identity) - var/new_fingerprint_hash = sanitize(tgui_input_text(usr,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default)) - if(!isnull(new_fingerprint_hash) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_fingerprint_hash = sanitize(tgui_input_text(ui.user,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default)) + if(!isnull(new_fingerprint_hash) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.fingerprint_hash = new_fingerprint_hash - to_chat(usr, span_notice("Fingerprint hash changed to '[new_fingerprint_hash]'.")) + to_chat(ui.user, span_notice("Fingerprint hash changed to '[new_fingerprint_hash]'.")) . = TRUE if("name") - var/new_name = sanitizeName(tgui_input_text(usr,"What name would you like to put on this card?","Agent Card Name", S.registered_name)) - if(!isnull(new_name) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_name = sanitizeName(tgui_input_text(ui.user,"What name would you like to put on this card?","Agent Card Name", S.registered_name)) + if(!isnull(new_name) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.registered_name = new_name S.update_name() - to_chat(usr, span_notice("Name changed to '[new_name]'.")) + to_chat(ui.user, span_notice("Name changed to '[new_name]'.")) . = TRUE if("photo") - S.set_id_photo(usr) - to_chat(usr, span_notice("Photo changed.")) + S.set_id_photo(ui.user) + to_chat(ui.user, span_notice("Photo changed.")) . = TRUE if("sex") - var/new_sex = sanitize(tgui_input_text(usr,"What sex would you like to put on this card?","Agent Card Sex", S.sex)) - if(!isnull(new_sex) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_sex = sanitize(tgui_input_text(ui.user,"What sex would you like to put on this card?","Agent Card Sex", S.sex)) + if(!isnull(new_sex) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.sex = new_sex - to_chat(usr, span_notice("Sex changed to '[new_sex]'.")) + to_chat(ui.user, span_notice("Sex changed to '[new_sex]'.")) . = TRUE if("species") - var/new_species = sanitize(tgui_input_text(usr,"What species would you like to put on this card?","Agent Card Species", S.species)) - if(!isnull(new_species) && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_species = sanitize(tgui_input_text(ui.user,"What species would you like to put on this card?","Agent Card Species", S.species)) + if(!isnull(new_species) && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.species = new_species - to_chat(usr, span_notice("Species changed to '[new_species]'.")) + to_chat(ui.user, span_notice("Species changed to '[new_species]'.")) . = TRUE if("factoryreset") - if(tgui_alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) + if(tgui_alert(ui.user, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.age = initial(S.age) S.access = syndicate_access.Copy() S.assignment = initial(S.assignment) @@ -145,5 +145,5 @@ S.sex = initial(S.sex) S.species = initial(S.species) S.update_icon() - to_chat(usr, span_notice("All information has been deleted from \the [src].")) + to_chat(ui.user, span_notice("All information has been deleted from \the [src].")) . = TRUE diff --git a/code/modules/tgui/modules/alarm.dm b/code/modules/tgui/modules/alarm.dm index b9de22c7e69..9e1615c4537 100644 --- a/code/modules/tgui/modules/alarm.dm +++ b/code/modules/tgui/modules/alarm.dm @@ -96,13 +96,13 @@ return all_alarms -/datum/tgui_module/alarm_monitor/tgui_act(action, params) +/datum/tgui_module/alarm_monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - + // Camera stuff is AI only. // If you're not an AI, this is a read-only UI. - if(!isAI(usr)) + if(!isAI(ui.user)) return switch(action) @@ -111,7 +111,7 @@ if(!C) return - usr.switch_to_camera(C) + ui.user.switch_to_camera(C) return 1 /datum/tgui_module/alarm_monitor/tgui_data(mob/user) diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index eee72f9b386..3a07f583e4f 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -88,99 +88,99 @@ var/mob/living/carbon/human/target = owner if(customize_usr) - if(!ishuman(usr)) + if(!ishuman(ui.user)) return TRUE - target = usr + target = ui.user switch(action) if("race") - if(can_change(APPEARANCE_RACE) && (params["race"] in valid_species)) + if(can_change(target, APPEARANCE_RACE) && (params["race"] in valid_species)) if(target.change_species(params["race"])) if(params["race"] == "Custom Species") - target.custom_species = sanitize(tgui_input_text(usr, "Input custom species name:", + target.custom_species = sanitize(tgui_input_text(target, "Input custom species name:", "Custom Species Name", null, MAX_NAME_LEN), MAX_NAME_LEN) cut_data() - generate_data(usr) + generate_data(target) changed_hook(APPEARANCECHANGER_CHANGED_RACE) return 1 if("gender") - if(can_change(APPEARANCE_GENDER) && (params["gender"] in get_genders())) + if(can_change(target, APPEARANCE_GENDER) && (params["gender"] in get_genders(target))) if(target.change_gender(params["gender"])) cut_data() - generate_data(usr) + generate_data(target) changed_hook(APPEARANCECHANGER_CHANGED_GENDER) return 1 if("gender_id") - if(can_change(APPEARANCE_GENDER) && (params["gender_id"] in all_genders_define_list)) + if(can_change(target, APPEARANCE_GENDER) && (params["gender_id"] in all_genders_define_list)) target.identifying_gender = params["gender_id"] changed_hook(APPEARANCECHANGER_CHANGED_GENDER_ID) return 1 if("skin_tone") - if(can_change_skin_tone()) - var/new_s_tone = tgui_input_number(usr, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35, 220, 1) - if(isnum(new_s_tone) && can_still_topic(usr, state)) + if(can_change_skin_tone(target)) + var/new_s_tone = tgui_input_number(target, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35, 220, 1) + if(isnum(new_s_tone) && can_still_topic(target, state)) new_s_tone = 35 - max(min( round(new_s_tone), 220),1) changed_hook(APPEARANCECHANGER_CHANGED_SKINTONE) return target.change_skin_tone(new_s_tone) if("skin_color") - if(can_change_skin_color()) - var/new_skin = input(usr, "Choose your character's skin colour: ", "Skin Color", rgb(target.r_skin, target.g_skin, target.b_skin)) as color|null - if(new_skin && can_still_topic(usr, state)) + if(can_change_skin_color(target)) + var/new_skin = input(target, "Choose your character's skin colour: ", "Skin Color", rgb(target.r_skin, target.g_skin, target.b_skin)) as color|null + if(new_skin && can_still_topic(target, state)) var/r_skin = hex2num(copytext(new_skin, 2, 4)) var/g_skin = hex2num(copytext(new_skin, 4, 6)) var/b_skin = hex2num(copytext(new_skin, 6, 8)) if(target.change_skin_color(r_skin, g_skin, b_skin)) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_SKINCOLOR) return 1 if("hair") - if(can_change(APPEARANCE_HAIR) && (params["hair"] in valid_hairstyles)) + if(can_change(target, APPEARANCE_HAIR) && (params["hair"] in valid_hairstyles)) if(target.change_hair(params["hair"])) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return 1 if("hair_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select hair color.", "Hair Color", rgb(target.r_hair, target.g_hair, target.b_hair)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select hair color.", "Hair Color", rgb(target.r_hair, target.g_hair, target.b_hair)) as color|null + if(new_hair && can_still_topic(target, state)) var/r_hair = hex2num(copytext(new_hair, 2, 4)) var/g_hair = hex2num(copytext(new_hair, 4, 6)) var/b_hair = hex2num(copytext(new_hair, 6, 8)) if(target.change_hair_color(r_hair, g_hair, b_hair)) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("facial_hair") - if(can_change(APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles)) + if(can_change(target, APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles)) if(target.change_facial_hair(params["facial_hair"])) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRSTYLE) return 1 if("facial_hair_color") - if(can_change(APPEARANCE_FACIAL_HAIR_COLOR)) - var/new_facial = input(usr, "Please select facial hair color.", "Facial Hair Color", rgb(target.r_facial, target.g_facial, target.b_facial)) as color|null - if(new_facial && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_FACIAL_HAIR_COLOR)) + var/new_facial = input(target, "Please select facial hair color.", "Facial Hair Color", rgb(target.r_facial, target.g_facial, target.b_facial)) as color|null + if(new_facial && can_still_topic(target, state)) var/r_facial = hex2num(copytext(new_facial, 2, 4)) var/g_facial = hex2num(copytext(new_facial, 4, 6)) var/b_facial = hex2num(copytext(new_facial, 6, 8)) if(target.change_facial_hair_color(r_facial, g_facial, b_facial)) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRCOLOR) return 1 if("eye_color") - if(can_change(APPEARANCE_EYE_COLOR)) - var/new_eyes = input(usr, "Please select eye color.", "Eye Color", rgb(target.r_eyes, target.g_eyes, target.b_eyes)) as color|null - if(new_eyes && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_EYE_COLOR)) + var/new_eyes = input(target, "Please select eye color.", "Eye Color", rgb(target.r_eyes, target.g_eyes, target.b_eyes)) as color|null + if(new_eyes && can_still_topic(target, state)) var/r_eyes = hex2num(copytext(new_eyes, 2, 4)) var/g_eyes = hex2num(copytext(new_eyes, 4, 6)) var/b_eyes = hex2num(copytext(new_eyes, 6, 8)) if(target.change_eye_color(r_eyes, g_eyes, b_eyes)) - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_EYES) return 1 // VOREStation Add - Ears/Tails/Wings/Markings if("ear") - if(can_change(APPEARANCE_ALL_HAIR)) + if(can_change(target, APPEARANCE_ALL_HAIR)) var/datum/sprite_accessory/ears/instance = locate(params["ref"]) if(params["clear"]) instance = null @@ -188,11 +188,11 @@ return FALSE target.ear_style = instance target.update_hair() - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if("ear_secondary") - if(can_change(APPEARANCE_ALL_HAIR)) + if(can_change(target, APPEARANCE_ALL_HAIR)) var/datum/sprite_accessory/ears/instance = locate(params["ref"]) if(params["clear"]) instance = null @@ -204,46 +204,46 @@ if(length(target.ear_secondary_colors) < instance.get_color_channel_count()) target.ear_secondary_colors.len = instance.get_color_channel_count() target.update_hair() - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if("ears_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select ear color.", "Ear Color", rgb(target.r_ears, target.g_ears, target.b_ears)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select ear color.", "Ear Color", rgb(target.r_ears, target.g_ears, target.b_ears)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_ears = hex2num(copytext(new_hair, 2, 4)) target.g_ears = hex2num(copytext(new_hair, 4, 6)) target.b_ears = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_hair() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("ears2_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select secondary ear color.", "2nd Ear Color", rgb(target.r_ears2, target.g_ears2, target.b_ears2)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select secondary ear color.", "2nd Ear Color", rgb(target.r_ears2, target.g_ears2, target.b_ears2)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_ears2 = hex2num(copytext(new_hair, 2, 4)) target.g_ears2 = hex2num(copytext(new_hair, 4, 6)) target.b_ears2 = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_hair() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("ears_secondary_color") - if(can_change(APPEARANCE_HAIR_COLOR)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) var/channel = params["channel"] if(channel > length(target.ear_secondary_colors)) return TRUE var/existing = LAZYACCESS(target.ear_secondary_colors, channel) || "#ffffff" - var/new_color = input(usr, "Please select ear color.", "2nd Ear Color", existing) as color|null - if(new_color && can_still_topic(usr, state)) + var/new_color = input(target, "Please select ear color.", "2nd Ear Color", existing) as color|null + if(new_color && can_still_topic(target, state)) target.ear_secondary_colors[channel] = new_color - update_dna() + update_dna(target) target.update_hair() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return TRUE if("tail") - if(can_change(APPEARANCE_ALL_HAIR)) + if(can_change(target, APPEARANCE_ALL_HAIR)) var/datum/sprite_accessory/tail/instance = locate(params["ref"]) if(params["clear"]) instance = null @@ -251,33 +251,33 @@ return FALSE target.tail_style = instance target.update_tail_showing() - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if("tail_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select tail color.", "Tail Color", rgb(target.r_tail, target.g_tail, target.b_tail)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select tail color.", "Tail Color", rgb(target.r_tail, target.g_tail, target.b_tail)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_tail = hex2num(copytext(new_hair, 2, 4)) target.g_tail = hex2num(copytext(new_hair, 4, 6)) target.b_tail = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_tail_showing() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("tail2_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select secondary tail color.", "2nd Tail Color", rgb(target.r_tail2, target.g_tail2, target.b_tail2)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select secondary tail color.", "2nd Tail Color", rgb(target.r_tail2, target.g_tail2, target.b_tail2)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_tail2 = hex2num(copytext(new_hair, 2, 4)) target.g_tail2 = hex2num(copytext(new_hair, 4, 6)) target.b_tail2 = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_tail_showing() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("wing") - if(can_change(APPEARANCE_ALL_HAIR)) + if(can_change(target, APPEARANCE_ALL_HAIR)) var/datum/sprite_accessory/wing/instance = locate(params["ref"]) if(params["clear"]) instance = null @@ -285,33 +285,33 @@ return FALSE target.wing_style = instance target.update_wing_showing() - update_dna() + update_dna(target) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if("wing_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select wing color.", "Wing Color", rgb(target.r_wing, target.g_wing, target.b_wing)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select wing color.", "Wing Color", rgb(target.r_wing, target.g_wing, target.b_wing)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_wing = hex2num(copytext(new_hair, 2, 4)) target.g_wing = hex2num(copytext(new_hair, 4, 6)) target.b_wing = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_wing_showing() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("wing2_color") - if(can_change(APPEARANCE_HAIR_COLOR)) - var/new_hair = input(usr, "Please select secondary wing color.", "2nd Wing Color", rgb(target.r_wing2, target.g_wing2, target.b_wing2)) as color|null - if(new_hair && can_still_topic(usr, state)) + if(can_change(target, APPEARANCE_HAIR_COLOR)) + var/new_hair = input(target, "Please select secondary wing color.", "2nd Wing Color", rgb(target.r_wing2, target.g_wing2, target.b_wing2)) as color|null + if(new_hair && can_still_topic(target, state)) target.r_wing2 = hex2num(copytext(new_hair, 2, 4)) target.g_wing2 = hex2num(copytext(new_hair, 4, 6)) target.b_wing2 = hex2num(copytext(new_hair, 6, 8)) - update_dna() + update_dna(target) target.update_wing_showing() changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("marking") - if(can_change(APPEARANCE_ALL_HAIR)) + if(can_change(target, APPEARANCE_ALL_HAIR)) var/todo = params["todo"] var/name_marking = params["name"] switch (todo) @@ -323,8 +323,8 @@ return TRUE if (1) //add var/list/usable_markings = markings.Copy() ^ body_marking_styles_list.Copy() - var/new_marking = tgui_input_list(usr, "Choose a body marking:", "New Body Marking", usable_markings) - if(new_marking && can_still_topic(usr, state)) + var/new_marking = tgui_input_list(target, "Choose a body marking:", "New Body Marking", usable_markings) + if(new_marking && can_still_topic(target, state)) var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[new_marking] if (target.add_marking(mark_datum)) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) @@ -339,8 +339,8 @@ return TRUE if (4) //color var/current = markings[name_marking] ? markings[name_marking] : "#000000" - var/marking_color = input(usr, "Please select marking color", "Marking color", current) as color|null - if(marking_color && can_still_topic(usr, state)) + var/marking_color = input(target, "Please select marking color", "Marking color", current) as color|null + if(marking_color && can_still_topic(target, state)) var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] if (target.change_marking_color(mark_datum, marking_color)) return TRUE @@ -374,15 +374,15 @@ /datum/tgui_module/appearance_changer/tgui_static_data(mob/user) var/list/data = ..() - generate_data(usr) + generate_data(user) - if(can_change(APPEARANCE_RACE)) + if(can_change(user, APPEARANCE_RACE)) var/species[0] for(var/specimen in valid_species) species[++species.len] = list("specimen" = specimen) data["species"] = species - if(can_change(APPEARANCE_HAIR)) + if(can_change(user, APPEARANCE_HAIR)) var/hair_styles[0] for(var/hair_style in valid_hairstyles) hair_styles[++hair_styles.len] = list("hairstyle" = hair_style) @@ -393,7 +393,7 @@ data["wing_styles"] = valid_wingstyles // VOREStation Add End - if(can_change(APPEARANCE_FACIAL_HAIR)) + if(can_change(user, APPEARANCE_FACIAL_HAIR)) var/facial_hair_styles[0] for(var/facial_hair_style in valid_facial_hairstyles) facial_hair_styles[++facial_hair_styles.len] = list("facialhairstyle" = facial_hair_style) @@ -408,20 +408,20 @@ var/mob/living/carbon/human/target = owner if(customize_usr) - if(!ishuman(usr)) + if(!ishuman(ui.user)) return TRUE - target = usr + target = ui.user data["name"] = target.name data["specimen"] = target.species.name data["gender"] = target.gender data["gender_id"] = target.identifying_gender - data["change_race"] = can_change(APPEARANCE_RACE) + data["change_race"] = can_change(target, APPEARANCE_RACE) - data["change_gender"] = can_change(APPEARANCE_GENDER) + data["change_gender"] = can_change(target, APPEARANCE_GENDER) if(data["change_gender"]) var/genders[0] - for(var/gender in get_genders()) + for(var/gender in get_genders(target)) genders[++genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender) data["genders"] = genders var/id_genders[0] @@ -429,7 +429,7 @@ id_genders[++id_genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender) data["id_genders"] = id_genders - data["change_hair"] = can_change(APPEARANCE_HAIR) + data["change_hair"] = can_change(target, APPEARANCE_HAIR) if(data["change_hair"]) data["hair_style"] = target.h_style @@ -445,20 +445,20 @@ data["markings"] = markings_data // VOREStation Add End - data["change_facial_hair"] = can_change(APPEARANCE_FACIAL_HAIR) + data["change_facial_hair"] = can_change(target, APPEARANCE_FACIAL_HAIR) if(data["change_facial_hair"]) data["facial_hair_style"] = target.f_style - data["change_skin_tone"] = can_change_skin_tone() - data["change_skin_color"] = can_change_skin_color() + data["change_skin_tone"] = can_change_skin_tone(target) + data["change_skin_color"] = can_change_skin_color(target) if(data["change_skin_color"]) data["skin_color"] = rgb(target.r_skin, target.g_skin, target.b_skin) - data["change_eye_color"] = can_change(APPEARANCE_EYE_COLOR) + data["change_eye_color"] = can_change(target, APPEARANCE_EYE_COLOR) if(data["change_eye_color"]) data["eye_color"] = rgb(target.r_eyes, target.g_eyes, target.b_eyes) - data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) + data["change_hair_color"] = can_change(target, APPEARANCE_HAIR_COLOR) if(data["change_hair_color"]) data["hair_color"] = rgb(target.r_hair, target.g_hair, target.b_hair) // VOREStation Add - Ears/Tails/Wings @@ -476,7 +476,7 @@ data["wing2_color"] = rgb(target.r_wing2, target.g_wing2, target.b_wing2) // VOREStation Add End - data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) + data["change_facial_hair_color"] = can_change(target, APPEARANCE_FACIAL_HAIR_COLOR) if(data["change_facial_hair_color"]) data["facial_hair_color"] = rgb(target.r_facial, target.g_facial, target.b_facial) return data @@ -512,42 +512,30 @@ local_skybox.set_position("CENTER", "CENTER", (world.maxx>>1) - newturf.x, (world.maxy>>1) - newturf.y) */ -/datum/tgui_module/appearance_changer/proc/update_dna() - var/mob/living/carbon/human/target = owner - if(customize_usr) - if(!ishuman(usr)) - return TRUE - target = usr +/datum/tgui_module/appearance_changer/proc/update_dna(mob/target) + if(customize_usr && !ishuman(target)) + return TRUE + var/mob/living/carbon/human/H = target + if(H && (flags & APPEARANCE_UPDATE_DNA)) + H.update_dna() - if(target && (flags & APPEARANCE_UPDATE_DNA)) - target.update_dna() +/datum/tgui_module/appearance_changer/proc/can_change(mob/target, var/flag) + if(customize_usr && !ishuman(target)) + return TRUE + var/mob/living/carbon/human/H = target + return H && (flags & flag) -/datum/tgui_module/appearance_changer/proc/can_change(var/flag) - var/mob/living/carbon/human/target = owner - if(customize_usr) - if(!ishuman(usr)) - return TRUE - target = usr +/datum/tgui_module/appearance_changer/proc/can_change_skin_tone(mob/target) + if(customize_usr && !ishuman(target)) + return TRUE + var/mob/living/carbon/human/H = target + return H && (flags & APPEARANCE_SKIN) && H.species.appearance_flags & HAS_SKIN_TONE - return target && (flags & flag) - -/datum/tgui_module/appearance_changer/proc/can_change_skin_tone() - var/mob/living/carbon/human/target = owner - if(customize_usr) - if(!ishuman(usr)) - return TRUE - target = usr - - return target && (flags & APPEARANCE_SKIN) && target.species.appearance_flags & HAS_SKIN_TONE - -/datum/tgui_module/appearance_changer/proc/can_change_skin_color() - var/mob/living/carbon/human/target = owner - if(customize_usr) - if(!ishuman(usr)) - return TRUE - target = usr - - return target && (flags & APPEARANCE_SKIN) && target.species.appearance_flags & HAS_SKIN_COLOR +/datum/tgui_module/appearance_changer/proc/can_change_skin_color(mob/target) + if(customize_usr && !ishuman(target)) + return TRUE + var/mob/living/carbon/human/H = target + return H && (flags & APPEARANCE_SKIN) && H.species.appearance_flags & HAS_SKIN_COLOR /datum/tgui_module/appearance_changer/proc/cut_data() // Making the assumption that the available species remain constant @@ -610,15 +598,13 @@ ))) // VOREStation Add End -/datum/tgui_module/appearance_changer/proc/get_genders() - var/mob/living/carbon/human/target = owner - if(customize_usr) - if(!ishuman(usr)) - return TRUE - target = usr - var/datum/species/S = target.species +/datum/tgui_module/appearance_changer/proc/get_genders(mob/target) + if(customize_usr && !ishuman(target)) + return TRUE + var/mob/living/carbon/human/H = target + var/datum/species/S = H.species var/list/possible_genders = S.genders - if(!target.internal_organs_by_name["cell"]) + if(!H.internal_organs_by_name["cell"]) return possible_genders possible_genders = possible_genders.Copy() possible_genders |= NEUTER diff --git a/code/modules/tgui/modules/atmos_control.dm b/code/modules/tgui/modules/atmos_control.dm index 2f2b881da1e..d2c7c71ec92 100644 --- a/code/modules/tgui/modules/atmos_control.dm +++ b/code/modules/tgui/modules/atmos_control.dm @@ -28,7 +28,7 @@ var/obj/machinery/alarm/alarm = locate(params["alarm"]) in (monitored_alarms.len ? monitored_alarms : machines) if(alarm) var/datum/tgui_state/TS = generate_state(alarm) - alarm.tgui_interact(usr, parent_ui = ui_ref, state = TS) + alarm.tgui_interact(ui.user, parent_ui = ui_ref, state = TS) return 1 if("setZLevel") ui.set_map_z_level(params["mapZLevel"]) diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index 1614a6c5519..e66d4bc96d9 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -130,16 +130,16 @@ data["allNetworks"] |= C.network return data -/datum/tgui_module/camera/tgui_act(action, params) +/datum/tgui_module/camera/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(action && !issilicon(usr)) + if(action && !issilicon(ui.user)) playsound(tgui_host(), "terminal_type", 50, 1) if(action == "switch_camera") var/c_tag = params["name"] - var/list/cameras = get_available_cameras(usr) + var/list/cameras = get_available_cameras(ui.user) var/obj/machinery/camera/C = cameras["[ckey(c_tag)]"] if(active_camera) UnregisterSignal(active_camera, COMSIG_OBSERVER_MOVED) @@ -159,7 +159,7 @@ var/obj/machinery/camera/target var/best_dist = INFINITY - var/list/possible_cameras = get_available_cameras(usr) + var/list/possible_cameras = get_available_cameras(ui.user) for(var/obj/machinery/camera/C in get_area(T)) if(!possible_cameras["[ckey(C.c_tag)]"]) continue diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index 5b758ceb452..00656061bff 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -63,7 +63,7 @@ to_chat(user, span_warning("Access denied.")) return COMM_AUTHENTICATION_NONE -/datum/tgui_module/communications/proc/change_security_level(new_level) +/datum/tgui_module/communications/proc/change_security_level(mob/user, new_level) tmp_alertlevel = new_level var/old_level = security_level if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN @@ -72,8 +72,8 @@ set_security_level(tmp_alertlevel) if(security_level != old_level) //Only notify the admins if an actual change happened - log_game("[key_name(usr)] has changed the security level to [get_security_level()].") - message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") + log_game("[key_name(user)] has changed the security level to [get_security_level()].") + message_admins("[key_name_admin(user)] has changed the security level to [get_security_level()].") switch(security_level) if(SEC_LEVEL_GREEN) feedback_inc("alert_comms_green",1) @@ -197,102 +197,101 @@ frequency.post_signal(null, status_signal) -/datum/tgui_module/communications/tgui_act(action, params) +/datum/tgui_module/communications/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(using_map && !(get_z(usr) in using_map.contact_levels)) - to_chat(usr, span_danger("Unable to establish a connection: You're too far away from the station!")) + if(using_map && !(get_z(ui.user) in using_map.contact_levels)) + to_chat(ui.user, span_danger("Unable to establish a connection: You're too far away from the station!")) return FALSE . = TRUE if(action == "auth") - if(!ishuman(usr)) - to_chat(usr, span_warning("Access denied.")) + if(!ishuman(ui.user)) + to_chat(ui.user, span_warning("Access denied.")) return FALSE // Logout function. if(authenticated != COMM_AUTHENTICATION_NONE) authenticated = COMM_AUTHENTICATION_NONE crew_announcement.announcer = null - setMenuState(usr, COMM_SCREEN_MAIN) + setMenuState(ui.user, COMM_SCREEN_MAIN) return // Login function. - if(check_access(usr, access_heads)) + if(check_access(ui.user, access_heads)) authenticated = COMM_AUTHENTICATION_MIN - if(check_access(usr, access_captain)) + if(check_access(ui.user, access_captain)) authenticated = COMM_AUTHENTICATION_MAX - var/mob/M = usr - var/obj/item/card/id = M.GetIdCard() + var/obj/item/card/id = ui.user.GetIdCard() if(istype(id)) crew_announcement.announcer = GetNameAndAssignmentFromId(id) if(authenticated == COMM_AUTHENTICATION_NONE) - to_chat(usr, span_warning("You need to wear your ID.")) + to_chat(ui.user, span_warning("You need to wear your ID.")) // All functions below this point require authentication. - if(!is_authenticated(usr)) + if(!is_authenticated(ui.user)) return FALSE switch(action) // main interface if("main") - setMenuState(usr, COMM_SCREEN_MAIN) + setMenuState(ui.user, COMM_SCREEN_MAIN) if("newalertlevel") - if(isAI(usr) || isrobot(usr)) - to_chat(usr, span_warning("Firewalls prevent you from changing the alert level.")) + if(isAI(ui.user) || isrobot(ui.user)) + to_chat(ui.user, span_warning("Firewalls prevent you from changing the alert level.")) return - else if(isobserver(usr)) - var/mob/observer/dead/D = usr + else if(isobserver(ui.user)) + var/mob/observer/dead/D = ui.user if(D.can_admin_interact()) - change_security_level(text2num(params["level"])) + change_security_level(ui.user, text2num(params["level"])) return TRUE - else if(!ishuman(usr)) - to_chat(usr, span_warning("Security measures prevent you from changing the alert level.")) + else if(!ishuman(ui.user)) + to_chat(ui.user, span_warning("Security measures prevent you from changing the alert level.")) return - if(is_authenticated(usr)) - change_security_level(text2num(params["level"])) + if(is_authenticated(ui.user)) + change_security_level(ui.user, text2num(params["level"])) else - to_chat(usr, span_warning("You are not authorized to do this.")) - setMenuState(usr, COMM_SCREEN_MAIN) + to_chat(ui.user, span_warning("You are not authorized to do this.")) + setMenuState(ui.user, COMM_SCREEN_MAIN) if("announce") - if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) + if(is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX) if(message_cooldown > world.time) - to_chat(usr, span_warning("Please allow at least one minute to pass between announcements.")) + to_chat(ui.user, span_warning("Please allow at least one minute to pass between announcements.")) return - var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "Priority Announcement", multiline = TRUE, prevent_enter = TRUE) - if(!input || message_cooldown > world.time || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + var/input = tgui_input_text(ui.user, "Please write a message to announce to the station crew.", "Priority Announcement", multiline = TRUE, prevent_enter = TRUE) + if(!input || message_cooldown > world.time || ..() || !(is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX)) return if(length(input) < COMM_MSGLEN_MINIMUM) - to_chat(usr, span_warning("Message '[input]' is too short. [COMM_MSGLEN_MINIMUM] character minimum.")) + to_chat(ui.user, span_warning("Message '[input]' is too short. [COMM_MSGLEN_MINIMUM] character minimum.")) return crew_announcement.Announce(input) message_cooldown = world.time + 600 //One minute if("callshuttle") - if(!is_authenticated(usr)) + if(!is_authenticated(ui.user)) return - call_shuttle_proc(usr) + call_shuttle_proc(ui.user) if(emergency_shuttle.online()) - post_status(src, "shuttle", user = usr) - setMenuState(usr, COMM_SCREEN_MAIN) + post_status(src, "shuttle", user = ui.user) + setMenuState(ui.user, COMM_SCREEN_MAIN) if("cancelshuttle") - if(isAI(usr) || isrobot(usr)) - to_chat(usr, span_warning("Firewalls prevent you from recalling the shuttle.")) + if(isAI(ui.user) || isrobot(ui.user)) + to_chat(ui.user, span_warning("Firewalls prevent you from recalling the shuttle.")) return - var/response = tgui_alert(usr, "Are you sure you wish to recall the shuttle?", "Confirm", list("Yes", "No")) + var/response = tgui_alert(ui.user, "Are you sure you wish to recall the shuttle?", "Confirm", list("Yes", "No")) if(response == "Yes") - cancel_call_proc(usr) - setMenuState(usr, COMM_SCREEN_MAIN) + cancel_call_proc(ui.user) + setMenuState(ui.user, COMM_SCREEN_MAIN) if("messagelist") current_viewing_message = null current_viewing_message_id = null if(params["msgid"]) - setCurrentMessage(usr, text2num(params["msgid"])) - setMenuState(usr, COMM_SCREEN_MESSAGES) + setCurrentMessage(ui.user, text2num(params["msgid"])) + setMenuState(ui.user, COMM_SCREEN_MESSAGES) if("toggleatc") ATC.squelched = !ATC.squelched @@ -300,79 +299,79 @@ if("delmessage") var/datum/comm_message_listener/l = obtain_message_listener() if(params["msgid"]) - setCurrentMessage(usr, text2num(params["msgid"])) - var/response = tgui_alert(usr, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No")) + setCurrentMessage(ui.user, text2num(params["msgid"])) + var/response = tgui_alert(ui.user, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No")) if(response == "Yes") if(current_viewing_message) if(l != global_message_listener) l.Remove(current_viewing_message) current_viewing_message = null - setMenuState(usr, COMM_SCREEN_MESSAGES) + setMenuState(ui.user, COMM_SCREEN_MESSAGES) if("status") - setMenuState(usr, COMM_SCREEN_STAT) + setMenuState(ui.user, COMM_SCREEN_STAT) // Status display stuff if("setstat") display_type = params["statdisp"] switch(display_type) if("message") - post_status(src, "message", stat_msg1, stat_msg2, user = usr) + post_status(src, "message", stat_msg1, stat_msg2, user = ui.user) if("alert") - post_status(src, "alert", params["alert"], user = usr) + post_status(src, "alert", params["alert"], user = ui.user) else - post_status(src, params["statdisp"], user = usr) + post_status(src, params["statdisp"], user = ui.user) if("setmsg1") - stat_msg1 = reject_bad_text(sanitize(tgui_input_text(usr, "Line 1", "Enter Message Text", stat_msg1, 40), 40), 40) - setMenuState(usr, COMM_SCREEN_STAT) + stat_msg1 = reject_bad_text(sanitize(tgui_input_text(ui.user, "Line 1", "Enter Message Text", stat_msg1, 40), 40), 40) + setMenuState(ui.user, COMM_SCREEN_STAT) if("setmsg2") - stat_msg2 = reject_bad_text(sanitize(tgui_input_text(usr, "Line 2", "Enter Message Text", stat_msg2, 40), 40), 40) - setMenuState(usr, COMM_SCREEN_STAT) + stat_msg2 = reject_bad_text(sanitize(tgui_input_text(ui.user, "Line 2", "Enter Message Text", stat_msg2, 40), 40), 40) + setMenuState(ui.user, COMM_SCREEN_STAT) // OMG CENTCOMM LETTERHEAD if("MessageCentCom") - if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) + if(is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown > world.time) - to_chat(usr, span_warning("Arrays recycling. Please stand by.")) + to_chat(ui.user, span_warning("Arrays recycling. Please stand by.")) return - var/input = sanitize(tgui_input_text(usr, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \ + var/input = sanitize(tgui_input_text(ui.user, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \ Please be aware that this process is very expensive, and abuse will lead to... termination. \ Transmission does not guarantee a response. \ There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging", multiline = TRUE, prevent_enter = TRUE)) - if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + if(!input || ..() || !(is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX)) return if(length(input) < COMM_CCMSGLEN_MINIMUM) - to_chat(usr, span_warning("Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.")) + to_chat(ui.user, span_warning("Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.")) return - CentCom_announce(input, usr) - to_chat(usr, span_blue("Message transmitted.")) - log_game("[key_name(usr)] has made an IA [using_map.boss_short] announcement: [input]") + CentCom_announce(input, ui.user) + to_chat(ui.user, span_blue("Message transmitted.")) + log_game("[key_name(ui.user)] has made an IA [using_map.boss_short] announcement: [input]") centcomm_message_cooldown = world.time + 300 // 30 seconds - setMenuState(usr, COMM_SCREEN_MAIN) + setMenuState(ui.user, COMM_SCREEN_MAIN) // OMG SYNDICATE ...LETTERHEAD if("MessageSyndicate") - if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (emagged)) + if((is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX) && (emagged)) if(centcomm_message_cooldown > world.time) - to_chat(usr, "Arrays recycling. Please stand by.") + to_chat(ui.user, "Arrays recycling. Please stand by.") return - var/input = sanitize(tgui_input_text(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) - if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + var/input = sanitize(tgui_input_text(ui.user, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) + if(!input || ..() || !(is_authenticated(ui.user) == COMM_AUTHENTICATION_MAX)) return if(length(input) < COMM_CCMSGLEN_MINIMUM) - to_chat(usr, span_warning("Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.")) + to_chat(ui.user, span_warning("Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.")) return - Syndicate_announce(input, usr) - to_chat(usr, span_blue("Message transmitted.")) - log_game("[key_name(usr)] has made an illegal announcement: [input]") + Syndicate_announce(input, ui.user) + to_chat(ui.user, span_blue("Message transmitted.")) + log_game("[key_name(ui.user)] has made an illegal announcement: [input]") centcomm_message_cooldown = world.time + 300 // 30 seconds if("RestoreBackup") - to_chat(usr, "Backup routing data restored!") + to_chat(ui.user, "Backup routing data restored!") emagged = FALSE - setMenuState(usr, COMM_SCREEN_MAIN) + setMenuState(ui.user, COMM_SCREEN_MAIN) /datum/tgui_module/communications/ntos ntos = TRUE @@ -386,7 +385,7 @@ if ((!( ticker ) || !emergency_shuttle.location())) return - if(!universe.OnShuttleCall(usr)) + if(!universe.OnShuttleCall(user)) to_chat(user, span_notice("Cannot establish a bluespace connection.")) return diff --git a/code/modules/tgui/modules/crew_monitor.dm b/code/modules/tgui/modules/crew_monitor.dm index b02e56d094e..e2e3c056abf 100644 --- a/code/modules/tgui/modules/crew_monitor.dm +++ b/code/modules/tgui/modules/crew_monitor.dm @@ -11,18 +11,18 @@ if(..()) return TRUE - if(action && !issilicon(usr)) + if(action && !issilicon(ui.user)) playsound(tgui_host(), "terminal_type", 50, 1) - var/turf/T = get_turf(usr) + var/turf/T = get_turf(ui.user) if(!T || !(T.z in using_map.player_levels)) - to_chat(usr, span_boldwarning("Unable to establish a connection") + ": You're too far away from the station!") + to_chat(ui.user, span_boldwarning("Unable to establish a connection") + ": You're too far away from the station!") return FALSE switch(action) if("track") - if(isAI(usr)) - var/mob/living/silicon/ai/AI = usr + if(isAI(ui.user)) + var/mob/living/silicon/ai/AI = ui.user var/mob/living/carbon/human/H = locate(params["track"]) in mob_list if(hassensorlevel(H, SUIT_SENSOR_TRACKING)) AI.ai_actual_track(H) diff --git a/code/modules/tgui/modules/gyrotron_control.dm b/code/modules/tgui/modules/gyrotron_control.dm index e0c47758498..9980c484c71 100644 --- a/code/modules/tgui/modules/gyrotron_control.dm +++ b/code/modules/tgui/modules/gyrotron_control.dm @@ -5,7 +5,7 @@ var/gyro_tag = "" var/scan_range = 25 -/datum/tgui_module/gyrotron_control/tgui_act(action, params) +/datum/tgui_module/gyrotron_control/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -18,13 +18,13 @@ switch(action) if("set_tag") - var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", gyro_tag)) + var/new_ident = sanitize_text(tgui_input_text(ui.user, "Enter a new ident tag.", "Gyrotron Control", gyro_tag)) if(new_ident) gyro_tag = new_ident return TRUE if("toggle_active") - G.activate(usr) + G.activate(ui.user) return TRUE if("set_str") @@ -65,4 +65,4 @@ return data /datum/tgui_module/gyrotron_control/ntos - ntos = TRUE \ No newline at end of file + ntos = TRUE diff --git a/code/modules/tgui/modules/late_choices.dm b/code/modules/tgui/modules/late_choices.dm index 5aaba31984e..1a3f86eeaba 100644 --- a/code/modules/tgui/modules/late_choices.dm +++ b/code/modules/tgui/modules/late_choices.dm @@ -105,31 +105,33 @@ return data -/datum/tgui_module/late_choices/tgui_act(action, params) +/datum/tgui_module/late_choices/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return - var/mob/new_player/user = usr + if(!isnewplayer(ui.user)) + return + var/mob/new_player/new_user = ui.user switch(action) if("join") var/job = params["job"] if(!CONFIG_GET(flag/enter_allowed)) - to_chat(user, span_notice("There is an administrative lock on entering the game!")) + to_chat(new_user, span_notice("There is an administrative lock on entering the game!")) return else if(ticker && ticker.mode && ticker.mode.explosion_in_progress) - to_chat(user, span_danger("The station is currently exploding. Joining would go poorly.")) + to_chat(new_user, span_danger("The station is currently exploding. Joining would go poorly.")) return - var/datum/species/S = GLOB.all_species[user.client.prefs.species] - if(!is_alien_whitelisted(user, S)) - tgui_alert(user, "You are currently not whitelisted to play [user.client.prefs.species].") + var/datum/species/S = GLOB.all_species[new_user.client.prefs.species] + if(!is_alien_whitelisted(new_user, S)) + tgui_alert(new_user, "You are currently not whitelisted to play [new_user.client.prefs.species].") return 0 if(!(S.spawn_flags & SPECIES_CAN_JOIN)) - tgui_alert_async(user,"Your current species, [user.client.prefs.species], is not available for play on the station.") + tgui_alert_async(new_user,"Your current species, [new_user.client.prefs.species], is not available for play on the station.") return 0 - user.AttemptLateSpawn(job, user.client.prefs.spawnpoint) + new_user.AttemptLateSpawn(job, new_user.client.prefs.spawnpoint) diff --git a/code/modules/tgui/modules/law_manager.dm b/code/modules/tgui/modules/law_manager.dm index 86cea7cd35f..54b86a0da48 100644 --- a/code/modules/tgui/modules/law_manager.dm +++ b/code/modules/tgui/modules/law_manager.dm @@ -45,69 +45,69 @@ return TRUE if("add_zeroth_law") - if(zeroth_law && is_admin(usr) && !owner.laws.zeroth_law) + if(zeroth_law && is_admin(ui.user) && !owner.laws.zeroth_law) owner.set_zeroth_law(zeroth_law) return TRUE if("add_ion_law") - if(ion_law && is_malf(usr)) + if(ion_law && is_malf(ui.user)) owner.add_ion_law(ion_law) return TRUE if("add_inherent_law") - if(inherent_law && is_malf(usr)) + if(inherent_law && is_malf(ui.user)) owner.add_inherent_law(inherent_law) return TRUE if("add_supplied_law") - if(supplied_law && supplied_law_position >= 1 && MIN_SUPPLIED_LAW_NUMBER <= MAX_SUPPLIED_LAW_NUMBER && is_malf(usr)) + if(supplied_law && supplied_law_position >= 1 && MIN_SUPPLIED_LAW_NUMBER <= MAX_SUPPLIED_LAW_NUMBER && is_malf(ui.user)) owner.add_supplied_law(supplied_law_position, supplied_law) return TRUE if("change_zeroth_law") var/new_law = sanitize(params["val"]) - if(new_law && new_law != zeroth_law && can_still_topic(usr, state)) + if(new_law && new_law != zeroth_law && can_still_topic(ui.user, state)) zeroth_law = new_law return TRUE if("change_ion_law") var/new_law = sanitize(params["val"]) - if(new_law && new_law != ion_law && can_still_topic(usr, state)) + if(new_law && new_law != ion_law && can_still_topic(ui.user, state)) ion_law = new_law return TRUE if("change_inherent_law") var/new_law = sanitize(params["val"]) - if(new_law && new_law != inherent_law && can_still_topic(usr, state)) + if(new_law && new_law != inherent_law && can_still_topic(ui.user, state)) inherent_law = new_law return TRUE if("change_supplied_law") var/new_law = sanitize(params["val"]) - if(new_law && new_law != supplied_law && can_still_topic(usr, state)) + if(new_law && new_law != supplied_law && can_still_topic(ui.user, state)) supplied_law = new_law return TRUE if("change_supplied_law_position") - var/new_position = tgui_input_number(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) - if(isnum(new_position) && can_still_topic(usr, state)) + var/new_position = tgui_input_number(ui.user, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) + if(isnum(new_position) && can_still_topic(ui.user, state)) supplied_law_position = CLAMP(new_position, 1, MAX_SUPPLIED_LAW_NUMBER) return TRUE if("edit_law") - if(is_malf(usr)) + if(is_malf(ui.user)) var/datum/ai_law/AL = locate(params["edit_law"]) in owner.laws.all_laws() if(AL) - var/new_law = sanitize(tgui_input_text(usr, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) - if(new_law && new_law != AL.law && is_malf(usr) && can_still_topic(usr, state)) + var/new_law = sanitize(tgui_input_text(ui.user, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) + if(new_law && new_law != AL.law && is_malf(ui.user) && can_still_topic(ui.user, state)) log_and_message_admins("has changed a law of [owner] from '[AL.law]' to '[new_law]'") AL.law = new_law return TRUE if("delete_law") - if(is_malf(usr)) + if(is_malf(ui.user)) var/datum/ai_law/AL = locate(params["delete_law"]) in owner.laws.all_laws() - if(AL && is_malf(usr)) + if(AL && is_malf(ui.user)) owner.delete_law(AL) return TRUE @@ -116,14 +116,14 @@ return TRUE if("state_law_set") - var/datum/ai_laws/ALs = locate(params["state_law_set"]) in (is_admin(usr) ? admin_laws : player_laws) + var/datum/ai_laws/ALs = locate(params["state_law_set"]) in (is_admin(ui.user) ? admin_laws : player_laws) if(ALs) owner.statelaws(ALs) return TRUE if("transfer_laws") - if(is_malf(usr)) - var/datum/ai_laws/ALs = locate(params["transfer_laws"]) in (is_admin(usr) ? admin_laws : player_laws) + if(is_malf(ui.user)) + var/datum/ai_laws/ALs = locate(params["transfer_laws"]) in (is_admin(ui.user) ? admin_laws : player_laws) if(ALs) log_and_message_admins("has transfered the [ALs.name] laws to [owner].") ALs.sync(owner, 0) @@ -137,8 +137,8 @@ for(var/mob/living/silicon/robot/R in AI.connected_robots) to_chat(R, span_danger("Law Notice")) R.laws.show_laws(R) - if(usr != owner) - to_chat(usr, span_notice("Laws displayed.")) + if(ui.user != owner) + to_chat(ui.user, span_notice("Laws displayed.")) return TRUE /datum/tgui_module/law_manager/tgui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index c399e68ba76..e50efdd95e4 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -119,7 +119,7 @@ if(!istype(computer)) return TRUE - var/obj/item/card/id/user_id_card = usr.GetIdCard() + var/obj/item/card/id/user_id_card = ui.user.GetIdCard() var/obj/item/card/id/id_card if(computer.card_slot) id_card = computer.card_slot.stored_card @@ -131,7 +131,7 @@ if("print") if(computer && computer.nano_printer) //This option should never be called if there is no printer if(!mod_mode) - if(program.can_run(usr, 1)) + if(program.can_run(ui.user, 1)) var/contents = {"

Access Report

Prepared By: [user_id_card.registered_name ? user_id_card.registered_name : "Unknown"]
For: [id_card.registered_name ? id_card.registered_name : "Unregistered"]
@@ -148,7 +148,7 @@ contents += " [get_access_desc(A)]" if(!computer.nano_printer.print_text(contents,"access report")) - to_chat(usr, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper.")) + to_chat(ui.user, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper.")) return else computer.visible_message(span_bold("\The [computer]") + " prints out paper.") @@ -158,7 +158,7 @@ [data_core ? data_core.get_manifest(0) : ""] "} if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", stationtime2text()))) - to_chat(usr, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper.")) + to_chat(ui.user, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper.")) return else computer.visible_message(span_bold("\The [computer]") + " prints out paper.") @@ -167,16 +167,16 @@ if(computer && computer.card_slot) if(id_card) data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.rank) - computer.proc_eject_id(usr) + computer.proc_eject_id(ui.user) . = TRUE if("terminate") - if(computer && program.can_run(usr, 1)) + if(computer && program.can_run(ui.user, 1)) id_card.assignment = "Dismissed" //VOREStation Edit: setting adjustment id_card.access = list() callHook("terminate_employee", list(id_card)) . = TRUE if("reg") - if(computer && program.can_run(usr, 1)) + if(computer && program.can_run(ui.user, 1)) var/temp_name = sanitizeName(params["reg"], allow_numbers = TRUE) if(temp_name) id_card.registered_name = temp_name @@ -184,15 +184,15 @@ computer.visible_message(span_notice("[computer] buzzes rudely.")) . = TRUE if("account") - if(computer && program.can_run(usr, 1)) + if(computer && program.can_run(ui.user, 1)) var/account_num = text2num(params["account"]) id_card.associated_account_number = account_num . = TRUE if("assign") - if(computer && program.can_run(usr, 1) && id_card) + if(computer && program.can_run(ui.user, 1) && id_card) var/t1 = params["assign_target"] if(t1 == "Custom") - var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment", id_card.assignment, 45), 45) + var/temp_t = sanitize(tgui_input_text(ui.user, "Enter a custom job assignment.","Assignment", id_card.assignment, 45), 45) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t) id_card.assignment = temp_t @@ -208,7 +208,7 @@ jobdatum = J break if(!jobdatum) - to_chat(usr, span_warning("No log exists for this job: [t1]")) + to_chat(ui.user, span_warning("No log exists for this job: [t1]")) return access = jobdatum.get_access() @@ -220,7 +220,7 @@ callHook("reassign_employee", list(id_card)) . = TRUE if("access") - if(computer && program.can_run(usr, 1)) + if(computer && program.can_run(ui.user, 1)) var/access_type = text2num(params["access_target"]) var/access_allowed = text2num(params["allowed"]) if(access_type in get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)) diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm index 45317a9aee1..e8a7d606feb 100644 --- a/code/modules/tgui/modules/ntos-only/email.dm +++ b/code/modules/tgui/modules/ntos-only/email.dm @@ -228,11 +228,10 @@ return 1 -/datum/tgui_module/email_client/tgui_act(action, params) +/datum/tgui_module/email_client/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - var/mob/living/user = usr check_for_new_messages(1) // Any actual interaction (button pressing) is considered as acknowledging received message, for the purpose of notification icons. switch(action) @@ -279,7 +278,7 @@ var/oldtext = html_decode(msg_body) oldtext = replacetext(oldtext, "\[editorbr\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext, 20000, TRUE, prevent_enter = TRUE), "\n", "\[editorbr\]"), 20000) + var/newtext = sanitize(replacetext(tgui_input_text(ui.user, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext, 20000, TRUE, prevent_enter = TRUE), "\n", "\[editorbr\]"), 20000) if(newtext) msg_body = newtext return 1 @@ -362,13 +361,13 @@ return 1 if("changepassword") - var/oldpassword = sanitize(tgui_input_text(user,"Please enter your old password:", "Password Change", null, 100), 100) + var/oldpassword = sanitize(tgui_input_text(ui.user,"Please enter your old password:", "Password Change", null, 100), 100) if(!oldpassword) return 1 - var/newpassword1 = sanitize(tgui_input_text(user,"Please enter your new password:", "Password Change", null, 100), 100) + var/newpassword1 = sanitize(tgui_input_text(ui.user,"Please enter your new password:", "Password Change", null, 100), 100) if(!newpassword1) return 1 - var/newpassword2 = sanitize(tgui_input_text(user,"Please re-enter your new password:", "Password Change", null, 100), 100) + var/newpassword2 = sanitize(tgui_input_text(ui.user,"Please re-enter your new password:", "Password Change", null, 100), 100) if(!newpassword2) return 1 @@ -399,7 +398,7 @@ error = "Error exporting file. Are you using a functional and NTOS-compliant device?" return 1 - var/filename = sanitize(tgui_input_text(user,"Please specify file name:", "Message export", null, 100), 100) + var/filename = sanitize(tgui_input_text(ui.user,"Please specify file name:", "Message export", null, 100), 100) if(!filename) return 1 @@ -427,7 +426,7 @@ if(CF.unsendable) continue filenames.Add(CF.filename) - var/picked_file = tgui_input_list(user, "Please pick a file to send as attachment (max 32GQ)", "Select Attachment", filenames) + var/picked_file = tgui_input_list(ui.user, "Please pick a file to send as attachment (max 32GQ)", "Select Attachment", filenames) if(!picked_file) return 1 diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm index 9cc35dfe772..559cf00e284 100644 --- a/code/modules/tgui/modules/ntos-only/uav.dm +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -45,11 +45,11 @@ if("switch_uav") var/obj/item/uav/U = locate(params["switch_uav"]) //This is a \ref to the UAV itself if(!istype(U)) - to_chat(usr,span_warning("Something is blocking the connection to that UAV. In-person investigation is required.")) + to_chat(ui.user,span_warning("Something is blocking the connection to that UAV. In-person investigation is required.")) return FALSE if(!get_signal_to(U)) - to_chat(usr,span_warning("The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.")) + to_chat(ui.user,span_warning("The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.")) return FALSE set_current(U) @@ -70,10 +70,10 @@ if(!current_uav) return FALSE - if(current_uav.check_eye(usr) < 0) - to_chat(usr,span_warning("The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.")) + if(current_uav.check_eye(ui.user) < 0) + to_chat(ui.user,span_warning("The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.")) else - viewing_uav(usr) ? unlook(usr) : look(usr) + viewing_uav(ui.user) ? unlook(ui.user) : look(ui.user) return TRUE if("power_uav") diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm index 0661d4b146a..6b7e31a5ab3 100644 --- a/code/modules/tgui/modules/overmap.dm +++ b/code/modules/tgui/modules/overmap.dm @@ -149,7 +149,7 @@ return data -/datum/tgui_module/ship/nav/tgui_act(action, params) +/datum/tgui_module/ship/nav/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -157,7 +157,7 @@ return FALSE if(action == "viewing") - viewing_overmap(usr) ? unlook(usr) : look(usr) + viewing_overmap(ui.user) ? unlook(ui.user) : look(ui.user) return TRUE /datum/tgui_module/ship/nav/ntos @@ -326,7 +326,7 @@ return data // Beware ye eyes. This holds all of the ACTIONS from helm, engine, and sensor control all at once. -/datum/tgui_module/ship/fullmonty/tgui_act(action, params) +/datum/tgui_module/ship/fullmonty/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -334,21 +334,21 @@ /* HELM */ if("add") var/datum/computer_file/data/waypoint/R = new() - var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]", MAX_NAME_LEN) + var/sec_name = tgui_input_text(ui.user, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]", MAX_NAME_LEN) sec_name = sanitize(sec_name,MAX_NAME_LEN) if(!sec_name) sec_name = "Sector #[known_sectors.len]" R.fields["name"] = sec_name if(sec_name in known_sectors) - to_chat(usr, span_warning("Sector with that name already exists, please input a different name.")) + to_chat(ui.user, span_warning("Sector with that name already exists, please input a different name.")) return TRUE switch(params["add"]) if("current") R.fields["x"] = linked.x R.fields["y"] = linked.y if("new") - var/newx = tgui_input_number(usr, "Input new entry x coordinate", "Coordinate input", linked.x, world.maxx, 1) - var/newy = tgui_input_number(usr, "Input new entry y coordinate", "Coordinate input", linked.y, world.maxy, 1) + var/newx = tgui_input_number(ui.user, "Input new entry x coordinate", "Coordinate input", linked.x, world.maxx, 1) + var/newy = tgui_input_number(ui.user, "Input new entry y coordinate", "Coordinate input", linked.y, world.maxy, 1) R.fields["x"] = CLAMP(newx, 1, world.maxx) R.fields["y"] = CLAMP(newy, 1, world.maxy) known_sectors[sec_name] = R @@ -363,12 +363,12 @@ if("setcoord") if(params["setx"]) - var/newx = tgui_input_number(usr, "Input new destiniation x coordinate", "Coordinate input", dx, world.maxx, 1) + var/newx = tgui_input_number(ui.user, "Input new destiniation x coordinate", "Coordinate input", dx, world.maxx, 1) if(newx) dx = CLAMP(newx, 1, world.maxx) if(params["sety"]) - var/newy = tgui_input_number(usr, "Input new destiniation y coordinate", "Coordinate input", dy, world.maxy, 1) + var/newy = tgui_input_number(ui.user, "Input new destiniation y coordinate", "Coordinate input", dy, world.maxy, 1) if(newy) dy = CLAMP(newy, 1, world.maxy) . = TRUE @@ -384,13 +384,13 @@ . = TRUE if("speedlimit") - var/newlimit = tgui_input_number(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000, 100000) + var/newlimit = tgui_input_number(ui.user, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000, 100000) if(newlimit) speedlimit = CLAMP(newlimit/1000, 0, 100) . = TRUE if("accellimit") - var/newlimit = tgui_input_number(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) + var/newlimit = tgui_input_number(ui.user, "Input new acceleration limit", "Acceleration limit", accellimit*1000) if(newlimit) accellimit = max(newlimit/1000, 0) . = TRUE @@ -398,7 +398,7 @@ if("move") var/ndir = text2num(params["dir"]) ndir = turn(ndir,pick(90,-90)) - linked.relaymove(usr, ndir, accellimit) + linked.relaymove(ui.user, ndir, accellimit) . = TRUE if("brake") @@ -418,7 +418,7 @@ . = TRUE if("manual") - viewing_overmap(usr) ? unlook(usr) : look(usr) + viewing_overmap(ui.user) ? unlook(ui.user) : look(ui.user) . = TRUE /* END HELM */ /* ENGINES */ @@ -430,7 +430,7 @@ . = TRUE if("set_global_limit") - var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0) + var/newlim = tgui_input_number(ui.user, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0) linked.thrust_limit = clamp(newlim/100, 0, 1) for(var/datum/ship_engine/E in linked.engines) E.set_thrust_limit(linked.thrust_limit) @@ -444,7 +444,7 @@ if("set_limit") var/datum/ship_engine/E = locate(params["engine"]) - var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0) + var/newlim = tgui_input_number(ui.user, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0) var/limit = clamp(newlim/100, 0, 1) if(istype(E)) E.set_thrust_limit(limit) @@ -465,7 +465,7 @@ /* END ENGINES */ /* SENSORS */ if("range") - var/nrange = tgui_input_number(usr, "Set new sensors range", "Sensor range", sensors.range, world.view, round_value = FALSE) + var/nrange = tgui_input_number(ui.user, "Set new sensors range", "Sensor range", sensors.range, world.view, round_value = FALSE) if(nrange) sensors.set_range(CLAMP(nrange, 1, world.view)) . = TRUE @@ -473,8 +473,8 @@ sensors.toggle() . = TRUE if("viewing") - if(usr && !isAI(usr)) - viewing_overmap(usr) ? unlook(usr) : look(usr) + if(ui.user && !isAI(ui.user)) + viewing_overmap(ui.user) ? unlook(ui.user) : look(ui.user) . = TRUE /* END SENSORS */ diff --git a/code/modules/tgui/modules/rcon.dm b/code/modules/tgui/modules/rcon.dm index 7f1f0822a99..0cecc4c5ee6 100644 --- a/code/modules/tgui/modules/rcon.dm +++ b/code/modules/tgui/modules/rcon.dm @@ -55,7 +55,7 @@ return data -/datum/tgui_module/rcon/tgui_act(action, params) +/datum/tgui_module/rcon/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -78,14 +78,14 @@ var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(params["smes"]) if(SMES) SMES.tgui_set_io(SMES_TGUI_INPUT, params["target"], text2num(params["adjust"])) - // var/inputset = (input(usr, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000) as num) * 1000 + // var/inputset = (input(ui.user, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000) as num) * 1000 // SMES.set_input(inputset) . = TRUE if("smes_out_set") var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(params["smes"]) if(SMES) SMES.tgui_set_io(SMES_TGUI_OUTPUT, params["target"], text2num(params["adjust"])) - // var/outputset = (input(usr, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Output Power Control", SMES.output_level/1000) as num) * 1000 + // var/outputset = (input(ui.user, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Output Power Control", SMES.output_level/1000) as num) * 1000 // SMES.set_output(outputset) . = TRUE if("toggle_breaker") @@ -95,7 +95,7 @@ toggle = breaker if(toggle) if(toggle.update_locked) - to_chat(usr, "The breaker box was recently toggled. Please wait before toggling it again.") + to_chat(ui.user, "The breaker box was recently toggled. Please wait before toggling it again.") else toggle.auto_toggle() . = TRUE diff --git a/code/modules/tgui/modules/rustcore_monitor.dm b/code/modules/tgui/modules/rustcore_monitor.dm index a7ce6edbbb0..06808b54846 100644 --- a/code/modules/tgui/modules/rustcore_monitor.dm +++ b/code/modules/tgui/modules/rustcore_monitor.dm @@ -4,7 +4,7 @@ var/core_tag = "" -/datum/tgui_module/rustcore_monitor/tgui_act(action, params) +/datum/tgui_module/rustcore_monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -25,7 +25,7 @@ return TRUE if("set_tag") - var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Core Control", core_tag)) + var/new_ident = sanitize_text(tgui_input_text(ui.user, "Enter a new ident tag.", "Core Control", core_tag)) if(new_ident) core_tag = new_ident return TRUE diff --git a/code/modules/tgui/modules/rustfuel_control.dm b/code/modules/tgui/modules/rustfuel_control.dm index 820a937b992..6a355e4f0f4 100644 --- a/code/modules/tgui/modules/rustfuel_control.dm +++ b/code/modules/tgui/modules/rustfuel_control.dm @@ -4,7 +4,7 @@ var/fuel_tag = "" -/datum/tgui_module/rustfuel_control/tgui_act(action, params) +/datum/tgui_module/rustfuel_control/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -22,7 +22,7 @@ return TRUE if("set_tag") - var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", fuel_tag)) + var/new_ident = sanitize_text(tgui_input_text(ui.user, "Enter a new ident tag.", "Gyrotron Control", fuel_tag)) if(new_ident) fuel_tag = new_ident @@ -48,4 +48,4 @@ return data /datum/tgui_module/rustfuel_control/ntos - ntos = TRUE \ No newline at end of file + ntos = TRUE diff --git a/code/modules/tgui/modules/teleporter.dm b/code/modules/tgui/modules/teleporter.dm index 34d2650b889..a616c1ec896 100644 --- a/code/modules/tgui/modules/teleporter.dm +++ b/code/modules/tgui/modules/teleporter.dm @@ -20,7 +20,7 @@ /datum/tgui_module/teleport_control/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - + switch(action) if("select_target") var/list/L = list() @@ -59,10 +59,10 @@ areaindex[tmpname] = 1 L[tmpname] = I - var/desc = tgui_input_list(usr, "Please select a location to lock in.", "Locking Menu", L) + var/desc = tgui_input_list(ui.user, "Please select a location to lock in.", "Locking Menu", L) if(!desc) return FALSE - if(tgui_status(usr, state) != STATUS_INTERACTIVE) + if(tgui_status(ui.user, state) != STATUS_INTERACTIVE) return FALSE locked = L[desc] @@ -76,10 +76,10 @@ if("toggle_on") if(!station) return FALSE - + if(station.engaged) station.disengage() else station.engage() - + return TRUE diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm index ed654a4c6f4..5acbaa887a0 100644 --- a/code/modules/tgui/tgui.dm +++ b/code/modules/tgui/tgui.dm @@ -353,8 +353,7 @@ log_tgui(user, "Action: [act_type] [href_list["payload"]], Window: [window.id], Source: [src_object]") #endif process_status() - if(src_object.tgui_act(act_type, payload, src, state)) - SStgui.update_uis(src_object) + DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(on_act_message), act_type, payload, state)) return FALSE switch(type) if("ready") @@ -382,3 +381,10 @@ log_tgui(user, "Fallback Triggered: [href_list["payload"]], Window: [window.id], Source: [src_object]") #endif src_object.tgui_fallback(payload) + +/// Wrapper for behavior to potentially wait until the next tick if the server is overloaded +/datum/tgui/proc/on_act_message(act_type, payload, state) + if(QDELETED(src) || QDELETED(src_object)) + return + if(src_object.tgui_act(act_type, payload, src, state)) + SStgui.update_uis(src_object) diff --git a/code/modules/tgui_input/number.dm b/code/modules/tgui_input/number.dm index da302798411..ddb7f8a1953 100644 --- a/code/modules/tgui_input/number.dm +++ b/code/modules/tgui_input/number.dm @@ -136,19 +136,19 @@ data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS)) return data -/datum/tgui_input_number/tgui_act(action, list/params) +/datum/tgui_input_number/tgui_act(action, list/params, datum/tgui/ui) . = ..() if (.) return switch(action) if("submit") if(!isnum(params["entry"])) - CRASH("A non number was input into tgui input number by [usr]") + CRASH("A non number was input into tgui input number by [ui.user]") var/choice = round_value ? round(params["entry"]) : params["entry"] if(choice > max_value) - CRASH("A number greater than the max value was input into tgui input number by [usr]") + CRASH("A number greater than the max value was input into tgui input number by [ui.user]") if(choice < min_value) - CRASH("A number less than the min value was input into tgui input number by [usr]") + CRASH("A number less than the min value was input into tgui input number by [ui.user]") set_entry(choice) closed = TRUE SStgui.close_uis(src) diff --git a/code/modules/tgui_input/text.dm b/code/modules/tgui_input/text.dm index 58290032984..d02ef216ac5 100644 --- a/code/modules/tgui_input/text.dm +++ b/code/modules/tgui_input/text.dm @@ -130,7 +130,7 @@ data["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1) return data -/datum/tgui_input_text/tgui_act(action, list/params) +/datum/tgui_input_text/tgui_act(action, list/params, datum/tgui/ui) . = ..() if (.) return @@ -138,9 +138,9 @@ if("submit") if(max_length) if(length(params["entry"]) > max_length) - CRASH("[usr] typed a text string longer than the max length") + CRASH("[ui.user] typed a text string longer than the max length") if(encode && (length(html_encode(params["entry"])) > max_length)) - to_chat(usr, span_notice("Your message was clipped due to special character usage.")) + to_chat(ui.user, span_notice("Your message was clipped due to special character usage.")) set_entry(params["entry"]) closed = TRUE SStgui.close_uis(src) diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm index 038924f6f6d..0693854ad43 100644 --- a/code/modules/turbolift/turbolift_console.dm +++ b/code/modules/turbolift/turbolift_console.dm @@ -174,7 +174,7 @@ return data -/obj/structure/lift/panel/tgui_act(action, params) +/obj/structure/lift/panel/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -193,7 +193,7 @@ lift.emergency_stop() if(.) - pressed(usr) + pressed(ui.user) /obj/structure/lift/panel/update_icon() if(lift.fire_mode) diff --git a/code/modules/vehicles/rover_vr.dm b/code/modules/vehicles/rover_vr.dm index 12094f58c62..9ad03c25bfa 100644 --- a/code/modules/vehicles/rover_vr.dm +++ b/code/modules/vehicles/rover_vr.dm @@ -292,12 +292,15 @@ if(!istype(C, /mob/living/carbon/human)) return 0 + . = ..(C) + + if(!.) + return + if(ismob(C)) buckle_mob(C) C.alpha = 0 - return ..() - /obj/vehicle/train/rover/engine/unload(var/mob/user, var/direction) var/mob/living/carbon/human/C = load diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 97e9dfa7469..963faa32f8a 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -340,7 +340,7 @@ C.pixel_y += load_offset_y C.layer = layer + 0.1 - if(ismob(C)) + if(ismob(C) && user) user_buckle_mob(C, user) return 1 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index ae486f1e3f8..b568f1b3192 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -609,6 +609,12 @@ forceMove(get_turf(src)) log_and_message_admins("[key_name(src)] used the OOC escape button to get out of a microwave.") + else if(istype(loc, /obj/structure/gargoyle) && loc:was_rayed) + var/obj/structure/gargoyle/G = loc + G.can_revert = TRUE + qdel(G) + log_and_message_admins("[key_name(src)] used the OOC escape button to revert back from being petrified.") + //You are in food and for some reason can't resist out else if(istype(loc, /obj/item/reagent_containers/food)) var/obj/item/reagent_containers/food/F = src.loc diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index f682673a14b..3a44a1414b3 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -363,7 +363,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", return data -/datum/vore_look/tgui_act(action, params) +/datum/vore_look/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -372,7 +372,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", show_pictures = !show_pictures return TRUE if("int_help") - tgui_alert(usr, "These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \ + tgui_alert(ui.user, "These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \ and you can change them to whatever you see fit. Setting them to 0% will disable the possibility of that interaction. \ These only function as long as interactions are turned on in general. Keep in mind, the 'belly mode' interactions (digest/absorb) \ will affect all prey in that belly, if one resists and triggers digestion/absorption. If multiple trigger at the same time, \ @@ -381,17 +381,17 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", // Host is inside someone else, and is trying to interact with something else inside that person. if("pick_from_inside") - return pick_from_inside(usr, params) + return pick_from_inside(ui.user, params) // Host is trying to interact with something in host's belly. if("pick_from_outside") - return pick_from_outside(usr, params) + return pick_from_outside(ui.user, params) if("newbelly") if(host.vore_organs.len >= BELLIES_MAX) return FALSE - var/new_name = html_encode(tgui_input_text(usr,"New belly's name:","New Belly")) + var/new_name = html_encode(tgui_input_text(ui.user,"New belly's name:","New Belly")) if(!new_name) return FALSE @@ -407,7 +407,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", break if(failure_msg) //Something went wrong. - tgui_alert_async(usr, failure_msg, "Error!") + tgui_alert_async(ui.user, failure_msg, "Error!") return TRUE var/obj/belly/NB = new(host) @@ -424,7 +424,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if("move_belly") var/dir = text2num(params["dir"]) if(LAZYLEN(host.vore_organs) <= 1) - to_chat(usr, span_warning("You can't sort bellies with only one belly to sort...")) + to_chat(ui.user, span_warning("You can't sort bellies with only one belly to sort...")) return TRUE var/current_index = host.vore_organs.Find(host.vore_selected) @@ -435,80 +435,78 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", return TRUE if("set_attribute") - return set_attr(usr, params) + return set_attr(ui.user, params) if("saveprefs") if(isnewplayer(host)) - var/choice = tgui_alert(usr, "Warning: Saving your vore panel while in the lobby will save it to the CURRENTLY LOADED character slot, and potentially overwrite it. Are you SURE you want to overwrite your current slot with these vore bellies?", "WARNING!", list("No, abort!", "Yes, save.")) + var/choice = tgui_alert(ui.user, "Warning: Saving your vore panel while in the lobby will save it to the CURRENTLY LOADED character slot, and potentially overwrite it. Are you SURE you want to overwrite your current slot with these vore bellies?", "WARNING!", list("No, abort!", "Yes, save.")) if(choice != "Yes, save.") return TRUE else if(host.real_name != host.client.prefs.real_name || (!ishuman(host) && !issilicon(host))) - var/choice = tgui_alert(usr, "Warning: Saving your vore panel while playing what is very-likely not your normal character will overwrite whatever character you have loaded in character setup. Maybe this is your 'playing a simple mob' slot, though. Are you SURE you want to overwrite your current slot with these vore bellies?", "WARNING!", list("No, abort!", "Yes, save.")) + var/choice = tgui_alert(ui.user, "Warning: Saving your vore panel while playing what is very-likely not your normal character will overwrite whatever character you have loaded in character setup. Maybe this is your 'playing a simple mob' slot, though. Are you SURE you want to overwrite your current slot with these vore bellies?", "WARNING!", list("No, abort!", "Yes, save.")) if(choice != "Yes, save.") return TRUE if(!host.save_vore_prefs()) - tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to save!","Error") + tgui_alert_async(ui.user, "ERROR: Virgo-specific preferences failed to save!","Error") else - to_chat(usr, span_notice("Virgo-specific preferences saved!")) + to_chat(ui.user, span_notice("Virgo-specific preferences saved!")) unsaved_changes = FALSE return TRUE if("reloadprefs") - var/alert = tgui_alert(usr, "Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation",list("Reload","Cancel")) + var/alert = tgui_alert(ui.user, "Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation",list("Reload","Cancel")) if(alert != "Reload") return FALSE if(!host.apply_vore_prefs()) - tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to apply!","Error") + tgui_alert_async(ui.user, "ERROR: Virgo-specific preferences failed to apply!","Error") else - to_chat(usr,span_notice("Virgo-specific preferences applied from active slot!")) + to_chat(ui.user,span_notice("Virgo-specific preferences applied from active slot!")) unsaved_changes = FALSE return TRUE if("loadprefsfromslot") - var/alert = tgui_alert(usr, "Are you sure you want to load another character slot's preferences? This will remove your current vore organs and eject their contents. This will not be immediately saved to your character slot, and you will need to save manually to overwrite your current bellies and preferences.","Confirmation",list("Load","Cancel")) + var/alert = tgui_alert(ui.user, "Are you sure you want to load another character slot's preferences? This will remove your current vore organs and eject their contents. This will not be immediately saved to your character slot, and you will need to save manually to overwrite your current bellies and preferences.","Confirmation",list("Load","Cancel")) if(alert != "Load") return FALSE if(!host.load_vore_prefs_from_slot()) - tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to apply!","Error") + tgui_alert_async(ui.user, "ERROR: Virgo-specific preferences failed to apply!","Error") else - to_chat(usr,span_notice("Virgo-specific preferences applied from active slot!")) + to_chat(ui.user,span_notice("Virgo-specific preferences applied from active slot!")) unsaved_changes = TRUE return TRUE if("exportpanel") - var/mob/living/user = usr - if(!user) - to_chat(usr,span_notice("Mob undefined: [user]")) + if(!ui.user) return FALSE var/datum/vore_look/export_panel/exportPanel if(!exportPanel) - exportPanel = new(usr) + exportPanel = new(ui.user) if(!exportPanel) - to_chat(user,span_notice("Export panel undefined: [exportPanel]")) + to_chat(ui.user,span_notice("Export panel undefined: [exportPanel]")) return FALSE - exportPanel.open_export_panel(user) + exportPanel.open_export_panel(ui.user) return TRUE if("setflavor") - var/new_flavor = html_encode(tgui_input_text(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste)) + var/new_flavor = html_encode(tgui_input_text(ui.user,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste)) if(!new_flavor) return FALSE new_flavor = readd_quotes(new_flavor) if(length(new_flavor) > FLAVOR_MAX) - tgui_alert_async(usr, "Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!") + tgui_alert_async(ui.user, "Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!") return FALSE host.vore_taste = new_flavor unsaved_changes = TRUE return TRUE if("setsmell") - var/new_smell = html_encode(tgui_input_text(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell)) + var/new_smell = html_encode(tgui_input_text(ui.user,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell)) if(!new_smell) return FALSE new_smell = readd_quotes(new_smell) if(length(new_smell) > FLAVOR_MAX) - tgui_alert_async(usr, "Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!") + tgui_alert_async(ui.user, "Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!") return FALSE host.vore_smell = new_smell unsaved_changes = TRUE @@ -657,7 +655,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", unsaved_changes = TRUE return TRUE if("switch_selective_mode_pref") - host.selective_preference = tgui_input_list(usr, "What would you prefer happen to you with selective bellymode?","Selective Bellymode", list(DM_DEFAULT, DM_DIGEST, DM_ABSORB, DM_DRAIN)) + host.selective_preference = tgui_input_list(ui.user, "What would you prefer happen to you with selective bellymode?","Selective Bellymode", list(DM_DEFAULT, DM_DIGEST, DM_ABSORB, DM_DRAIN)) if(!(host.selective_preference)) host.selective_preference = DM_DEFAULT if(host.client.prefs_vr) @@ -675,11 +673,11 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if("set_vs_color") if (istype(host, /mob/living/carbon/human)) var/mob/living/carbon/human/hhost = host - var/belly_choice = tgui_input_list(usr, "Which vore sprite are you going to edit the color of?", "Vore Sprite Color", hhost.vore_icon_bellies) - var/newcolor = input(usr, "Choose a color.", "", hhost.vore_sprite_color[belly_choice]) as color|null + var/belly_choice = tgui_input_list(ui.user, "Which vore sprite are you going to edit the color of?", "Vore Sprite Color", hhost.vore_icon_bellies) + var/newcolor = input(ui.user, "Choose a color.", "", hhost.vore_sprite_color[belly_choice]) as color|null if(newcolor) hhost.vore_sprite_color[belly_choice] = newcolor - var/multiply = tgui_input_list(usr, "Set the color to be applied multiplicatively or additively? Currently in [hhost.vore_sprite_multiply[belly_choice] ? "Multiply" : "Add"]", "Vore Sprite Color", list("Multiply", "Add")) + var/multiply = tgui_input_list(ui.user, "Set the color to be applied multiplicatively or additively? Currently in [hhost.vore_sprite_multiply[belly_choice] ? "Multiply" : "Add"]", "Vore Sprite Color", list("Multiply", "Add")) if(multiply == "Multiply") hhost.vore_sprite_multiply[belly_choice] = TRUE else if(multiply == "Add") diff --git a/code/modules/vore/fluffstuff/custom_boxes_vr.dm b/code/modules/vore/fluffstuff/custom_boxes_vr.dm index 741d3055a12..1ff0dbeada2 100644 --- a/code/modules/vore/fluffstuff/custom_boxes_vr.dm +++ b/code/modules/vore/fluffstuff/custom_boxes_vr.dm @@ -198,7 +198,7 @@ name = "Phi's Personal Items" has_items = list( /obj/item/clothing/accessory/medal/bronze_heart, - /obj/item/clothing/gloves/ring/seal/signet/fluff/phi) + /obj/item/clothing/accessory/ring/seal/signet/fluff/phi) // Tabiranth: Ascian /obj/item/grenade/spawnergrenade/spirit diff --git a/code/modules/vore/fluffstuff/custom_clothes_vr.dm b/code/modules/vore/fluffstuff/custom_clothes_vr.dm index 95cd7b02167..ef00bf6e4e0 100644 --- a/code/modules/vore/fluffstuff/custom_clothes_vr.dm +++ b/code/modules/vore/fluffstuff/custom_clothes_vr.dm @@ -1686,14 +1686,14 @@ Departamental Swimsuits, for general use item_state = "kilanosuit_p_mob" //Mewchild: Phi Vietsi -/obj/item/clothing/gloves/ring/seal/signet/fluff/phi +/obj/item/clothing/accessory/ring/seal/signet/fluff/phi name = "Phi's Bone Signet Ring" desc = "A signet ring belonging to Phi, carved from the bones of something long extinct, as a ward against bad luck." icon = 'icons/vore/custom_clothes_vr.dmi' icon_state = "phi_ring" -/obj/item/clothing/gloves/ring/seal/signet/fluff/phi/change_name(var/signet_name = "Unknown") +/obj/item/clothing/accessory/ring/seal/signet/fluff/phi/change_name(var/signet_name = "Unknown") name = "[signet_name]'s Bone Signet Ring" desc = "A signet ring belonging to [signet_name], carved from the bones of something long extinct, as a ward against bad luck." @@ -1950,12 +1950,13 @@ Departamental Swimsuits, for general use icon_override = 'icons/vore/custom_clothes_vr.dmi' //CappyCat:Cappy Fuzzlyfeathers -/obj/item/clothing/accessory/watch +/obj/item/clothing/accessory/watch/custom name = "silver pocket watch" desc = "A fancy silver-plated digital pocket watch. Looks expensive." icon = 'icons/obj/deadringer.dmi' icon_state = "deadringer" w_class = ITEMSIZE_SMALL + slot = ACCESSORY_SLOT_INSIGNIA slot_flags = SLOT_ID | SLOT_BELT | SLOT_TIE //Pimientopyro:Zaku Fyodorovna @@ -2707,7 +2708,7 @@ Departamental Swimsuits, for general use //Halored: Mercury -/obj/item/clothing/gloves/ring/material/void_opal/fluff/mercury +/obj/item/clothing/accessory/ring/material/void_opal/fluff/mercury name = "Mercury's Mate Ring" desc = "A band of void opal, given to Mercury by Lumen" diff --git a/code/modules/vote/vote_datum.dm b/code/modules/vote/vote_datum.dm index 9c739ada02b..9a3597ae4cc 100644 --- a/code/modules/vote/vote_datum.dm +++ b/code/modules/vote/vote_datum.dm @@ -117,9 +117,9 @@ return null -/datum/vote/proc/announce(start_text, var/time = vote_time/10) +/datum/vote/proc/announce(start_text, var/time = vote_time) to_chat(world, span_lightpurple("Type vote or click here to place your vote. \ - You have [time] seconds to vote.")) + You have [time/10] seconds to vote.")) world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3) /datum/vote/Topic(href, list/href_list) @@ -195,6 +195,6 @@ switch(action) if("vote") if(params["target"] in choices) - voted[usr.ckey] = params["target"] + voted[ui.user.ckey] = params["target"] else - message_admins(span_warning("User [key_name_admin(usr)] spoofed a vote in the vote panel!")) + message_admins(span_warning("User [key_name_admin(ui.user)] spoofed a vote in the vote panel!")) diff --git a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm index 144f51bd767..e8b1ff662a8 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm @@ -347,7 +347,7 @@ var/list/created_items = list() var/list/tgui_vore_selection = list() var/list/viable_items = list( - /obj/item/clothing/gloves/ring, + /obj/item/clothing/accessory/ring, /obj/item/clothing/gloves/evening, /obj/item/clothing/gloves/black, /obj/item/clothing/under/swimsuit/black, diff --git a/code/modules/xenoarcheaology/finds/find_spawning.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm index 7c262bd3507..af11c748e72 100644 --- a/code/modules/xenoarcheaology/finds/find_spawning.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -576,7 +576,7 @@ apply_image_decorations = TRUE if(prob(25)) apply_material_decorations = FALSE - new_item = new /obj/item/clothing/gloves/ring/material(src.loc) + new_item = new /obj/item/clothing/accessory/ring/material(src.loc) item_type = new_item.name if(ARCHAEO_CLUB) diff --git a/code/modules/xenoarcheaology/finds/finds.dm b/code/modules/xenoarcheaology/finds/finds.dm index 2dd956bc27e..8f30b0cb15b 100644 --- a/code/modules/xenoarcheaology/finds/finds.dm +++ b/code/modules/xenoarcheaology/finds/finds.dm @@ -26,9 +26,32 @@ /obj/item/strangerock/New(loc, var/inside_item_type = 0) pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 + var/d100 = rand(1,100) if(inside_item_type) - new /obj/item/archaeological_find(src, new_item_type = inside_item_type) + switch(d100) + if(51 to 100) //standard spawn logic 50% of the time + new /obj/item/archaeological_find(src, new_item_type = inside_item_type) + if(21 to 50) // 30% chance + new /obj/item/research_sample/common(src) + if(6 to 20) // 15% chance + new /obj/item/research_sample/uncommon(src) + if(1 to 5) // 5% chance + new /obj/item/research_sample/rare(src) + else //if something went wrong, somehow, generate the usual find + new /obj/item/archaeological_find(src, new_item_type = inside_item_type) + else //if this strange rock isn't set to generate a find for whatever reason, create a sample 75% of the time (this shouldn't happen unless the rock is mapped in or adminspawned) + switch(d100) + if(76 to 100) + return + if(21 to 75) + new /obj/item/research_sample/common(src) + if(6 to 20) + new /obj/item/research_sample/uncommon(src) + if(1 to 5) + new /obj/item/research_sample/rare(src) + else //if we somehow glitched + return //do nothing /obj/item/strangerock/attackby(var/obj/item/I, var/mob/user) if(istype(I, /obj/item/pickaxe/brush)) diff --git a/code/modules/xenoarcheaology/tools/ano_device_battery.dm b/code/modules/xenoarcheaology/tools/ano_device_battery.dm index bc336d4ea79..5f40d9deb52 100644 --- a/code/modules/xenoarcheaology/tools/ano_device_battery.dm +++ b/code/modules/xenoarcheaology/tools/ano_device_battery.dm @@ -109,7 +109,7 @@ time_end = world.time + duration last_process = world.time else - to_chat(usr, span_warning("[src] is unable to start due to no anomolous power source inserted/remaining.")) + to_chat(ui.user, span_warning("[src] is unable to start due to no anomolous power source inserted/remaining.")) return TRUE if("shutdown") activated = FALSE diff --git a/code/modules/xenoarcheaology/tools/artifact_analyser.dm b/code/modules/xenoarcheaology/tools/artifact_analyser.dm index a96e1fc2e20..db713bb57a7 100644 --- a/code/modules/xenoarcheaology/tools/artifact_analyser.dm +++ b/code/modules/xenoarcheaology/tools/artifact_analyser.dm @@ -58,7 +58,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("scan") diff --git a/code/modules/xenoarcheaology/tools/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm index d63d633cf09..2c4debe9f43 100644 --- a/code/modules/xenoarcheaology/tools/artifact_harvester.dm +++ b/code/modules/xenoarcheaology/tools/artifact_harvester.dm @@ -73,7 +73,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("harvest") @@ -101,7 +101,7 @@ if("drainbattery") if(inserted_battery) if(inserted_battery.battery_effect && inserted_battery.stored_charge > 0) - if(tgui_alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning",list("Continue","Cancel")) == "Continue") + if(tgui_alert(ui.user, "This action will dump all charge, safety gear is recommended before proceeding","Warning",list("Continue","Cancel")) == "Continue") if(!inserted_battery.battery_effect.activated) inserted_battery.battery_effect.ToggleActivate(1) last_process = world.time diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index be642fdfdb5..5e8065ab9b7 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -64,7 +64,7 @@ to_chat(user, span_warning("You can't do that while [src] is scanning!")) else if(istype(I, /obj/item/stack/nanopaste)) - var/choice = tgui_alert(usr, "What do you want to do with the nanopaste?","Radiometric Scanner",list("Scan nanopaste","Fix seal integrity")) + var/choice = tgui_alert(user, "What do you want to do with the nanopaste?","Radiometric Scanner",list("Scan nanopaste","Fix seal integrity")) if(!choice) return if(choice == "Fix seal integrity") @@ -77,7 +77,7 @@ var/obj/item/reagent_containers/glass/G = I if(!G.is_open_container()) return - var/choice = tgui_alert(usr, "What do you want to do with the container?","Radiometric Scanner",list("Add coolant","Empty coolant","Scan container")) + var/choice = tgui_alert(user, "What do you want to do with the container?","Radiometric Scanner",list("Add coolant","Empty coolant","Scan container")) if(!choice) return if(choice == "Add coolant") @@ -164,7 +164,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("scanItem") if(scanning) @@ -175,11 +175,11 @@ scanner_progress = 0 scanning = 1 t_left_radspike = pick(5,10,15) - to_chat(usr, span_notice("Scan initiated.")) + to_chat(ui.user, span_notice("Scan initiated.")) else - to_chat(usr, span_warning("Could not initiate scan, seal requires replacing.")) + to_chat(ui.user, span_warning("Could not initiate scan, seal requires replacing.")) else - to_chat(usr, span_warning("Insert an item to scan.")) + to_chat(ui.user, span_warning("Insert an item to scan.")) return TRUE if("maserWavelength") diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index be52793006a..ed19f72e265 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -78,13 +78,13 @@ if(anchored) activate() else - to_chat(usr, span_warning("You are unable to activate [src] until it is properly secured on the ground.")) + to_chat(ui.user, span_warning("You are unable to activate [src] until it is properly secured on the ground.")) else deactivate() return TRUE if("lock") - if(allowed(usr)) + if(allowed(ui.user)) locked = !locked return TRUE diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index e988835fc4d..d6a93477845 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -124,10 +124,10 @@ /datum/unit_test/active_edges/start_test() - var/active_edges = air_master.active_edges.len + var/active_edges = SSair.active_edges.len var/list/edge_log = list() if(active_edges) - for(var/connection_edge/E in air_master.active_edges) + for(var/connection_edge/E in SSair.active_edges) var/a_temp = E.A.air.temperature var/a_moles = E.A.air.total_moles var/a_vol = E.A.air.volume diff --git a/config/alienwhitelist.txt b/config/alienwhitelist.txt index 9da41e180fa..e604fe5f39a 100644 --- a/config/alienwhitelist.txt +++ b/config/alienwhitelist.txt @@ -79,6 +79,7 @@ jademanique - Protean jademanique - Teppi jademanique - Xenochimera joltze - Black-Eyed Shadekin +jparker890 - Vox juney7 - Hanner kered2 - Protean khanivore - Protean @@ -221,3 +222,4 @@ yeehawguvnah - Xenochimera zalvine - Shadekin Empathy zammyman215 - Vox zeracyfr - Xenochimera +zwadstheiguana - Diona diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index 4df86b72fff..97643ad7a8c 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/inventory/accessory/mob.dmi b/icons/inventory/accessory/mob.dmi index 8b67d7d7dec..9c30c1c501d 100644 Binary files a/icons/inventory/accessory/mob.dmi and b/icons/inventory/accessory/mob.dmi differ diff --git a/icons/inventory/ears/mob.dmi b/icons/inventory/ears/mob.dmi index 95ec0e9c8a9..6071bf0efaa 100644 Binary files a/icons/inventory/ears/mob.dmi and b/icons/inventory/ears/mob.dmi differ diff --git a/icons/inventory/ears/mob_teshari.dmi b/icons/inventory/ears/mob_teshari.dmi index d41f5d871f2..69b6b42b0bc 100644 Binary files a/icons/inventory/ears/mob_teshari.dmi and b/icons/inventory/ears/mob_teshari.dmi differ diff --git a/icons/inventory/hands/item.dmi b/icons/inventory/hands/item.dmi index 228d7999239..104a112bf1a 100644 Binary files a/icons/inventory/hands/item.dmi and b/icons/inventory/hands/item.dmi differ diff --git a/icons/inventory/hands/mob.dmi b/icons/inventory/hands/mob.dmi index e1825ca97c7..ab825c3513d 100644 Binary files a/icons/inventory/hands/mob.dmi and b/icons/inventory/hands/mob.dmi differ diff --git a/icons/mob/items/lefthand_melee.dmi b/icons/mob/items/lefthand_melee.dmi index da3401ccedf..bc4ea4cdc34 100644 Binary files a/icons/mob/items/lefthand_melee.dmi and b/icons/mob/items/lefthand_melee.dmi differ diff --git a/icons/mob/items/righthand_melee.dmi b/icons/mob/items/righthand_melee.dmi index fc8851a610a..a9e83e3046d 100644 Binary files a/icons/mob/items/righthand_melee.dmi and b/icons/mob/items/righthand_melee.dmi differ diff --git a/icons/mob/macrophage.dmi b/icons/mob/macrophage.dmi index 4b7518bfc64..3d8d5fdeabc 100644 Binary files a/icons/mob/macrophage.dmi and b/icons/mob/macrophage.dmi differ diff --git a/icons/mob/radial.dmi b/icons/mob/radial.dmi index bf14a197341..d38f1e63be5 100644 Binary files a/icons/mob/radial.dmi and b/icons/mob/radial.dmi differ diff --git a/icons/mob/robot/janitor.dmi b/icons/mob/robot/janitor.dmi index 7410b353a75..3dbaa27a420 100644 Binary files a/icons/mob/robot/janitor.dmi and b/icons/mob/robot/janitor.dmi differ diff --git a/icons/mob/turkey.dmi b/icons/mob/turkey.dmi new file mode 100644 index 00000000000..8f7d1db729a Binary files /dev/null and b/icons/mob/turkey.dmi differ diff --git a/icons/mob/vore.dmi b/icons/mob/vore.dmi index 67209c83d73..33cc2020b06 100644 Binary files a/icons/mob/vore.dmi and b/icons/mob/vore.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index a538ec2b609..2a817ae4e0e 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index 0729f894288..0133201cba5 100644 Binary files a/icons/obj/food.dmi and b/icons/obj/food.dmi differ diff --git a/icons/obj/furniture.dmi b/icons/obj/furniture.dmi index 6df4edab483..1abe1e3843e 100644 Binary files a/icons/obj/furniture.dmi and b/icons/obj/furniture.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index b09963ba6db..a7598b39a53 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/items_vr.dmi b/icons/obj/items_vr.dmi index c5ecf41b1ac..26286904c79 100644 Binary files a/icons/obj/items_vr.dmi and b/icons/obj/items_vr.dmi differ diff --git a/icons/obj/lockpicks.dmi b/icons/obj/lockpicks.dmi new file mode 100644 index 00000000000..11880cd0f52 Binary files /dev/null and b/icons/obj/lockpicks.dmi differ diff --git a/icons/obj/machines/petrification.dmi b/icons/obj/machines/petrification.dmi new file mode 100644 index 00000000000..932a461108a Binary files /dev/null and b/icons/obj/machines/petrification.dmi differ diff --git a/icons/obj/pillows.dmi b/icons/obj/pillows.dmi index 276e8cb3c5f..b11e83ee617 100644 Binary files a/icons/obj/pillows.dmi and b/icons/obj/pillows.dmi differ diff --git a/icons/obj/playing_cards.dmi b/icons/obj/playing_cards.dmi index 0f2e51923a7..fd1679a3235 100644 Binary files a/icons/obj/playing_cards.dmi and b/icons/obj/playing_cards.dmi differ diff --git a/icons/obj/radio_vr.dmi b/icons/obj/radio_vr.dmi index 480e3bcbff2..482f9c09f03 100644 Binary files a/icons/obj/radio_vr.dmi and b/icons/obj/radio_vr.dmi differ diff --git a/icons/obj/trash.dmi b/icons/obj/trash.dmi index 8866b481c1d..482452e8ecc 100644 Binary files a/icons/obj/trash.dmi and b/icons/obj/trash.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index d54a4e1e416..23ca616c029 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/maps/cynosure/cynosure-6.dmm b/maps/cynosure/cynosure-6.dmm index 56fe694d8c2..95ac6376a5a 100644 --- a/maps/cynosure/cynosure-6.dmm +++ b/maps/cynosure/cynosure-6.dmm @@ -10652,10 +10652,10 @@ /area/beach) "lQh" = ( /obj/structure/table/standard, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, /turf/unsimulated/floor{ icon_state = "lino" }, diff --git a/maps/offmap_vr/common_offmaps.dm b/maps/offmap_vr/common_offmaps.dm index 2d7bacc46b3..b0bac955da0 100644 --- a/maps/offmap_vr/common_offmaps.dm +++ b/maps/offmap_vr/common_offmaps.dm @@ -226,6 +226,29 @@ ////////////////////////////////////////////////////////////////////////////////////// +#ifdef AWAY_MISSION_TEST +#include "../redgate/falls/falls.dmm" +#include "../redgate/abandonedisland.dmm" +#include "../redgate/cybercity.dmm" +#include "../redgate/darkadventure.dmm" +#include "../redgate/eggnogtown.dmm" +#include "../redgate/eggnogtownunderground.dmm" +#include "../redgate/facility.dmm" +#include "../redgate/fantasy_dungeon.dmm" +#include "../redgate/fantasy.dmm" +#include "../redgate/hotsprings.dmm" +#include "../redgate/innland.dmm" +#include "../redgate/islands_underwater.dmm" +#include "../redgate/islands.dmm" +#include "../redgate/jungle_underground.dmm" +#include "../redgate/jungle.dmm" +#include "../redgate/laserdome.dmm" +#include "../redgate/stardog.dmm" +#include "../redgate/teppiranch.dmm" +#include "../redgate/train_upper.dmm" +#include "../redgate/train.dmm" +#endif + /datum/map_template/common_lateload/redgate name = "Redgate Submap" desc = "Please do not use this." diff --git a/maps/redgate/cybercity.dmm b/maps/redgate/cybercity.dmm index b6ee0422167..b5b094ca1b1 100644 --- a/maps/redgate/cybercity.dmm +++ b/maps/redgate/cybercity.dmm @@ -3641,10 +3641,8 @@ /turf/simulated/floor/water/digestive_enzymes, /area/redgate/city/waterworks) "eSM" = ( -/obj/machinery/disease2/incubator, -/obj/machinery/light{ - dir = 1 - }, +/obj/structure/table/standard, +/obj/item/book/manual/virology, /turf/simulated/floor/tiled/white, /area/redgate/city/science) "eTR" = ( @@ -9085,7 +9083,7 @@ /turf/simulated/floor/tiled/white, /area/redgate/city/supermarket) "lXc" = ( -/obj/item/clothing/gloves/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, /turf/simulated/floor/wood/alt/tile, /area/redgate/city/fightclub) "lXi" = ( @@ -9486,7 +9484,7 @@ /obj/structure/closet/wardrobe, /obj/random/maintenance/cargo, /obj/item/clothing/glasses/goggles, -/obj/item/clothing/gloves/ring/material/plastic, +/obj/item/clothing/accessory/ring/material/plastic, /obj/item/clothing/under/cuttop/red, /turf/simulated/floor/wood, /area/redgate/city/apartments) @@ -11034,6 +11032,13 @@ /obj/structure/undies_wardrobe, /turf/simulated/floor/tiled/freezer, /area/redgate/city/laundry) +"ozN" = ( +/obj/machinery/light{ + dir = 1 + }, +/obj/structure/prop/machine/disease_analyser, +/turf/simulated/floor/tiled/white, +/area/redgate/city/science) "ozW" = ( /obj/machinery/light{ dir = 1 @@ -14361,8 +14366,8 @@ /turf/simulated/floor/tiled/neutral, /area/redgate/city/house10) "sLw" = ( -/obj/machinery/computer/centrifuge, /obj/machinery/light, +/obj/machinery/computer/pandemic, /turf/simulated/floor/tiled/white, /area/redgate/city/science) "sLB" = ( @@ -17015,7 +17020,7 @@ /turf/simulated/floor/tiled/eris/dark/gray_platform, /area/redgate/city/engine) "wgN" = ( -/obj/machinery/disease2/diseaseanalyser, +/obj/structure/prop/machine/centrifuge, /turf/simulated/floor/tiled/white, /area/redgate/city/science) "wgO" = ( @@ -17388,7 +17393,10 @@ /turf/simulated/floor/tiled/steel_dirty, /area/redgate/city/dodgypharmacy) "wIw" = ( -/obj/machinery/computer/diseasesplicer, +/obj/structure/reagent_dispensers/virusfood{ + pixel_y = 29 + }, +/obj/structure/prop/machine/incubator, /turf/simulated/floor/tiled/white, /area/redgate/city/science) "wIy" = ( @@ -23051,10 +23059,10 @@ lyJ jNE kfL rdM +ozN +fpI +fpI eSM -fpI -fpI -uEa rdM btI kWt diff --git a/maps/redgate/eggnogtown.dmm b/maps/redgate/eggnogtown.dmm index 9dc3ed22d03..3771a88096d 100644 --- a/maps/redgate/eggnogtown.dmm +++ b/maps/redgate/eggnogtown.dmm @@ -4090,7 +4090,7 @@ "XK" = ( /obj/effect/map_effect/perma_light/gateway{ light_color = "#fc8c03"; - light_power = .5 + light_power = 0.5 }, /turf/simulated/floor/wood, /area/redgate/eggnogtown/bar) diff --git a/maps/redgate/facility.dmm b/maps/redgate/facility.dmm index bff1c55fc63..5c0259ff98e 100644 --- a/maps/redgate/facility.dmm +++ b/maps/redgate/facility.dmm @@ -3246,10 +3246,6 @@ /obj/item/bone, /turf/simulated/floor/grass, /area/redgate/facility/cell27) -"eFo" = ( -/obj/machinery/computer/centrifuge, -/turf/simulated/floor/tiled/white, -/area/redgate/facility/cell20) "eGK" = ( /turf/simulated/wall/tgmc/whitewall, /area/redgate/facility/cell27) @@ -4471,7 +4467,7 @@ /turf/simulated/floor/tiled/white, /area/redgate/facility/cell2) "gmR" = ( -/obj/machinery/computer/centrifuge, +/obj/structure/prop/machine/disease_analyser, /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "gmU" = ( @@ -4913,13 +4909,6 @@ /obj/random/forgotten_tram, /turf/simulated/floor/tiled/white, /area/redgate/facility/nw) -"gQm" = ( -/obj/machinery/disease2/isolator, -/obj/machinery/light{ - dir = 1 - }, -/turf/simulated/floor/tiled/white, -/area/redgate/facility/sw) "gQy" = ( /obj/effect/floor_decal/corner/black/border{ dir = 4 @@ -11648,7 +11637,7 @@ /turf/simulated/floor/tiled/white, /area/redgate/facility/cell15) "qsU" = ( -/obj/machinery/disease2/diseaseanalyser, +/obj/structure/prop/machine/centrifuge, /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "qtt" = ( @@ -11908,7 +11897,7 @@ /turf/simulated/floor/tiled/techfloor, /area/redgate/facility/cell9) "qMo" = ( -/obj/machinery/disease2/incubator, +/obj/structure/closet/l3closet/virology, /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "qNh" = ( @@ -11950,10 +11939,10 @@ /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "qQL" = ( -/obj/machinery/computer/diseasesplicer, /obj/machinery/light{ dir = 1 }, +/obj/machinery/computer/pandemic, /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "qQY" = ( @@ -14775,12 +14764,7 @@ "uMq" = ( /obj/structure/closet/walllocker_double/science/east, /obj/item/book/manual/virology, -/obj/item/antibody_scanner, -/obj/item/antibody_scanner, /obj/item/reagent_containers/glass/beaker, -/obj/item/virusdish/random, -/obj/item/virusdish/random, -/obj/item/virusdish/random, /turf/simulated/floor/tiled/white, /area/redgate/facility/sw) "uNl" = ( @@ -19788,7 +19772,7 @@ pLg fPE mzU aOv -gQm +xRG vrp oWf aOv @@ -30193,7 +30177,7 @@ aKz ehw lnw sCO -eFo +ehw hgj hgj hgj diff --git a/maps/redgate/fantasy.dmm b/maps/redgate/fantasy.dmm index 55252e07c65..072d62751c1 100644 --- a/maps/redgate/fantasy.dmm +++ b/maps/redgate/fantasy.dmm @@ -550,7 +550,7 @@ /area/redgate/fantasy/butcher) "dw" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/silver, +/obj/item/clothing/accessory/ring/material/silver, /obj/structure/window/basic{ dir = 4 }, @@ -2067,7 +2067,7 @@ /area/redgate/fantasy/redgate) "mW" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/diamond, +/obj/item/clothing/accessory/ring/material/diamond, /obj/structure/window/basic{ dir = 4 }, @@ -2507,7 +2507,7 @@ /area/redgate/fantasy/grocery) "pq" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /obj/structure/window/basic{ dir = 4 }, @@ -2906,7 +2906,7 @@ /area/redgate/fantasy/church) "rO" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/wood, +/obj/item/clothing/accessory/ring/material/wood, /turf/simulated/floor/wood/alt, /area/redgate/fantasy/jewler) "rP" = ( @@ -3465,7 +3465,7 @@ /area/redgate/fantasy/butcher) "vl" = ( /obj/structure/table/rack/shelf/wood, -/obj/item/clothing/gloves/ring/material/silver, +/obj/item/clothing/accessory/ring/material/silver, /obj/machinery/light/small/torch{ dir = 8 }, @@ -3489,7 +3489,7 @@ /area/redgate/fantasy/castle) "vp" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/void_opal, +/obj/item/clothing/accessory/ring/material/void_opal, /obj/structure/window/basic{ dir = 4 }, @@ -5126,7 +5126,7 @@ /area/redgate/fantasy/house) "FQ" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, /turf/simulated/floor/wood/alt, /area/redgate/fantasy/house) "FS" = ( @@ -7836,7 +7836,7 @@ /area/redgate/fantasy/butcher) "WW" = ( /obj/structure/table/rack/shelf/wood, -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /turf/simulated/floor/wood/alt, /area/redgate/fantasy/jewler) "WZ" = ( @@ -8255,7 +8255,7 @@ /area/redgate/fantasy/bard) "ZP" = ( /obj/structure/table/woodentable, -/obj/item/clothing/gloves/ring/material/iron, +/obj/item/clothing/accessory/ring/material/iron, /turf/simulated/floor/wood/alt, /area/redgate/fantasy/jewler) "ZS" = ( diff --git a/maps/redgate/fantasy_dungeon.dmm b/maps/redgate/fantasy_dungeon.dmm index 64436653a2a..44cc56930bf 100644 --- a/maps/redgate/fantasy_dungeon.dmm +++ b/maps/redgate/fantasy_dungeon.dmm @@ -209,7 +209,7 @@ /turf/simulated/floor/concrete, /area/redgate/fantasy/castle) "ez" = ( -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /turf/simulated/mineral/floor/ignore_cavegen/cave, /area/redgate/fantasy/caves) "eP" = ( diff --git a/maps/redgate/hotsprings.dmm b/maps/redgate/hotsprings.dmm index 725aafba2a2..4a8eaccc540 100644 --- a/maps/redgate/hotsprings.dmm +++ b/maps/redgate/hotsprings.dmm @@ -1209,7 +1209,7 @@ /obj/random/mouseray, /obj/random/cash/huge, /obj/item/clothing/ears/earring/dangle/diamond, -/obj/item/clothing/gloves/ring/material/diamond, +/obj/item/clothing/accessory/ring/material/diamond, /obj/structure/closet/grave/dirthole, /obj/random/coin, /turf/simulated/floor/outdoors/dirt{ diff --git a/maps/redgate/islands_underwater.dmm b/maps/redgate/islands_underwater.dmm index 834ec9585ae..5f25f246f3c 100644 --- a/maps/redgate/islands_underwater.dmm +++ b/maps/redgate/islands_underwater.dmm @@ -848,7 +848,7 @@ /turf/simulated/floor/water/underwater/sand, /area/redgate/islands/ruins) "qY" = ( -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /turf/simulated/floor/water/underwater/sand, /area/redgate/islands/ruins) "rk" = ( diff --git a/maps/redgate/jungle.dmm b/maps/redgate/jungle.dmm index de8eeff00d0..b8a99f781a1 100644 --- a/maps/redgate/jungle.dmm +++ b/maps/redgate/jungle.dmm @@ -1732,7 +1732,7 @@ key_id = "gold"; name = "gold key" }, -/obj/item/spellbook/oneuse/knock, +/obj/random/fantasy_item, /obj/random/fantasy_item, /turf/simulated/floor/tiled/yellow, /area/redgate/jungle/temple) diff --git a/maps/redgate/train_upper.dmm b/maps/redgate/train_upper.dmm index f5921a71d0a..56b08472297 100644 --- a/maps/redgate/train_upper.dmm +++ b/maps/redgate/train_upper.dmm @@ -3121,8 +3121,8 @@ /obj/structure/closet/cabinet, /obj/item/clothing/under/suit_jacket, /obj/item/clothing/shoes/dress, -/obj/item/clothing/gloves/ring/wedding, -/obj/item/clothing/gloves/ring/wedding, +/obj/item/clothing/accessory/ring/wedding, +/obj/item/clothing/accessory/ring/wedding, /obj/item/clothing/accessory/bowtie/black, /turf/simulated/floor/wood, /area/redgate/train/dorm6) diff --git a/maps/southern_cross/job/outfits.dm b/maps/southern_cross/job/outfits.dm index 2a1cf6d67b0..f2ef7db2ee6 100644 --- a/maps/southern_cross/job/outfits.dm +++ b/maps/southern_cross/job/outfits.dm @@ -10,7 +10,6 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go name = OUTFIT_JOB_NAME("Explorer") shoes = /obj/item/clothing/shoes/boots/winter/explorer uniform = /obj/item/clothing/under/explorer - l_ear = /obj/item/radio/headset/explorer id_slot = slot_wear_id pda_slot = slot_l_store pda_type = /obj/item/pda/explorer //VORESTation Edit - Better Brown @@ -19,6 +18,10 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL backpack_contents = list(/obj/item/clothing/accessory/permit/gun/planetside = 1) + headset = /obj/item/radio/headset/explorer + headset_alt = /obj/item/radio/headset/explorer + headset_earbud = /obj/item/radio/headset/explorer + /decl/hierarchy/outfit/job/explorer2/post_equip(mob/living/carbon/human/H) ..() for(var/obj/item/clothing/accessory/permit/gun/planetside/permit in H.back.contents) @@ -43,7 +46,6 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go suit = /obj/item/clothing/suit/storage/toggle/bomber/pilot gloves = /obj/item/clothing/gloves/fingerless glasses = /obj/item/clothing/glasses/fakesunglasses/aviator - l_ear = /obj/item/radio/headset/pilot/alt uniform_accessories = list(/obj/item/clothing/accessory/storage/webbing/pilot1 = 1) id_slot = slot_wear_id pda_slot = slot_belt @@ -52,12 +54,15 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go id_pda_assignment = JOB_PILOT flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL + headset = /obj/item/radio/headset/pilot/alt + headset_alt = /obj/item/radio/headset/pilot/alt + headset_earbud = /obj/item/radio/headset/pilot/alt + /decl/hierarchy/outfit/job/medical/sar name = OUTFIT_JOB_NAME("Field Medic") //VOREStation Edit uniform = /obj/item/clothing/under/utility/blue //suit = /obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar //VOREStation Edit shoes = /obj/item/clothing/shoes/boots/winter/explorer - l_ear = /obj/item/radio/headset/sar l_hand = /obj/item/storage/firstaid/regular belt = /obj/item/storage/belt/medical/emt pda_slot = slot_l_store @@ -65,3 +70,7 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go pda_type = /obj/item/pda/sar //VOREStation Add id_pda_assignment = "Field Medic" //VOREStation Edit flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL + + headset = /obj/item/radio/headset/sar + headset_alt = /obj/item/radio/headset/sar + headset_earbud = /obj/item/radio/headset/sar diff --git a/maps/stellar_delight/stellar_delight1.dmm b/maps/stellar_delight/stellar_delight1.dmm index 4a75431ddac..87e5ba518dc 100644 --- a/maps/stellar_delight/stellar_delight1.dmm +++ b/maps/stellar_delight/stellar_delight1.dmm @@ -590,7 +590,6 @@ master_tag = "xenobio_airlock_control"; name = "Xenobiology Access Button"; pixel_y = -32; - req_access = null; req_one_access = list(47,55) }, /obj/machinery/door/airlock/angled_bay/standard/color{ @@ -3323,6 +3322,10 @@ /obj/machinery/recharger, /turf/simulated/floor/tiled/techfloor, /area/rnd/workshop) +"gv" = ( +/mob/living/simple_mob/animal/passive/mouse/jerboa/leggy, +/turf/simulated/floor/tiled/eris/steel/cargo, +/area/stellardelight/deck1/miningequipment) "gw" = ( /obj/structure/closet/crate, /obj/random/maintenance, @@ -3807,7 +3810,6 @@ master_tag = "xenobio_airlock_control"; name = "Xenobiology Access Button"; pixel_y = 32; - req_access = null; req_one_access = list(47,55) }, /obj/machinery/door/airlock/angled_bay/standard/color{ @@ -4507,7 +4509,6 @@ dir = 4; door_color = "#ffffff"; name = "maintenance access"; - req_one_access = null; stripe_color = "#5a19a8" }, /turf/simulated/floor/tiled/steel_ridged, @@ -4747,8 +4748,7 @@ /obj/machinery/button/crematorium{ id = "crematorium"; pixel_x = 25; - req_access = list(); - req_one_access = null + req_access = list() }, /turf/simulated/floor/tiled/dark, /area/chapel/chapel_morgue) @@ -4980,8 +4980,7 @@ /obj/machinery/button/remote/blast_door{ id = "librarywindowlockdown"; name = "Window Lockdown"; - pixel_y = 25; - req_access = null + pixel_y = 25 }, /turf/simulated/floor/carpet, /area/library) @@ -5791,8 +5790,12 @@ /turf/simulated/floor/tiled/dark, /area/security/lobby) "lC" = ( -/obj/item/bedsheet/bluedouble, -/obj/structure/bed/double/padded, +/obj/item/bedsheet/bluedouble{ + dir = 1 + }, +/obj/structure/bed/double/padded{ + dir = 1 + }, /obj/structure/curtain/black, /turf/simulated/floor/carpet, /area/stellardelight/deck1/dorms/dorm8) @@ -6503,7 +6506,6 @@ dir = 8; door_color = "#333333"; name = "Away Mission Meeting Room"; - req_one_access = null; stripe_color = "#5a19a8" }, /turf/simulated/floor/tiled/steel_ridged, @@ -9910,7 +9912,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#8c1d11"; name = "Brig"; - req_access = null; req_one_access = list(38,63); stripe_color = "#d27428" }, @@ -10494,7 +10495,6 @@ name = "EVA Shutter"; pixel_x = -5; pixel_y = 24; - req_access = null; req_one_access = list(18,19,43,67) }, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ @@ -11712,7 +11712,6 @@ dir = 4; door_color = "#ffffff"; name = "maintenance access"; - req_one_access = null; stripe_color = "#5a19a8" }, /turf/simulated/floor/tiled/steel_ridged, @@ -12874,8 +12873,12 @@ /turf/simulated/floor/tiled/steel_grid, /area/assembly/robotics) "AP" = ( -/obj/item/bedsheet/bluedouble, -/obj/structure/bed/double/padded, +/obj/item/bedsheet/bluedouble{ + dir = 1 + }, +/obj/structure/bed/double/padded{ + dir = 1 + }, /obj/structure/curtain/black, /turf/simulated/floor/carpet, /area/stellardelight/deck1/dorms/dorm5) @@ -13243,7 +13246,6 @@ dir = 4; door_color = "#333333"; name = "Shuttle Bay"; - req_one_access = null; stripe_color = "#5a19a8" }, /turf/simulated/floor/tiled/steel_ridged, @@ -15639,7 +15641,6 @@ door_color = "#a6753d"; name = "Shuttle Bay"; req_access = list(31); - req_one_access = null; stripe_color = "#3b2b1a" }, /turf/simulated/floor/tiled/steel_ridged, @@ -17497,7 +17498,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#8c1d11"; name = "Brig"; - req_access = null; req_one_access = list(38,63); stripe_color = "#d27428" }, @@ -17961,7 +17961,6 @@ dir = 4; door_color = "#a88860"; name = "Mining Shuttle"; - req_access = null; req_one_access = list(31,5); stripe_color = "#69461a" }, @@ -18065,7 +18064,6 @@ door_color = "#2e2e2e"; fill_color = "#2e2e2e"; name = "Chapel Morgue"; - req_access = null; stripe_color = "#deaf43" }, /turf/simulated/floor/tiled/steel_ridged, @@ -18373,7 +18371,6 @@ door_color = "#8c1d11"; name = "maintenance access"; req_access = list(4); - req_one_access = null; stripe_color = "#8c1d11" }, /obj/structure/cable/pink{ @@ -21290,8 +21287,12 @@ /turf/simulated/floor, /area/maintenance/stellardelight/deck1/exploration) "Tc" = ( -/obj/item/bedsheet/orangedouble, -/obj/structure/bed/double/padded, +/obj/item/bedsheet/orangedouble{ + dir = 1 + }, +/obj/structure/bed/double/padded{ + dir = 1 + }, /obj/structure/curtain/black, /turf/simulated/floor/carpet/purcarpet, /area/stellardelight/deck1/dorms/dorm7) @@ -21421,7 +21422,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#ffffff"; name = "Xenobiology"; - req_access = null; req_one_access = list(47,55); stripe_color = "#5a19a8" }, @@ -21619,8 +21619,12 @@ /turf/simulated/floor/tiled/dark, /area/security/armoury) "TN" = ( -/obj/item/bedsheet/orangedouble, -/obj/structure/bed/double/padded, +/obj/item/bedsheet/orangedouble{ + dir = 1 + }, +/obj/structure/bed/double/padded{ + dir = 1 + }, /obj/structure/curtain/black, /turf/simulated/floor/carpet/purcarpet, /area/stellardelight/deck1/dorms/dorm6) @@ -33765,7 +33769,7 @@ pV xf aT MG -vC +gv vi xf ww diff --git a/maps/stellar_delight/stellar_delight2.dmm b/maps/stellar_delight/stellar_delight2.dmm index 15bb7139ee5..a6d068408db 100644 --- a/maps/stellar_delight/stellar_delight2.dmm +++ b/maps/stellar_delight/stellar_delight2.dmm @@ -21,18 +21,9 @@ /turf/simulated/floor/tiled/eris/white/bluecorner, /area/medical/chemistry) "ae" = ( -/obj/structure/cable/yellow{ - icon_state = "4-8" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 8 - }, -/obj/effect/floor_decal/steeldecal/steel_decals4, -/obj/effect/floor_decal/steeldecal/steel_decals4{ - dir = 10 +/obj/machinery/requests_console/preset/cargo{ + dir = 8; + pixel_x = 30 }, /turf/simulated/floor/tiled/eris/steel/cargo, /area/quartermaster/storage) @@ -954,14 +945,14 @@ /turf/simulated/floor, /area/maintenance/stellardelight/deck2/portfore) "bQ" = ( -/obj/structure/closet/secure_closet/quartermaster, -/obj/item/storage/backpack/dufflebag, -/obj/machinery/atmospherics/unary/vent_scrubber/on{ - dir = 1 - }, /obj/machinery/firealarm/angled{ dir = 8 }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/structure/cable/yellow{ + icon_state = "1-2" + }, /turf/simulated/floor/wood, /area/quartermaster/qm) "bR" = ( @@ -1085,9 +1076,16 @@ /turf/simulated/floor/plating, /area/engineering/storage) "ce" = ( -/obj/machinery/vending/wardrobe/cargodrobe, -/obj/machinery/status_display/supply_display{ - pixel_y = 32 +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/effect/floor_decal/steeldecal/steel_decals4{ + dir = 4 + }, +/obj/effect/floor_decal/steeldecal/steel_decals4{ + dir = 9 + }, +/obj/structure/cable/yellow{ + icon_state = "1-2" }, /turf/simulated/floor/tiled/eris/steel/cargo, /area/quartermaster/storage) @@ -3355,18 +3353,14 @@ /turf/simulated/floor/tiled/techmaint, /area/engineering/atmos/storage) "gN" = ( -/obj/machinery/atmospherics/pipe/manifold/hidden/supply{ - dir = 8 - }, -/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{ - dir = 8 - }, /obj/effect/floor_decal/steeldecal/steel_decals4{ dir = 4 }, /obj/effect/floor_decal/steeldecal/steel_decals4{ dir = 9 }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, /turf/simulated/floor/tiled/eris/steel/brown_platform, /area/quartermaster/storage) "gO" = ( @@ -3580,7 +3574,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#e6ab22"; name = "Engineering EVA Storage"; - req_access = null; req_one_access = list(11,24); stripe_color = "#913013" }, @@ -4057,9 +4050,6 @@ /area/engineering/atmos/storage) "iB" = ( /obj/structure/filingcabinet/filingcabinet, -/obj/machinery/requests_console/preset/cargo{ - pixel_y = 30 - }, /turf/simulated/floor/tiled/eris/steel/brown_platform, /area/quartermaster/storage) "iC" = ( @@ -4433,6 +4423,20 @@ }, /turf/simulated/floor/tiled, /area/stellardelight/deck2/aftport) +"ju" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/fuel{ + dir = 4 + }, +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/structure/cable{ + icon_state = "4-8" + }, +/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/manifold/hidden/supply, +/turf/simulated/floor/tiled/eris/steel/cargo, +/area/quartermaster/storage) "jv" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 10 @@ -5249,26 +5253,10 @@ /turf/simulated/floor/tiled/eris/white/bluecorner, /area/medical/reception) "le" = ( -/obj/machinery/door/firedoor/glass, -/obj/structure/cable/yellow{ - icon_state = "4-8" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 8 - }, -/obj/machinery/door/airlock/angled_bay/standard/color{ - dir = 4; - door_color = "#a6753d"; - fill_color = "#75736f"; - name = "Quartermaster"; - req_access = list(41); - stripe_color = "#3b2b1a" - }, -/turf/simulated/floor/tiled/steel_ridged, -/area/quartermaster/qm) +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/turf/simulated/floor/tiled/eris/steel/cargo, +/area/quartermaster/storage) "lf" = ( /obj/machinery/portable_atmospherics/hydroponics, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ @@ -6021,14 +6009,14 @@ /turf/simulated/floor/tiled/techfloor, /area/engineering/atmos/monitoring) "mE" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 6 + }, /obj/structure/cable/yellow{ - icon_state = "4-8" + icon_state = "2-4" }, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 10 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 + dir = 6 }, /turf/simulated/floor/wood, /area/quartermaster/qm) @@ -8177,7 +8165,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#e6ab22"; name = "Engineering Workshop"; - req_access = null; req_one_access = list(11,24); stripe_color = "#913013" }, @@ -9683,11 +9670,10 @@ /turf/simulated/floor/tiled/eris/steel/brown_platform, /area/crew_quarters/bar) "uY" = ( -/obj/structure/cable/yellow{ - icon_state = "1-8" - }, -/turf/simulated/floor/tiled/eris/steel/brown_platform, -/area/quartermaster/storage) +/obj/structure/closet/secure_closet/quartermaster, +/obj/item/storage/backpack/dufflebag, +/turf/simulated/floor/wood, +/area/quartermaster/qm) "uZ" = ( /obj/machinery/button/remote/blast_door{ dir = 8; @@ -9880,9 +9866,6 @@ /turf/simulated/floor, /area/engineering/atmos/monitoring) "vy" = ( -/obj/structure/cable/yellow{ - icon_state = "4-8" - }, /obj/structure/cable/yellow{ icon_state = "2-8" }, @@ -10582,10 +10565,10 @@ /turf/simulated/floor/tiled/white, /area/medical/surgery) "xk" = ( -/obj/machinery/photocopier, /obj/machinery/light{ dir = 1 }, +/obj/machinery/vending/wardrobe/cargodrobe, /turf/simulated/floor/tiled/eris/steel/cargo, /area/quartermaster/storage) "xl" = ( @@ -11078,7 +11061,6 @@ door_color = "#e6ab22"; name = "maintenance access"; req_access = list(11,24); - req_one_access = null; stripe_color = "#e6ab22" }, /obj/structure/cable/orange{ @@ -12493,7 +12475,6 @@ /obj/machinery/door/firedoor/glass, /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#9c9c9c"; - fill_color = null; name = "Commons"; stripe_color = "#89bd66" }, @@ -12570,6 +12551,13 @@ /obj/machinery/camera/network/cargo, /obj/item/retail_scanner/cargo, /obj/item/stamp/accepted, +/obj/machinery/button/remote/blast_door{ + dir = 8; + id = "cargo_desk"; + name = "Cargo Shutter Control"; + pixel_x = 24; + pixel_y = 24 + }, /turf/simulated/floor/tiled/eris/steel/brown_platform, /area/quartermaster/storage) "BN" = ( @@ -13226,6 +13214,9 @@ /obj/structure/cable/yellow{ icon_state = "4-8" }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 9 + }, /turf/simulated/floor/wood, /area/quartermaster/qm) "Ds" = ( @@ -13889,18 +13880,9 @@ /turf/simulated/floor/tiled/white, /area/medical/surgery) "EM" = ( -/obj/structure/cable/yellow{ - icon_state = "2-4" - }, /obj/machinery/light{ dir = 1 }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 8 - }, /turf/simulated/floor/tiled/eris/steel/brown_platform, /area/quartermaster/storage) "EN" = ( @@ -14101,9 +14083,7 @@ /obj/machinery/embedded_controller/radio/simple_docking_controller{ frequency = 1380; id_tag = "cargo_bay"; - pixel_y = 24; - req_one_access = null; - tag_door = null + pixel_y = 24 }, /obj/structure/cable{ icon_state = "4-8" @@ -16315,7 +16295,6 @@ }, /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#9c9c9c"; - fill_color = null; name = "Commons"; stripe_color = "#89bd66" }, @@ -16980,6 +16959,12 @@ req_access = list(50) }, /obj/machinery/door/firedoor/glass, +/obj/machinery/door/blast/shutters{ + id = "cargo_desk"; + layer = 3.3; + name = "Cargo Shutters"; + dir = 2 + }, /turf/simulated/floor/tiled/monotile, /area/quartermaster/storage) "Lv" = ( @@ -18905,6 +18890,9 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 9 }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 8 + }, /turf/simulated/floor/wood, /area/quartermaster/qm) "PE" = ( @@ -19441,9 +19429,7 @@ tag_east_con = 0.79; tag_north = 1; tag_north_con = 0.21; - tag_south = 2; - tag_south_con = null; - tag_west_con = null + tag_south = 2 }, /turf/simulated/floor/tiled/techmaint, /area/engineering/atmos/storage) @@ -19641,7 +19627,6 @@ /obj/machinery/door/airlock/angled_bay/standard/glass{ door_color = "#e6ab22"; name = "Engineering Monitoring Room"; - req_access = null; req_one_access = list(11,24); stripe_color = "#913013" }, @@ -19741,6 +19726,17 @@ }, /turf/simulated/floor/airless, /area/engineering/engine_room) +"Rt" = ( +/obj/structure/cable/yellow{ + icon_state = "4-8" + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/structure/cable/yellow{ + icon_state = "1-8" + }, +/turf/simulated/floor/tiled/eris/steel/cargo, +/area/quartermaster/storage) "Ru" = ( /turf/simulated/floor/glass/reinforced, /area/stellardelight/deck2/starboard) @@ -19890,11 +19886,16 @@ /turf/simulated/floor/tiled/techmaint, /area/engineering/atmos/storage) "RO" = ( -/obj/structure/cable/yellow{ - icon_state = "4-8" +/obj/machinery/door/firedoor/glass, +/obj/structure/window/bay/reinforced, +/obj/structure/low_wall/bay/reinforced/brown, +/obj/machinery/door/blast/shutters{ + id = "cargo_desk"; + layer = 3.3; + name = "Cargo Shutters"; + dir = 2 }, -/mob/living/simple_mob/animal/passive/mouse/jerboa/leggy, -/turf/simulated/floor/tiled/eris/steel/brown_platform, +/turf/simulated/floor, /area/quartermaster/storage) "RP" = ( /obj/structure/table/reinforced, @@ -20945,13 +20946,21 @@ /turf/simulated/floor/tiled/techfloor, /area/engineering/atmos/monitoring) "Um" = ( -/obj/structure/cable/yellow{ - icon_state = "4-8" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/machinery/door/firedoor/glass, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/turf/simulated/floor/tiled/eris/steel/brown_platform, -/area/quartermaster/storage) +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/structure/cable/yellow{ + icon_state = "1-2" + }, +/obj/machinery/door/airlock/angled_bay/standard/color{ + door_color = "#a6753d"; + fill_color = "#75736f"; + name = "Quartermaster"; + req_access = list(41); + stripe_color = "#3b2b1a" + }, +/turf/simulated/floor/tiled/steel_ridged, +/area/quartermaster/qm) "Un" = ( /obj/machinery/atmospherics/binary/pump/on{ dir = 1; @@ -21966,9 +21975,7 @@ /obj/machinery/firealarm/angled{ dir = 4 }, -/obj/structure/closet/crate/bin{ - anchored = 1 - }, +/obj/machinery/photocopier, /turf/simulated/floor/tiled/eris/steel/cargo, /area/quartermaster/storage) "WF" = ( @@ -22597,6 +22604,7 @@ pixel_y = 5 }, /obj/item/cartridge/quartermaster, +/obj/machinery/atmospherics/unary/vent_scrubber/on, /turf/simulated/floor/wood, /area/quartermaster/qm) "XY" = ( @@ -33004,7 +33012,7 @@ eB OP TS XN -NN +RO ou vy mw @@ -33148,7 +33156,7 @@ zj We Lu CS -vq +zj Rh gO vq @@ -33288,9 +33296,9 @@ eB dq zj GE -NN -BM RO +BM +zj pl LF oC @@ -33432,7 +33440,7 @@ zj GE do iB -vq +zj XJ MM nz @@ -33574,7 +33582,7 @@ wH Sv sk gN -Um +bB wR wR fz @@ -33716,7 +33724,7 @@ zj DV do EM -uY +zj hS hS bW @@ -33856,7 +33864,7 @@ eB gq HZ Nj -NN +RO ae gt WE @@ -33999,7 +34007,7 @@ YY Nf Nf YY -le +YY YY YY xk @@ -34138,16 +34146,16 @@ ZF ci eB cX -ed +uY du dJ mE bQ -YY +Um ce -BO -Ui -dN +Rt +le +ju pD jQ jQ diff --git a/maps/submaps/admin_use_vr/kk_mercship.dmm b/maps/submaps/admin_use_vr/kk_mercship.dmm index 79a61b4b31e..7a8048d4fa4 100644 --- a/maps/submaps/admin_use_vr/kk_mercship.dmm +++ b/maps/submaps/admin_use_vr/kk_mercship.dmm @@ -6594,10 +6594,10 @@ /obj/item/radio/headset/syndicate, /obj/item/radio/headset/syndicate, /obj/item/radio/headset/syndicate, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, /obj/effect/floor_decal/techfloor{ dir = 10 }, @@ -9996,8 +9996,8 @@ /obj/machinery/recharger/wallcharger{ pixel_y = 20 }, -/obj/item/clothing/gloves/knuckledusters, -/obj/item/clothing/gloves/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, /obj/item/flash, /obj/item/flash, /obj/item/laser_pointer/upgraded, diff --git a/maps/submaps/depreciated_vr/mercbase.dmm b/maps/submaps/depreciated_vr/mercbase.dmm index 097b6bf8a43..234417b727d 100644 --- a/maps/submaps/depreciated_vr/mercbase.dmm +++ b/maps/submaps/depreciated_vr/mercbase.dmm @@ -419,10 +419,10 @@ /obj/item/radio/headset/syndicate, /obj/item/radio/headset/syndicate, /obj/item/radio/headset/syndicate, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, -/obj/item/radio/headset/syndicate/alt, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, +/obj/item/radio/headset/alt/syndicate, /turf/unsimulated/floor{ icon_state = "lino" }, @@ -2463,11 +2463,11 @@ }, /area/antag/antag_base) "dM" = ( -/obj/item/clothing/gloves/knuckledusters, -/obj/item/clothing/gloves/knuckledusters, -/obj/item/clothing/gloves/knuckledusters, -/obj/item/clothing/gloves/knuckledusters, -/obj/item/clothing/gloves/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, +/obj/item/clothing/accessory/knuckledusters, /obj/structure/table/steel, /obj/effect/floor_decal/borderfloorblack{ dir = 6 diff --git a/maps/submaps/pois_vr/debris_field/foodstand.dmm b/maps/submaps/pois_vr/debris_field/foodstand.dmm index 56891bbe75d..1cd9b2041ef 100644 --- a/maps/submaps/pois_vr/debris_field/foodstand.dmm +++ b/maps/submaps/pois_vr/debris_field/foodstand.dmm @@ -16,7 +16,7 @@ /obj/item/reagent_containers/food/snacks/carpmeat, /obj/item/reagent_containers/food/snacks/carpmeat, /obj/item/reagent_containers/food/snacks/carpmeat, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "f" = ( /obj/structure/table/woodentable, @@ -24,19 +24,19 @@ /obj/item/reagent_containers/food/condiment/ketchup, /obj/item/reagent_containers/food/condiment/hotsauce, /obj/item/reagent_containers/food/condiment/soysauce, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "g" = ( /obj/structure/table/woodentable, /obj/machinery/microwave, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "h" = ( /obj/structure/simple_door/wood, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "i" = ( -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "j" = ( /obj/structure/closet/crate/freezer, @@ -47,23 +47,23 @@ /obj/item/reagent_containers/food/snacks/hotdog, /obj/item/reagent_containers/food/snacks/cheeseburrito, /obj/item/reagent_containers/food/snacks/cheeseburrito, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "k" = ( /obj/structure/table/woodentable, /obj/machinery/cash_register{ dir = 1 }, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "l" = ( /obj/structure/table/woodentable, /obj/item/reagent_containers/food/snacks/taco, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) "m" = ( /obj/structure/table/woodentable, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/airless, /area/submap/debrisfield/foodstand) (1,1,1) = {" diff --git a/maps/submaps/pois_vr/debris_field/ship_tanker_betrayed.dmm b/maps/submaps/pois_vr/debris_field/ship_tanker_betrayed.dmm index 701ce361230..e8d723c5191 100644 --- a/maps/submaps/pois_vr/debris_field/ship_tanker_betrayed.dmm +++ b/maps/submaps/pois_vr/debris_field/ship_tanker_betrayed.dmm @@ -10,11 +10,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ dir = 6 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "ar" = ( /obj/structure/window/reinforced{ @@ -29,11 +25,7 @@ /area/space) "aF" = ( /mob/living/simple_mob/humanoid/merc/melee/sword/drone/tanker_escort, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "ck" = ( /obj/machinery/atmospherics/pipe/simple/visible, @@ -93,12 +85,7 @@ "ht" = ( /obj/item/stack/cable_coil, /mob/living/simple_mob/humanoid/merc/melee/drone/tanker_escort, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "hx" = ( /obj/effect/decal/cleanable/blood/oil, @@ -108,21 +95,13 @@ /area/submap/debrisfield/phoron_tanker) "ik" = ( /obj/structure/meteorite, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "iD" = ( /obj/machinery/atmospherics/pipe/simple/visible{ dir = 10 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "jx" = ( /turf/simulated/floor/tiled/techfloor, @@ -175,11 +154,7 @@ /obj/machinery/atmospherics/pipe/tank/phoron/full{ dir = 4 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "mP" = ( /obj/item/card/id/event/altcard/centcom, @@ -204,12 +179,7 @@ /turf/space, /area/space) "ou" = ( -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "ox" = ( /obj/machinery/door/window{ @@ -249,11 +219,7 @@ /obj/machinery/light/small/emergency/flicker{ dir = 8 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "rt" = ( /obj/structure/lattice, @@ -262,20 +228,11 @@ /area/submap/debrisfield/phoron_tanker) "sU" = ( /obj/item/broken_device, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "sY" = ( /obj/item/reagent_containers/food/snacks/meat, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "ta" = ( /obj/structure/meteorite, @@ -290,11 +247,7 @@ /area/submap/debrisfield/phoron_tanker) "tw" = ( /obj/machinery/atmospherics/pipe/simple/visible, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "uo" = ( /obj/structure/lattice, @@ -303,12 +256,7 @@ /area/submap/debrisfield/phoron_tanker) "uF" = ( /obj/effect/decal/cleanable/blood/oil, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "uL" = ( /obj/tether_away_spawner/debrisfield/carp, @@ -318,11 +266,7 @@ /obj/machinery/atmospherics/pipe/manifold/visible{ dir = 8 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "vs" = ( /obj/machinery/atmospherics/pipe/simple/visible{ @@ -376,11 +320,7 @@ /obj/machinery/atmospherics/pipe/manifold/visible{ dir = 4 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "zZ" = ( /obj/structure/curtain/black, @@ -426,11 +366,7 @@ /obj/machinery/atmospherics/pipe/manifold/visible{ dir = 8 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "Ex" = ( /obj/machinery/atmospherics/pipe/simple/visible{ @@ -452,11 +388,7 @@ /turf/simulated/floor/tiled/techfloor, /area/submap/debrisfield/phoron_tanker) "Fl" = ( -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "Fv" = ( /obj/structure/lattice, @@ -484,11 +416,7 @@ /obj/machinery/light/small/emergency/flicker{ dir = 4 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "Hk" = ( /obj/structure/toilet{ @@ -515,12 +443,7 @@ /area/submap/debrisfield/phoron_tanker) "JD" = ( /obj/effect/map_effect/perma_light, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "JG" = ( /obj/machinery/computer/shuttle, @@ -606,22 +529,13 @@ /area/submap/debrisfield/phoron_tanker) "TL" = ( /obj/effect/decal/cleanable/blood/oil/streak, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "Uh" = ( /obj/machinery/atmospherics/pipe/tank/phoron/full{ dir = 8 }, -/turf/simulated/floor/plating/external{ - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/floor/airless, /area/submap/debrisfield/phoron_tanker) "Vl" = ( /obj/effect/map_effect/perma_light, @@ -647,12 +561,7 @@ /area/submap/debrisfield/phoron_tanker) "XW" = ( /obj/item/stack/material/steel, -/turf/simulated/mineral/floor/ignore_mapgen/cave{ - name = "asteroid"; - nitrogen = 0; - oxygen = 0; - temperature = 2.7 - }, +/turf/simulated/mineral/floor/vacuum, /area/submap/debrisfield/phoron_tanker) "Yp" = ( /obj/effect/decal/cleanable/blood/oil/streak, diff --git a/maps/submaps/shelters/shelter_2.dmm b/maps/submaps/shelters/shelter_2.dmm index 9b3a9e50239..ee95a4c268c 100644 --- a/maps/submaps/shelters/shelter_2.dmm +++ b/maps/submaps/shelters/shelter_2.dmm @@ -53,7 +53,7 @@ /obj/item/storage/firstaid/toxin, /obj/item/storage/firstaid/o2, /obj/item/storage/box/survival/space, -/obj/item/clothing/gloves/watch/survival, +/obj/item/clothing/accessory/watch/survival, /obj/item/emergency_beacon, /obj/item/healthanalyzer, /obj/item/storage/pill_bottle/dice_nerd, diff --git a/maps/submaps/shelters/shelter_a.dmm b/maps/submaps/shelters/shelter_a.dmm index 489a383f647..9ab9bfadb99 100644 --- a/maps/submaps/shelters/shelter_a.dmm +++ b/maps/submaps/shelters/shelter_a.dmm @@ -74,7 +74,7 @@ starts_with = list(/obj/item/tool/prybar/red,/obj/item/clothing/glasses/goggles,/obj/item/reagent_containers/hypospray/autoinjector,/obj/item/stack/medical/bruise_pack,/obj/item/flashlight/glowstick,/obj/item/reagent_containers/food/snacks/candy/proteinbar,/obj/item/clothing/mask/breath,/obj/item/tank/emergency/oxygen/engi) }, /obj/item/storage/box/survival/space, -/obj/item/clothing/gloves/watch/survival, +/obj/item/clothing/accessory/watch/survival, /obj/item/emergency_beacon, /obj/item/extinguisher/mini, /obj/item/radio{ diff --git a/maps/submaps/space_rocks/space_rocks_stuff.dm b/maps/submaps/space_rocks/space_rocks_stuff.dm index ff0d03b8549..dfa64b90ce6 100644 --- a/maps/submaps/space_rocks/space_rocks_stuff.dm +++ b/maps/submaps/space_rocks/space_rocks_stuff.dm @@ -19,11 +19,13 @@ prob_fall = 40 //guard = 20 mobs_to_pick_from = list( - /mob/living/simple_mob/animal/space/bats = 10, - /mob/living/simple_mob/vore/alienanimals/space_jellyfish = 15, - /mob/living/simple_mob/vore/alienanimals/startreader = 15, - /mob/living/simple_mob/vore/alienanimals/space_ghost = 6, + /mob/living/simple_mob/vore/alienanimals/space_jellyfish = 1, + /mob/living/simple_mob/vore/alienanimals/startreader = 3, + /mob/living/simple_mob/vore/alienanimals/space_ghost = 2, /mob/living/simple_mob/vore/oregrub = 1, + /mob/living/simple_mob/animal/space/ray = 10, + /mob/living/simple_mob/animal/space/bats = 10, + /mob/living/simple_mob/animal/space/gnat = 15, /mob/living/simple_mob/animal/space/carp = 3, /mob/living/simple_mob/animal/space/carp/large = 1, /mob/living/simple_mob/animal/space/carp/large/huge = 1 diff --git a/maps/submaps/surface_submaps/plains/drgnplateu.dmm b/maps/submaps/surface_submaps/plains/drgnplateu.dmm index f46b33bec0e..feb8686d441 100644 --- a/maps/submaps/surface_submaps/plains/drgnplateu.dmm +++ b/maps/submaps/surface_submaps/plains/drgnplateu.dmm @@ -41,7 +41,7 @@ /obj/structure/flora/grass/green{ pixel_x = -8 }, -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /obj/item/clothing/ears/earring/stud/gold, /obj/item/gun/projectile/deagle/gold{ pixel_x = -11; diff --git a/maps/submaps/surface_submaps/plains/lonehome.dmm b/maps/submaps/surface_submaps/plains/lonehome.dmm index bc8e1979c54..9e71ca016ae 100644 --- a/maps/submaps/surface_submaps/plains/lonehome.dmm +++ b/maps/submaps/surface_submaps/plains/lonehome.dmm @@ -32,7 +32,7 @@ "kT" = (/obj/machinery/light/small{dir = 1},/obj/structure/bed/padded,/obj/item/book/custom_library/fiction/truelovehathmyheart,/obj/item/bedsheet/clown,/turf/simulated/floor/wood,/area/submap/lonehome) "kU" = (/obj/item/chainsaw,/obj/item/storage/box/lights/mixed,/obj/item/extinguisher,/obj/item/storage/toolbox/mechanical,/obj/structure/table/rack,/turf/simulated/floor,/area/submap/lonehome) "ld" = (/obj/machinery/power/port_gen/pacman,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor,/area/submap/lonehome) -"lz" = (/obj/item/reagent_containers/glass/rag,/obj/item/clothing/gloves/ring/engagement,/obj/structure/table/wooden_reinforced,/turf/simulated/floor/wood,/area/submap/lonehome) +"lz" = (/obj/item/reagent_containers/glass/rag,/obj/item/clothing/accessory/ring/engagement,/obj/structure/table/wooden_reinforced,/turf/simulated/floor/wood,/area/submap/lonehome) "lB" = (/obj/machinery/button/windowtint{id = "h_kitchen"},/obj/item/trash/plate,/obj/structure/table/sifwooden_reinforced,/obj/structure/window/reinforced/polarized{dir = 4; id = "h_kitchen"},/turf/simulated/floor/wood,/area/submap/lonehome) "lJ" = (/obj/item/tape,/obj/structure/table/wooden_reinforced,/turf/simulated/floor/wood,/area/submap/lonehome) "lS" = (/obj/item/organ/internal/liver,/obj/random/trash,/turf/simulated/floor,/area/submap/lonehome) diff --git a/maps/submaps/surface_submaps/plains/lonehome_vr.dmm b/maps/submaps/surface_submaps/plains/lonehome_vr.dmm index cabcd7f61d6..a70a82f6031 100644 --- a/maps/submaps/surface_submaps/plains/lonehome_vr.dmm +++ b/maps/submaps/surface_submaps/plains/lonehome_vr.dmm @@ -554,7 +554,7 @@ /area/submap/lonehome) "bG" = ( /obj/item/reagent_containers/glass/rag, -/obj/item/clothing/gloves/ring/engagement, +/obj/item/clothing/accessory/ring/engagement, /obj/structure/table/wooden_reinforced, /turf/simulated/floor/wood/virgo3b, /area/submap/lonehome) diff --git a/maps/submaps/surface_submaps/plains/oldhotel.dmm b/maps/submaps/surface_submaps/plains/oldhotel.dmm index f195022b43d..4d0a583af97 100644 --- a/maps/submaps/surface_submaps/plains/oldhotel.dmm +++ b/maps/submaps/surface_submaps/plains/oldhotel.dmm @@ -1,8 +1,4 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE -"ai" = ( -/obj/random/trash, -/turf/simulated/floor/carpet/purcarpet, -/area/submap/oldhotel) "aJ" = ( /obj/item/towel/random, /obj/item/towel/random, @@ -104,11 +100,6 @@ /obj/item/trash/tray, /turf/simulated/floor/wood/virgo3b, /area/submap/oldhotel) -"ja" = ( -/obj/effect/decal/cleanable/dirt, -/obj/random/junk, -/turf/simulated/floor/carpet/purcarpet, -/area/submap/oldhotel) "je" = ( /obj/structure/closet/cabinet, /obj/item/binoculars/spyglass, @@ -342,7 +333,7 @@ /area/submap/oldhotel) "yM" = ( /obj/item/stack/cable_coil, -/turf/simulated/floor/carpet/purcarpet, +/turf/simulated/floor/carpet/sblucarpet/virgo3b, /area/submap/oldhotel) "zs" = ( /obj/effect/decal/cleanable/dirt, @@ -579,9 +570,6 @@ /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/tiled/old_tile/white/virgo3b, /area/submap/oldhotel) -"SG" = ( -/turf/simulated/floor/carpet/purcarpet, -/area/submap/oldhotel) "SL" = ( /obj/item/material/shard, /obj/item/material/shard, @@ -846,8 +834,8 @@ Vj SZ hQ RM -ai -ja +ES +cZ TU hQ RM @@ -873,7 +861,7 @@ cZ SZ hQ TU -SG +Vj yM Wy ZG diff --git a/maps/submaps/surface_submaps/wilderness/drgnplateu.dmm b/maps/submaps/surface_submaps/wilderness/drgnplateu.dmm index 2f202bffdac..7043f0230ea 100644 --- a/maps/submaps/surface_submaps/wilderness/drgnplateu.dmm +++ b/maps/submaps/surface_submaps/wilderness/drgnplateu.dmm @@ -41,7 +41,7 @@ /obj/structure/flora/grass/green{ pixel_x = -8 }, -/obj/item/clothing/gloves/ring/material/gold, +/obj/item/clothing/accessory/ring/material/gold, /obj/item/clothing/ears/earring/stud/gold, /obj/item/gun/projectile/deagle/gold{ pixel_x = -11; diff --git a/maps/tether/tether-05-station1.dmm b/maps/tether/tether-05-station1.dmm index 010b2f41e25..712a50b3be2 100644 --- a/maps/tether/tether-05-station1.dmm +++ b/maps/tether/tether-05-station1.dmm @@ -788,7 +788,6 @@ id = "EngineEmitterPortWest2"; name = "Engine Room Blast Doors"; pixel_x = 25; - req_access = null; req_one_access = list(11,24) }, /obj/machinery/atmospherics/unary/vent_scrubber/on{ @@ -2468,6 +2467,12 @@ icon_state = "1-2" }, /obj/machinery/door/firedoor/glass, +/obj/machinery/door/blast/shutters{ + dir = 2; + id = "cargo_shutter"; + layer = 3.3; + name = "Cargo Shutters" + }, /turf/simulated/floor/tiled, /area/quartermaster/office) "aer" = ( @@ -8016,7 +8021,6 @@ /obj/machinery/door/airlock/multi_tile/glass{ dir = 2; name = "Gateway/EVA Prep Room"; - req_access = null; req_one_access = list(18,19,43,67) }, /turf/simulated/floor/tiled/steel_ridged, @@ -8588,6 +8592,12 @@ /obj/structure/grille, /obj/structure/window/reinforced/full, /obj/structure/disposalpipe/segment, +/obj/machinery/door/blast/shutters{ + dir = 2; + id = "cargo_shutter"; + layer = 3.3; + name = "Cargo Shutters" + }, /turf/simulated/floor/plating, /area/quartermaster/office) "avz" = ( @@ -12706,8 +12716,7 @@ /obj/structure/plasticflaps, /obj/machinery/conveyor{ dir = 8; - id = "miningops"; - movedir = null + id = "miningops" }, /turf/simulated/floor/plating, /area/quartermaster/belterdock/refinery) @@ -14869,6 +14878,19 @@ fancy_shuttle_tag = "secbus" }, /area/shuttle/securiship/engines) +"cbX" = ( +/obj/machinery/door/firedoor/glass, +/obj/machinery/door/firedoor/glass, +/obj/structure/grille, +/obj/structure/window/reinforced/full, +/obj/machinery/door/blast/shutters{ + dir = 2; + id = "cargo_shutter"; + layer = 3.3; + name = "Cargo Shutters" + }, +/turf/simulated/floor/plating, +/area/quartermaster/office) "cbY" = ( /obj/machinery/atmospherics/unary/vent_pump/on{ dir = 4 @@ -20522,6 +20544,12 @@ /obj/structure/window/reinforced/full, /obj/machinery/door/firedoor/glass, /obj/structure/disposalpipe/segment, +/obj/machinery/door/blast/shutters{ + dir = 2; + id = "cargo_shutter"; + layer = 3.3; + name = "Cargo Shutters" + }, /turf/simulated/floor/plating, /area/quartermaster/office) "hUm" = ( @@ -27351,8 +27379,7 @@ "pty" = ( /obj/machinery/conveyor{ dir = 8; - id = "miningops"; - movedir = null + id = "miningops" }, /turf/simulated/floor/plating, /area/quartermaster/belterdock/refinery) @@ -29631,8 +29658,7 @@ dir = 4; id = "medivac blast"; name = "window blast shields"; - pixel_y = 1; - req_access = null + pixel_y = 1 }, /turf/simulated/floor/tiled, /area/shuttle/medivac/cockpit) @@ -29926,8 +29952,7 @@ /obj/machinery/mineral/input, /obj/machinery/conveyor{ dir = 8; - id = "miningops"; - movedir = null + id = "miningops" }, /turf/simulated/floor/plating, /area/quartermaster/belterdock/refinery) @@ -30435,7 +30460,14 @@ /obj/machinery/requests_console{ department = "Cargo Bay"; departmentType = 2; - pixel_y = 32 + pixel_y = 32; + pixel_x = -6 + }, +/obj/machinery/button/remote/blast_door{ + id = "cargo_shutter"; + name = "Cargo Shutter Control"; + pixel_x = 10; + pixel_y = 24 }, /turf/simulated/floor/tiled, /area/quartermaster/office) @@ -30943,8 +30975,7 @@ /obj/machinery/mineral/output, /obj/machinery/conveyor{ dir = 8; - id = "miningops"; - movedir = null + id = "miningops" }, /turf/simulated/floor/plating, /area/quartermaster/belterdock/refinery) @@ -31985,8 +32016,7 @@ frequency = 1380; id_tag = "securiship_bay"; pixel_x = 24; - pixel_y = -26; - req_one_access = null + pixel_y = -26 }, /turf/simulated/floor/tiled, /area/tether/station/dock_two) @@ -34459,6 +34489,12 @@ /obj/machinery/door/firedoor/glass, /obj/structure/grille, /obj/structure/window/reinforced/full, +/obj/machinery/door/blast/shutters{ + dir = 2; + id = "cargo_shutter"; + layer = 3.3; + name = "Cargo Shutters" + }, /turf/simulated/floor/plating, /area/quartermaster/office) @@ -44910,7 +44946,7 @@ oWu qkG mkL iDA -yjH +cbX tnC tWj jhJ diff --git a/maps/tether/tether_jobs.dm b/maps/tether/tether_jobs.dm index 7dc03f38e29..758b707b9e0 100644 --- a/maps/tether/tether_jobs.dm +++ b/maps/tether/tether_jobs.dm @@ -177,8 +177,6 @@ id_type = /obj/item/card/id/talon/captain id_slot = slot_wear_id pda_type = null - - l_ear = /obj/item/radio/headset/talon glasses = /obj/item/clothing/glasses/sunglasses uniform = /obj/item/clothing/under/rank/talon/command shoes = /obj/item/clothing/shoes/brown @@ -186,6 +184,10 @@ satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon + /decl/hierarchy/outfit/job/talon_pilot name = OUTFIT_JOB_NAME(JOB_TALON_PILOT) @@ -194,7 +196,6 @@ pda_type = null flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL - l_ear = /obj/item/radio/headset/talon shoes = /obj/item/clothing/shoes/black head = /obj/item/clothing/head/pilot_vr/talon uniform = /obj/item/clothing/under/rank/talon/pilot @@ -206,6 +207,10 @@ satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon + /decl/hierarchy/outfit/job/talon_doctor name = OUTFIT_JOB_NAME(JOB_TALON_DOCTOR) hierarchy_type = /decl/hierarchy/outfit/job @@ -214,7 +219,6 @@ id_slot = slot_wear_id pda_type = null - l_ear = /obj/item/radio/headset/talon shoes = /obj/item/clothing/shoes/white backpack = /obj/item/storage/backpack/medic satchel_one = /obj/item/storage/backpack/satchel/med @@ -227,6 +231,10 @@ satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon + /decl/hierarchy/outfit/job/talon_security name = OUTFIT_JOB_NAME(JOB_ALT_TALON_SECURITY) hierarchy_type = /decl/hierarchy/outfit/job @@ -236,7 +244,6 @@ pda_type = null backpack_contents = list(/obj/item/handcuffs = 1) - l_ear = /obj/item/radio/headset/talon gloves = /obj/item/clothing/gloves/black shoes = /obj/item/clothing/shoes/boots/jackboots backpack = /obj/item/storage/backpack/security @@ -248,6 +255,10 @@ satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon + /decl/hierarchy/outfit/job/talon_engineer name = OUTFIT_JOB_NAME(JOB_TALON_ENGINEER) hierarchy_type = /decl/hierarchy/outfit/job @@ -257,7 +268,6 @@ pda_type = null flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL - l_ear = /obj/item/radio/headset/talon belt = /obj/item/storage/belt/utility/full shoes = /obj/item/clothing/shoes/boots/workboots r_pocket = /obj/item/t_scanner @@ -270,6 +280,10 @@ satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon + /decl/hierarchy/outfit/job/talon_miner name = OUTFIT_JOB_NAME(JOB_TALON_MINER) hierarchy_type = /decl/hierarchy/outfit/job @@ -279,7 +293,6 @@ pda_type = null flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL - l_ear = /obj/item/radio/headset/talon shoes = /obj/item/clothing/shoes/boots/workboots r_pocket = /obj/item/storage/bag/ore l_pocket = /obj/item/tool/crowbar @@ -287,3 +300,7 @@ backpack = /obj/item/storage/backpack/talon satchel_one = /obj/item/storage/backpack/satchel/talon messenger_bag = /obj/item/storage/backpack/messenger/talon + + headset = /obj/item/radio/headset/talon + headset_alt = /obj/item/radio/headset/talon + headset_earbud = /obj/item/radio/headset/talon diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerBody.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerBody.tsx index 68bb73dfcc2..9909232b02f 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerBody.tsx +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerBody.tsx @@ -66,7 +66,7 @@ export const AppearanceChangerEars = (props) => { const { ear_style, ear_styles } = data; return ( - +
+ } + > + + + + {!!show_selected_option && ( + + + + )} {
+ {
{general.skills || 'No data found.'} + {
{general.comments && general.comments.length === 0 ? ( diff --git a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsOptions.tsx b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsOptions.tsx index 757e79b7cda..a711cdf931d 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsOptions.tsx +++ b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsOptions.tsx @@ -36,6 +36,14 @@ export const MedicalRecordsView = (props) => {
+ { {field.value} - - - - } - > - - {items.map((item) => ( - - {item.amt} {item.extra} - - ))} - -
- )) || ( -
- {config.title} is empty. -
- )} - + + {inner} ); }; + +const MicrowaveContents = (props) => { + const { act, data } = useBackend(); + + const { items, reagents, recipe, recipe_name } = data; + + return ( +
+ + + + } + > + + + + {items.map((item) => ( + + + + x{item.amt} + + + + + ))} + {reagents.map((r) => ( + + + + {r.amt} + + {/* To be clear: This is fucking cursed + We're directly loading the rectangular glass and + manually colorizing a div that's set to be the right shape */} + + + + + ))} + + + + + + + + + {recipe ? ( + + ) : ( + + )} + + + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx index 293db7da7de..165b95af2e7 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx @@ -2,16 +2,17 @@ import { capitalize } from 'common/string'; import { useState } from 'react'; import { useBackend } from 'tgui/backend'; import { + Box, Button, Divider, Flex, Icon, - Image, Input, Section, Stack, Tabs, } from 'tgui/components'; +import { classes } from 'tgui-core/react'; import { NoSpriteWarning } from '../components'; import { @@ -163,15 +164,18 @@ export const ModifyRobotComponent = (props: { - + + + + + + + diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx index 045025ccd56..85ad5a6da4c 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx @@ -13,6 +13,7 @@ import { Section, Stack, } from 'tgui/components'; +import { classes } from 'tgui-core/react'; import { NoSpriteWarning } from '../components'; import { prepareSearch } from '../functions'; @@ -47,7 +48,8 @@ export const ModifyRobotModules = (props: { /> {!!source && ( - + + + + + + + { /> - + + + + + + + { /> - + + + + + + + { + const { act, data } = useBackend(); + + const { + material, + identifier, + adjective, + tint, + t, + able_to_unpetrify, + discard_clothes, + target, + can_remote, + } = data; + + return ( + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/IconSection.tsx b/tgui/packages/tgui/interfaces/RobotChoose/IconSection.tsx new file mode 100644 index 00000000000..3fd39c36e1a --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/IconSection.tsx @@ -0,0 +1,88 @@ +import { useBackend } from 'tgui/backend'; +import { Box, Button, Flex, Input, Section, Stack } from 'tgui-core/components'; +import { classes } from 'tgui-core/react'; + +import { Tooltip } from '../../components'; + +export const IconSection = (props: { + currentName: string; + isDefaultName: boolean; + sprite?: string | null; + size?: string | null; +}) => { + const { act } = useBackend(); + const { currentName, isDefaultName, sprite, size } = props; + + return ( +
act('confirm')}> + Confirm + + } + > + + + + Name: + + + + act('rename', { value })} + maxLength={52} + textColor={isDefaultName ? 'red' : undefined} + /> + + + + + {!!sprite && !!size && ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )} +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/ModuleSection.tsx b/tgui/packages/tgui/interfaces/RobotChoose/ModuleSection.tsx new file mode 100644 index 00000000000..c90dbbe7be5 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/ModuleSection.tsx @@ -0,0 +1,47 @@ +import { createSearch } from 'common/string'; +import { useState } from 'react'; +import { Input, Section, Stack } from 'tgui-core/components'; + +import { SelectorElement } from './SelectorElement'; + +export const ModuleSection = (props: { + title: string; + sortable?: string[]; + selected?: string; +}) => { + const { title, sortable, selected } = props; + + const [searchText, setSearchText] = useState(''); + + const searcher = createSearch(searchText, (element: string) => { + return element; + }); + + const filtered = sortable?.filter(searcher); + + return ( +
+ + setSearchText(value)} + /> + + + + {!!filtered && + filtered.map((filter) => ( + + ))} + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/SelectorElement.tsx b/tgui/packages/tgui/interfaces/RobotChoose/SelectorElement.tsx new file mode 100644 index 00000000000..3279ce78829 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/SelectorElement.tsx @@ -0,0 +1,34 @@ +import { useBackend } from 'tgui/backend'; +import { Button, Flex, Icon, Stack } from 'tgui-core/components'; + +export const SelectorElement = (props: { + option: string; + action: string; + selected?: string | null; + belly?: boolean; +}) => { + const { act } = useBackend(); + const { option, action, selected, belly } = props; + + return ( + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/SpriteSection.tsx b/tgui/packages/tgui/interfaces/RobotChoose/SpriteSection.tsx new file mode 100644 index 00000000000..d287792d025 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/SpriteSection.tsx @@ -0,0 +1,80 @@ +import { useState } from 'react'; +import { Button, Input, Section, Stack } from 'tgui-core/components'; + +import { robotSpriteSearcher } from './functions'; +import { SelectorElement } from './SelectorElement'; +import { spriteOption } from './types'; + +export const SpriteSection = (props: { + title: string; + selected?: string | null; + sortable?: spriteOption[]; +}) => { + const { title, sortable, selected } = props; + + const [searchText, setSearchText] = useState(''); + const [includeDefault, setIncludeDefault] = useState(false); + const [includeWide, setInclideDog] = useState(false); + const [includeTall, setIncludeTall] = useState(false); + + const filtered = robotSpriteSearcher( + searchText, + includeDefault, + includeWide, + includeTall, + sortable, + ); + return ( +
+ setIncludeDefault(!includeDefault)} + > + Def + + setInclideDog(!includeWide)} + > + Wide + + setIncludeTall(!includeTall)} + > + Tall + + + } + > + + setSearchText(value)} + /> + + + + {!!filtered && + filtered.map((filter) => ( + + ))} + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/functions.ts b/tgui/packages/tgui/interfaces/RobotChoose/functions.ts new file mode 100644 index 00000000000..db60717e88e --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/functions.ts @@ -0,0 +1,47 @@ +import { filter } from 'common/collections'; +import { flow } from 'common/fp'; +import { createSearch } from 'common/string'; + +import { spriteOption } from './types'; + +export function robotSpriteSearcher( + searchText: string, + includeDefault: boolean, + includeWide: boolean, + includeTall: boolean, + sprites?: spriteOption[], +): spriteOption[] { + const testSearch = createSearch( + searchText, + (sprite: spriteOption) => sprite.sprite, + ); + if (!sprites) { + return []; + } + let subtypes: string[] = []; + if (includeDefault) { + subtypes.push('def'); + } + if (includeWide) { + subtypes.push('wide'); + } + if (includeTall) { + subtypes.push('tall'); + } + return flow([ + (sprites: spriteOption[]) => { + if (!searchText) { + return sprites; + } else { + return filter(sprites, testSearch); + } + }, + (sprites: spriteOption[]) => { + if (!subtypes.length) { + return sprites; + } else { + return filter(sprites, (sprite) => subtypes.includes(sprite.type)); + } + }, + ])(sprites); +} diff --git a/tgui/packages/tgui/interfaces/RobotChoose/index.tsx b/tgui/packages/tgui/interfaces/RobotChoose/index.tsx new file mode 100644 index 00000000000..91d8dcb7d57 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/index.tsx @@ -0,0 +1,49 @@ +import { useBackend } from 'tgui/backend'; +import { Window } from 'tgui/layouts'; +import { Stack } from 'tgui-core/components'; + +import { IconSection } from './IconSection'; +import { ModuleSection } from './ModuleSection'; +import { SpriteSection } from './SpriteSection'; +import { Data } from './types'; + +export const RobotChoose = (props) => { + const { data } = useBackend(); + + const { + possible_modules, + possible_sprites, + selected_module, + sprite_datum, + theme, + currentName, + isDefaultName, + sprite_datum_class, + sprite_datum_size, + } = data; + + return ( + + + + + + + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/RobotChoose/types.ts b/tgui/packages/tgui/interfaces/RobotChoose/types.ts new file mode 100644 index 00000000000..06d691c5893 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RobotChoose/types.ts @@ -0,0 +1,13 @@ +export type Data = { + possible_modules: string[]; + possible_sprites?: spriteOption[]; + currentName: string; + isDefaultName: boolean; + theme?: string; + selected_module?: string; + sprite_datum?: string | null; + sprite_datum_class?: string | null; + sprite_datum_size?: string | null; +}; + +export type spriteOption = { sprite: string; belly: boolean; type: string }; diff --git a/tgui/packages/tgui/interfaces/Robotact/index.tsx b/tgui/packages/tgui/interfaces/Robotact/index.tsx index 94b97253342..1ab5ea486aa 100644 --- a/tgui/packages/tgui/interfaces/Robotact/index.tsx +++ b/tgui/packages/tgui/interfaces/Robotact/index.tsx @@ -18,7 +18,7 @@ export const Robotact = (props) => { } return ( - + {content} ); diff --git a/tgui/packages/tgui/interfaces/Robotact/types.ts b/tgui/packages/tgui/interfaces/Robotact/types.ts index bd33676d99d..b4232ff6e43 100644 --- a/tgui/packages/tgui/interfaces/Robotact/types.ts +++ b/tgui/packages/tgui/interfaces/Robotact/types.ts @@ -31,6 +31,7 @@ export type Data = { max_health: number; light_color: string; + theme?: string; // Modules modules_static: Module[]; diff --git a/tgui/packages/tgui/interfaces/SecurityRecords/SecurityRecordsOptions.tsx b/tgui/packages/tgui/interfaces/SecurityRecords/SecurityRecordsOptions.tsx index 276ad42d1a9..03e2530eb22 100644 --- a/tgui/packages/tgui/interfaces/SecurityRecords/SecurityRecordsOptions.tsx +++ b/tgui/packages/tgui/interfaces/SecurityRecords/SecurityRecordsOptions.tsx @@ -35,6 +35,14 @@ export const SecurityRecordsView = (props) => {
+ { {field.value} -
); }; + +const SheetSearch = (props: { + searchText: string; + sortOrder: string; + descending: boolean; + onSearchText: Function; + onSortOrder: Function; + onDescending: Function; +}) => { + const { + searchText, + sortOrder, + descending, + onSearchText, + onSortOrder, + onDescending, + } = props; + return ( + + + + onSearchText(value)} + /> + + + onSortOrder(v)} + /> + + +