Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
@@ -392,7 +392,7 @@
if(network_card)
return network_card.get_signal(specific_action)
else
return 0
return FALSE
/obj/item/modular_computer/proc/add_log(text)
if(!get_ntnet_status())
@@ -454,7 +454,7 @@
var/obj/item/computer_hardware/H = all_components[h]
component_names.Add(H.name)
var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sortList(component_names)
var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sort_list(component_names)
if(!choice)
return
@@ -24,7 +24,7 @@
var/obj/item/computer_hardware/battery/battery_module = all_components[MC_CELL]
if(battery_module?.battery)
return battery_module.battery.give(amount)
return 0
return FALSE
/obj/item/modular_computer/get_cell()
var/obj/item/computer_hardware/battery/battery_module = all_components[MC_CELL]
@@ -170,7 +170,7 @@
active_program = P
P.alert_pending = FALSE
update_appearance()
return 1
return TRUE
if("PC_toggle_light")
return toggle_flashlight()
@@ -72,7 +72,7 @@
/datum/computer_file/program/proc/generate_network_log(text)
if(computer)
return computer.add_log(text)
return 0
return FALSE
/**
*Runs when the device is used to attack an atom in non-combat mode.
@@ -99,7 +99,7 @@
/datum/computer_file/program/proc/get_signal(specific_action = 0)
if(computer)
return computer.get_ntnet_status(specific_action)
return 0
return FALSE
// Called by Process() on device that runs us, once every tick.
/datum/computer_file/program/proc/process_tick(delta_time)
@@ -161,7 +161,7 @@
return computer.get_header_data()
return list()
// This is performed on program startup. May be overridden to add extra logic. Remember to include ..() call. Return 1 on success, 0 on failure.
// This is performed on program startup. May be overridden to add extra logic. Remember to include ..() call. return TRUE on success, 0 on failure.
// When implementing new program based device, use this to run the program.
/datum/computer_file/program/proc/run_program(mob/living/user)
if(can_run(user, 1))
@@ -198,7 +198,7 @@
if(card_holder)
ID = card_holder.GetID()
generate_network_log("Connection closed -- Program ID: [filename] User:[ID?"[ID.registered_name]":"None"]")
return 1
return TRUE
/datum/computer_file/program/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -23,7 +23,7 @@
program_icon_state = "alert-green"
ui_header = "alarm_green.gif"
update_computer_icon()
return 1
return TRUE
/datum/computer_file/program/alarm_monitor/ui_data(mob/user)
var/list/data = get_header_data()
@@ -27,7 +27,7 @@
// No computer connection, we can't get data from that.
if(!movable)
return 0
return FALSE
var/list/data = get_header_data()
@@ -51,11 +51,11 @@
var/obj/item/stack/S = I
if(obj_integrity == max_integrity)
to_chat(user, span_warning("\The [src] doesn't seem to require repairs."))
return 1
return TRUE
if(S.use(1))
to_chat(user, span_notice("You patch up \the [src] with a bit of \the [I]."))
obj_integrity = min(obj_integrity + 10, max_integrity)
return 1
return TRUE
if(try_insert(I, user))
return TRUE
@@ -34,16 +34,16 @@
// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
/obj/item/computer_hardware/network_card/proc/get_signal(specific_action = 0)
if(!holder) // Hardware is not installed in anything. No signal. How did this even get called?
return 0
return FALSE
if(!check_functionality())
return 0
return FALSE
if(ethernet) // Computer is connected via wired connection.
return 3
if(!SSnetworks.station_network || !SSnetworks.station_network.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal.
return 0
return FALSE
if(holder)
@@ -53,12 +53,12 @@
if(long_range)
return 2
else
return 1
return TRUE
if(long_range) // Computer is not on station, but it has upgraded network card. Low signal.
return 1
return TRUE
return 0 // Computer is not on station and does not have upgraded network card. No signal.
return FALSE // Computer is not on station and does not have upgraded network card. No signal.
/obj/item/computer_hardware/network_card/advanced
@@ -95,5 +95,5 @@
charge_rate = 100000
/obj/item/computer_hardware/recharger/lambda/use_power(amount, charging=0)
return 1
return TRUE