Skip to content

Commit

Permalink
Removes some old and broken features
Browse files Browse the repository at this point in the history
  • Loading branch information
AffectedArc07 committed Jun 21, 2020
1 parent 0d4e085 commit 8294741
Show file tree
Hide file tree
Showing 30 changed files with 5 additions and 3,474 deletions.
14 changes: 2 additions & 12 deletions code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
var/frequency = ATMOS_VENTSCRUB
var/id_tag = null
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC

settagwhitelist = list("id_tag")

Expand Down Expand Up @@ -75,7 +74,7 @@

/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
..()

if(!check_icon_cache())
return

Expand Down Expand Up @@ -192,7 +191,7 @@
return 1

/obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
Expand Down Expand Up @@ -256,14 +255,5 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li><b>ID Tag:</b> <a href="?src=[UID()];set_id=1">[id_tag]</a></li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a></li>
</ul>
"}

/obj/machinery/atmospherics/binary/dp_vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
. = ..()
if(.)
return .
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE
8 changes: 1 addition & 7 deletions code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
Mtoollink = 1
var/advcontrol = 0//does this device listen to the AAC

var/radio_filter_out
var/radio_filter_in
Expand Down Expand Up @@ -250,7 +249,7 @@
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0

if(signal.data["purge"] != null)
Expand Down Expand Up @@ -425,15 +424,10 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}

/obj/machinery/atmospherics/unary/vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE

if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src.id_tag) as null|text), 1, MAX_MESSAGE_LEN)
if(!newid)
Expand Down
8 changes: 1 addition & 7 deletions code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
var/id_tag = null
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC?

var/list/turf/simulated/adjacent_turfs = list()

Expand Down Expand Up @@ -286,7 +285,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0

if(signal.data["power"] != null)
Expand Down Expand Up @@ -354,15 +353,10 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag", "set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}

/obj/machinery/atmospherics/unary/vent_scrubber/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE

if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN)
if(!newid)
Expand Down
3 changes: 0 additions & 3 deletions code/game/machinery/computer/buildandrepair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@
build_path = /obj/machinery/computer/telescience
origin_tech = "programming=3;bluespace=3;plasmatech=4"

/obj/item/circuitboard/atmos_automation
name = "Circuit board (Atmospherics Automation)"
build_path = /obj/machinery/computer/general_air_control/atmos_automation
/obj/item/circuitboard/large_tank_control
name = "Circuit board (Atmospheric Tank Control)"
build_path = /obj/machinery/computer/general_air_control/large_tank_control
Expand Down
46 changes: 0 additions & 46 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -936,49 +936,3 @@ to destroy them and players will be able to make replacements.
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stack/cable_coil = 3,
/obj/item/stack/sheet/glass = 1)

//Selectable mode board, like vending machine boards
/obj/item/circuitboard/logic_gate
name = "circuit board (Logic Connector)"
build_path = /obj/machinery/logic_gate
board_type = "machine"
origin_tech = "programming=1" //This stuff is pretty much the absolute basis of programming, so it's mostly useless for research
req_components = list(/obj/item/stack/cable_coil = 1)
var/list/names_paths = list(
"NOT Gate" = /obj/machinery/logic_gate/not,
"OR Gate" = /obj/machinery/logic_gate/or,
"AND Gate" = /obj/machinery/logic_gate/and,
"NAND Gate" = /obj/machinery/logic_gate/nand,
"NOR Gate" = /obj/machinery/logic_gate/nor,
"XOR Gate" = /obj/machinery/logic_gate/xor,
"XNOR Gate" = /obj/machinery/logic_gate/xnor,
"STATUS Gate" = /obj/machinery/logic_gate/status,
"CONVERT Gate" = /obj/machinery/logic_gate/convert
)

/obj/item/circuitboard/logic_gate/New()
..()
if(build_path == /obj/machinery/logic_gate) //If we spawn the base type board (determined by the base type machine as the build path), become a random gate board
var/new_path = names_paths[pick(names_paths)]
set_type(new_path)

/obj/item/circuitboard/logic_gate/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
set_type(null, user)
return
return ..()

/obj/item/circuitboard/logic_gate/proc/set_type(typepath, mob/user)
var/new_name = "Logic Base"
if(!typepath)
new_name = input("Circuit Setting", "What would you change the board setting to?") in names_paths
typepath = names_paths[new_name]
else
for(var/name in names_paths)
if(names_paths[name] == typepath)
new_name = name
break
build_path = typepath
name = "circuit board ([new_name])"
if(user)
to_chat(user, "<span class='notice'>You set the board to [new_name].</span>")
Loading

0 comments on commit 8294741

Please sign in to comment.