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
@@ -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)
@@ -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))
@@ -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)
@@ -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.
@@ -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.
@@ -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