Cleans up unused circuitry code (#32840)

This commit is contained in:
ShizCalev
2017-11-18 14:02:29 -05:00
committed by CitadelStationBot
parent c4eb49994f
commit 88da7f3d30
9 changed files with 5 additions and 137 deletions

View File

@@ -25,12 +25,7 @@
if( A.type == I )
HTML += initial(I.name) +"=-="+A.name //2-nd block.assembly type and name. Maybe in future there will also be color and accesories.
break
/*
If(I.name == "electronic implant")
var/obj/item/weapon/implant/integrated_circuit/PI = PA //now it can't recreate electronic implants.and devices maybe I'll fix it later.
var/obj/item/device/electronic_assembly/implant/PIC = PI.IC
A = PIC
*/
HTML += "{{*}}components" //3-rd block.components. First element is useless.delimeter for elements is ^%^.In element first circuit's default name.Second is user given name.delimiter is =-=
for(var/obj/item/integrated_circuit/IC in A.contents)

View File

@@ -13,7 +13,6 @@
io_type_override = io_list_copy[io_entry]
if(io_type_override)
// world << "io_type_override is now [io_type_override] on [src]."
io_list.Add(new io_type_override(src, io_entry, default_data))
else
io_list.Add(new io_type(src, io_entry, default_data))

View File

@@ -80,13 +80,7 @@ a creative player the means to solve many problems. Circuits are held inside an
QDEL_LIST(outputs)
QDEL_LIST(activators)
. = ..()
/*
/obj/item/integrated_circuit/nano_host()
if(istype(src.loc, /obj/item/device/electronic_assembly))
var/obj/item/device/electronic_assembly/assembly = loc
return assembly.resolve_nano_host()
return ..()
*/
/obj/item/integrated_circuit/emp_act(severity)
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
@@ -116,14 +110,10 @@ a creative player the means to solve many problems. Circuits are held inside an
/obj/item/integrated_circuit/interact(mob/user)
if(!check_interactivity(user))
return
// if(!assembly)
// return
var/window_height = 350
var/window_width = 600
//var/table_edge_width = "[(window_width - window_width * 0.1) / 4]px"
//var/table_middle_width = "[(window_width - window_width * 0.1) - (table_edge_width * 2)]px"
var/table_edge_width = "30%"
var/table_middle_width = "40%"
@@ -163,7 +153,6 @@ a creative player the means to solve many problems. Circuits are held inside an
if(io.linked.len)
for(var/k in 1 to io.linked.len)
var/datum/integrated_io/linked = io.linked[k]
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]>[linked]</a> \
@ <a href=?src=[REF(linked.holder)];examine=1;>[linked.holder.displayed_name]</a><br>"
@@ -182,7 +171,6 @@ a creative player the means to solve many problems. Circuits are held inside an
if(io.linked.len)
for(var/k in 1 to io.linked.len)
var/datum/integrated_io/linked = io.linked[k]
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]>[linked]</a> \
@ <a href=?src=[REF(linked.holder)];examine=1;>[linked.holder.displayed_name]</a><br>"
@@ -199,7 +187,6 @@ a creative player the means to solve many problems. Circuits are held inside an
if(io.linked.len)
for(var/k in 1 to io.linked.len)
var/datum/integrated_io/linked = io.linked[k]
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]><font color='FF0000'>[linked]</font></a> \
@ <a href=?src=[REF(linked.holder)];examine=1;><font color='FF0000'>[linked.holder.displayed_name]</font></a><br>"
@@ -210,9 +197,6 @@ a creative player the means to solve many problems. Circuits are held inside an
HTML += "</table>"
HTML += "</div>"
// HTML += "<br><font color='33CC33'>Meta Variables;</font>" // If more meta vars get introduced, uncomment this.
// HTML += "<br>"
HTML += "<br><font color='0000AA'>Complexity: [complexity]</font>"
if(power_draw_idle)
HTML += "<br><font color='0000AA'>Power Draw: [power_draw_idle] W (Idle)</font>"
@@ -268,34 +252,6 @@ a creative player the means to solve many problems. Circuits are held inside an
else
var/datum/integrated_io/io = pin
io.ask_for_pin_data(usr) // The pins themselves will determine how to ask for data, and will validate the data.
/*
if(io.io_type == DATA_CHANNEL)
var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number", "null")
if(!check_interactivity(usr))
return
var/new_data = null
switch(type_to_use)
if("string")
new_data = stripped_input(usr, "Now type in a string.","[src] string writing")
to_chat(usr, "<span class='notice'>You input [new_data] into the pin.</span>")
//to_chat(user, "<span class='notice'>You write '[new_data]' to the '[io]' pin of \the [io.holder].</span>")
if("number")
new_data = input("Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && check_interactivity(usr) )
to_chat(usr, "<span class='notice'>You input [new_data] into the pin.</span>")
if("null")
if(check_interactivity(usr))
to_chat(usr, "<span class='notice'>You clear the pin's memory.</span>")
io.write_data_to_pin(new_data)
else if(io.io_type == PULSE_CHANNEL)
io.holder.check_then_do_work(ignore_power = TRUE)
to_chat(usr, "<span class='notice'>You pulse \the [io.holder]'s [io] pin.</span>")
*/
if(href_list["pin_unwire"])
if (!istype(held_item, /obj/item/device/multitool) || !allow_multitool)

View File

