# Conflicts:
#	tgstation.dme
This commit is contained in:
zerothebigboy
2021-09-19 15:23:52 -04:00
344 changed files with 20475 additions and 10060 deletions
@@ -191,6 +191,7 @@
var/x2 = x1
work_squares(y2, x2) //Work squares while in this loop so there's less load
reset_board = FALSE
CHECK_TICK
web += "<table>" //Start setting up the html table
web += "<tbody>"
@@ -235,6 +236,7 @@
web += "<td>[MINESWEEPERIMG(7)]</td>"
if(19)
web += "<td>[MINESWEEPERIMG(8)]</td>"
CHECK_TICK
web += "</tr>"
web += "</table>"
web += "</tbody>"
+12 -17
View File
@@ -102,6 +102,9 @@
rad_insulation = RAD_MEDIUM_INSULATION
var/static/list/airlock_overlays = list()
/// sigh
var/unelectrify_timerid
/obj/machinery/door/airlock/Initialize()
. = ..()
@@ -791,21 +794,6 @@
return WIRE_INTERACTION_FAIL
return ..()
/obj/machinery/door/airlock/proc/electrified_loop()
while (secondsElectrified > NOT_ELECTRIFIED)
sleep(10)
if(QDELETED(src))
return
secondsElectrified--
updateDialog()
// This is to protect against changing to permanent, mid loop.
if(secondsElectrified == NOT_ELECTRIFIED)
set_electrified(NOT_ELECTRIFIED)
else
set_electrified(ELECTRIFIED_PERMANENT)
updateDialog()
/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0)
// If you add an if(..()) check you must first remove the var/nowindow parameter.
// Otherwise it will runtime with this kind of error: null.Topic()
@@ -1365,11 +1353,18 @@
wires.cut_all()
update_icon()
/obj/machinery/door/airlock/proc/remove_electrify()
secondsElectrified = NOT_ELECTRIFIED
unelectrify_timerid = null
/obj/machinery/door/airlock/proc/set_electrified(seconds, mob/user)
secondsElectrified = seconds
if(unelectrify_timerid)
deltimer(unelectrify_timerid)
unelectrify_timerid = null
if(secondsElectrified != ELECTRIFIED_PERMANENT)
unelectrify_timerid = addtimer(CALLBACK(src, .proc/remove_electrify), secondsElectrified SECONDS, TIMER_STOPPABLE)
diag_hud_set_electrified()
if(secondsElectrified > NOT_ELECTRIFIED)
INVOKE_ASYNC(src, .proc/electrified_loop)
if(user)
var/message
+1 -3
View File
@@ -197,10 +197,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
if(orig_light < 10)
say("Explosion not large enough for research calculations.")
return
else if(orig_light < 4500)
point_gain = (83300 * orig_light) / (orig_light + 3000)
else
point_gain = TECHWEB_BOMB_POINTCAP
point_gain = (100000 * orig_light) / (orig_light + 5000)
/*****The Point Capper*****/
if(point_gain > linked_techweb.largest_bomb_value)
+66
View File
@@ -0,0 +1,66 @@
/obj/machinery/plate_press
name = "license plate press"
desc = "You know, we're making a lot of license plates for a station with literaly no cars in it."
icon = 'icons/obj/machines/prison.dmi'
icon_state = "offline"
use_power = IDLE_POWER_USE
idle_power_usage = 2
active_power_usage = 50
var/obj/item/stack/license_plates/empty/current_plate
var/pressing = FALSE
/obj/machinery/plate_press/update_icon()
. = ..()
if(!is_operational())
icon_state = "offline"
else if(pressing)
icon_state = "loop"
else if(current_plate)
icon_state = "online_loaded"
else
icon_state = "online"
/obj/machinery/plate_press/Destroy()
QDEL_NULL(current_plate)
. = ..()
/obj/machinery/plate_press/attackby(obj/item/I, mob/living/user, params)
if(!is_operational())
to_chat(user, "<span class='warning'>[src] has to be on to do this!</span>")
return FALSE
if(pressing)
to_chat(user, "<span class='warning'>[src] already has a plate in it!</span>")
return FALSE
if(istype(I, /obj/item/stack/license_plates/empty))
var/obj/item/stack/license_plates/empty/plate = I
plate.use(1)
current_plate = new plate.type(src, 1) //Spawn a new single sheet in the machine
update_icon()
else
return ..()
/obj/machinery/plate_press/attack_hand(mob/living/user)
. = ..()
if(!pressing && current_plate)
work_press(user)
///This proc attempts to create a plate. User cannot move during this process.
/obj/machinery/plate_press/proc/work_press(mob/living/user)
pressing = TRUE
update_icon()
to_chat(user, "<span class='notice'>You start pressing a new license plate!</span>")
if(!do_after(user, 40, target = src))
pressing = FALSE
update_icon()
return FALSE
use_power(100)
to_chat(user, "<span class='notice'>You finish pressing a new license plate!</span>")
pressing = FALSE
QDEL_NULL(current_plate)
update_icon()
new /obj/item/stack/license_plates/filled(drop_location(), 1)
+18 -9
View File
@@ -1,7 +1,7 @@
/obj/machinery/recharger
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
icon_state = "recharger"
base_icon_state = "recharger"
desc = "A charging dock for energy based weaponry."
use_power = IDLE_POWER_USE
@@ -12,6 +12,8 @@
var/obj/item/charging = null
var/recharge_coeff = 1
var/using_power = FALSE //Did we put power into "charging" last process()?
///Did we finish recharging the currently inserted item?
var/finished_recharging = FALSE
var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy,
@@ -48,13 +50,14 @@
charging = new_charging
if (new_charging)
START_PROCESSING(SSmachines, src)
finished_recharging = FALSE
use_power = ACTIVE_POWER_USE
using_power = TRUE
update_icon()
update_appearance()
else
use_power = IDLE_POWER_USE
using_power = FALSE
update_icon()
update_appearance()
/obj/machinery/recharger/Exited(atom/movable/M, atom/newloc)
. = ..()
@@ -100,7 +103,8 @@
return 1
if(anchored && !charging)
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
if(default_deconstruction_screwdriver(user, "recharger", "recharger", G))
update_appearance()
return
if(panel_open && G.tool_behaviour == TOOL_CROWBAR)
@@ -133,7 +137,7 @@
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
using_power = TRUE
update_icon()
update_appearance()
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging
@@ -141,7 +145,7 @@
R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff)
using_power = TRUE
update_icon()
update_appearance()
return
if(istype(charging, /obj/item/ammo_casing/mws_batt))
@@ -152,7 +156,7 @@
using_power = 1
if(R.BB == null)
R.chargeshot()
update_icon(using_power)
update_appearance()
if(istype(charging, /obj/item/ammo_box/magazine/mws_mag))
var/obj/item/ammo_box/magazine/mws_mag/R = charging
@@ -164,14 +168,19 @@
using_power = 1
if(batt.BB == null)
batt.chargeshot()
update_icon(using_power)
update_appearance()
if(!using_power && !finished_recharging) //Inserted thing is at max charge/ammo, notify those around us
finished_recharging = TRUE
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
say("[charging] has finished recharging!")
else
return PROCESS_KILL
/obj/machinery/recharger/power_change()
..()
update_icon()
update_appearance()
/obj/machinery/recharger/emp_act(severity)
. = ..()
+4 -4
View File
@@ -110,7 +110,7 @@
var/list/to_eat = AM0.GetAllContents()
var/living_detected = FALSE //technically includes silicons as well but eh
var/mob/living/living_detected //technically includes silicons as well but eh
var/list/nom = list()
var/list/crunchy_nom = list() //Mobs have to be handled differently so they get a different list instead of checking them multiple times.
@@ -120,10 +120,10 @@
var/obj/item/bodypart/head/as_head = AM
var/obj/item/mmi/as_mmi = AM
if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay))
living_detected = TRUE
living_detected = living_detected || AM
nom += AM
else if(isliving(AM))
living_detected = TRUE
living_detected = living_detected || TRUE
crunchy_nom += AM
var/not_eaten = to_eat.len - nom.len - crunchy_nom.len
if(living_detected) // First, check if we have any living beings detected.
@@ -132,7 +132,7 @@
if(isliving(CRUNCH)) // MMIs and brains will get eaten like normal items
crush_living(CRUNCH)
else // Stop processing right now without eating anything.
emergency_stop()
emergency_stop(living_detected)
return
for(var/nommed in nom)
recycle_item(nommed)
+5 -3
View File
@@ -6,6 +6,7 @@
anchored = FALSE
density = TRUE
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN
use_power = NO_POWER_USE
icon = 'icons/obj/atmos.dmi'
icon_state = "sheater-off"
name = "space heater"
@@ -72,7 +73,7 @@
on = FALSE
return PROCESS_KILL
if(cell && cell.charge > 0)
if(cell && cell.charge > 1 / efficiency)
var/turf/L = loc
PerformHeating(L)
@@ -112,7 +113,9 @@
var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity
requiredPower = min(requiredPower, heatingPower)
if(requiredPower < 1)
if(requiredPower < 1 || !cell.use(requiredPower / efficiency))
on = FALSE
update_icon()
return
var/deltaTemperature = requiredPower / heat_capacity
@@ -121,7 +124,6 @@
if(deltaTemperature)
env.set_temperature(env.return_temperature() + deltaTemperature)
air_update_turf()
cell.use(requiredPower / efficiency)
/obj/machinery/space_heater/RefreshParts()
var/laser = 2