Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
@@ -176,19 +176,19 @@
/obj/item/device/modular_computer/emag_act(mob/user)
if(emagged)
user << "<span class='warning'>\The [src] was already emagged.</span>"
to_chat(user, "<span class='warning'>\The [src] was already emagged.</span>")
return 0
else
emagged = 1
user << "<span class='notice'>You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.</span>"
to_chat(user, "<span class='notice'>You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.</span>")
return 1
/obj/item/device/modular_computer/examine(mob/user)
..()
if(obj_integrity <= integrity_failure)
user << "<span class='danger'>It is heavily damaged!</span>"
to_chat(user, "<span class='danger'>It is heavily damaged!</span>")
else if(obj_integrity < max_integrity)
user << "<span class='warning'>It is damaged.</span>"
to_chat(user, "<span class='warning'>It is damaged.</span>")
/obj/item/device/modular_computer/update_icon()
cut_overlays()
@@ -217,9 +217,9 @@
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
if(obj_integrity <= integrity_failure)
if(issynth)
user << "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>"
to_chat(user, "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>")
else
user << "<span class='warning'>You press the power button, but the computer fails to boot up, displaying variety of errors before shutting down again.</span>"
to_chat(user, "<span class='warning'>You press the power button, but the computer fails to boot up, displaying variety of errors before shutting down again.</span>")
return
// If we have a recharger, enable it automatically. Lets computer without a battery work.
@@ -229,17 +229,17 @@
if(all_components[MC_CPU] && use_power()) // use_power() checks if the PC is powered
if(issynth)
user << "<span class='notice'>You send an activation signal to \the [src], turning it on.</span>"
to_chat(user, "<span class='notice'>You send an activation signal to \the [src], turning it on.</span>")
else
user << "<span class='notice'>You press the power button and start up \the [src].</span>"
to_chat(user, "<span class='notice'>You press the power button and start up \the [src].</span>")
enabled = 1
update_icon()
ui_interact(user)
else // Unpowered
if(issynth)
user << "<span class='warning'>You send an activation signal to \the [src] but it does not respond.</span>"
to_chat(user, "<span class='warning'>You send an activation signal to \the [src] but it does not respond.</span>")
else
user << "<span class='warning'>You press the power button but \the [src] does not respond.</span>"
to_chat(user, "<span class='warning'>You press the power button but \the [src] does not respond.</span>")
// Process currently calls handle_power(), may be expanded in future if more things are added.
/obj/item/device/modular_computer/process()
@@ -384,7 +384,7 @@
if(istype(W, /obj/item/weapon/wrench))
if(all_components.len)
user << "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>"
to_chat(user, "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>")
return
new /obj/item/stack/sheet/metal( get_turf(src.loc), steel_sheet_cost )
physical.visible_message("\The [src] has been disassembled by [user].")
@@ -395,23 +395,23 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
user << "<span class='warning'>\The [W] is off.</span>"
to_chat(user, "<span class='warning'>\The [W] is off.</span>")
return
if(obj_integrity == max_integrity)
user << "<span class='warning'>\The [src] does not require repairs.</span>"
to_chat(user, "<span class='warning'>\The [src] does not require repairs.</span>")
return
user << "<span class='notice'>You begin repairing damage to \the [src]...</span>"
to_chat(user, "<span class='notice'>You begin repairing damage to \the [src]...</span>")
var/dmg = round(max_integrity - obj_integrity)
if(WT.remove_fuel(round(dmg/75)) && do_after(usr, dmg/10))
obj_integrity = max_integrity
user << "<span class='notice'>You repair \the [src].</span>"
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
return
if(istype(W, /obj/item/weapon/screwdriver))
if(!all_components.len)
user << "<span class='warning'>This device doesn't have any components installed.</span>"
to_chat(user, "<span class='warning'>This device doesn't have any components installed.</span>")
return
var/list/component_names = list()
for(var/h in all_components)
@@ -3,11 +3,11 @@
return FALSE
if(H.w_class > max_hardware_size)
user << "<span class='warning'>This component is too large for \the [src]!</span>"
to_chat(user, "<span class='warning'>This component is too large for \the [src]!</span>")
return FALSE
if(all_components[H.device_type])
user << "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>"
to_chat(user, "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>")
return FALSE
return TRUE
@@ -22,7 +22,7 @@
all_components[H.device_type] = H
user << "<span class='notice'>You install \the [H] into \the [src].</span>"
to_chat(user, "<span class='notice'>You install \the [H] into \the [src].</span>")
H.holder = src
H.forceMove(src)
H.on_install(src, user)
@@ -35,7 +35,7 @@
all_components.Remove(H.device_type)
user << "<span class='notice'>You remove \the [H] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove \the [H] from \the [src].</span>")
H.forceMove(get_turf(src))
H.holder = null
@@ -26,7 +26,7 @@
// This screen simply lists available programs and user may select them.
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
if(!hard_drive || !hard_drive.stored_files || !hard_drive.stored_files.len)
user << "<span class='danger'>\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.</span>")
return // No HDD, No HDD files list or no stored files. Something is very broken.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -89,7 +89,7 @@
return
P.kill_program(forced = TRUE)
user << "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>"
to_chat(user, "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>")
if("PC_runprogram")
var/prog = params["name"]
@@ -99,7 +99,7 @@
P = hard_drive.find_file_by_name(prog)
if(!P || !istype(P)) // Program not found or it's not executable program.
user << "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>")
return
P.computer = src
@@ -118,11 +118,11 @@
var/obj/item/weapon/computer_hardware/processor_unit/PU = all_components[MC_CPU]
if(idle_threads.len > PU.max_idle_programs)
user << "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>"
to_chat(user, "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>")
return
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature)) // The program requires NTNet connection, but we are not connected to NTNet.
user << "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>")
return
if(P.run_program(user))
active_program = P
@@ -12,16 +12,18 @@
max_hardware_size = 2
w_class = WEIGHT_CLASS_NORMAL
flags = HANDSLOW // No running around with open laptops in hands.
screen_on = 0 // Starts closed
var/start_open = 1 // unless this var is set to 1
var/icon_state_closed = "laptop-closed"
var/w_class_open = WEIGHT_CLASS_BULKY
var/slowdown_open = 1
/obj/item/device/modular_computer/laptop/New()
/obj/item/device/modular_computer/laptop/Initialize()
..()
// No running around with open laptops in hands.
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
if(start_open && !screen_on)
toggle_open()
@@ -83,11 +85,11 @@
/obj/item/device/modular_computer/laptop/proc/toggle_open(mob/living/user=null)
if(screen_on)
user << "<span class='notice'>You close \the [src].</span>"
to_chat(user, "<span class='notice'>You close \the [src].</span>")
slowdown = initial(slowdown)
w_class = initial(w_class)
else
user << "<span class='notice'>You open \the [src].</span>"
to_chat(user, "<span class='notice'>You open \the [src].</span>")
slowdown = slowdown_open
w_class = w_class_open
@@ -58,9 +58,9 @@ var/list/global_modular_computers = list()
add_overlay(screen_icon_screensaver)
else
icon_state = icon_state_unpowered
SetLuminosity(0)
set_light(0)
else
SetLuminosity(light_strength)
set_light(light_strength)
if(cpu.active_program)
add_overlay(cpu.active_program.program_icon_state ? cpu.active_program.program_icon_state : screen_icon_state_menu)
else