= danger_levels[4] && danger_levels[4] > 0) || current_value <= danger_levels[1])
+ return 2
+ if((current_value >= danger_levels[3] && danger_levels[3] > 0) || current_value <= danger_levels[2])
+ return 1
+ return 0
update_icon()
- src.updateDialog()
- return
+ if(wiresexposed)
+ icon_state = "alarmx"
+ return
+ if((stat & (NOPOWER|BROKEN)) || shorted)
+ icon_state = "alarmp"
+ return
+ switch(max(danger_level, alarm_area.atmosalm))
+ if (0)
+ icon_state = "alarm0"
+ if (1)
+ icon_state = "alarm2" //yes, alarm2 is yellow alarm
+ if (2)
+ icon_state = "alarm1"
-/obj/machinery/alarm/proc/pulse(var/wireColor)
- //var/wireFlag = AAlarmWireColorToFlag[wireColor] //not used in this function
- var/wireIndex = AAlarmWireColorToIndex[wireColor]
- switch(wireIndex)
- if(AALARM_WIRE_IDSCAN) //unlocks for 30 seconds, if you have a better way to hack I'm all ears
- src.locked = 0
- spawn(300)
- src.locked = 1
- //world << "Idscan wire pulsed"
+ receive_signal(datum/signal/signal)
+ if(stat & (NOPOWER|BROKEN))
+ return
+ if (alarm_area.master_air_alarm != src)
+ if (master_is_operating())
+ return
+ elect_master()
+ if (alarm_area.master_air_alarm != src)
+ return
+ if(!signal || signal.encryption)
+ return
+ var/id_tag = signal.data["tag"]
+ if (!id_tag)
+ return
+ if (signal.data["area"] != area_uid)
+ return
+ if (signal.data["sigtype"] != "status")
+ return
- if (AALARM_WIRE_POWER)
- // world << "Power wire pulsed"
- if(shorted == 0)
+ var/dev_type = signal.data["device"]
+ if(!(id_tag in alarm_area.air_scrub_names) && !(id_tag in alarm_area.air_vent_names))
+ register_env_machine(id_tag, dev_type)
+ if(dev_type == "AScr")
+ alarm_area.air_scrub_info[id_tag] = signal.data
+ else if(dev_type == "AVP")
+ alarm_area.air_vent_info[id_tag] = signal.data
+
+ proc/register_env_machine(var/m_id, var/device_type)
+ var/new_name
+ if (device_type=="AVP")
+ new_name = "[alarm_area.name] Vent Pump #[alarm_area.air_vent_names.len+1]"
+ alarm_area.air_vent_names[m_id] = new_name
+ else if (device_type=="AScr")
+ new_name = "[alarm_area.name] Air Scrubber #[alarm_area.air_scrub_names.len+1]"
+ alarm_area.air_scrub_names[m_id] = new_name
+ else
+ return
+ spawn (10)
+ send_signal(m_id, list("init" = new_name) )
+
+ proc/refresh_all()
+ for(var/id_tag in alarm_area.air_vent_names)
+ var/list/I = alarm_area.air_vent_info[id_tag]
+ if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
+ continue
+ send_signal(id_tag, list("status") )
+ for(var/id_tag in alarm_area.air_scrub_names)
+ var/list/I = alarm_area.air_scrub_info[id_tag]
+ if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
+ continue
+ send_signal(id_tag, list("status") )
+
+ proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_TO_AIRALARM)
+
+ proc/send_signal(var/target, var/list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
+ if(!radio_connection)
+ return 0
+
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.source = src
+
+ signal.data = command
+ signal.data["tag"] = target
+ signal.data["sigtype"] = "command"
+
+ radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
+ // world << text("Signal [] Broadcasted to []", command, target)
+
+ return 1
+
+ proc/apply_mode()
+ var/current_pressures = TLV["pressure"]
+ var/target_pressure = (current_pressures[2] + current_pressures[3])/2
+ switch(mode)
+ if(AALARM_MODE_SCRUBBING)
+ for(var/device_id in alarm_area.air_scrub_names)
+ send_signal(device_id, list("power"= 1, "co2_scrub"= 1, "scrubbing"= 1, "panic_siphon"= 0) )
+ for(var/device_id in alarm_area.air_vent_names)
+ send_signal(device_id, list("power"= 1, "checks"= 1, "set_external_pressure"= target_pressure) )
+
+ if(AALARM_MODE_PANIC, AALARM_MODE_CYCLE)
+ for(var/device_id in alarm_area.air_scrub_names)
+ send_signal(device_id, list("power"= 1, "panic_siphon"= 1) )
+ for(var/device_id in alarm_area.air_vent_names)
+ send_signal(device_id, list("power"= 0) )
+
+ if(AALARM_MODE_REPLACEMENT)
+ for(var/device_id in alarm_area.air_scrub_names)
+ send_signal(device_id, list("power"= 1, "panic_siphon"= 1) )
+ for(var/device_id in alarm_area.air_vent_names)
+ send_signal(device_id, list("power"= 1, "checks"= 1, "set_external_pressure"= target_pressure) )
+
+ if(AALARM_MODE_FILL)
+ for(var/device_id in alarm_area.air_scrub_names)
+ send_signal(device_id, list("power"= 0) )
+ for(var/device_id in alarm_area.air_vent_names)
+ send_signal(device_id, list("power"= 1, "checks"= 1, "set_external_pressure"= target_pressure) )
+
+ if(AALARM_MODE_OFF)
+ for(var/device_id in alarm_area.air_scrub_names)
+ send_signal(device_id, list("power"= 0) )
+ for(var/device_id in alarm_area.air_vent_names)
+ send_signal(device_id, list("power"= 0) )
+
+ proc/apply_danger_level(var/new_danger_level)
+ alarm_area.atmosalm = new_danger_level
+
+ for (var/area/A in alarm_area.related)
+ for (var/obj/machinery/alarm/AA in A)
+ if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
+ AA.update_icon()
+
+ if(danger_level > 1)
+ air_doors_close(0)
+ else
+ air_doors_open(0)
+
+ update_icon()
+
+ proc/air_doors_close(manual)
+ var/area/A = get_area(src)
+ if(!A.master.air_doors_activated)
+ A.master.air_doors_activated = 1
+ for(var/obj/machinery/door/E in A.master.all_doors)
+ if(istype(E,/obj/machinery/door/firedoor))
+ if(!E:blocked)
+ if(E.operating)
+ E:nextstate = CLOSED
+ else if(!E.density)
+ spawn(0)
+ E.close()
+ continue
+
+/* if(istype(E, /obj/machinery/door/airlock))
+ if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER) || E:air_locked) continue
+ if(!E.density)
+ spawn(0)
+ E.close()
+ spawn(10)
+ if(E.density)
+ E:air_locked = E.req_access
+ E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
+ E.update_icon()
+ else if(E.operating)
+ spawn(10)
+ E.close()
+ if(E.density)
+ E:air_locked = E.req_access
+ E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
+ E.update_icon()
+ else if(!E:locked) //Don't lock already bolted doors.
+ E:air_locked = E.req_access
+ E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
+ E.update_icon()*/
+
+ proc/air_doors_open(manual)
+ var/area/A = get_area(loc)
+ if(A.master.air_doors_activated)
+ A.master.air_doors_activated = 0
+ for(var/obj/machinery/door/E in A.master.all_doors)
+ if(istype(E, /obj/machinery/door/firedoor))
+ if(!E:blocked)
+ if(E.operating)
+ E:nextstate = OPEN
+ else if(E.density)
+ spawn(0)
+ E.open()
+ continue
+
+/* if(istype(E, /obj/machinery/door/airlock))
+ if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue
+ if(!isnull(E:air_locked)) //Don't mess with doors locked for other reasons.
+ E:req_access = E:air_locked
+ E:air_locked = null
+ E.update_icon()*/
+
+///////////
+//HACKING//
+///////////
+ proc/isWireColorCut(var/wireColor)
+ var/wireFlag = AAlarmWireColorToFlag[wireColor]
+ return ((AAlarmwires & wireFlag) == 0)
+
+ proc/isWireCut(var/wireIndex)
+ var/wireFlag = AAlarmIndexToFlag[wireIndex]
+ return ((AAlarmwires & wireFlag) == 0)
+
+ proc/cut(var/wireColor)
+ var/wireFlag = AAlarmWireColorToFlag[wireColor]
+ var/wireIndex = AAlarmWireColorToIndex[wireColor]
+ AAlarmwires &= ~wireFlag
+ switch(wireIndex)
+ if(AALARM_WIRE_IDSCAN)
+ locked = 1
+
+ if(AALARM_WIRE_POWER)
+ shock(usr, 50)
shorted = 1
update_icon()
- spawn(1200)
- if(shorted == 1)
- shorted = 0
+ if (AALARM_WIRE_AI_CONTROL)
+ if (aidisabled == 0)
+ aidisabled = 1
+
+ if(AALARM_WIRE_SYPHON)
+ mode = AALARM_MODE_PANIC
+ apply_mode()
+
+ if(AALARM_WIRE_AALARM)
+
+ if (alarm_area.atmosalert(2))
+ apply_danger_level(2)
+ spawn(1)
+ updateUsrDialog()
+ update_icon()
+
+ updateDialog()
+
+ return
+
+ proc/mend(var/wireColor)
+ var/wireFlag = AAlarmWireColorToFlag[wireColor]
+ var/wireIndex = AAlarmWireColorToIndex[wireColor] //not used in this function
+ AAlarmwires |= wireFlag
+ switch(wireIndex)
+ if(AALARM_WIRE_IDSCAN)
+
+ if(AALARM_WIRE_POWER)
+ shorted = 0
+ shock(usr, 50)
+ update_icon()
+
+ if(AALARM_WIRE_AI_CONTROL)
+ if (aidisabled == 1)
+ aidisabled = 0
+
+ updateDialog()
+ return
+
+ proc/pulse(var/wireColor)
+ //var/wireFlag = AAlarmWireColorToFlag[wireColor] //not used in this function
+ var/wireIndex = AAlarmWireColorToIndex[wireColor]
+ switch(wireIndex)
+ if(AALARM_WIRE_IDSCAN) //unlocks for 30 seconds, if you have a better way to hack I'm all ears
+ locked = 0
+ spawn(300)
+ locked = 1
+
+ if (AALARM_WIRE_POWER)
+ if(shorted == 0)
+ shorted = 1
update_icon()
+ spawn(1200)
+ if(shorted == 1)
+ shorted = 0
+ update_icon()
- if (AALARM_WIRE_AI_CONTROL)
- // world << "AI Control wire pulsed"
- if (src.aidisabled == 0)
- src.aidisabled = 1
- src.updateDialog()
- spawn(10)
- if (src.aidisabled == 1)
- src.aidisabled = 0
- src.updateDialog()
- if(AALARM_WIRE_SYPHON)
- // world << "Syphon wire pulsed"
- mode = AALARM_MODE_REPLACEMENT
- apply_mode()
+ if (AALARM_WIRE_AI_CONTROL)
+ if (aidisabled == 0)
+ aidisabled = 1
+ updateDialog()
+ spawn(10)
+ if (aidisabled == 1)
+ aidisabled = 0
+ updateDialog()
- if(AALARM_WIRE_AALARM)
- // world << "Aalarm wire pulsed"
- if (alarm_area.atmosalert(0))
- post_alert(0)
- spawn(1)
- src.updateUsrDialog()
- update_icon()
+ if(AALARM_WIRE_SYPHON)
+ mode = AALARM_MODE_REPLACEMENT
+ apply_mode()
- src.updateDialog()
- return
+ if(AALARM_WIRE_AALARM)
+ if (alarm_area.atmosalert(0))
+ apply_danger_level(0)
+ spawn(1)
+ updateUsrDialog()
+ update_icon()
-/obj/machinery/alarm/proc/shock(mob/user, prb)
- if((stat & (NOPOWER))) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0 //you lucked out, no shock for you
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start() //sparks always.
- if (electrocute_mob(user, get_area(src), src))
- return 1
- else
- return 0
+ updateDialog()
+ return
-/obj/machinery/alarm/proc/refresh_all()
- for(var/id_tag in alarm_area.air_vent_names)
- var/list/I = alarm_area.air_vent_info[id_tag]
- if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
- continue
- send_signal(id_tag, list("status") )
- for(var/id_tag in alarm_area.air_scrub_names)
- var/list/I = alarm_area.air_scrub_info[id_tag]
- if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
- continue
- send_signal(id_tag, list("status") )
+ proc/shock(mob/user, prb)
+ if((stat & (NOPOWER))) // unpowered, no shock
+ return 0
+ if(!prob(prb))
+ return 0 //you lucked out, no shock for you
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, src)
+ s.start() //sparks always.
+ if (electrocute_mob(user, get_area(src), src))
+ return 1
+ else
+ return 0
+///////////////
+//END HACKING//
+///////////////
-/obj/machinery/alarm/proc/set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- radio_connection = radio_controller.add_object(src, frequency, RADIO_TO_AIRALARM)
+ attack_ai(mob/user)
+ return interact(user)
-/obj/machinery/alarm/proc/send_signal(var/target, var/list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
- if(!radio_connection)
- return 0
+ attack_hand(mob/user)
+ . = ..()
+ if (.)
+ return
+ return interact(user)
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.source = src
+ interact(mob/user)
+ user.set_machine(src)
- signal.data = command
- signal.data["tag"] = target
- signal.data["sigtype"] = "command"
+ if ( (get_dist(src, user) > 1 ))
+ if (!istype(user, /mob/living/silicon))
+ user.machine = null
+ user << browse(null, "window=air_alarm")
+ user << browse(null, "window=AAlarmwires")
+ return
- radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
-// world << text("Signal [] Broadcasted to []", command, target)
- return 1
+ else if (istype(user, /mob/living/silicon) && aidisabled)
+ user << "AI control for this Air Alarm interface has been disabled."
+ user << browse(null, "window=air_alarm")
+ return
-/obj/machinery/alarm/proc/return_text()
- if(!(istype(usr, /mob/living/silicon)) && locked)
- return "[src][return_status()]
(Swipe ID card to unlock interface)"
- else
- return "[src][return_status()]
[return_controls()]"
+ if(wiresexposed && (!istype(user, /mob/living/silicon)))
+ var/t1 = text("[alarm_area.name] Air Alarm WiresAccess Panel
\n")
+ var/list/AAlarmwires = list(
+ "Orange" = 1,
+ "Dark red" = 2,
+ "White" = 3,
+ "Yellow" = 4,
+ "Black" = 5,
+ )
+ for(var/wiredesc in AAlarmwires)
+ var/is_uncut = AAlarmwires & AAlarmWireColorToFlag[AAlarmwires[wiredesc]]
+ t1 += "[wiredesc] wire: "
+ if(!is_uncut)
+ t1 += "Mend"
-/obj/machinery/alarm/proc/return_status()
- var/turf/location = src.loc
- var/datum/gas_mixture/environment = location.return_air()
- var/total = environment.oxygen + environment.carbon_dioxide + environment.toxins + environment.nitrogen
- var/output = "Air Status:
"
+ else
+ t1 += "Cut "
+ t1 += "Pulse "
- if(total == 0)
- output +={"Warning: Cannot obtain air sample for analysis."}
- return output
+ t1 += "
"
+ t1 += text("
\n[(locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]
\n[((shorted || (stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]
\n[(aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
+ t1 += text("Close
")
+ user << browse(t1, "window=AAlarmwires")
+ onclose(user, "AAlarmwires")
- output += {"
+ if(!shorted)
+ user << browse(return_text(user),"window=air_alarm")
+ onclose(user, "air_alarm")
+
+ return
+
+ proc/return_text(mob/user)
+ if(!(istype(user, /mob/living/silicon)) && locked)
+ return "\The [src][return_status()]
[rcon_text()]
(Swipe ID card to unlock interface)"
+ else
+ return "\The [src][return_status()]
[rcon_text()]
[return_controls()]"
+
+ proc/return_status()
+ var/turf/location = get_turf(src)
+ var/datum/gas_mixture/environment = location.return_air()
+ var/total = environment.oxygen + environment.carbon_dioxide + environment.toxins + environment.nitrogen
+ var/output = "Air Status:
"
+
+ if(total == 0)
+ output += "Warning: Cannot obtain air sample for analysis."
+ return output
+
+ output += {"
"}
- var/datum/tlv/cur_tlv
- var/GET_PP = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
- cur_tlv = TLV["pressure"]
- var/environment_pressure = environment.return_pressure()
- var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
+ var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
- cur_tlv = TLV["oxygen"]
- var/oxygen_dangerlevel = cur_tlv.get_danger_level(environment.oxygen*GET_PP)
- var/oxygen_percent = round(environment.oxygen / total * 100, 2)
+ var/list/current_settings = TLV["pressure"]
+ var/environment_pressure = environment.return_pressure()
+ var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
- cur_tlv = TLV["carbon dioxide"]
- var/co2_dangerlevel = cur_tlv.get_danger_level(environment.carbon_dioxide*GET_PP)
- var/co2_percent = round(environment.carbon_dioxide / total * 100, 2)
+ current_settings = TLV["oxygen"]
+ var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, current_settings)
+ var/oxygen_percent = round(environment.oxygen / total * 100, 2)
- cur_tlv = TLV["plasma"]
- var/plasma_dangerlevel = cur_tlv.get_danger_level(environment.toxins*GET_PP)
- var/plasma_percent = round(environment.toxins / total * 100, 2)
+ current_settings = TLV["carbon dioxide"]
+ var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, current_settings)
+ var/co2_percent = round(environment.carbon_dioxide / total * 100, 2)
- cur_tlv = TLV["other"]
- var/other_moles = 0.0
- for(var/datum/gas/G in environment.trace_gases)
- other_moles+=G.moles
- var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
+ current_settings = TLV["plasma"]
+ var/plasma_dangerlevel = get_danger_level(environment.toxins*partial_pressure, current_settings)
+ var/plasma_percent = round(environment.toxins / total * 100, 2)
- cur_tlv = TLV["temperature"]
- var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
+ current_settings = TLV["other"]
+ var/other_moles = 0.0
+ for(var/datum/gas/G in environment.trace_gases)
+ other_moles+=G.moles
+ var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
- output += {"
+ current_settings = TLV["temperature"]
+ var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
+
+ output += {"
Pressure: [environment_pressure]kPa
Oxygen: [oxygen_percent]%
Carbon dioxide: [co2_percent]%
Toxins: [plasma_percent]%
"}
- if (other_dangerlevel==2)
- output += {"Notice: High Concentration of Unknown Particles Detected
"}
- else if (other_dangerlevel==1)
- output += {"Notice: Low Concentration of Unknown Particles Detected
"}
+ if (other_dangerlevel==2)
+ output += "Notice: High Concentration of Unknown Particles Detected
"
+ else if (other_dangerlevel==1)
+ output += "Notice: Low Concentration of Unknown Particles Detected
"
- output += {"
-Temperature: [environment.temperature]K
-"}
+ output += "Temperature: [environment.temperature]K
"
- var/display_danger_level = max(
- pressure_dangerlevel,
- oxygen_dangerlevel,
- co2_dangerlevel,
- plasma_dangerlevel,
- other_dangerlevel,
- temperature_dangerlevel
- )
+ //Overall status
+ output += "Local Status: "
+ switch(max(pressure_dangerlevel,oxygen_dangerlevel,co2_dangerlevel,plasma_dangerlevel,other_dangerlevel,temperature_dangerlevel))
+ if(2)
+ output += "DANGER: Internals Required"
+ if(1)
+ output += "Caution"
+ if(0)
+ if(alarm_area.atmosalm)
+ output += {"Caution: Atmos alert in area"}
+ else
+ output += {"Optimal"}
- //Overall status
- output += {"Local Status: "}
- if(display_danger_level == 2)
- output += {"DANGER: Internals Required"}
- else if(display_danger_level == 1)
- output += {"Caution"}
- else if (alarm_area.atmosalm)
- output += {"Caution: Atmos alert in area"}
- else
- output += {"Optimal"}
+ return output
- return output
+ proc/rcon_text()
+ var/dat = "Remote Control:
"
+ if(rcon_setting == RCON_NO)
+ dat += "Off"
+ else
+ dat += "Off"
+ dat += " | "
+ if(rcon_setting == RCON_AUTO)
+ dat += "Auto"
+ else
+ dat += "Auto"
+ dat += " | "
+ if(rcon_setting == RCON_YES)
+ dat += "On"
+ else
+ dat += "On"
+ return dat
-/obj/machinery/alarm/proc/return_controls()
- var/output = ""//"[alarm_zone] Air [name]
"
+ proc/return_controls()
+ var/output = ""//"[alarm_zone] Air [name]
"
- switch(screen)
- if (AALARM_SCREEN_MAIN)
- if(alarm_area.atmosalm)
- output += {"Reset - Atmospheric Alarm
"}
- else
- output += {"Activate - Atmospheric Alarm
"}
+ switch(screen)
+ if (AALARM_SCREEN_MAIN)
+ if(alarm_area.atmosalm)
+ output += "Reset - Atmospheric Alarm
"
+ else
+ output += "Activate - Atmospheric Alarm
"
- output += {"
+ output += {"
Scrubbers Control
Vents Control
Set environmentals mode
Sensor Settings
"}
- if (mode==AALARM_MODE_PANIC)
- output += "PANIC SYPHON ACTIVE
Turn syphoning off"
- else
- output += "ACTIVATE PANIC SYPHON IN AREA"
- if (AALARM_SCREEN_VENT)
- var/sensor_data = ""
- if(alarm_area.air_vent_names.len)
- for(var/id_tag in alarm_area.air_vent_names)
- var/long_name = alarm_area.air_vent_names[id_tag]
- var/list/data = alarm_area.air_vent_info[id_tag]
- if(!data)
- continue;
- var/state = ""
-
- sensor_data += {"
-[long_name][state]
-Operating:
-[data["power"]?"on":"off"]
-
-Pressure checks:
-external
-internal
-
-External pressure bound:
--
--
--
--
-[data["external"]]
-+
-+
-+
-+
- (reset)
-
-"}
- if (data["direction"] == "siphon")
- sensor_data += {"
-Direction:
-siphoning
-
-"}
- sensor_data += {"
"}
- else
- sensor_data = "No vents connected.
"
- output = {"Main menu
[sensor_data]"}
- if (AALARM_SCREEN_SCRUB)
- var/sensor_data = ""
- if(alarm_area.air_scrub_names.len)
- for(var/id_tag in alarm_area.air_scrub_names)
- var/long_name = alarm_area.air_scrub_names[id_tag]
- var/list/data = alarm_area.air_scrub_info[id_tag]
- if(!data)
- continue;
- var/state = ""
-
- sensor_data += {"
-[long_name][state]
-Operating:
-[data["power"]?"on":"off"]
-Type:
-[data["scrubbing"]?"scrubbing":"syphoning"]
-"}
-
- if(data["scrubbing"])
- sensor_data += {"
-Filtering:
-Carbon Dioxide
-[data["filter_co2"]?"on":"off"];
-Toxins
-[data["filter_toxins"]?"on":"off"];
-Nitrous Oxide
-[data["filter_n2o"]?"on":"off"]
-
-"}
- sensor_data += {"
-Panic syphon: [data["panic"]?"PANIC SYPHON ACTIVATED":""]
-Dea":"red'>A")]ctivate
-
-"}
- else
- sensor_data = "No scrubbers connected.
"
- output = {"Main menu
[sensor_data]"}
-
- if (AALARM_SCREEN_MODE)
- output += {"
-Main menu
-Air machinery mode for the area:"}
- var/list/modes = list(
- AALARM_MODE_SCRUBBING = "Filtering",
- AALARM_MODE_VENTING = "Draught",
- AALARM_MODE_PANIC = "PANIC",
- AALARM_MODE_REPLACEMENT = "REPLACE AIR",
- AALARM_MODE_OFF = "Off",
- )
- for (var/m=1,m<=modes.len,m++)
- if (mode==m)
- output += {"- [modes[m]] (selected)
"}
+ if (mode==AALARM_MODE_PANIC)
+ output += "PANIC SYPHON ACTIVE
Turn syphoning off"
else
- output += {"- [modes[m]]
"}
- output += "
"
- if (AALARM_SCREEN_SENSORS)
- output += {"
+ output += "ACTIVATE PANIC SYPHON IN AREA"
+
+
+ if (AALARM_SCREEN_VENT)
+ var/sensor_data = ""
+ if(alarm_area.air_vent_names.len)
+ for(var/id_tag in alarm_area.air_vent_names)
+ var/long_name = alarm_area.air_vent_names[id_tag]
+ var/list/data = alarm_area.air_vent_info[id_tag]
+ if(!data)
+ continue;
+ var/state = ""
+
+ sensor_data += {"
+ [long_name][state]
+ Operating:
+ [data["power"]?"on":"off"]
+
+ Pressure checks:
+ external
+ internal
+
+ External pressure bound:
+ -
+ -
+ -
+ -
+ [data["external"]]
+ +
+ +
+ +
+ +
+ (reset)
+
+ "}
+ if (data["direction"] == "siphon")
+ sensor_data += {"
+ Direction:
+ siphoning
+
+ "}
+ sensor_data += {"
"}
+ else
+ sensor_data = "No vents connected.
"
+ output = {"Main menu
[sensor_data]"}
+ if (AALARM_SCREEN_SCRUB)
+ var/sensor_data = ""
+ if(alarm_area.air_scrub_names.len)
+ for(var/id_tag in alarm_area.air_scrub_names)
+ var/long_name = alarm_area.air_scrub_names[id_tag]
+ var/list/data = alarm_area.air_scrub_info[id_tag]
+ if(!data)
+ continue;
+ var/state = ""
+
+ sensor_data += {"
+ [long_name][state]
+ Operating:
+ [data["power"]?"on":"off"]
+ Type:
+ [data["scrubbing"]?"scrubbing":"syphoning"]
+ "}
+
+ if(data["scrubbing"])
+ sensor_data += {"
+ Filtering:
+ Carbon Dioxide
+ [data["filter_co2"]?"on":"off"];
+ Toxins
+ [data["filter_toxins"]?"on":"off"];
+ Nitrous Oxide
+ [data["filter_n2o"]?"on":"off"]
+
+ "}
+ sensor_data += {"
+ Panic syphon: [data["panic"]?"PANIC SYPHON ACTIVATED":""]
+ Dea":"red'>A")]ctivate
+
+ "}
+ else
+ sensor_data = "No scrubbers connected.
"
+ output = {"Main menu
[sensor_data]"}
+
+ if (AALARM_SCREEN_MODE)
+ output += "Main menu
Air machinery mode for the area:"
+ var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering",\
+ AALARM_MODE_REPLACEMENT = "REPLACE AIR",\
+ AALARM_MODE_PANIC = "PANIC",\
+ AALARM_MODE_CYCLE = "CYCLE",\
+ AALARM_MODE_FILL = "FILL",\
+ AALARM_MODE_OFF = "OFFF",)
+ for (var/m=1,m<=modes.len,m++)
+ if (mode==m)
+ output += "- [modes[m]] (selected)
"
+ else
+ output += "- [modes[m]]
"
+ output += "
"
+
+ if (AALARM_SCREEN_SENSORS)
+ output += {"
Main menu
Alarm thresholds:
Partial pressure for gases
@@ -631,404 +850,197 @@ table tr:first-child th:first-child { border: none;}
| min2 | min1 | max1 | max2 |
"}
- var/list/gases = list(
- "oxygen" = "O2",
- "carbon dioxide" = "CO2",
- "plasma" = "Toxin",
- "other" = "Other",
- )
- var/list/thresholds = list("min2", "min1", "max1", "max2")
- var/datum/tlv/tlv
- for (var/g in gases)
- output += {"
-| [gases[g]] |
-"}
- tlv = TLV[g]
- for (var/v in thresholds)
- output += {"
-
-[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]
- |
-"}
- output += {"
-
-"}
- tlv = TLV["pressure"]
- output += {"
-| Pressure |
-"}
- for (var/v in thresholds)
- output += {"
-
-[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]
- |
-"}
- output += {"
-
-"}
- tlv = TLV["temperature"]
- output += {"
-| Temperature |
-"}
- for (var/v in thresholds)
- output += {"
-
-[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]
- |
-"}
- output += {"
-
-"}
- output += {"
"}
+ var/list/gases = list(
+ "oxygen" = "O2",
+ "carbon dioxide" = "CO2",
+ "plasma" = "Toxin",
+ "other" = "Other",)
- return output
+ var/list/selected
+ for (var/g in gases)
+ output += "| [gases[g]] | "
+ selected = TLV[g]
+ for(var/i = 1, i <= 4, i++)
+ output += "[selected[i] >= 0 ? selected[i] :"OFF"] | "
+ output += "
"
-/obj/machinery/alarm/Topic(href, href_list)
- if(..())
- return
- src.add_fingerprint(usr)
- usr.set_machine(src)
+ selected = TLV["pressure"]
+ output += " | Pressure | "
+ for(var/i = 1, i <= 4, i++)
+ output += "[selected[i] >= 0 ? selected[i] :"OFF"] | "
+ output += "
"
- if ( (get_dist(src, usr) > 1 ))
- if (!istype(usr, /mob/living/silicon))
- usr.unset_machine()
- usr << browse(null, "window=air_alarm")
- usr << browse(null, "window=AAlarmwires")
- return
+ selected = TLV["temperature"]
+ output += "| Temperature | "
+ for(var/i = 1, i <= 4, i++)
+ output += "[selected[i] >= 0 ? selected[i] :"OFF"] | "
+ output += "
"
- if (href_list["AAlarmwires"])
- var/t1 = text2num(href_list["AAlarmwires"])
- if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
- usr << "You need wirecutters!"
- return
- if (src.isWireColorCut(t1))
- src.mend(t1)
- else
- src.cut(t1)
- spawn(1)
- src.updateUsrDialog()
- else if (href_list["pulse"])
- var/t1 = text2num(href_list["pulse"])
- if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
- usr << "You need a multitool!"
- return
- if (src.isWireColorCut(t1))
- usr << "You can't pulse a cut wire."
- return
- else
- src.pulse(t1)
- spawn(1)
- src.updateUsrDialog()
+ return output
+ Topic(href, href_list)
+ if(href_list["rcon"])
+ rcon_setting = text2num(href_list["rcon"])
- if(href_list["command"])
- var/device_id = href_list["id_tag"]
- switch(href_list["command"])
- if(
- "power",
- "adjust_external_pressure",
- "set_external_pressure",
- "checks",
- "co2_scrub",
- "tox_scrub",
- "n2o_scrub",
- "panic_siphon",
- "scrubbing"
- )
- send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
- spawn(3)
- src.updateUsrDialog()
+ if ( (get_dist(src, usr) > 1 ))
+ if (!istype(usr, /mob/living/silicon))
+ usr.machine = null
+ usr << browse(null, "window=air_alarm")
+ usr << browse(null, "window=AAlarmwires")
+ return
- //if("adjust_threshold") //was a good idea but required very wide window
- if("set_threshold")
- var/env = href_list["env"]
- var/varname = href_list["var"]
- var/datum/tlv/tlv = TLV[env]
- var/newval = input("Enter [varname] for env", "Alarm triggers", tlv.vars[varname]) as num|null
+ add_fingerprint(usr)
+ usr.machine = src
- if (isnull(newval) || ..() || (locked && !issilicon(usr)))
- return
- if (newval<0)
- tlv.vars[varname] = -1.0
- else if (env=="temperature" && newval>5000)
- tlv.vars[varname] = 5000
- else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
- tlv.vars[varname] = 50*ONE_ATMOSPHERE
- else if (env!="temperature" && env!="pressure" && newval>200)
- tlv.vars[varname] = 200
- else
- newval = round(newval,0.01)
- tlv.vars[varname] = newval
- spawn(1)
- src.updateUsrDialog()
+ if(href_list["command"])
+ var/device_id = href_list["id_tag"]
+ switch(href_list["command"])
+ if( "power",
+ "adjust_external_pressure",
+ "set_external_pressure",
+ "checks",
+ "co2_scrub",
+ "tox_scrub",
+ "n2o_scrub",
+ "panic_siphon",
+ "scrubbing")
- if(href_list["screen"])
- screen = text2num(href_list["screen"])
- spawn(1)
- src.updateUsrDialog()
+ send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
+ if("set_threshold")
+ var/env = href_list["env"]
+ var/threshold = text2num(href_list["var"])
+ var/list/selected = TLV[env]
+ var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
+ var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
+ if (isnull(newval) || ..() || (locked && issilicon(usr)))
+ return
+ if (newval<0)
+ selected[threshold] = -1.0
+ else if (env=="temperature" && newval>5000)
+ selected[threshold] = 5000
+ else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
+ selected[threshold] = 50*ONE_ATMOSPHERE
+ else if (env!="temperature" && env!="pressure" && newval>200)
+ selected[threshold] = 200
+ else
+ newval = round(newval,0.01)
+ selected[threshold] = newval
+ if(threshold == 1)
+ if(selected[1] > selected[2])
+ selected[2] = selected[1]
+ if(selected[1] > selected[3])
+ selected[3] = selected[1]
+ if(selected[1] > selected[4])
+ selected[4] = selected[1]
+ if(threshold == 2)
+ if(selected[1] > selected[2])
+ selected[1] = selected[2]
+ if(selected[2] > selected[3])
+ selected[3] = selected[2]
+ if(selected[2] > selected[4])
+ selected[4] = selected[2]
+ if(threshold == 3)
+ if(selected[1] > selected[3])
+ selected[1] = selected[3]
+ if(selected[2] > selected[3])
+ selected[2] = selected[3]
+ if(selected[3] > selected[4])
+ selected[4] = selected[3]
+ if(threshold == 4)
+ if(selected[1] > selected[4])
+ selected[1] = selected[4]
+ if(selected[2] > selected[4])
+ selected[2] = selected[4]
+ if(selected[3] > selected[4])
+ selected[3] = selected[4]
- if(href_list["atmos_alarm"])
- if (alarm_area.atmosalert(2))
- post_alert(2)
- spawn(1)
- src.updateUsrDialog()
- update_icon()
- if(href_list["atmos_reset"])
- if (alarm_area.atmosalert(0))
- post_alert(0)
- spawn(1)
- src.updateUsrDialog()
- update_icon()
+ //Sets the temperature the built-in heater/cooler tries to maintain.
+ if(env == "temperature")
+ target_temperature = (selected[2] + selected[3])/2
- if(href_list["mode"])
- mode = text2num(href_list["mode"])
- apply_mode()
- spawn(5)
- src.updateUsrDialog()
+ apply_mode()
- return
+ if(href_list["screen"])
+ screen = text2num(href_list["screen"])
-/obj/machinery/alarm/proc/apply_mode()
- switch(mode)
- if(AALARM_MODE_SCRUBBING)
- for(var/device_id in alarm_area.air_scrub_names)
- send_signal(device_id, list(
- "power"= 1,
- "co2_scrub"= 1,
- "scrubbing"= 1,
- "panic_siphon"= 0,
- ))
- for(var/device_id in alarm_area.air_vent_names)
- send_signal(device_id, list(
- "power"= 1,
- "checks"= 1,
- "set_external_pressure"= ONE_ATMOSPHERE
- ))
+ if(href_list["atmos_unlock"])
+ switch(href_list["atmos_unlock"])
+ if("0")
+ air_doors_close(1)
+ if("1")
+ air_doors_open(1)
- if(AALARM_MODE_VENTING)
- for(var/device_id in alarm_area.air_scrub_names)
- send_signal(device_id, list(
- "power"= 1,
- "panic_siphon"= 0,
- "scrubbing"= 0
- ))
- for(var/device_id in alarm_area.air_vent_names)
- send_signal(device_id, list(
- "power"= 1,
- "checks"= 1,
- "set_external_pressure"= ONE_ATMOSPHERE
- ))
- if(
- AALARM_MODE_PANIC,
- AALARM_MODE_REPLACEMENT
- )
- for(var/device_id in alarm_area.air_scrub_names)
- send_signal(device_id, list(
- "power"= 1,
- "panic_siphon"= 1
- ))
- for(var/device_id in alarm_area.air_vent_names)
- send_signal(device_id, list(
- "power"= 0
- ))
- /*if(AALARM_MODE_OFF) Commented out cause the "turn off panic" uses scrubbing mode now instead.
- for(var/device_id in alarm_area.air_scrub_names)
- send_signal(device_id, list(
- "panic_siphon" = 0
- ))
- for(var/device_id in alarm_area.air_vent_names)
- send_signal(device_id, list(
- "power"= 1
- ))*/
+ if(href_list["atmos_alarm"])
+ if (alarm_area.atmosalert(2))
+ apply_danger_level(2)
+ update_icon()
-/obj/machinery/alarm/update_icon()
- if(wiresexposed)
- switch(buildstage)
- if(2)
- if(src.AAlarmwires == 0) // All wires cut
- icon_state = "alarm_b2"
- else
- icon_state = "alarmx"
- if(1)
- icon_state = "alarm_b2"
- if(0)
- icon_state = "alarm_b1"
- return
+ if(href_list["atmos_reset"])
+ if (alarm_area.atmosalert(0))
+ apply_danger_level(0)
+ update_icon()
- if((stat & (NOPOWER|BROKEN)) || shorted)
- icon_state = "alarmp"
- return
- switch(max(danger_level, alarm_area.atmosalm))
- if (0)
- src.icon_state = "alarm0"
- if (1)
- src.icon_state = "alarm2" //yes, alarm2 is yellow alarm
- if (2)
- src.icon_state = "alarm1"
+ if(href_list["mode"])
+ mode = text2num(href_list["mode"])
+ apply_mode()
-/obj/machinery/alarm/process()
- if((stat & (NOPOWER|BROKEN)) || shorted)
- return
+ if (href_list["AAlarmwires"])
+ var/t1 = text2num(href_list["AAlarmwires"])
+ if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
+ usr << "You need wirecutters!"
+ return
+ if (isWireColorCut(t1))
+ mend(t1)
+ else
+ cut(t1)
- var/turf/simulated/location = src.loc
- if (!istype(location))
- return 0
+ else if (href_list["pulse"])
+ var/t1 = text2num(href_list["pulse"])
+ if (!istype(usr.equipped(), /obj/item/device/multitool))
+ usr << "You need a multitool!"
+ return
+ if (isWireColorCut(t1))
+ usr << "You can't pulse a cut wire."
+ return
+ else
+ pulse(t1)
- var/datum/gas_mixture/environment = location.return_air()
+ updateUsrDialog()
- var/datum/tlv/cur_tlv
- var/GET_PP = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
-
- cur_tlv = TLV["pressure"]
- var/environment_pressure = environment.return_pressure()
- var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
-
- cur_tlv = TLV["oxygen"]
- var/oxygen_dangerlevel = cur_tlv.get_danger_level(environment.oxygen*GET_PP)
-
- cur_tlv = TLV["carbon dioxide"]
- var/co2_dangerlevel = cur_tlv.get_danger_level(environment.carbon_dioxide*GET_PP)
-
- cur_tlv = TLV["plasma"]
- var/plasma_dangerlevel = cur_tlv.get_danger_level(environment.toxins*GET_PP)
-
- cur_tlv = TLV["other"]
- var/other_moles = 0.0
- for(var/datum/gas/G in environment.trace_gases)
- other_moles+=G.moles
- var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
-
- cur_tlv = TLV["temperature"]
- var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
-
- var/old_danger_level = danger_level
- danger_level = max(
- pressure_dangerlevel,
- oxygen_dangerlevel,
- co2_dangerlevel,
- plasma_dangerlevel,
- other_dangerlevel,
- temperature_dangerlevel
- )
- if (old_danger_level!=danger_level)
- apply_danger_level()
-
- if (mode==AALARM_MODE_REPLACEMENT && environment_pressureNo Party :(", src)
else
d1 = text("PARTY!!!", src)
- if (src.timing)
+ if (timing)
d2 = text("Stop Time Lock", src)
else
d2 = text("Initiate Time Lock", src)
- var/second = src.time % 60
- var/minute = (src.time - second) / 60
+ var/second = time % 60
+ var/minute = (time - second) / 60
var/dat = text("Party Button []\n
\nTimer System: []
\nTime Left: [][] - - + +\n", d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
user << browse(dat, "window=partyalarm")
onclose(user, "partyalarm")
else
- A = A.loc
if (A.fire)
d1 = text("[]", src, stars("No Party :("))
else
d1 = text("[]", src, stars("PARTY!!!"))
- if (src.timing)
+ if (timing)
d2 = text("[]", src, stars("Stop Time Lock"))
else
d2 = text("[]", src, stars("Initiate Time Lock"))
- var/second = src.time % 60
- var/minute = (src.time - second) / 60
+ var/second = time % 60
+ var/minute = (time - second) / 60
var/dat = text("[] []\n
\nTimer System: []
\nTime Left: [][] - - + +\n", stars("Party Button"), d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
user << browse(dat, "window=partyalarm")
onclose(user, "partyalarm")
return
/obj/machinery/partyalarm/proc/reset()
- if (!( src.working ))
- return
- var/area/A = src.loc
- A = A.loc
- if (!( istype(A, /area) ))
+ if (!( working ))
return
+ var/area/A = get_area(src)
+ ASSERT(isarea(A))
+ if(A.master)
+ A = A.master
A.partyreset()
return
/obj/machinery/partyalarm/proc/alarm()
- if (!( src.working ))
- return
- var/area/A = src.loc
- A = A.loc
- if (!( istype(A, /area) ))
+ if (!( working ))
return
+ var/area/A = get_area(src)
+ ASSERT(isarea(A))
+ if(A.master)
+ A = A.master
A.partyalert()
return
@@ -1521,25 +1534,25 @@ Code shamelessly copied from apc_frame
..()
if (usr.stat || stat & (BROKEN|NOPOWER))
return
- if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
- usr.set_machine(src)
+ if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
+ usr.machine = src
if (href_list["reset"])
- src.reset()
+ reset()
else
if (href_list["alarm"])
- src.alarm()
+ alarm()
else
if (href_list["time"])
- src.timing = text2num(href_list["time"])
+ timing = text2num(href_list["time"])
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
- src.time += tp
- src.time = min(max(round(src.time), 0), 120)
- src.updateUsrDialog()
+ time += tp
+ time = min(max(round(time), 0), 120)
+ updateUsrDialog()
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
else
usr << browse(null, "window=partyalarm")
return
- return
+ return
\ No newline at end of file
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index d43f7657f2c..5fdfc357490 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -18,6 +18,14 @@
use_power = 0
var/release_log = ""
+/obj/machinery/portable_atmospherics/initialize()
+ . = ..()
+ spawn()
+ var/obj/machinery/atmospherics/portables_connector/connector = locate() in loc
+ if(connector)
+ connected_port = connector
+ update_icon()
+
/obj/machinery/portable_atmospherics/canister/sleeping_agent
name = "Canister: \[N2O\]"
icon_state = "redws"
diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm
index 3e970a580c6..47b27ac54bd 100644
--- a/code/game/machinery/bots/cleanbot.dm
+++ b/code/game/machinery/bots/cleanbot.dm
@@ -225,7 +225,6 @@ text("[src.oddbutton ? "Yes" : "No"
next_dest_loc = closest_loc
if (next_dest_loc)
src.patrol_path = AStar(src.loc, next_dest_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=null)
- src.patrol_path = reverselist(src.patrol_path)
else
patrol_move()
@@ -235,7 +234,6 @@ text("[src.oddbutton ? "Yes" : "No"
spawn(0)
if(!src || !target) return
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 0, 30)
- src.path = reverselist(src.path)
if(src.path.len == 0)
src.oldtarget = src.target
src.target = null
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index a833c8f10bd..30aa8a4e64d 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -615,7 +615,6 @@ Auto Patrol: []"},
// given an optional turf to avoid
/obj/machinery/bot/ed209/proc/calc_path(var/turf/avoid = null)
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
- src.path = reverselist(src.path)
// look for a criminal in view of the bot
diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm
index ef582351570..5881f08ce28 100644
--- a/code/game/machinery/bots/farmbot.dm
+++ b/code/game/machinery/bots/farmbot.dm
@@ -357,7 +357,6 @@
var/turf/dest = get_step_towards(target,src) //Can't pathfind to a tray, as it is dense, so pathfind to the spot next to the tray
src.path = AStar(src.loc, dest, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
- src.path = reverselist(src.path)
if(src.path.len == 0)
for ( var/turf/spot in orange(1,target) ) //The closest one is unpathable, try the other spots
if ( spot == dest ) //We already tried this spot
diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm
index 986728f5c66..bb984a1787b 100644
--- a/code/game/machinery/bots/floorbot.dm
+++ b/code/game/machinery/bots/floorbot.dm
@@ -244,7 +244,6 @@
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
else
src.path = AStar(src.loc, src.target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
- src.path = reverselist(src.path)
if(src.path.len == 0)
src.oldtarget = src.target
src.target = null
diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index df7b8b0ff81..71cccfdc3ee 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -299,7 +299,6 @@
if(src.patient && src.path.len == 0 && (get_dist(src,src.patient) > 1))
spawn(0)
src.path = AStar(src.loc, get_turf(src.patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
- src.path = reverselist(src.path)
if(src.path.len == 0)
src.oldpatient = src.patient
src.patient = null
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index c21e2554899..3496b6723a7 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -706,7 +706,8 @@
// given an optional turf to avoid
/obj/machinery/bot/mulebot/proc/calc_path(var/turf/avoid = null)
src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, id=botcard, exclude=avoid)
- src.path = reverselist(src.path)
+ if(!src.path)
+ src.path = list()
// sets the current destination
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index fb599c35ccb..19a43f41cc7 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -583,7 +583,6 @@ Auto Patrol: []"},
// given an optional turf to avoid
/obj/machinery/bot/secbot/proc/calc_path(var/turf/avoid = null)
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
- src.path = reverselist(src.path)
// look for a criminal in view of the bot
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 6640def45cd..124239dc82b 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -197,6 +197,7 @@
if(H.dna)
H.dna.mutantrace = mrace
H.update_mutantrace()
+ H.update_mutantrace_languages()
H.suiciding = 0
src.attempting = 0
return 1
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 935cae8240f..e8d4078593e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1169,7 +1169,7 @@ About the new airlock wires panel:
return
src.add_fingerprint(user)
- if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
+ if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0,user))
if(!src.welded)
@@ -1198,7 +1198,7 @@ About the new airlock wires panel:
beingcrowbarred = 1 //derp, Agouri
else
beingcrowbarred = 0
- if( beingcrowbarred && (density && welded && !operating && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
+ if( beingcrowbarred && (operating == -1 || density && welded && operating != 1 && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40))
@@ -1243,6 +1243,9 @@ About the new airlock wires panel:
ae = electronics
electronics = null
ae.loc = src.loc
+ if(operating == -1)
+ ae.icon_state = "door_electronics_smoked"
+ operating = 0
del(src)
return
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index c09dbfdf682..9ac8ad6c7f4 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -18,6 +18,7 @@
var/glass = 0
var/normalspeed = 1
var/heat_proof = 0 // For glass airlocks/opacity firedoors
+ var/air_properties_vary_with_direction = 0
/obj/machinery/door/New()
..()
@@ -218,7 +219,7 @@
/obj/machinery/door/proc/close()
if(density) return 1
- if(operating) return
+ if(operating > 0) return
operating = 1
animate("closing")
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 07a3a1b9b83..9566cd6db40 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -234,6 +234,7 @@
glass = 1 //There is a glass window so you can see through the door
//This is needed due to BYOND limitations in controlling visibility
heat_proof = 1
+ air_properties_vary_with_direction = 1
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 55aef446eaa..45ff776d401 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -11,6 +11,7 @@
opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null
explosion_resistance = 5
+ air_properties_vary_with_direction = 1
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm
index fb5cc1575af..a0d9c847b2f 100644
--- a/code/game/machinery/embedded_controller/access_controller.dm
+++ b/code/game/machinery/embedded_controller/access_controller.dm
@@ -153,6 +153,7 @@ obj/machinery/embedded_controller/radio/access_controller
name = "Access Console"
density = 0
power_channel = ENVIRON
+ unacidable = 1
frequency = 1449
diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm
index a997dcfdac0..9aa6a5a8e96 100644
--- a/code/game/machinery/embedded_controller/airlock_controller.dm
+++ b/code/game/machinery/embedded_controller/airlock_controller.dm
@@ -262,6 +262,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
name = "Airlock Console"
density = 0
+ unacidable = 1
frequency = 1449
power_channel = ENVIRON
diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm
index f43031884da..f226d33f9ef 100644
--- a/code/game/machinery/embedded_controller/simple_vent_controller.dm
+++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm
@@ -44,6 +44,7 @@
name = "Vent Controller"
density = 0
+ unacidable = 1
frequency = 1229
power_channel = ENVIRON
diff --git a/code/game/machinery/embedded_controller/smart_airlock_controller.dm b/code/game/machinery/embedded_controller/smart_airlock_controller.dm
new file mode 100644
index 00000000000..032c1fa82c5
--- /dev/null
+++ b/code/game/machinery/embedded_controller/smart_airlock_controller.dm
@@ -0,0 +1,369 @@
+//States for airlock_control
+#define AIRLOCK_STATE_WAIT 0
+#define AIRLOCK_STATE_DEPRESSURIZE 1
+#define AIRLOCK_STATE_PRESSURIZE 2
+
+#define AIRLOCK_TARGET_INOPEN -1
+#define AIRLOCK_TARGET_NONE 0
+#define AIRLOCK_TARGET_OUTOPEN 1
+
+datum/computer/file/embedded_program/smart_airlock_controller
+ var/id_tag
+ var/tag_exterior_door
+ var/tag_interior_door
+ var/tag_airpump
+ var/tag_chamber_sensor
+ var/tag_exterior_sensor
+ var/tag_interior_sensor
+ //var/sanitize_external
+
+ state = AIRLOCK_STATE_WAIT
+ var/target_state = AIRLOCK_TARGET_NONE
+
+datum/computer/file/embedded_program/smart_airlock_controller/New()
+ ..()
+ memory["chamber_sensor_pressure"] = ONE_ATMOSPHERE
+ memory["external_sensor_pressure"] = ONE_ATMOSPHERE
+ memory["internal_sensor_pressure"] = ONE_ATMOSPHERE
+ memory["exterior_status"] = "unknown"
+ memory["interior_status"] = "unknown"
+ memory["pump_status"] = "unknown"
+ memory["target_pressure"] = ONE_ATMOSPHERE
+
+datum/computer/file/embedded_program/smart_airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
+ var/receive_tag = signal.data["tag"]
+ if(!receive_tag) return
+
+ if(receive_tag==tag_chamber_sensor)
+ if(signal.data["pressure"])
+ memory["chamber_sensor_pressure"] = text2num(signal.data["pressure"])
+
+ else if(receive_tag==tag_exterior_sensor)
+ if(signal.data["pressure"])
+ memory["external_sensor_pressure"] = text2num(signal.data["pressure"])
+
+ else if(receive_tag==tag_interior_sensor)
+ if(signal.data["pressure"])
+ memory["internal_sensor_pressure"] = text2num(signal.data["pressure"])
+
+ else if(receive_tag==tag_exterior_door)
+ memory["exterior_status"] = signal.data["door_status"]
+
+ else if(receive_tag==tag_interior_door)
+ memory["interior_status"] = signal.data["door_status"]
+
+ else if(receive_tag==tag_airpump)
+ if(signal.data["power"])
+ memory["pump_status"] = signal.data["direction"]
+ else
+ memory["pump_status"] = "off"
+
+ else if(receive_tag==id_tag)
+ switch(signal.data["command"])
+ if("cycle_exterior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_OUTOPEN
+ if("cycle_interior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_INOPEN
+
+ master.updateDialog()
+
+datum/computer/file/embedded_program/smart_airlock_controller/receive_user_command(command)
+ var/shutdown_pump = 0
+ switch(command)
+ if("cycle_closed")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_NONE
+ if(memory["interior_status"] != "closed")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_interior_door
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
+ if(memory["exterior_status"] != "closed")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_exterior_door
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
+ shutdown_pump = 1
+ if("open_interior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_NONE
+ if(memory["interior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_interior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ if("close_interior")
+ if(memory["interior_status"] != "closed")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_interior_door
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
+ shutdown_pump = 1
+ if("close_exterior")
+ if(memory["exterior_status"] != "closed")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_exterior_door
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
+ shutdown_pump = 1
+ if("open_exterior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_NONE
+ if(memory["exterior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_exterior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ if("cycle_exterior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_OUTOPEN
+ if("cycle_interior")
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_INOPEN
+
+ if(shutdown_pump)
+ //send a signal to stop pressurizing
+ if(memory["pump_status"] != "off")
+ var/datum/signal/signal = new
+ signal.data = list(
+ "tag" = tag_airpump,
+ "power" = 0,
+ "sigtype"="command"
+ )
+ post_signal(signal)
+ master.updateDialog()
+
+datum/computer/file/embedded_program/smart_airlock_controller/process()
+ var/process_again = 1
+ while(process_again)
+ process_again = 0
+
+ if(!state && target_state)
+ //we're ready to do stuff, now what do we want to do?
+ switch(target_state)
+ if(AIRLOCK_TARGET_INOPEN)
+ memory["target_pressure"] = memory["internal_sensor_pressure"]
+ if(AIRLOCK_TARGET_OUTOPEN)
+ memory["target_pressure"] = memory["external_sensor_pressure"]
+
+ //work out whether we need to pressurize or depressurize the chamber (5% leeway with target pressure)
+ var/chamber_pressure = memory["chamber_sensor_pressure"]
+ var/target_pressure = memory["target_pressure"]
+ if(chamber_pressure <= target_pressure)
+ state = AIRLOCK_STATE_PRESSURIZE
+
+ //send a signal to start pressurizing
+ var/datum/signal/signal = new
+ signal.data = list(
+ "tag" = tag_airpump,
+ "sigtype"="command",
+ "power"=1,
+ "direction"=1,
+ "set_external_pressure"=target_pressure
+ )
+ post_signal(signal)
+
+ else if(chamber_pressure > target_pressure)
+ state = AIRLOCK_STATE_DEPRESSURIZE
+
+ //send a signal to start depressurizing
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.data = list(
+ "tag" = tag_airpump,
+ "sigtype"="command",
+ "power"=1,
+ "direction"=0,
+ "set_external_pressure"=target_pressure
+ )
+ post_signal(signal)
+
+ //actually do stuff
+ //override commands are handled elsewhere, otherwise everything proceeds automatically
+ switch(state)
+ if(AIRLOCK_STATE_PRESSURIZE)
+ if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
+ if(target_state < 0)
+ if(memory["interior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_interior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ else if(target_state > 0)
+ if(memory["exterior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_exterior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_NONE
+
+ //send a signal to stop pumping
+ if(memory["pump_status"] != "off")
+ var/datum/signal/signal = new
+ signal.data = list(
+ "tag" = tag_airpump,
+ "sigtype"="command",
+ "power" = 0
+ )
+ post_signal(signal)
+ master.updateDialog()
+
+ if(AIRLOCK_STATE_DEPRESSURIZE)
+ if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
+ if(target_state > 0)
+ if(memory["exterior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_exterior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ else if(target_state < 0)
+ if(memory["interior_status"] != "open")
+ var/datum/signal/signal = new
+ signal.data["tag"] = tag_interior_door
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ state = AIRLOCK_STATE_WAIT
+ target_state = AIRLOCK_TARGET_NONE
+
+ //send a signal to stop pumping
+ if(memory["pump_status"] != "off")
+ var/datum/signal/signal = new
+ signal.data = list(
+ "tag" = tag_airpump,
+ "sigtype"="command",
+ "power" = 0
+ )
+ post_signal(signal)
+ master.updateDialog()
+
+ //memory["sensor_pressure"] = sensor_pressure
+ memory["processing"] = state != target_state
+ //sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
+
+ return 1
+
+
+obj/machinery/embedded_controller/radio/smart_airlock_controller
+ icon = 'icons/obj/airlock_machines.dmi'
+ icon_state = "airlock_control_standby"
+
+ name = "Cycling Airlock Console"
+ density = 0
+ unacidable = 1
+ frequency = 1449
+ power_channel = ENVIRON
+
+ // Setup parameters only
+ var/id_tag
+ var/tag_exterior_door
+ var/tag_interior_door
+ var/tag_airpump
+ var/tag_chamber_sensor
+ var/tag_exterior_sensor
+ var/tag_interior_sensor
+ //var/sanitize_external
+
+ initialize()
+ ..()
+
+ var/datum/computer/file/embedded_program/smart_airlock_controller/new_prog = new
+
+ new_prog.id_tag = id_tag
+ new_prog.tag_exterior_door = tag_exterior_door
+ new_prog.tag_interior_door = tag_interior_door
+ new_prog.tag_airpump = tag_airpump
+ new_prog.tag_chamber_sensor = tag_chamber_sensor
+ new_prog.tag_exterior_sensor = tag_exterior_sensor
+ new_prog.tag_interior_sensor = tag_interior_sensor
+ //new_prog.sanitize_external = sanitize_external
+
+ new_prog.master = src
+ program = new_prog
+
+ update_icon()
+ if(on && program)
+ if(program.memory["processing"])
+ icon_state = "airlock_control_process"
+ else
+ icon_state = "airlock_control_standby"
+ else
+ icon_state = "airlock_control_off"
+
+
+ return_text()
+ var/state_options = ""
+
+ var/state = 0
+ var/chamber_sensor_pressure = "----"
+ var/external_sensor_pressure = "----"
+ var/internal_sensor_pressure = "----"
+ var/exterior_status = "----"
+ var/interior_status = "----"
+ var/pump_status = "----"
+ var/target_pressure = "----"
+ if(program)
+ state = program.state
+ chamber_sensor_pressure = program.memory["chamber_sensor_pressure"]
+ external_sensor_pressure = program.memory["external_sensor_pressure"]
+ internal_sensor_pressure = program.memory["internal_sensor_pressure"]
+ exterior_status = program.memory["exterior_status"]
+ interior_status = program.memory["interior_status"]
+ pump_status = program.memory["pump_status"]
+ target_pressure = program.memory["target_pressure"]
+
+ var/exterior_closed = 0
+ if(exterior_status == "closed")
+ exterior_closed = 1
+ var/interior_closed = 0
+ if(interior_status == "closed")
+ interior_closed = 1
+
+ state_options += "Exterior status: [exterior_status] ([external_sensor_pressure] kPa)
"
+ if(exterior_closed)
+ state_options += "Open exterior airlock "
+ if(abs(chamber_sensor_pressure - external_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
+ state_options += "WARNING"
+ state_options += "
"
+ if(!state && exterior_closed && interior_closed)
+ state_options += "Cycle to Exterior Airlock
"
+ else
+ state_options += "
"
+ else
+ state_options += "Close exterior airlock
"
+ state_options += "
"
+
+ state_options += "Interior status: [interior_status] ([internal_sensor_pressure] kPa)
"
+ if(interior_closed)
+ state_options += "Open interior airlock "
+ if(abs(chamber_sensor_pressure - internal_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
+ state_options += "WARNING"
+ state_options += "
"
+ if(!state && exterior_closed && interior_closed)
+ state_options += "Cycle to Interior Airlock
"
+ else
+ state_options += "
"
+ else
+ state_options += "Close interior airlock
"
+ state_options += "
"
+
+ state_options += "
"
+ state_options += "Chamber Pressure: [chamber_sensor_pressure] kPa
"
+ state_options += "Target Chamber Pressure: [target_pressure] kPa
"
+ state_options += "Control Pump: [pump_status]
"
+ if(state)
+ state_options += "Abort Cycling
"
+ else
+ state_options += "
"
+
+ return state_options
+
+#undef AIRLOCK_STATE_PRESSURIZE
+#undef AIRLOCK_STATE_WAIT
+#undef AIRLOCK_STATE_DEPRESSURIZE
+
+#undef AIRLOCK_TARGET_INOPEN
+#undef AIRLOCK_TARGET_CLOSED
+#undef AIRLOCK_TARGET_OUTOPEN
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 10002bc570b..d50cc775ca4 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -99,4 +99,32 @@ obj/machinery/recharger/update_icon() //we have an update_icon() in addition to
if(charging)
icon_state = "recharger1"
else
- icon_state = "recharger0"
\ No newline at end of file
+ icon_state = "recharger0"
+
+obj/machinery/recharger/wallcharger
+ name = "wall recharger"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "wrecharger0"
+
+obj/machinery/recharger/wallcharger/process()
+ if(stat & (NOPOWER|BROKEN) || !anchored)
+ return
+
+ if(charging)
+ if(istype(charging, /obj/item/weapon/gun/energy))
+ var/obj/item/weapon/gun/energy/E = charging
+ if(E.power_supply.charge < E.power_supply.maxcharge)
+ E.power_supply.give(100)
+ icon_state = "wrecharger1"
+ use_power(250)
+ else
+ icon_state = "wrecharger2"
+ return
+ if(istype(charging, /obj/item/weapon/melee/baton))
+ var/obj/item/weapon/melee/baton/B = charging
+ if(B.charges < initial(B.charges))
+ B.charges++
+ icon_state = "wrecharger1"
+ use_power(150)
+ else
+ icon_state = "wrecharger2"
\ No newline at end of file
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index a27544b47c1..9a6849dcdf4 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -83,6 +83,10 @@
attack_hand(mob/user as mob)
src.add_fingerprint(user)
+ interact(user)
+
+ interact(mob/user as mob)
+
if(open)
var/dat
@@ -127,7 +131,7 @@
var/value = text2num(href_list["val"])
// limit to 20-90 degC
- set_temperature = dd_range(20, 90, set_temperature + value)
+ set_temperature = dd_range(0, 90, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
@@ -164,7 +168,7 @@
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
- if(env.temperature < (set_temperature+T0C))
+ if(env.temperature != set_temperature + T0C)
var/transfer_moles = 0.25 * env.total_moles()
@@ -176,10 +180,12 @@
var/heat_capacity = removed.heat_capacity()
//world << "heating ([heat_capacity])"
- if(heat_capacity == 0 || heat_capacity == null) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
- heat_capacity = 1
- removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
- cell.use(heating_power/20000)
+ if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
+ if(removed.temperature < set_temperature + T0C)
+ removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
+ else
+ removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB)
+ cell.use(heating_power/20000)
//world << "now at [removed.temperature]"
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 754d758248b..0845b0ba73b 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -148,6 +148,15 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
+
+ if(connection.frequency == ERT_FREQ)
+ Broadcast_Message(signal.data["connection"], signal.data["mob"],
+ signal.data["vmask"], signal.data["vmessage"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
+
+
else
if(intercept)
Broadcast_Message(signal.data["connection"], signal.data["mob"],
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
index 0cd533cf274..2fe5b5e3a64 100644
--- a/code/game/machinery/telecomms/presets.dm
+++ b/code/game/machinery/telecomms/presets.dm
@@ -24,12 +24,18 @@
toggled = 0
autolinkers = list("r_relay")
+/obj/machinery/telecomms/relay/preset/centcom
+ id = "Centcom Relay"
+ hide = 1
+ toggled = 0
+ autolinkers = list("c_relay")
+
//HUB
/obj/machinery/telecomms/hub/preset
id = "Hub"
network = "tcommsat"
- autolinkers = list("hub", "relay", "s_relay", "m_relay", "r_relay", "science", "medical",
+ autolinkers = list("hub", "relay", "c_relay", "s_relay", "m_relay", "r_relay", "science", "medical",
"supply", "common", "command", "engineering", "security",
"receiverA", "receiverB", "broadcasterA", "broadcasterB")
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 59abc057a29..d98d57de30b 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -774,7 +774,7 @@
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
- /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3)
+ /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
premium = list(/obj/item/toy/waterflower = 1)
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index 2ad11bb0214..84bff5cffc4 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -110,4 +110,15 @@
return
-
+/obj/mecha/working/ripley/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/fluff/sven_fjeltson_1))//this shit broke ripleys
+ src.icon_state = "earth"
+ src.initial_icon = "earth"
+ src.name = "APLU \"Strike the Earth!\""
+ src.desc = "Looks like an over worked, under maintained Ripley with some horrific damage."
+ user << "You pick up your old \"Strike the Earth!\" APLU."
+ user.drop_item()
+ del(W)
+ return
+ else
+ ..()
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index 1c6fe70e8c0..ba63563d7c5 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -84,3 +84,45 @@
icon_state = icon_closed
else
icon_state = icon_opened
+
+
+/obj/item/bodybag/cryobag
+ name = "stasis bag"
+ desc = "A folded, non-reusable bag designed for the preservation of an occupant's brain by stasis."
+ icon = 'icons/obj/cryobag.dmi'
+ icon_state = "bodybag_folded"
+
+
+ attack_self(mob/user)
+ var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
+ R.add_fingerprint(user)
+ del(src)
+
+
+
+/obj/structure/closet/body_bag/cryobag
+ name = "stasis bag"
+ desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
+ icon = 'icons/obj/cryobag.dmi'
+ icon_state = "bodybag_closed"
+ icon_closed = "bodybag_closed"
+ icon_opened = "bodybag_open"
+ density = 0
+
+ var/used = 0
+
+ open()
+ . = ..()
+ if(used)
+ var/obj/item/O = new/obj/item(src.loc)
+ O.name = "used stasis bag"
+ O.icon = src.icon
+ O.icon_state = "bodybag_used"
+ O.desc = "Pretty useless now.."
+ del(src)
+
+ MouseDrop(over_object, src_location, over_location)
+ if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
+ if(!ishuman(usr)) return
+ usr << "\red You can't fold that up anymore.."
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm
new file mode 100644
index 00000000000..7a05fc696a9
--- /dev/null
+++ b/code/game/objects/items/devices/debugger.dm
@@ -0,0 +1,45 @@
+/**
+ * Multitool -- A multitool is used for hacking electronic devices.
+ * TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
+ *
+ */
+
+/obj/item/device/debugger
+ icon = 'icons/obj/hacktool.dmi'
+ name = "debugger"
+ desc = "Used to debug electronic equipment."
+ icon_state = "hacktool-g"
+ flags = FPRINT | TABLEPASS| CONDUCT
+ force = 5.0
+ w_class = 2.0
+ throwforce = 5.0
+ throw_range = 15
+ throw_speed = 3
+ desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
+ m_amt = 50
+ g_amt = 20
+ origin_tech = "magnets=1;engineering=1"
+ var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
+
+/obj/item/device/debugger/is_used_on(obj/O, mob/user)
+ if(istype(O, /obj/machinery/power/apc))
+ var/obj/machinery/power/apc/A = O
+ if(A.emagged || A.malfhack)
+ user << "\red There is a software error with the device."
+ else
+ user << "\blue The device's software appears to be fine."
+ return 1
+ if(istype(O, /obj/machinery/door))
+ var/obj/machinery/door/D = O
+ if(D.operating == -1)
+ user << "\red There is a software error with the device."
+ else
+ user << "\blue The device's software appears to be fine."
+ return 1
+ else if(istype(O, /obj/machinery))
+ var/obj/machinery/A = O
+ if(A.emagged)
+ user << "\red There is a software error with the device."
+ else
+ user << "\blue The device's software appears to be fine."
+ return 1
\ No newline at end of file
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index d79a76507a5..82abc09f7ea 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -76,9 +76,9 @@
M.updatehealth()
/obj/item/stack/medical/bruise_pack
- name = "bruise pack"
- singular_name = "bruise pack"
- desc = "A pack designed to treat blunt-force trauma."
+ name = "roll of gauze"
+ singular_name = "gauze length"
+ desc = "Some sterile gauze to wrap around bloody stumps."
icon_state = "brutepack"
heal_brute = 60
origin_tech = "biotech=1"
diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm
index 5b0be916c35..026ddb77f5f 100644
--- a/code/game/objects/items/stacks/nanopaste.dm
+++ b/code/game/objects/items/stacks/nanopaste.dm
@@ -14,8 +14,8 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss() )
- R.adjustBruteLoss(-60)
- R.adjustFireLoss(-60)
+ R.adjustBruteLoss(-15)
+ R.adjustFireLoss(-15)
R.updatehealth()
use(1)
user.visible_message("\The [user] applied some [src] at [R]'s damaged areas.",\
@@ -28,7 +28,7 @@
var/datum/organ/external/S = H.get_organ(user.zone_sel.selecting)
if (S && (S.status & ORGAN_ROBOT))
if(S.get_damage())
- S.heal_damage(30, 30, robo_repair = 1)
+ S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
user.visible_message("\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src].",\
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 42fe0a3e4ca..c76ff2511f6 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -114,6 +114,33 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
pixel_y = rand(0,4)-4
..()
+/obj/item/stack/sheet/mineral/plastic
+ name = "Plastic"
+ icon_state = "sheet-plastic"
+ force = 5.0
+ throwforce = 5
+ w_class = 3.0
+ throw_speed = 3
+ throw_range = 3
+ origin_tech = "materials=3"
+ perunit = 2000
+ sheettype = "plastic"
+
+var/global/list/datum/stack_recipe/plastic_recipes = list ( \
+ new/datum/stack_recipe("plastic crate", /obj/structure/closet/pcrate, 10, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
+ new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
+ new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
+ new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
+ )
+
+/obj/item/stack/sheet/mineral/plastic/New(var/loc, var/amount=null)
+ recipes = plastic_recipes
+ pixel_x = rand(0,4)-4
+ pixel_y = rand(0,4)-4
+ ..()
+
/*
* Gold
*/
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 6c3814a8010..dd4d2662a7d 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -556,6 +556,7 @@
name = "toy phazon"
desc = "Mini-Mecha action figure! Collect them all! 11/11."
icon_state = "phazonprize"
+
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
@@ -575,4 +576,4 @@
desc = "This baby looks almost real. Wait, did it just burp?"
force = 5
w_class = 4.0
- slot_flags = SLOT_BACK
+ slot_flags = SLOT_BACK
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 649a4fe713c..aeb3e86227d 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -119,7 +119,7 @@
/obj/item/weapon/card/id/syndicate
name = "agent card"
- access = list(access_maint_tunnels, access_syndicate)
+ access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
origin_tech = "syndicate=3"
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
@@ -156,7 +156,7 @@
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
- access = list(access_syndicate)
+ access = list(access_syndicate, access_external_airlocks)
/obj/item/weapon/card/id/captains_spare
name = "captain's spare ID"
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index c21601d0230..a68276a3100 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -40,6 +40,12 @@
icon_state = "spoon"
attack_verb = list("attacked", "poked")
+/obj/item/weapon/kitchen/utensil/pspoon
+ name = "plastic spoon"
+ desc = "Super dull action!"
+ icon_state = "pspoon"
+ attack_verb = list("attacked", "poked")
+
/*
* Forks
*/
@@ -71,6 +77,34 @@
M = user
return eyestab(M,user)
+/obj/item/weapon/kitchen/utensil/pfork
+ name = "plastic fork"
+ desc = "Yay, no washing up to do."
+ icon_state = "pfork"
+
+/obj/item/weapon/kitchen/utensil/pfork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return ..()
+
+ if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
+ return ..()
+
+ if (src.icon_state == "forkloaded") //This is a poor way of handling it, but a proper rewrite of the fork to allow for a more varied foodening can happen when I'm in the mood. --NEO
+ if(M == user)
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\blue [] eats a delicious forkful of omelette!", user), 1)
+ M.reagents.add_reagent("nutriment", 1)
+ else
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\blue [] feeds [] a delicious forkful of omelette!", user, M), 1)
+ M.reagents.add_reagent("nutriment", 1)
+ src.icon_state = "fork"
+ return
+ else
+ if((CLUMSY in user.mutations) && prob(50))
+ M = user
+ return eyestab(M,user)
+
/*
* Knives
*/
@@ -95,6 +129,21 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
+/obj/item/weapon/kitchen/utensil/pknife
+ name = "plastic knife"
+ desc = "The bluntest of blades."
+ icon_state = "pknife"
+ force = 10.0
+ throwforce = 10.0
+
+/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
+ if ((CLUMSY in user.mutations) && prob(50))
+ user << "\red You somehow managed to cut yourself with the [src]."
+ user.take_organ_damage(20)
+ return
+ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
+ return ..()
+
/*
* Kitchen knives
*/
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index ebaebdcabe0..706102d6145 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -38,7 +38,6 @@
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
-
/obj/item/weapon/storage/bag/trash/update_icon()
if(contents.len == 0)
icon_state = "trashbag0"
@@ -48,6 +47,24 @@
icon_state = "trashbag2"
else icon_state = "trashbag3"
+
+// -----------------------------
+// Plastic Bag
+// -----------------------------
+
+/obj/item/weapon/storage/bag/plasticbag
+ name = "plastic bag"
+ desc = "It's a very flimsy, very noisy alternative to a bag."
+ icon = 'icons/obj/trash.dmi'
+ icon_state = "plasticbag"
+ item_state = "plasticbag"
+
+ w_class = 4
+ max_w_class = 2
+ storage_slots = 21
+ can_hold = list() // any
+ cant_hold = list("/obj/item/weapon/disk/nuclear")
+
// -----------------------------
// Mining Satchel
// -----------------------------
diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm
index a5874f09855..1369bb15759 100644
--- a/code/game/objects/items/weapons/storage/firstaid.dm
+++ b/code/game/objects/items/weapons/storage/firstaid.dm
@@ -106,6 +106,7 @@
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice")
allow_quick_gather = 1
use_to_pickup = 1
+ storage_slots = 14
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index bc79c6634f2..24d622bff1a 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -75,13 +75,13 @@
else
user.take_organ_damage(2*force)
return
+/*this is already called in ..()
src.add_fingerprint(user)
-
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
+*/
if (user.a_intent == "hurt")
if(!..()) return
playsound(src.loc, "swing_hit", 50, 1, -1)
@@ -90,13 +90,88 @@
M.Stun(8)
M.Weaken(8)
for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\red [M] has been beaten with the police baton by [user]!", 1, "\red You hear someone fall", 2)
+ if (O.client) O.show_message("\red [M] has been beaten with \the [src] by [user]!", 1, "\red You hear someone fall", 2)
else
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
M.Stun(5)
M.Weaken(5)
+ M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
+ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
+ log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
+ src.add_fingerprint(user)
+
for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\red [M] has been stunned with the police baton by [user]!", 1, "\red You hear someone fall", 2)
+ if (O.client) O.show_message("\red [M] has been stunned with \the [src] by [user]!", 1, "\red You hear someone fall", 2)
+
+//Telescopic baton
+/obj/item/weapon/melee/telebaton
+ name = "telescopic baton"
+ desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "telebaton_0"
+ item_state = "telebaton_0"
+ flags = FPRINT | TABLEPASS
+ slot_flags = SLOT_BELT
+ w_class = 2
+ force = 3
+ var/on = 0
+
+
+/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
+ on = !on
+ if(on)
+ user.visible_message("\red With a flick of their wrist, [user] extends their telescopic baton.",\
+ "\red You extend the baton.",\
+ "You hear an ominous click.")
+ icon_state = "telebaton_1"
+ item_state = "telebaton_1"
+ w_class = 4
+ force = 15//quite robust
+ attack_verb = list("smacked", "struck", "slapped")
+ else
+ user.visible_message("\blue [user] collapses their telescopic baton.",\
+ "\blue You collapse the baton.",\
+ "You hear a click.")
+ icon_state = "telebaton_0"
+ item_state = "telebaton_0"
+ w_class = 2
+ force = 3//not so robust now
+ attack_verb = list("hit", "punched")
+ playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ add_fingerprint(user)
+
+ if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
+ overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
+
+ var/icon/I = new /icon(src.icon, src.icon_state)
+ I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
+ I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
+ blood_overlay = I
+
+ overlays += blood_overlay
+
+ return
+
+/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
+ if(on)
+ if ((CLUMSY in user.mutations) && prob(50))
+ user << "\red You club yourself over the head."
+ user.Weaken(3 * force)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ H.apply_damage(2*force, BRUTE, "head")
+ else
+ user.take_organ_damage(2*force)
+ return
+
+ if(!..()) return
+ playsound(src.loc, "swing_hit", 50, 1, -1)
+ //target.Stun(4) //naaah
+ target.Weaken(4)
+ return
+ else
+ return ..()
+
/*
*Energy Blade
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 66cb1998d0a..d68a7b3c8d3 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -16,6 +16,8 @@
var/damtype = "brute"
var/force = 0
+/obj/item/proc/is_used_on(obj/O, mob/user)
+
/obj/proc/process()
processing_objects.Remove(src)
return 0
diff --git a/code/game/objects/structures/crates_lockers/closets/fitness.dm b/code/game/objects/structures/crates_lockers/closets/fitness.dm
index 1aec0343fd7..182a9aa84c0 100644
--- a/code/game/objects/structures/crates_lockers/closets/fitness.dm
+++ b/code/game/objects/structures/crates_lockers/closets/fitness.dm
@@ -12,6 +12,11 @@
new /obj/item/clothing/under/shorts/red(src)
new /obj/item/clothing/under/shorts/blue(src)
new /obj/item/clothing/under/shorts/green(src)
+ new /obj/item/clothing/under/swimsuit/red(src)
+ new /obj/item/clothing/under/swimsuit/black(src)
+ new /obj/item/clothing/under/swimsuit/blue(src)
+ new /obj/item/clothing/under/swimsuit/green(src)
+ new /obj/item/clothing/under/swimsuit/purple(src)
/obj/structure/closet/boxinggloves
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 3c359125002..4342e231403 100644
--- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm
@@ -19,10 +19,12 @@
sleep(2)
new /obj/item/clothing/head/that(src)
new /obj/item/clothing/head/that(src)
+ new /obj/item/clothing/head/hairflower
new /obj/item/clothing/under/sl_suit(src)
new /obj/item/clothing/under/sl_suit(src)
new /obj/item/clothing/under/rank/bartender(src)
new /obj/item/clothing/under/rank/bartender(src)
+ new /obj/item/clothing/under/dress/dress_saloon
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/shoes/black(src)
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 7883038d5d8..3309b5b54d1 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm
@@ -91,7 +91,10 @@
new /obj/item/clothing/under/rank/medical/purple(src)
new /obj/item/clothing/head/surgery/purple(src)
new /obj/item/clothing/under/rank/medical(src)
+ new /obj/item/clothing/under/rank/nurse(src)
+ new /obj/item/clothing/under/rank/orderly(src)
new /obj/item/clothing/suit/storage/labcoat(src)
+ new /obj/item/clothing/suit/storage/fr_jacket(src)
new /obj/item/clothing/shoes/white(src)
// new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
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 9da76e62c60..f6ad799900d 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -16,6 +16,7 @@
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
+ new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest(src)
@@ -26,6 +27,8 @@
new /obj/item/clothing/gloves/captain(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/suit/armor/captain(src)
+ new /obj/item/weapon/melee/telebaton(src)
+ new /obj/item/clothing/under/dress/dress_cap(src)
return
@@ -43,17 +46,41 @@
New()
..()
sleep(2)
- new /obj/item/clothing/under/rank/head_of_personnel(src)
+ new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/weapon/cartridge/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
- new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids( src )
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/device/flash(src)
- new /obj/item/clothing/glasses/sunglasses(src)
+ return
+
+/obj/structure/closet/secure_closet/hop2
+ name = "Head of Personnel's Attire"
+ req_access = list(access_hop)
+ icon_state = "hopsecure1"
+ icon_closed = "hopsecure"
+ icon_locked = "hopsecure1"
+ icon_opened = "hopsecureopen"
+ icon_broken = "hopsecurebroken"
+ icon_off = "hopsecureoff"
+
+ New()
+ ..()
+ sleep(2)
+ new /obj/item/clothing/under/rank/head_of_personnel(src)
+ new /obj/item/clothing/under/dress/dress_hop(src)
+ new /obj/item/clothing/under/dress/dress_hr(src)
+ new /obj/item/clothing/under/lawyer/female(src)
+ new /obj/item/clothing/under/lawyer/black(src)
+ new /obj/item/clothing/under/lawyer/red(src)
+ new /obj/item/clothing/under/lawyer/oldman(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/leather(src)
+ new /obj/item/clothing/shoes/white(src)
return
@@ -75,6 +102,7 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
+ new /obj/item/clothing/head/helmet/HoS(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
@@ -90,6 +118,7 @@
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/waist(src)
+ new /obj/item/weapon/melee/telebaton(src)
return
diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
index 71fc5324fde..dd3bb5a6b33 100644
--- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
@@ -26,6 +26,8 @@
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
+ new /obj/item/clothing/under/rank/dispatch(src)
+ new /obj/item/clothing/under/rank/dispatch(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
@@ -84,6 +86,7 @@
new /obj/item/clothing/suit/chaplain_hoodie(src)
new /obj/item/clothing/head/chaplain_hood(src)
new /obj/item/clothing/suit/holidaypriest(src)
+ new /obj/item/clothing/under/wedding/bride_white(src)
new /obj/item/weapon/storage/backpack/cultpack (src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/weapon/storage/fancy/candle_box(src)
@@ -104,6 +107,19 @@
new /obj/item/clothing/shoes/black(src)
return
+/obj/structure/closet/wardrobe/xenos
+ name = "xenos wardrobe"
+ icon_state = "green"
+ icon_closed = "green"
+
+/obj/structure/closet/wardrobe/xenos/New()
+ new /obj/item/clothing/suit/unathi/mantle(src)
+ new /obj/item/clothing/suit/unathi/robe(src)
+ new /obj/item/clothing/shoes/sandal(src)
+ new /obj/item/clothing/shoes/sandal(src)
+ new /obj/item/clothing/shoes/sandal(src)
+ return
+
/obj/structure/closet/wardrobe/orange
name = "prison wardrobe"
@@ -328,13 +344,18 @@
icon_closed = "mixed"
/obj/structure/closet/wardrobe/mixed/New()
- new /obj/item/clothing/under/color/white(src)
new /obj/item/clothing/under/color/blue(src)
new /obj/item/clothing/under/color/yellow(src)
new /obj/item/clothing/under/color/green(src)
new /obj/item/clothing/under/color/orange(src)
new /obj/item/clothing/under/color/pink(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/under/dress/plaid_blue(src)
+ new /obj/item/clothing/under/dress/plaid_red(src)
+ new /obj/item/clothing/under/dress/plaid_purple(src)
+ new /obj/item/clothing/shoes/blue(src)
+ new /obj/item/clothing/shoes/yellow(src)
+ new /obj/item/clothing/shoes/green(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/purple(src)
+ new /obj/item/clothing/shoes/leather(src)
return
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 0026aa53165..61b1750a82f 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -14,6 +14,20 @@
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
+/obj/structure/closet/pcrate
+ name = "plastic crate"
+ desc = "A rectangular plastic crate."
+ icon = 'icons/obj/storage.dmi'
+ icon_state = "plasticcrate"
+ density = 1
+ icon_opened = "plasticcrateopen"
+ icon_closed = "plasticcrate"
+ req_access = null
+ opened = 0
+ flags = FPRINT
+// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
+ var/rigged = 0
+
/obj/structure/closet/crate/internals
desc = "A internals crate."
name = "Internals crate"
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index ea06d19ed60..7ece9970d55 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -349,7 +349,7 @@ obj/structure/door_assembly
src.state = 0
src.name = "Secured Airlock Assembly"
- else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
+ else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
user.drop_item()
diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm
index eebe9fb343c..83df96a7280 100644
--- a/code/game/objects/structures/lamarr_cage.dm
+++ b/code/game/objects/structures/lamarr_cage.dm
@@ -89,9 +89,16 @@
/obj/structure/lamarr/proc/Break()
if(occupied)
- var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc )
- A.sterile = 1
- A.name = "Lamarr"
+ new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
occupied = 0
update_icon()
+ return
+
+/obj/item/clothing/mask/facehugger/lamarr
+ name = "Lamarr"
+ desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
+ sterile = 1
+ gender = FEMALE
+
+/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
return
\ No newline at end of file
diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm
index 5e85802b1fa..54630d3c4a3 100644
--- a/code/game/objects/structures/transit_tubes.dm
+++ b/code/game/objects/structures/transit_tubes.dm
@@ -150,6 +150,17 @@ obj/structure/ex_act(severity)
pod_moving = 1
close_animation()
sleep(CLOSE_DURATION + 2)
+
+ //reverse directions for automated cycling
+ var/turf/next_loc = get_step(loc, pod.dir)
+ var/obj/structure/transit_tube/nexttube
+ for(var/obj/structure/transit_tube/tube in next_loc)
+ if(tube.has_entrance(pod.dir))
+ nexttube = tube
+ break
+ if(!nexttube)
+ pod.dir = turn(pod.dir, 180)
+
if(icon_state == "closed" && pod)
pod.follow_tube()
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 9064b51c930..28791229725 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -105,12 +105,12 @@
if(reinf) new /obj/item/stack/rods(loc)
del(src)
else if (usr.a_intent == "hurt")
- playsound(src.loc, 'Glassknock.ogg', 80, 1)
+ playsound(src.loc, 'glassknock.ogg', 80, 1)
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
"\red You bang against the [src.name]!", \
"You hear a banging sound.")
else
- playsound(src.loc, 'Glassknock.ogg', 80, 1)
+ playsound(src.loc, 'glassknock.ogg', 80, 1)
usr.visible_message("[usr.name] knocks on the [src.name].", \
"You knock on the [src.name].", \
"You hear a knocking sound.")
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 5d055f1a8cb..f06eb81ba32 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -3,6 +3,7 @@
desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
+ var/rotting = 0
opacity = 1
density = 1
blocks_air = 1
@@ -59,9 +60,11 @@
P.roll_and_drop(src)
else
O.loc = src
+
ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/wall/ex_act(severity)
+ if(rotting) severity = 1.0
switch(severity)
if(1.0)
//SN src = null
@@ -84,7 +87,7 @@
return
/turf/simulated/wall/blob_act()
- if(prob(50))
+ if(prob(50) || rotting)
dismantle_wall()
/turf/simulated/wall/attack_paw(mob/user as mob)
@@ -103,11 +106,11 @@
/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
if(M.wall_smash)
- if (istype(src, /turf/simulated/wall/r_wall))
+ if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
M << text("\blue This wall is far too strong for you to destroy.")
return
else
- if (prob(40))
+ if (prob(40) || rotting)
M << text("\blue You smash through the wall.")
dismantle_wall(1)
return
@@ -120,7 +123,7 @@
/turf/simulated/wall/attack_hand(mob/user as mob)
if (HULK in user.mutations)
- if (prob(40))
+ if (prob(40) || rotting)
usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
@@ -129,6 +132,11 @@
usr << text("\blue You punch the wall.")
return
+ if(rotting)
+ user << "\blue The wall crumbles under your touch."
+ dismantle_wall()
+ return
+
user << "\blue You push the wall but nothing happens!"
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user)
@@ -143,6 +151,21 @@
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
+ if(rotting)
+ if(istype(W, /obj/item/weapon/weldingtool) )
+ var/obj/item/weapon/weldingtool/WT = W
+ if( WT.remove_fuel(0,user) )
+ user << "You burn away the fungi with \the [WT]."
+ playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
+ for(var/obj/effect/E in src) if(E.name == "Wallrot")
+ del E
+ rotting = 0
+ return
+ else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
+ user << "\The [src] crumbles away under the force of your [W.name]."
+ src.dismantle_wall(1)
+ return
+
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) )
@@ -284,6 +307,24 @@
return attack_hand(user)
return
+// Wall-rot effect, a nasty fungus that destroys walls.
+/turf/simulated/wall/proc/rot()
+ if(!rotting)
+ rotting = 1
+
+ var/number_rots = rand(2,3)
+ for(var/i=0, iYou burn away the fungi with \the [WT]."
+ playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
+ for(var/obj/effect/E in src) if(E.name == "Wallrot")
+ del E
+ rotting = 0
+ return
+ else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
+ user << "\The [src] crumbles away under the force of your [W.name]."
+ src.dismantle_wall()
+ return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
diff --git a/code/global.dm b/code/global.dm
index 3a81f7bac43..cd6e374a94f 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -27,6 +27,12 @@ var/global/list/global_map = null
//////////////
+var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
+ "big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
+ "table","td","th","tr")
+var/list/paper_blacklist = list("java","onblur","onchange","onclick","ondblclick","onfocus","onkeydown", \
+ "onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \
+ "onmouseup","onreset","onselect","onsubmit","onunload")
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 6f6abd1d977..25daafc9f41 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -64,6 +64,7 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_rejuvenate,
/client/proc/toggleattacklogs,
+ /client/proc/toggledebuglogs,
/datum/admins/proc/show_skills,
/client/proc/check_customitem_activity
)
@@ -133,7 +134,9 @@ var/list/admin_verbs_debug = list(
/client/proc/air_report,
/client/proc/reload_admins,
/client/proc/restart_controller,
- /client/proc/enable_debug_verbs
+ /client/proc/enable_debug_verbs,
+ /client/proc/callproc,
+ /client/proc/toggledebuglogs
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -221,6 +224,7 @@ var/list/admin_verbs_mod = list(
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
+ /client/proc/toggledebuglogs,
/datum/admins/proc/PlayerNotes,
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/cmd_mod_say,
@@ -720,4 +724,15 @@ var/list/admin_verbs_mod = list(
if (prefs.toggles & CHAT_ATTACKLOGS)
usr << "You now will get attack log messages"
else
- usr << "You now won't get attack log messages"
\ No newline at end of file
+ usr << "You now won't get attack log messages"
+
+
+/client/proc/toggledebuglogs()
+ set name = "Toggle Debug Log Messages"
+ set category = "Preferences"
+
+ prefs.toggles ^= CHAT_DEBUGLOGS
+ if (prefs.toggles & CHAT_DEBUGLOGS)
+ usr << "You now will get debug log messages"
+ else
+ usr << "You now won't get debug log messages"
\ No newline at end of file
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 7dd3407ce79..292327ca274 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -10,7 +10,7 @@
switch(href_list["makeAntag"])
if("1")
log_admin("[key_name(usr)] has spawned a traitor.")
- if(!src.makeTratiors())
+ if(!src.makeTraitors())
usr << "\red Unfortunatly there were no candidates available"
if("2")
log_admin("[key_name(usr)] has spawned a changeling.")
diff --git a/code/modules/admin/verbs/BrokenInhands.dm b/code/modules/admin/verbs/BrokenInhands.dm
index 6339d3c0113..43f6d0b7931 100644
--- a/code/modules/admin/verbs/BrokenInhands.dm
+++ b/code/modules/admin/verbs/BrokenInhands.dm
@@ -13,24 +13,24 @@
var/list/istates = J.IconStates()
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state))
if(O.icon_state)
- text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n"
+ text += "[O.type] is missing left hand icon called \"[O.icon_state]\".\n"
if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state))
if(O.icon_state)
- text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n"
+ text += "[O.type] is missing right hand icon called \"[O.icon_state]\".\n"
if(O.icon_state)
if(!istates.Find(O.icon_state))
- text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n"
- if(O.item_state)
- if(!istates.Find(O.item_state))
- text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
- text+="\n"
+ text += "[O.type] is missing normal icon called \"[O.icon_state]\" in \"[O.icon]\".\n"
+ //if(O.item_state)
+ // if(!istates.Find(O.item_state))
+ // text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
+ //text+="\n"
del(O)
if(text)
var/F = file("broken_icons.txt")
fdel(F)
F << text
- world << "Completely successfully and written to [F]"
+ world << "Completeled successfully and written to [F]"
diff --git a/code/modules/admin/verbs/check_customitem_activity.dm b/code/modules/admin/verbs/check_customitem_activity.dm
index a39ce0fd535..1bda56c6e58 100644
--- a/code/modules/admin/verbs/check_customitem_activity.dm
+++ b/code/modules/admin/verbs/check_customitem_activity.dm
@@ -55,7 +55,7 @@ var/inactive_keys = "None
"
//run a query to get all ckeys inactive for over 2 months
var/list/inactive_ckeys = list()
if(ckeys_with_customitems.len)
- var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(),lastseen) > 2")
+ var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60")
query_inactive.Execute()
while(query_inactive.NextRow())
var/cur_ckey = query_inactive.item[1]
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index ef5c02be9a0..9e9c8bf5c6a 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -547,13 +547,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
"assassin",
"death commando",
"syndicate commando",
- "centcom official",
- "centcom commander",
"special ops officer",
"blue wizard",
"red wizard",
"marisa wizard",
"emergency rescue team",
+ "nanotrasen representative",
+ "nanotrasen officer",
+ "nanotrasen captain"
)
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
if (isnull(dresscode))
@@ -742,54 +743,79 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("syndicate commando")
M.equip_syndicate_commando()
- if("centcom official")
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
- M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/weapon/pen(M), slot_l_store)
+ if("nanotrasen representative")
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
+ M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
- pda.ownjob = "CentCom Review Official"
+ pda.ownjob = "NanoTrasen Navy Representative"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
- M.equip_to_slot_or_del(pda, slot_r_store)
-
- M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_l_hand)
+ M.equip_if_possible(pda, slot_r_store)
+ M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
+ M.equip_if_possible(new /obj/item/weapon/clipboard(M), slot_belt)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
+ W.item_state = "id_inv"
W.access = get_all_accesses()
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
- W.assignment = "CentCom Review Official"
+ W.assignment = "NanoTrasen Navy Representative"
W.registered_name = M.real_name
- M.equip_to_slot_or_del(W, slot_wear_id)
+ M.equip_if_possible(W, slot_wear_id)
- if("centcom commander")
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/bulletproof(M), slot_wear_suit)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
- M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
- M.equip_to_slot_or_del(new /obj/item/clothing/head/centhat(M), slot_head)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
- M.equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(M), slot_l_store)
+ if("nanotrasen officer")
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
+ M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
+ M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
- var/obj/item/weapon/card/id/W = new(M)
+ var/obj/item/device/pda/heads/pda = new(M)
+ pda.owner = M.real_name
+ pda.ownjob = "NanoTrasen Navy Officer"
+ pda.name = "PDA-[M.real_name] ([pda.ownjob])"
+
+ M.equip_if_possible(pda, slot_r_store)
+ M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
+ M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
+
+ var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
- W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
- W.assignment = "CentCom Commanding Officer"
+ W.assignment = "NanoTrasen Navy Officer"
W.registered_name = M.real_name
- M.equip_to_slot_or_del(W, slot_wear_id)
+ M.equip_if_possible(W, slot_wear_id)
+
+
+ if("nanotrasen captain")
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
+ M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
+ M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
+
+ var/obj/item/device/pda/heads/pda = new(M)
+ pda.owner = M.real_name
+ pda.ownjob = "NanoTrasen Navy Captain"
+ pda.name = "PDA-[M.real_name] ([pda.ownjob])"
+
+ M.equip_if_possible(pda, slot_r_store)
+ M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
+ M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
+
+ var/obj/item/weapon/card/id/centcom/W = new(M)
+ W.name = "[M.real_name]'s ID Card"
+ W.access = get_all_accesses()
+ W.access += get_all_centcom_access()
+ W.assignment = "NanoTrasen Navy Captain"
+ W.registered_name = M.real_name
+ M.equip_if_possible(W, slot_wear_id)
if("emergency rescue team")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 4c54b5bc072..af7f4f545e2 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -159,6 +159,8 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/kill_air_processing
src.verbs += /client/proc/disable_communication
src.verbs += /client/proc/disable_movement
+ src.verbs += /client/proc/Zone_Info
+ src.verbs += /client/proc/Test_ZAS_Connection
//src.verbs += /client/proc/cmd_admin_rejuvenate
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 809302387a0..8ef53eb0232 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -11,7 +11,7 @@ client/proc/one_click_antag()
/datum/admins/proc/one_click_antag()
var/dat = {"One-click Antagonist
- Make Tratiors
+ Make Traitors
Make Changlings
Make Revs
Make Cult
@@ -53,7 +53,7 @@ client/proc/one_click_antag()
return 0
-/datum/admins/proc/makeTratiors()
+/datum/admins/proc/makeTraitors()
var/datum/game_mode/traitor/temp = new
if(config.protect_roles_from_antagonist)
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 2c69b9957ef..d93dbd6f595 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -30,7 +30,7 @@
////////////
var/next_allowed_topic_time = 10
// comment out the line below when debugging locally to enable the options & messages menu
- control_freak = 1
+ //control_freak = 1
////////////////////////////////////
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 8757ad0d4f9..16b0fbea6cb 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -2,7 +2,7 @@
//SECURITY//
////////////
#define TOPIC_SPAM_DELAY 4 //4 ticks is about 3/10ths of a second
-#define UPLOAD_LIMIT 1048576 //Restricts client uploads to the server to 1MB //Could probably do with being lower.
+#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
/*
@@ -273,5 +273,9 @@
'icons/spideros_icons/sos_11.png',
'icons/spideros_icons/sos_12.png',
'icons/spideros_icons/sos_13.png',
- 'icons/spideros_icons/sos_14.png'
+ 'icons/spideros_icons/sos_14.png',
+ 'icons/xenoarch_icons/chart1.jpg',
+ 'icons/xenoarch_icons/chart2.jpg',
+ 'icons/xenoarch_icons/chart3.jpg',
+ 'icons/xenoarch_icons/chart4.jpg'
)
\ No newline at end of file
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 8a21fc6b6ce..4799dcffbc4 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -252,6 +252,7 @@ datum/preferences
dat += "Blood Type: [b_type]
"
dat += "Skin Tone: [-s_tone + 35]/220
"
//dat += "Skin pattern: Adjust
"
+ dat += "Needs Glasses: [disabilities == 0 ? "No" : "Yes"]
"
dat += "Limbs: Adjust
"
//display limbs below
@@ -1008,6 +1009,9 @@ datum/preferences
else
gender = MALE
+ if("disabilities") //please note: current code only allows nearsightedness as a disability
+ disabilities = !disabilities//if you want to add actual disabilities, code that selects them should be here
+
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index f60a5409da9..bb6718e3dd5 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -1,5 +1,5 @@
#define SAVEFILE_VERSION_MIN 8
-#define SAVEFILE_VERSION_MAX 8
+#define SAVEFILE_VERSION_MAX 9
//handles converting savefiles to new formats
//MAKE SURE YOU KEEP THIS UP TO DATE!
@@ -119,6 +119,7 @@
S["eyes_blue"] >> b_eyes
S["underwear"] >> underwear
S["backbag"] >> backbag
+ S["b_type"] >> b_type
//Jobs
S["userandomjob"] >> userandomjob
@@ -170,6 +171,7 @@
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
+ b_type = sanitize_text(b_type, initial(b_type))
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
@@ -218,6 +220,7 @@
S["eyes_blue"] << b_eyes
S["underwear"] << underwear
S["backbag"] << backbag
+ S["b_type"] << b_type
//Jobs
S["userandomjob"] << userandomjob
@@ -237,6 +240,7 @@
S["sec_record"] << sec_record
S["player_alt_titles"] << player_alt_titles
S["be_special"] << be_special
+ S["disabilities"] << disabilities
S["used_skillpoints"] << used_skillpoints
S["skills"] << skills
S["skill_specialization"] << skill_specialization
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 751dde212c9..7d8f1289ce6 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -1,6 +1,7 @@
/obj/item/clothing
name = "clothing"
+
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"
@@ -155,6 +156,7 @@ BLIND // can't see anything
3 = Report location
*/
var/obj/item/clothing/tie/hastie = null
+ var/displays_id = 1
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
if(!hastie && istype(I, /obj/item/clothing/tie))
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index f5fef1be70e..5795e8c7141 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -19,6 +19,8 @@
vision_flags = SEE_TURFS
/obj/item/clothing/glasses/meson/prescription
+ name = "prescription mesons"
+ desc = "Optical Meson Scanner with prescription lenses."
prescription = 1
/obj/item/clothing/glasses/science
@@ -61,6 +63,7 @@
desc = "Made by Nerd. Co."
icon_state = "glasses"
item_state = "glasses"
+ prescription = 1
/obj/item/clothing/glasses/regular/hipster
name = "Prescription Glasses"
@@ -114,6 +117,13 @@
usr.update_inv_glasses()
+/obj/item/clothing/glasses/welding/superior
+ name = "superior welding goggles"
+ desc = "Welding goggles made from more expensive materials, strangely smells like potatoes."
+ icon_state = "rwelding-g"
+ item_state = "rwelding-g"
+ icon_action_button = "action_welding_g"
+
/obj/item/clothing/glasses/sunglasses/blindfold
name = "blindfold"
desc = "Covers the eyes, preventing sight."
@@ -122,6 +132,7 @@
vision_flags = BLIND
/obj/item/clothing/glasses/sunglasses/prescription
+ name = "prescription sunglasses"
prescription = 1
/obj/item/clothing/glasses/sunglasses/big
diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm
index 568923fc8df..19bb098b4f0 100644
--- a/code/modules/clothing/head/misc.dm
+++ b/code/modules/clothing/head/misc.dm
@@ -7,6 +7,13 @@
flags = FPRINT|TABLEPASS
item_state = "centhat"
+/obj/item/clothing/head/hairflower
+ name = "hair flower pin"
+ icon_state = "hairflower"
+ desc = "Smells nice."
+ item_state = "hairflower"
+ flags = FPRINT|TABLEPASS
+
/obj/item/clothing/head/powdered_wig
name = "powdered wig"
desc = "A powdered wig."
diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm
index 4edc78a46ec..4ad3d51ffb3 100644
--- a/code/modules/clothing/shoes/colour.dm
+++ b/code/modules/clothing/shoes/colour.dm
@@ -68,6 +68,12 @@
permeability_coefficient = 0.01
color = "white"
+/obj/item/clothing/shoes/leather
+ name = "leather shoes"
+ desc = "A sturdy pair of leather shoes."
+ icon_state = "leather"
+ color = "leather"
+
/obj/item/clothing/shoes/rainbow
name = "rainbow shoes"
desc = "Very gay shoes."
diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm
index a5550e132ad..f31802d4e07 100644
--- a/code/modules/clothing/suits/jobs.dm
+++ b/code/modules/clothing/suits/jobs.dm
@@ -21,6 +21,14 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT
+/obj/item/clothing/suit/captunic/capjacket
+ name = "captain's uniform jacket"
+ desc = "A less formal jacket for everyday captain use."
+ icon_state = "capjacket"
+ item_state = "bio_suit"
+ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
+ flags_inv = HIDEJUMPSUIT
+
//Chaplain
/obj/item/clothing/suit/chaplain_hoodie
name = "chaplain hoodie"
@@ -150,7 +158,7 @@
icon_state = "suspenders"
blood_overlay_type = "armor" //it's the less thing that I can put here
-/obj/item/clothing/suit/fr_jacket
+/obj/item/clothing/suit/storage/fr_jacket
name = "first responder jacket"
desc = "A high-visibility jacket worn by medical first responders."
icon_state = "fr_jacket_open"
diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm
index 23b5890333d..0029cca6949 100644
--- a/code/modules/clothing/suits/miscellaneous.dm
+++ b/code/modules/clothing/suits/miscellaneous.dm
@@ -287,6 +287,13 @@
desc = "A rather skimpy green dress."
icon_state = "stripper_g_over"
item_state = "stripper_g"
+
+/obj/item/clothing/under/stripper/mankini
+ name = "the mankini"
+ desc = "No honest man would wear this abomination"
+ icon_state = "mankini"
+ color = "mankini"
+
/obj/item/clothing/suit/xenos
name = "xenos suit"
desc = "A suit made out of chitinous alien hide."
@@ -294,3 +301,35 @@
item_state = "xenos_helm"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
+
+//swimsuit
+
+/obj/item/clothing/under/swimsuit/black
+ name = "black swimsuit"
+ desc = "An oldfashioned black swimsuit."
+ icon_state = "swim_black"
+ color = "swim_black"
+
+/obj/item/clothing/under/swimsuit/blue
+ name = "blue swimsuit"
+ desc = "An oldfashioned blue swimsuit."
+ icon_state = "swim_blue"
+ color = "swim_blue"
+
+/obj/item/clothing/under/swimsuit/purple
+ name = "purple swimsuit"
+ desc = "An oldfashioned purple swimsuit."
+ icon_state = "swim_purp"
+ color = "swim_purp"
+
+/obj/item/clothing/under/swimsuit/green
+ name = "green swimsuit"
+ desc = "An oldfashioned green swimsuit."
+ icon_state = "swim_green"
+ color = "swim_green"
+
+/obj/item/clothing/under/swimsuit/red
+ name = "red swimsuit"
+ desc = "An oldfashioned red swimsuit."
+ icon_state = "swim_red"
+ color = "swim_red"
diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm
index b5d68643106..196915d4688 100644
--- a/code/modules/clothing/under/jobs/civilian.dm
+++ b/code/modules/clothing/under/jobs/civilian.dm
@@ -142,6 +142,13 @@
item_state = "lawyer_purp"
color = "lawyer_purp"
+/obj/item/clothing/under/lawyer/oldman
+ name = "Old Man's Suit"
+ desc = "A classic suit for the older gentleman with built in back support."
+ icon_state = "oldman"
+ item_state = "oldman"
+ color = "oldman"
+
/obj/item/clothing/under/librarian
name = "sensible suit"
diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm
index 808cc6d6c5d..7d1a7038c19 100644
--- a/code/modules/clothing/under/jobs/medsci.dm
+++ b/code/modules/clothing/under/jobs/medsci.dm
@@ -70,6 +70,24 @@
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
+/obj/item/clothing/under/rank/nurse
+ desc = "A dress commonly worn by the nursing staff in the medical department."
+ name = "nurse's dress"
+ icon_state = "nurse"
+ item_state = "nurse"
+ color = "nurse"
+ permeability_coefficient = 0.50
+ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
+
+/obj/item/clothing/under/rank/orderly
+ desc = "A white suit to be worn by orderly people who love orderly things."
+ name = "orderly's uniform"
+ icon_state = "orderly"
+ item_state = "orderly"
+ color = "orderly"
+ permeability_coefficient = 0.50
+ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
+
/obj/item/clothing/under/rank/medical
desc = "It's made of a special fiber that provides minor protection against biohazards. It has a cross on the chest denoting that the wearer is trained medical personnel."
name = "medical doctor's jumpsuit"
diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm
index e62adf21b2a..d98df1aad2f 100644
--- a/code/modules/clothing/under/jobs/security.dm
+++ b/code/modules/clothing/under/jobs/security.dm
@@ -26,6 +26,15 @@
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS
+/obj/item/clothing/under/rank/dispatch
+ name = "dispatcher's uniform"
+ desc = "A dress shirt and khakis with a security patch sewn on."
+ icon_state = "dispatch"
+ item_state = "dispatch"
+ color = "dispatch"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS
+
/obj/item/clothing/under/rank/security2
name = "security officer's uniform"
desc = "It's made of a slightly sturdier material, to allow for robust protection."
diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm
index c410d66ec3f..577ae6bbe35 100644
--- a/code/modules/clothing/under/miscellaneous.dm
+++ b/code/modules/clothing/under/miscellaneous.dm
@@ -12,6 +12,13 @@
color = "blue_pyjamas"
item_state = "w_suit"
+/obj/item/clothing/under/captain_fly
+ name = "rogue captains uniform"
+ desc = "For the man who doesn't care because he's still free."
+ icon_state = "captain_fly"
+ item_state = "captain_fly"
+ color = "captain_fly"
+
/obj/item/clothing/under/scratch
name = "white suit"
desc = "A white suit, suitable for an excellent host"
@@ -232,70 +239,122 @@
color = "gladiator"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
+//dress
+
+/obj/item/clothing/under/dress/dress_fire
+ name = "flame dress"
+ desc = "A small black dress with blue flames print on it."
+ icon_state = "dress_fire"
+ color = "dress_fire"
+
+/obj/item/clothing/under/dress/dress_green
+ name = "green dress"
+ desc = "A simple, tight fitting green dress."
+ icon_state = "dress_green"
+ color = "dress_green"
+
+/obj/item/clothing/under/dress/dress_orange
+ name = "orange dress"
+ desc = "A fancy orange gown for those who like to show leg."
+ icon_state = "dress_orange"
+ color = "dress_orange"
+
+/obj/item/clothing/under/dress/dress_pink
+ name = "pink dress"
+ desc = "A simple, tight fitting pink dress."
+ icon_state = "dress_pink"
+ color = "dress_pink"
+
+/obj/item/clothing/under/dress/dress_yellow
+ name = "yellow dress"
+ desc = "A flirty, little yellow dress."
+ icon_state = "dress_yellow"
+ color = "dress_yellow"
+
+/obj/item/clothing/under/dress/dress_saloon
+ name = "saloon girl dress"
+ desc = "A old western inspired gown for the girl who likes to drink."
+ icon_state = "dress_saloon"
+ color = "dress_saloon"
+
+/obj/item/clothing/under/dress/dress_rd
+ name = "research director dress uniform"
+ desc = "Feminine fashion for the style concious RD."
+ icon_state = "dress_rd"
+ color = "dress_rd"
+
+/obj/item/clothing/under/dress/dress_cap
+ name = "captain dress uniform"
+ desc = "Feminine fashion for the style concious captain."
+ icon_state = "dress_cap"
+ color = "dress_cap"
+
+/obj/item/clothing/under/dress/dress_hop
+ name = "head of personal dress uniform"
+ desc = "Feminine fashion for the style concious HoP."
+ icon_state = "dress_hop"
+ color = "dress_hop"
+
+/obj/item/clothing/under/dress/dress_hr
+ name = "human resources director uniform"
+ desc = "Superior class for the nosy H.R. Director."
+ icon_state = "huresource"
+ color = "huresource"
+
+/obj/item/clothing/under/dress/plaid_blue
+ name = "blue plaid skirt"
+ desc = "A preppy blue skirt with a white blouse."
+ icon_state = "plaid_blue"
+ color = "plaid_blue"
+
+/obj/item/clothing/under/dress/plaid_red
+ name = "red plaid skirt"
+ desc = "A preppy red skirt with a white blouse."
+ icon_state = "plaid_red"
+ color = "plaid_red"
+
+/obj/item/clothing/under/dress/plaid_purple
+ name = "blue purple skirt"
+ desc = "A preppy purple skirt with a white blouse."
+ icon_state = "plaid_purple"
+ color = "plaid_purple"
+
//wedding stuff
+
/obj/item/clothing/under/wedding/bride_orange
name = "orange wedding dress"
desc = "A big and puffy orange dress."
icon_state = "bride_orange"
- item_state = "creamsuit"
color = "bride_orange"
flags_inv = HIDESHOES
-/obj/item/clothing/under/wedding/suit_white
- name = "white suit"
- desc = "A fabulous white suit with orange shirt."
- icon_state = "white_suit"
- item_state = "creamsuit"
- color = "white_suit"
+/obj/item/clothing/under/wedding/bride_purple
+ name = "purple wedding dress"
+ desc = "A big and puffy purple dress."
+ icon_state = "bride_purple"
+ color = "bride_purple"
+ flags_inv = HIDESHOES
-/obj/item/clothing/under/wedding/bridesmaid
- name = "yellow dress"
- desc = "A big and puffy orange dress."
- icon_state = "bridesmaid"
- item_state = "creamsuit"
- color = "bridesmaid"
+/obj/item/clothing/under/wedding/bride_blue
+ name = "blue wedding dress"
+ desc = "A big and puffy blue dress."
+ icon_state = "bride_blue"
+ color = "bride_blue"
+ flags_inv = HIDESHOES
-/obj/item/clothing/under/wedding/firedress
- name = "flaming hot black dress"
- desc = "A small black dress with blue flames print on it."
- icon_state = "dress_fire"
- item_state = "creamsuit"
- color = "dress_fire"
+/obj/item/clothing/under/wedding/bride_red
+ name = "red wedding dress"
+ desc = "A big and puffy red dress."
+ icon_state = "bride_red"
+ color = "bride_red"
+ flags_inv = HIDESHOES
-/obj/item/clothing/under/wedding/dress_orange
- name = "orange dress"
- icon_state = "d_orange"
- color = "d_orange"
-
-/obj/item/clothing/under/wedding/dress_green
- name = "green dress"
- icon_state = "d_green"
- color = "d_green"
-
-/obj/item/clothing/under/wedding/dress_purple
- name = "purple dress"
- icon_state = "d_purple"
- color = "d_purple"
-
-/obj/item/clothing/under/wedding/dress_red
- name = "red dress"
- icon_state = "d_red"
- color = "d_red"
-
-/obj/item/clothing/under/wedding/dress_blue
- name = "blue dress"
- icon_state = "d_blue"
- color = "d_blue"
-
-/obj/item/clothing/under/wedding/officer_blue
- name = "blue officer dress"
- icon_state = "officer_blue"
- color = "officer_blue"
-
-/obj/item/clothing/under/wedding/dress_vampire
- name = "vampire dress"
- icon_state = "d_vampire"
- color = "d_vampire"
+/obj/item/clothing/under/wedding/bride_white
+ name = "orange wedding dress"
+ desc = "A white wedding gown made from the finest silk."
+ icon_state = "bride_white"
+ color = "bride_white"
+ flags_inv = HIDESHOES
/obj/item/clothing/under/sundress
name = "sundress"
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index f8da68d7901..086f04efa0f 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -135,6 +135,14 @@ hi
icon_on = "bluezippoon"
icon_off = "bluezippo"
+/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 //Dragor23: Michael Guess
+ name = "engraved lighter"
+ desc = "A golden lighter, engraved with some ornaments and a G."
+ icon = 'custom_items.dmi'
+ icon_state = "guessip"
+ icon_on = "guessipon"
+ icon_off = "guessip"
+
/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
name = "Riley's black zippo"
desc = "A black zippo lighter, which holds some form of sentimental value."
@@ -192,6 +200,17 @@ hi
icon = 'custom_items.dmi'
desc = "A modified detective's camera, painted in bright orange. On the back you see \"Have fun\" written in small accurate letters with something black."
icon_state = "orangecamera"
+ icon_on = "orangecamera"
+ icon_off = "camera_off"
+ pictures_left = 30
+
+/obj/item/device/camera/fluff/oldcamera //magmaram: Maria Crash
+ name = "Old Camera"
+ icon = 'custom_items.dmi'
+ desc = "An old, slightly beat-up digital camera, with a cheap photo printer taped on. It's a nice shade of blue."
+ icon_state = "oldcamera"
+ icon_on = "oldcamera"
+ icon_off = "oldcamera_off"
pictures_left = 30
/obj/item/weapon/card/id/fluff/lifetime //fastler: Fastler Greay; it seemed like something multiple people would have
@@ -317,13 +336,6 @@ hi
icon = 'custom_items.dmi'
icon_state = "odysseus_spec_id"
-/obj/item/weapon/card/id/fluff/ian_colm_1 //Roaper: Ian Colm
- name = "Technician"
- desc = "An old ID with the words 'Ian Colm's Technician ID' printed on it.."
- icon = 'custom_items.dmi'
- icon_state = "technician_id"
-
-
/obj/item/weapon/clipboard/fluff/mcreary_journal //sirribbot: James McReary
name = "McReary's journal"
desc = "A journal with a warning sticker on the front cover. The initials \"J.M.\" are written on the back."
@@ -353,6 +365,14 @@ hi
icon = 'custom_items.dmi'
icon_state = "royce_kit"
+////// Ripley customisation kit - Sven Fjeltson - Mordeth221
+
+/obj/item/weapon/fluff/sven_fjeltson_1
+ name = "Mercenary APLU kit"
+ desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into an old Mercenaries APLU."
+ icon = 'custom_items.dmi'
+ icon_state = "sven_kit"
+
//////////////////////////////////
//////////// Clothing ////////////
//////////////////////////////////
@@ -402,12 +422,6 @@ hi
icon = 'custom_items.dmi'
icon_state = "uzenwa_sissra_1"
-/obj/item/clothing/glasses/welding/fluff/ian_colm_2 //roaper: Ian Colm
- name = "Ian's Goggles"
- desc = "A pair of goggles used in the application of welding."
- icon = 'custom_items.dmi'
- icon_state = "ian_colm_1"
-
////// Medical eyepatch - Thysse Ezinwa - Jadepython
/obj/item/clothing/glasses/eyepatch/fluff/thysse_1
name = "medical eyepatch"
@@ -459,6 +473,17 @@ hi
icon = 'custom_items.dmi'
icon_state = "edvin_telephosphor_1"
+/obj/item/clothing/head/hardhat/fluff/neil_patterson_1 //superboredguy: Neil Patterson
+ name = "Engineering Cap"
+ desc = "Much safer than a hard helmet."
+ icon = 'custom_items.dmi'
+ icon_state = "neilpatterson0_hat"
+
+/obj/item/clothing/head/fluff/krinnhat //Shirotyrant: Krinn Seeskale
+ name = "saucepan hat"
+ desc = "This hat is the shiniest shiny Krinn has ever owned."
+ icon = 'custom_items.dmi'
+ icon_state = "krinn_hat"
//////////// Suits ////////////
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
@@ -496,6 +521,14 @@ hi
icon_state = "deus_blueshield"
item_state = "deus_blueshield"
+/obj/item/clothing/suit/fluff/oldscarf //Writerer2: Javaria Zara
+ name = "old scarf"
+ desc = "An old looking scarf, it seems to be fairly worn."
+ icon = 'clothing/suits.dmi'
+ icon_state = "mantle-unathi"
+ item_state = "mantle-unathi"
+ body_parts_covered = UPPER_TORSO
+
//////////// Uniforms ////////////
/obj/item/clothing/under/fluff/jumpsuitdown //searif: Yuki Matsuda
@@ -537,6 +570,14 @@ hi
item_state = "ara_bar_uniform"
color = "ara_bar_uniform"
+/obj/item/clothing/under/fluff/callum_suit //roaper: Callum Leamus
+ name = "knockoff suit"
+ desc = "A knockoff of a suit commonly worn by the upper class."
+ icon = 'custom_items.dmi'
+ icon_state = "callum_suit"
+ item_state = "callum_suit"
+ color = "callum_suit"
+
/////// NT-SID Suit //Zuhayr: Jane Doe
/obj/item/clothing/under/fluff/jane_sidsuit
diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm
index dce1fcc0b3b..93fc84f97c7 100644
--- a/code/modules/events/event_dynamic.dm
+++ b/code/modules/events/event_dynamic.dm
@@ -20,6 +20,8 @@
sleep(2400)
*/
+var/list/event_last_fired = list()
+
//Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
@@ -61,6 +63,7 @@
possibleEvents[/datum/event/ionstorm] = 25 + active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
+ possibleEvents[/datum/event/wallrot] = 50 * active_with_role["Engineer"] + 100 * active_with_role["Botanist"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"]
@@ -69,11 +72,12 @@
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
- possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25
+ possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
- possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75
- possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
+ possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150
+ possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 10
+ possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(active_with_role["Security"] > 0)
@@ -84,16 +88,26 @@
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
+ for(var/event_type in event_last_fired) if(possibleEvents[event_type])
+ var/time_passed = world.time - event_last_fired[event_type]
+ var/full_recharge_after = 60 * 60 * 10 * 3 // 3 hours
+ var/weight_modifier = max(0, (full_recharge_after - time_passed) / 300)
+
+ possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0)
+
+ var/picked_event = pickweight(possibleEvents)
+ event_last_fired[picked_event] = world.time
+
// Debug code below here, very useful for testing so don't delete please.
- /*var/debug_message = "Firing random event. "
+ var/debug_message = "Firing random event. "
for(var/V in active_with_role)
debug_message += "#[V]:[active_with_role[V]] "
debug_message += "||| "
for(var/V in possibleEvents)
debug_message += "[V]:[possibleEvents[V]]"
- message_admins(debug_message)*/
+ debug_message += "|||Picked:[picked_event]"
+ log_debug(debug_message)
- var/picked_event = pickweight(possibleEvents)
if(!picked_event)
return
@@ -176,6 +190,7 @@
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
+ active_with_role["Botanist"] = 0
for(var/mob/M in player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
@@ -208,4 +223,7 @@
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
+ if(M.mind.assigned_role == "Botanist")
+ active_with_role["Botanist"]++
+
return active_with_role
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index 0af33b153be..585cf6122a2 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
-var/eventTimeLower = 10000 //15 minutes
-var/eventTimeUpper = 25000 //30 minutes
+var/eventTimeLower = 6000 //10 minutes
+var/eventTimeUpper = 12000 //15 minutes
var/scheduledEvent = null
@@ -30,7 +30,9 @@ var/scheduledEvent = null
playercount_modifier = 0.9
if(36 to 100000)
playercount_modifier = 0.8
- scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier
+ var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier
+ scheduledEvent = world.timeofday + next_event_delay
+ log_debug("Next event in [next_event_delay/600] minutes.")
else if(world.timeofday > scheduledEvent)
spawn_dynamic_event()
diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm
index 8caf519dffa..e600cbc0370 100644
--- a/code/modules/events/money_spam.dm
+++ b/code/modules/events/money_spam.dm
@@ -36,7 +36,7 @@
var/sender
var/message
- switch(pick(1,2,3,4,5))
+ switch(pick(1,2,3,4,5,6))
if(1)
sender = pick("MaxBet","MaxBet Online Casino","There is no better time to register","I'm excited for you to join us")
message = pick("Triple deposits are waiting for you at MaxBet Online when you register to play with us.",\
@@ -73,6 +73,12 @@
"Dear fund beneficiary, We have please to inform you that overdue funds payment has finally been approved and released for payment",\
"Due to my lack of agents I require an off-world financial account to immediately deposit the sum of 1 POINT FIVE MILLION credits.",\
"Greetings sir, I regretfully to inform you that as I lay dying here due to my lack ofheirs I have chosen you to recieve the full sum of my lifetime savings of 1.5 billion credits")
+ if(6)
+ sender = pick("NanoTrasen Morale Divison","Feeling Lonely?","Bored?","www.wetskrell.nt")
+ message = pick("The NanoTrasen Morale Division wishes to provide you with quality entertainment sites.",\
+ "WetSkrell.nt is a xenophillic website endorsed by NT for the use of male crewmembers among it's many stations and outposts.",\
+ "Wetskrell.nt only provides the higest quality of male entertaiment to NanoTrasen Employees.",\
+ "Simply enter your NanoTrasen Bank account system number and pin. With three easy steps this service could be yours!")
useMS.send_pda_message("[P.owner]", sender, message)
diff --git a/code/modules/events/organ_failure.dm b/code/modules/events/organ_failure.dm
new file mode 100644
index 00000000000..89456c0c1ba
--- /dev/null
+++ b/code/modules/events/organ_failure.dm
@@ -0,0 +1,28 @@
+datum/event/organ_failure
+ var/severity = 1
+
+datum/event/organ_failure/setup()
+ announceWhen = rand(0, 300)
+ endWhen = announceWhen + 1
+ severity = rand(1, 3)
+
+datum/event/organ_failure/announce()
+ command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
+ world << sound('sound/AI/outbreak5.ogg')
+
+datum/event/organ_failure/start()
+ var/list/candidates = list() //list of candidate keys
+ for(var/mob/living/carbon/human/G in player_list)
+ if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70)
+ candidates += G
+ if(!candidates.len) return
+ candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
+
+ while(severity > 0 && candidates.len)
+ var/mob/living/carbon/human/C = candidates[1]
+
+ // Bruise one of their organs
+ var/datum/organ/internal/I = pick(C.internal_organs)
+ I.damage = I.min_bruised_damage
+ candidates.Remove(C)
+ severity--
diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm
index b077ef5782b..d9cca33e725 100644
--- a/code/modules/events/radiation_storm.dm
+++ b/code/modules/events/radiation_storm.dm
@@ -1,36 +1,45 @@
/datum/event/radiation_storm
- announceWhen = 5
+ announceWhen = 1
oneShot = 1
/datum/event/radiation_storm/announce()
- command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
- world << sound('sound/AI/radiation.ogg')
-
+ // Don't do anything, we want to pack the announcement with the actual event
/datum/event/radiation_storm/start()
- for(var/mob/living/carbon/human/H in living_mob_list)
- var/turf/T = get_turf(H)
- if(!T)
- continue
- if(T.z != 1)
- continue
- if(istype(H,/mob/living/carbon/human))
- H.apply_effect((rand(15,75)),IRRADIATE,0)
- if(prob(5))
- H.apply_effect((rand(90,150)),IRRADIATE,0)
- if(prob(25))
- if (prob(75))
- randmutb(H)
- domutcheck(H,null,1)
- else
- randmutg(H)
- domutcheck(H,null,1)
+ spawn()
+ command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert")
- for(var/mob/living/carbon/monkey/M in living_mob_list)
- var/turf/T = get_turf(M)
- if(!T)
- continue
- if(T.z != 1)
- continue
- M.apply_effect((rand(15,75)),IRRADIATE,0)
\ No newline at end of file
+ sleep(200)
+
+ command_alert("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
+ for(var/i = 0, i < 10, i++)
+ for(var/mob/living/carbon/human/H in living_mob_list)
+ var/turf/T = get_turf(H)
+ if(!T)
+ continue
+ if(T.z != 1)
+ continue
+ if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
+ continue
+ if(istype(H,/mob/living/carbon/human))
+ H.apply_effect((rand(5,25)),IRRADIATE,0)
+ if(prob(5))
+ H.apply_effect((rand(30,50)),IRRADIATE,0)
+ if (prob(75))
+ randmutb(H)
+ domutcheck(H,null,1)
+ else
+ randmutg(H)
+ domutcheck(H,null,1)
+ for(var/mob/living/carbon/monkey/M in living_mob_list)
+ var/turf/T = get_turf(M)
+ if(!T)
+ continue
+ if(T.z != 1)
+ continue
+ M.apply_effect((rand(5,25)),IRRADIATE,0)
+ sleep(50)
+
+
+ command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert")
\ No newline at end of file
diff --git a/code/modules/events/spontaneous_appendicitis.dm b/code/modules/events/spontaneous_appendicitis.dm
index 8a2b8133b47..1bba7866bf2 100644
--- a/code/modules/events/spontaneous_appendicitis.dm
+++ b/code/modules/events/spontaneous_appendicitis.dm
@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
- for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
+ for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) if(H.client && H.stat != DEAD)
var/foundAlready = 0 //don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm
index 2798e51dfbc..b7add26ef28 100644
--- a/code/modules/events/viral_infection.dm
+++ b/code/modules/events/viral_infection.dm
@@ -14,7 +14,7 @@ datum/event/viral_infection/announce()
datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
+ if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
diff --git a/code/modules/events/viral_outbreak.dm b/code/modules/events/viral_outbreak.dm
index 7a21ecccf9c..708b6c203c2 100644
--- a/code/modules/events/viral_outbreak.dm
+++ b/code/modules/events/viral_outbreak.dm
@@ -14,7 +14,7 @@ datum/event/viral_outbreak/announce()
datum/event/viral_outbreak/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
+ if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm
new file mode 100644
index 00000000000..13da0842b02
--- /dev/null
+++ b/code/modules/events/wallrot.dm
@@ -0,0 +1,37 @@
+/turf/simulated/wall
+
+
+datum/event/wallrot
+ var/severity = 1
+
+datum/event/wallrot/setup()
+ announceWhen = rand(0, 300)
+ endWhen = announceWhen + 1
+ severity = rand(5, 10)
+
+datum/event/wallrot/announce()
+ command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
+
+datum/event/wallrot/start()
+ spawn()
+ var/turf/center = null
+
+ // 100 attempts
+ for(var/i=0, i<100, i++)
+ var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1)
+ if(istype(candidate, /turf/simulated/wall))
+ center = candidate
+
+ if(center)
+ // Make sure at least one piece of wall rots!
+ center:rot()
+
+ // Have a chance to rot lots of other walls.
+ var/rotcount = 0
+ for(var/turf/simulated/wall/W in range(5, center)) if(prob(50))
+ W:rot()
+ rotcount++
+
+ // Only rot up to severity walls
+ if(rotcount >= severity)
+ break
\ No newline at end of file
diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm
index dd5ade5fe45..2a76150d673 100644
--- a/code/modules/flufftext/Dreaming.dm
+++ b/code/modules/flufftext/Dreaming.dm
@@ -6,7 +6,8 @@ mob/living/carbon/proc/dream()
"light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun",
"a hat","the Luna","a ruined station","a planet","plasma","air","the medical bay","the bridge","blinking lights",
"a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect",
- "riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying"
+ "riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs","money",
+ "a beach","the holodeck","a smokey room","a voice","the cold","a mouse","an operating table","the bar","the rain"
)
spawn(0)
for(var/i = rand(1,4),i > 0, i--)
diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm
index b9b61906d73..4260c13da95 100644
--- a/code/modules/food/recipes_microwave.dm
+++ b/code/modules/food/recipes_microwave.dm
@@ -819,6 +819,14 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/boiledspagetti
+/datum/recipe/boiledrice
+ reagents = list("water" = 5, "rice" = 10)
+ result = /obj/item/weapon/reagent_containers/food/snacks/boiledrice
+
+/datum/recipe/ricepudding
+ reagents = list("milk" = 5, "rice" = 10)
+ result = /obj/item/weapon/reagent_containers/food/snacks/ricepudding
+
/datum/recipe/pastatomato
reagents = list("water" = 5)
items = list(
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 94c1d350ddc..43dbadb4c21 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -344,14 +344,13 @@ commented out in r5061, I left it because of the shroom thingies
user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]."
- if(fail_message)
- if(prob(50))
- if(prob(25))
- excavate_find(5, src.finds[1])
- else if(prob(50))
- src.finds.Remove(src.finds[1])
- if(prob(50))
- artifact_debris()
+ if(fail_message && prob(90))
+ if(prob(25))
+ excavate_find(5, src.finds[1])
+ else if(prob(50))
+ src.finds.Remove(src.finds[1])
+ if(prob(50))
+ artifact_debris()
if(do_after(user,P.digspeed))
user << "\blue You finish [P.drill_verb] the rock."
@@ -425,8 +424,6 @@ commented out in r5061, I left it because of the shroom thingies
//extract pesky minerals while we're excavating
while(excavation_minerals.len && src.excavation_level > excavation_minerals[excavation_minerals.len])
drop_mineral()
- //have a 50% chance to extract bonus minerals this way
- //if(prob(50))
pop(excavation_minerals)
mineralAmt--
@@ -456,13 +453,6 @@ commented out in r5061, I left it because of the shroom thingies
O = new /obj/item/weapon/ore/plasma(src)
if (src.mineralName == "Diamond")
O = new /obj/item/weapon/ore/diamond(src)
- /*if (src.mineralName == "Archaeo")
- //new /obj/item/weapon/archaeological_find(src)
- //if(prob(10) || delicate)
- if(prob(50)) //Don't have delicate tools (hand pick/excavation tool) yet, temporarily change to 50% instead of 10% -Mij
- O = new /obj/item/weapon/ore/strangerock(src)
- else
- destroyed = 1*/
if (src.mineralName == "Clown")
O = new /obj/item/weapon/ore/clown(src)
if(O)
@@ -496,14 +486,9 @@ commented out in r5061, I left it because of the shroom thingies
M.Stun(5)
M.apply_effect(25, IRRADIATE)
- /*if (prob(src.artifactChance))
- //spawn a rare artifact here
- new /obj/machinery/artifact(src)*/
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
N.fullUpdateMineralOverlays()
- /*if(destroyed) //Display message about being a terrible miner
- usr << "\red You destroy some of the rocks!"*/
return
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm
index 3c070bdbd2b..9225eb0f8bd 100644
--- a/code/modules/mob/emote.dm
+++ b/code/modules/mob/emote.dm
@@ -32,19 +32,13 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
continue
if(findtext(message," snores.")) //Because we have so many sleeping people.
break
- if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
+ if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
if (m_type & 1)
for (var/mob/O in viewers(src, null))
- if(istype(O,/mob/living/carbon/human))
- for(var/mob/living/parasite/P in O:parasites)
- P.show_message(message, m_type)
O.show_message(message, m_type)
else if (m_type & 2)
for (var/mob/O in hearers(src.loc, null))
- if(istype(O,/mob/living/carbon/human))
- for(var/mob/living/parasite/P in O:parasites)
- P.show_message(message, m_type)
O.show_message(message, m_type)
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 3bba11e32d1..731f8ba3bf5 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -50,6 +50,7 @@
src.searching = 0
src.brainmob.mind = candidate.mind
src.brainmob.key = candidate.key
+ src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "You are a positronic brain, brought into existence on [station_name()]."
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7eca9638fc5..a905e5d90aa 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -97,6 +97,7 @@
return
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
+ if(status_flags & GODMODE) return 0 //godmode
shock_damage *= siemens_coeff
if (shock_damage<1)
return 0
@@ -384,13 +385,13 @@
item.layer = initial(item.layer)
u_equip(item)
update_icons()
- //if(src.client)
- //src.client.screen -= item
- //item.loc = src.loc
-
- //if(istype(item, /obj/item))
- //item:dropped(src) // let it know it's been dropped
+ if (istype(usr, /mob/living/carbon/monkey)) //Check if a monkey is throwing. Modify/remove this line as required.
+ item.loc = src.loc
+ if(src.client)
+ src.client.screen -= item
+ if(istype(item, /obj/item))
+ item:dropped(src) // let it know it's been dropped
//actually throw it!
if (item)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index ec94da40752..65e44caefe4 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -48,9 +48,6 @@
/mob/living/carbon/human/death(gibbed)
- if(halloss > 0 && !gibbed)
- halloss = 0
- return
if(stat == DEAD) return
if(healths) healths.icon_state = "health5"
stat = DEAD
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 802841e17a3..4029fc46444 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -53,27 +53,17 @@
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
- if(copytext(input,1,5) == "says")
- src << "\red Invalid emote."
- return
- else if(copytext(input,1,9) == "exclaims")
- src << "\red Invalid emote."
- return
- else if(copytext(input,1,5) == "asks")
- src << "\red Invalid emote."
- return
- else
- var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
- if (input2 == "Visible")
- m_type = 1
- else if (input2 == "Hearable")
- if (src.miming)
- return
- m_type = 2
- else
- alert("Unable to use this emote, must be either hearable or visible.")
+ var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
+ if (input2 == "Visible")
+ m_type = 1
+ else if (input2 == "Hearable")
+ if (src.miming)
return
- message = "[src] [input]"
+ m_type = 2
+ else
+ alert("Unable to use this emote, must be either hearable or visible.")
+ return
+ message = "[src] [input]"
if ("me")
if(silent)
@@ -88,17 +78,7 @@
return
if(!(message))
return
- if(copytext(message,1,5) == "says")
- src << "\red Invalid emote."
- return
- else if(copytext(message,1,9) == "exclaims")
- src << "\red Invalid emote."
- return
- else if(copytext(message,1,5) == "asks")
- src << "\red Invalid emote."
- return
- else
- message = "[src] [message]"
+ message = "[src] [message]"
if ("salute")
if (!src.buckled)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index a388aaf0ecd..a73e6c21910 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -439,7 +439,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
- if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name ) //disfigured. use id-name if possible
+ if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -823,6 +823,15 @@
else if(src.dna.mutantrace == "tajaran")
return "Tajaran"
+/mob/living/carbon/proc/update_mutantrace_languages()
+ if(src.dna)
+ if(src.dna.mutantrace == "lizard")
+ src.soghun_talk_understand = 1
+ else if(src.dna.mutantrace == "skrell")
+ src.skrell_talk_understand = 1
+ else if(src.dna.mutantrace == "tajaran")
+ src.tajaran_talk_understand = 1
+
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 249b72a4c4c..34a57cd9316 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -117,7 +117,7 @@ emp_act
if(!target_zone)
visible_message("\red [user] misses [src] with \the [I]!")
return
-
+
var/datum/organ/external/affecting = get_organ(target_zone)
if (!affecting)
return
@@ -138,7 +138,7 @@ emp_act
if(armor >= 2) return 0
if(!I.force) return 0
- apply_damage(I.force, I.damtype, affecting, armor , I.sharp, I.name)
+ apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I.name)
var/bloody = 0
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
@@ -152,7 +152,7 @@ emp_act
location.add_blood(src)
if(ishuman(user))
var/mob/living/carbon/human/H = user
- if(get_dist(H, src) > 1) //people with TK won't get smeared with blood
+ if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
H.bloody_body(src)
H.bloody_hands(src)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index ae58b2fbcf4..36b039dc89b 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -28,6 +28,7 @@
var/pressure_alert = 0
var/prev_gender = null // Debug for plural genders
var/temperature_alert = 0
+ var/in_stasis = 0
/mob/living/carbon/human/Life()
@@ -59,8 +60,11 @@
life_tick++
var/datum/gas_mixture/environment = loc.return_air()
+ in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
+ if(in_stasis) loc:used++
+
//No need to update all of these procs if the guy is dead.
- if(stat != DEAD)
+ if(stat != DEAD && !in_stasis)
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
breathe() //Only try to take a breath every 4 ticks, unless suffocating
@@ -86,18 +90,20 @@
handle_virus_updates()
+ //stuff in the stomach
+ handle_stomach()
+
+ handle_shock()
+
+ handle_pain()
+
+ handle_medical_side_effects()
+
+ handle_stasis_bag()
+
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
- //stuff in the stomach
- handle_stomach()
-
- handle_shock()
-
- handle_pain()
-
- handle_medical_side_effects()
-
//Status updates, death etc.
handle_regular_status_updates() //TODO: optimise ~Carn
update_canmove()
@@ -196,6 +202,16 @@
src << "\red Your legs won't respond properly, you fall down."
lying = 1
+ proc/handle_stasis_bag()
+ // Handle side effects from stasis bag
+ if(in_stasis)
+ // First off, there's no oxygen supply, so the mob will slowly take brain damage
+ adjustBrainLoss(0.1)
+
+ // Next, the method to induce stasis has some adverse side-effects, manifesting
+ // as cloneloss
+ adjustCloneLoss(0.1)
+
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || (prob(1)))
@@ -450,6 +466,7 @@
SA.moles = 0
if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
+ if(status_flags & GODMODE) return 1 //godmode
if(breath.temperature < 260.15)
if(prob(20))
src << "\red You feel your face freezing and an icicle forming in your lungs!"
@@ -518,6 +535,7 @@
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
//Body temperature is too hot.
fire_alert = max(fire_alert, 1)
+ if(status_flags & GODMODE) return 1 //godmode
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
@@ -531,6 +549,7 @@
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
fire_alert = max(fire_alert, 1)
+ if(status_flags & GODMODE) return 1 //godmode
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
@@ -548,6 +567,7 @@
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
+ if(status_flags & GODMODE) return 1 //godmode
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
@@ -784,7 +804,7 @@
for(var/obj/item/I in src)
if(I.contaminated)
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
-
+ if(status_flags & GODMODE) return 0 //godmode
adjustToxLoss(total_plasmaloss)
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
@@ -882,8 +902,10 @@
silent = 0
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
- handle_organs()
- handle_blood()
+ if(!in_stasis)
+ handle_organs()
+ handle_blood()
+
if(health <= config.health_threshold_dead || brain_op_stage == 4.0)
death()
blinded = 1
@@ -1223,8 +1245,14 @@
if(blinded) blind.layer = 18
else blind.layer = 0
- if( disabilities & NEARSIGHTED && !istype(glasses, /obj/item/clothing/glasses/regular) )
- client.screen += global_hud.vimpaired
+ if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
+ if(glasses) //to every /obj/item
+ var/obj/item/clothing/glasses/G = glasses
+ if(!G.prescription)
+ client.screen += global_hud.vimpaired
+ else
+ client.screen += global_hud.vimpaired
+
if(eye_blurry) client.screen += global_hud.blurry
if(druggy) client.screen += global_hud.druggy
@@ -1270,6 +1298,7 @@
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_virus_updates()
+ if(status_flags & GODMODE) return 0 //godmode
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
@@ -1319,7 +1348,7 @@
handle_shock()
..()
-
+ if(status_flags & GODMODE) return 0 //godmode
if(analgesic) return // analgesic avoids all traumatic shock temporarily
if(health < 0)// health 0 makes you immediately collapse
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index e8d8525e7ac..da0a999fdf5 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -560,9 +560,13 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
if(wear_id)
- overlays_lying[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id2")
- overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
wear_id.screen_loc = ui_id //TODO
+ if(w_uniform && w_uniform:displays_id)
+ overlays_lying[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id2")
+ overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
+ else
+ overlays_lying[ID_LAYER] = null
+ overlays_standing[ID_LAYER] = null
else
overlays_lying[ID_LAYER] = null
overlays_standing[ID_LAYER] = null
@@ -873,4 +877,4 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef R_HAND_LAYER
#undef TAIL_LAYER
#undef TARGETED_LAYER
-#undef TOTAL_LAYERS
+#undef TOTAL_LAYERS
diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm
index 2ee388f7d0c..0e6688e69ea 100644
--- a/code/modules/mob/living/carbon/metroid/emote.dm
+++ b/code/modules/mob/living/carbon/metroid/emote.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/slime/emote(var/act)
+/mob/living/carbon/slime/emote(var/act, var/type, var/desc)
if (findtext(act, "-", 1, null))
@@ -13,6 +13,10 @@
var/message
switch(act)
+ if ("me")
+ return custom_emote(m_type, desc)
+ if ("custom")
+ return custom_emote(m_type, desc)
if("moan")
message = "The [src.name] moans."
m_type = 2
diff --git a/code/modules/mob/living/carbon/monkey/emote.dm b/code/modules/mob/living/carbon/monkey/emote.dm
index eccb365a6f2..8e6c281c781 100644
--- a/code/modules/mob/living/carbon/monkey/emote.dm
+++ b/code/modules/mob/living/carbon/monkey/emote.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/monkey/emote(var/act)
+/mob/living/carbon/monkey/emote(var/act, var/type, var/desc)
var/param = null
if (findtext(act, "-", 1, null))
@@ -14,6 +14,12 @@
var/message
switch(act)
+ if ("me")
+ return custom_emote(m_type, desc)
+
+ if ("custom")
+ return custom_emote(m_type, desc)
+
if("sign")
if (!src.restrained())
message = text("The monkey signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c7aab1d9ed9..162a69b49c7 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -228,6 +228,7 @@
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn)
+ if(status_flags & GODMODE) return 0 //godmode
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
@@ -240,6 +241,7 @@
// damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
+ if(status_flags & GODMODE) return 0 //godmode
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 84b62c70339..2a475b1dd31 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -402,7 +402,7 @@ var/list/department_radio_keys = list(
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
- deaf_message = "[name][alt_name] talks but you cannot hear them."
+ deaf_message = "[name][alt_name] talks but you cannot hear them."
else
deaf_message = "You cannot hear yourself!"
deaf_type = 2 // Since you should be able to hear yourself without looking
@@ -416,12 +416,12 @@ var/list/department_radio_keys = list(
message_b = voice_message
else
message_b = stars(message)
- message_b = say_quote(message_b)
+ message_b = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
if (italics)
message_b = "[message_b]"
- rendered = "[voice_name] [message_b]"
+ rendered = "[name][alt_name] [message_b]" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
for (var/M in heard_b)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 94fc27ba8d8..de8f271c6c8 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -234,16 +234,12 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_roster()
set category = "AI Commands"
set name = "Show Crew Manifest"
- var/dat = "Crew RosterCrew Roster:
"
-
- var/list/L = list()
- for (var/datum/data/record/t in data_core.general)
- var/R = t.fields["name"] + " - " + t.fields["rank"]
- L += R
- for(var/R in sortList(L))
- dat += "[R]
"
- dat += ""
+ var/dat
+ dat += "Crew Manifest
"
+ if(data_core)
+ dat += data_core.get_manifest(0) // make it monochrome
+ dat += "
"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
@@ -743,4 +739,4 @@ var/list/ai_list = list()
anchored = 1
return
else
- return ..()
+ return ..()
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 139d65765b5..27d557c70cc 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -413,14 +413,9 @@
/mob/living/silicon/pai/proc/softwareManifest()
var/dat = ""
dat += "Crew Manifest
"
- var/list/L = list()
- if(!isnull(data_core.general))
- for (var/datum/data/record/t in sortRecord(data_core.general))
- var/R = t.fields["name"] + " - " + t.fields["rank"]
- L += R
- for(var/R in sortList(L))
- dat += "[R]
"
- dat += "