@@ -38,10 +38,6 @@ D [1]/ ||
data = null
holder = null
return ..()
/*
/datum/integrated_io/nano_host()
return holder.nano_host()
*/
/datum/integrated_io/proc/data_as_type(var/as_type)
if(!isweakref(data))
@@ -57,14 +53,6 @@ D [1]/ ||
if(istext(input))
return "(\"[input]\")" // Wraps the 'string' in escaped quotes, so that people know it's a 'string'.
/*
list[](
"A",
"B",
"C"
)
*/
if(islist(input))
var/list/my_list = input
var/result = "list\[[my_list.len]\]("
@@ -84,7 +72,6 @@ list[](
var/datum/weakref/w = input
var/atom/A = w.resolve()
return A ? "([A.name] \[Ref\])" : "(null)" // For refs, we want just the name displayed.
//return A ? "([REF(A)] \[Ref\])" : "(null)"
return "([input])" // Nothing special needed for numbers or other stuff.

View File

@@ -276,13 +276,7 @@
else
return 0
to_chat(usr, "<span class='notice'>This is program for [element[2]]</span>")
/*
else if(istype(PA,/obj/item/weapon/implant/integrated_circuit))
var/obj/item/weapon/implant/integrated_circuit/PI = PA
var/obj/item/device/electronic_assembly/implant/PIC = PI.IC
maxcap = PIC.max_components
maxcomp = PIC.max_complexity
metalcost = metalcost + round( (initial(PIC.max_complexity) + initial(PIC.max_components) ) / 4)*/
else
return 0 //what's the point if there is no assembly?
if(chap[3] != "components") //if there is only one word,there is no components.

View File

@@ -1,7 +1,6 @@
// These pins can only contain numbers (int and floating point) or null.
/datum/integrated_io/number
name = "number pin"
// data = 0
/datum/integrated_io/number/ask_for_pin_data(mob/user)
var/new_data = input("Please type in a number.","[src] number writing") as null|num

View File

@@ -19,7 +19,7 @@
/obj/item/integrated_circuit/transfer/multiplexer/New()
for(var/i = 1 to number_of_inputs)
inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called.
// inputs += "input [i]"
complexity = number_of_inputs
..()
desc += " It has [number_of_inputs] input pins."

View File

@@ -104,50 +104,6 @@
push_data()
activate_pin(2)
/*
/obj/item/integrated_circuit/input/pressure_plate
name = "pressure plate"
desc = "Electronic plate with a scanner, that could retrieve references to things,that was put onto the machine"
icon_state = "pressure_plate"
complexity = 4
inputs = list()
outputs = list("laid" = IC_PINTYPE_REF, "removed" = IC_PINTYPE_REF)
activators = list("laid" = IC_PINTYPE_PULSE_OUT, "removed" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
power_draw_per_use = 40
var/list/cont
/obj/item/integrated_circuit/input/pressure_plate/New()
..()
processing_objects |= src
/obj/item/integrated_circuit/input/pressure_plate/Destroy()
processing_objects -= src
/obj/item/integrated_circuit/input/pressure_plate/process()
var/list/newcont
var/turf/T = get_turf(src)
newcont = T.contents
var/list/U = cont & newcont
for(var/laid in U)
if(!(laid in cont))
var/datum/integrated_io/O = outputs[1]
O.data = WEAKREF(laid)
O.push_data()
activate_pin(1)
break
for(var/removed in U)
if(!(removed in newcont))
var/datum/integrated_io/O = outputs[2]
O.data = WEAKREF(removed)
O.push_data()
activate_pin(2)
break
cont = newcont
*/
/obj/item/integrated_circuit/input/adv_med_scanner
name = "integrated advanced medical analyser"

View File

@@ -139,7 +139,6 @@
being held, or anchored in some way. It should be noted that the ability to move is dependant on the type of assembly that this circuit inhabits."
w_class = WEIGHT_CLASS_SMALL
complexity = 20
// size = 5
inputs = list("direction" = IC_PINTYPE_DIR)
outputs = list()
activators = list("step towards dir" = IC_PINTYPE_PULSE_IN,"on step"=IC_PINTYPE_PULSE_OUT,"blocked"=IC_PINTYPE_PULSE_OUT)
@@ -232,12 +231,7 @@
attached_grenade.forceMove(drop_location())
attached_grenade = null
desc = initial(desc)
/*
/obj/item/integrated_circuit/manipulation/grenade/frag
pre_attached_grenade_type = /obj/item/weapon/grenade/explosive
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 10)
spawn_flags = null // Used for world initializing, see the #defines above.
*/
/obj/item/integrated_circuit/manipulation/plant_module
name = "plant manipulation module"
desc = "Used to uproot weeds or harvest plants in trays."
@@ -306,19 +300,7 @@
power_draw_per_use = 50
var/max_w_class = WEIGHT_CLASS_NORMAL
var/max_items = 10
/*
/obj/item/integrated_circuit/manipulation/thrower/New()
processing_objects |= src
/obj/item/integrated_circuit/manipulation/thrower/Destroy()
processing_objects -= src
/obj/item/integrated_circuit/manipulation/thrower/process()
set_pin_data(IC_OUTPUT, 1, WEAKREF(contents[1]))
set_pin_data(IC_OUTPUT, 2, WEAKREF(contents[contents.len]))
set_pin_data(IC_OUTPUT, 3, contents.len)
push_data()
*/
/obj/item/integrated_circuit/manipulation/grabber/do_work()
var/turf/T = get_turf(src)
var/obj/item/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/item)