mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Replaces a bunch of obj vars (and emagged on machinery/items) with obj_flags (#34078)
* It works, but is it worth it? * bitfield helpers take 1 * Would this work? * remove dangling debug code * rebase & fixes * vv bitfield stuff, reading * DNM oceans of shitcode DNM * honk * honk2 * plonk * rebase & fix
This commit is contained in:
committed by
AnturK
parent
70bec96f9c
commit
6406896df1
@@ -175,11 +175,11 @@
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/device/modular_computer/emag_act(mob/user)
|
||||
if(emagged)
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>\The [src] was already emagged.</span>")
|
||||
return 0
|
||||
else
|
||||
emagged = TRUE
|
||||
obj_flags |= EMAGGED
|
||||
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
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(!access_to_check) // No required_access, allow it.
|
||||
return 1
|
||||
|
||||
if(!transfer && computer && computer.emagged) //emags can bypass the execution locks but not the download ones.
|
||||
if(!transfer && computer && (computer.obj_flags & EMAGGED)) //emags can bypass the execution locks but not the download ones.
|
||||
return 1
|
||||
|
||||
if(IsAdminGhost(user))
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if(!printer)
|
||||
error = "Missing Hardware: Your computer does not have required hardware to complete this operation."
|
||||
return 1
|
||||
if(!printer.print_text("<font face=\"[computer.emagged ? CRAYON_FONT : PRINTER_FONT]\">" + prepare_printjob(F.stored_data) + "</font>", open_file))
|
||||
if(!printer.print_text("<font face=\"[(computer.obj_flags & EMAGGED) ? CRAYON_FONT : PRINTER_FONT]\">" + prepare_printjob(F.stored_data) + "</font>", open_file))
|
||||
error = "Hardware error: Printer was unable to print the file. It may be out of paper."
|
||||
return 1
|
||||
if("PRG_copytousb")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return 0
|
||||
|
||||
// Attempting to download antag only program, but without having emagged computer. No.
|
||||
if(PRG.available_on_syndinet && !computer.emagged)
|
||||
if(PRG.available_on_syndinet && !(computer.obj_flags & EMAGGED))
|
||||
return 0
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
|
||||
@@ -140,7 +140,7 @@
|
||||
"size" = P.size
|
||||
)))
|
||||
data["hackedavailable"] = 0
|
||||
if(computer.emagged) // If we are running on emagged computer we have access to some "bonus" software
|
||||
if(computer.obj_flags & EMAGGED) // If we are running on emagged computer we have access to some "bonus" software
|
||||
var/list/hacked_programs[0]
|
||||
for(var/S in SSnetworks.station_network.available_antag_software)
|
||||
var/datum/computer_file/program/P = S
|
||||
|
||||
Reference in New Issue
Block a user