mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
@@ -243,6 +243,7 @@
|
|||||||
var/obj/item/device/multitool/M = W
|
var/obj/item/device/multitool/M = W
|
||||||
M.connecting = src
|
M.connecting = src
|
||||||
user << "<span class='notice'>You load connection data from [src] to [M].</span>"
|
user << "<span class='notice'>You load connection data from [src] to [M].</span>"
|
||||||
|
M.update_icon()
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -168,6 +168,7 @@
|
|||||||
dat += "<br><br>MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
|
dat += "<br><br>MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
|
||||||
else
|
else
|
||||||
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
|
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
|
||||||
|
P.update_icon()
|
||||||
|
|
||||||
dat += "</font>"
|
dat += "</font>"
|
||||||
temp = ""
|
temp = ""
|
||||||
|
|||||||
@@ -23,119 +23,119 @@
|
|||||||
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
|
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
|
||||||
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
|
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
|
||||||
|
|
||||||
proc/activate() //What the device does when turned on
|
/obj/item/device/assembly/proc/activate() //What the device does when turned on
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
/obj/item/device/assembly/proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
|
/obj/item/device/assembly/proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
|
/obj/item/device/assembly/proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
|
/obj/item/device/assembly/proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
|
/obj/item/device/assembly/proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/holder_movement() //Called when the holder is moved
|
/obj/item/device/assembly/proc/holder_movement() //Called when the holder is moved
|
||||||
return
|
return
|
||||||
|
|
||||||
interact(mob/user as mob) //Called when attack_self is called
|
/obj/item/device/assembly/interact(mob/user as mob) //Called when attack_self is called
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
process_cooldown()
|
/obj/item/device/assembly/process_cooldown()
|
||||||
cooldown--
|
cooldown--
|
||||||
if(cooldown <= 0) return 0
|
if(cooldown <= 0) return 0
|
||||||
spawn(10)
|
spawn(10)
|
||||||
process_cooldown()
|
process_cooldown()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
pulsed(var/radio = 0)
|
/obj/item/device/assembly/pulsed(var/radio = 0)
|
||||||
if(holder && (wires & WIRE_RECEIVE))
|
if(holder && (wires & WIRE_RECEIVE))
|
||||||
activate()
|
activate()
|
||||||
if(radio && (wires & WIRE_RADIO_RECEIVE))
|
if(radio && (wires & WIRE_RADIO_RECEIVE))
|
||||||
activate()
|
activate()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
pulse(var/radio = 0)
|
/obj/item/device/assembly/pulse(var/radio = 0)
|
||||||
if(holder && (wires & WIRE_PULSE))
|
if(holder && (wires & WIRE_PULSE))
|
||||||
holder.process_activation(src, 1, 0)
|
holder.process_activation(src, 1, 0)
|
||||||
if(holder && (wires & WIRE_PULSE_SPECIAL))
|
if(holder && (wires & WIRE_PULSE_SPECIAL))
|
||||||
holder.process_activation(src, 0, 1)
|
holder.process_activation(src, 0, 1)
|
||||||
// if(radio && (wires & WIRE_RADIO_PULSE))
|
// if(radio && (wires & WIRE_RADIO_PULSE))
|
||||||
//Not sure what goes here quite yet send signal?
|
//Not sure what goes here quite yet send signal?
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/activate()
|
||||||
|
if(!secured || (cooldown > 0)) return 0
|
||||||
|
cooldown = 2
|
||||||
|
spawn(10)
|
||||||
|
process_cooldown()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/toggle_secure()
|
||||||
|
secured = !secured
|
||||||
|
update_icon()
|
||||||
|
return secured
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/attach_assembly(var/obj/item/device/assembly/A, var/mob/user)
|
||||||
|
holder = new/obj/item/device/assembly_holder(get_turf(src))
|
||||||
|
if(holder.attach(A,src,user))
|
||||||
|
to_chat(user, "<span class='notice'>You attach \the [A] to \the [src]!</span>")
|
||||||
return 1
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
activate()
|
/obj/item/device/assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(!secured || (cooldown > 0)) return 0
|
if(isassembly(W))
|
||||||
cooldown = 2
|
var/obj/item/device/assembly/A = W
|
||||||
spawn(10)
|
if((!A.secured) && (!secured))
|
||||||
process_cooldown()
|
attach_assembly(A,user)
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
toggle_secure()
|
|
||||||
secured = !secured
|
|
||||||
update_icon()
|
|
||||||
return secured
|
|
||||||
|
|
||||||
|
|
||||||
attach_assembly(var/obj/item/device/assembly/A, var/mob/user)
|
|
||||||
holder = new/obj/item/device/assembly_holder(get_turf(src))
|
|
||||||
if(holder.attach(A,src,user))
|
|
||||||
user << "\blue You attach \the [A] to \the [src]!"
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
if(isassembly(W))
|
|
||||||
var/obj/item/device/assembly/A = W
|
|
||||||
if((!A.secured) && (!secured))
|
|
||||||
attach_assembly(A,user)
|
|
||||||
return
|
|
||||||
if(isscrewdriver(W))
|
|
||||||
if(toggle_secure())
|
|
||||||
user << "\blue \The [src] is ready!"
|
|
||||||
else
|
|
||||||
user << "\blue \The [src] can now be attached!"
|
|
||||||
return
|
return
|
||||||
..()
|
if(isscrewdriver(W))
|
||||||
|
if(toggle_secure())
|
||||||
|
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>\The [src] can now be attached!</span>")
|
||||||
return
|
return
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
process()
|
/obj/item/device/assembly/process()
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
examine(mob/user)
|
/obj/item/device/assembly/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if((in_range(src, user) || loc == user))
|
if((in_range(src, user) || loc == user))
|
||||||
if(secured)
|
if(secured)
|
||||||
user << "\The [src] is ready!"
|
to_chat(user, "\The [src] is ready!")
|
||||||
else
|
else
|
||||||
user << "\The [src] can be attached!"
|
to_chat(user, "\The [src] can be attached!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/user as mob)
|
/obj/item/device/assembly/attack_self(mob/user as mob)
|
||||||
if(!user) return 0
|
if(!user) return 0
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
interact(user)
|
interact(user)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
interact(mob/user as mob)
|
/obj/item/device/assembly/interact(mob/user as mob)
|
||||||
return //HTML MENU FOR WIRES GOES HERE
|
return //HTML MENU FOR WIRES GOES HERE
|
||||||
|
|
||||||
/obj/item/device/assembly/nano_host()
|
/obj/item/device/assembly/nano_host()
|
||||||
if(istype(loc, /obj/item/device/assembly_holder))
|
if(istype(loc, /obj/item/device/assembly_holder))
|
||||||
|
|||||||
@@ -14,201 +14,201 @@
|
|||||||
var/obj/item/device/assembly/a_right = null
|
var/obj/item/device/assembly/a_right = null
|
||||||
var/obj/special_assembly = null
|
var/obj/special_assembly = null
|
||||||
|
|
||||||
proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
/obj/item/device/assembly_holder/proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/attach_special(var/obj/O, var/mob/user)
|
/obj/item/device/assembly_holder/proc/attach_special(var/obj/O, var/mob/user)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/process_activation(var/obj/item/device/D)
|
/obj/item/device/assembly_holder/proc/process_activation(var/obj/item/device/D)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/detached()
|
/obj/item/device/assembly_holder/proc/detached()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
IsAssemblyHolder()
|
/obj/item/device/assembly_holder/IsAssemblyHolder()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
/obj/item/device/assembly_holder/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
||||||
if((!D)||(!D2)) return 0
|
if((!D)||(!D2)) return 0
|
||||||
if((!isassembly(D))||(!isassembly(D2))) return 0
|
if((!isassembly(D))||(!isassembly(D2))) return 0
|
||||||
if((D:secured)||(D2:secured)) return 0
|
if((D:secured)||(D2:secured)) return 0
|
||||||
if(user)
|
if(user)
|
||||||
user.remove_from_mob(D)
|
user.remove_from_mob(D)
|
||||||
user.remove_from_mob(D2)
|
user.remove_from_mob(D2)
|
||||||
D:holder = src
|
D:holder = src
|
||||||
D2:holder = src
|
D2:holder = src
|
||||||
D.loc = src
|
D.loc = src
|
||||||
D2.loc = src
|
D2.loc = src
|
||||||
a_left = D
|
a_left = D
|
||||||
a_right = D2
|
a_right = D2
|
||||||
name = "[D.name]-[D2.name] assembly"
|
name = "[D.name]-[D2.name] assembly"
|
||||||
update_icon()
|
update_icon()
|
||||||
usr.put_in_hands(src)
|
usr.put_in_hands(src)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
attach_special(var/obj/O, var/mob/user)
|
/obj/item/device/assembly_holder/attach_special(var/obj/O, var/mob/user)
|
||||||
if(!O) return
|
if(!O) return
|
||||||
if(!O.IsSpecialAssembly()) return 0
|
if(!O.IsSpecialAssembly()) return 0
|
||||||
|
|
||||||
/* if(O:Attach_Holder())
|
/* if(O:Attach_Holder())
|
||||||
special_assembly = O
|
special_assembly = O
|
||||||
update_icon()
|
update_icon()
|
||||||
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
|
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
|
||||||
*/
|
*/
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
update_icon()
|
/obj/item/device/assembly_holder/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
if(a_left)
|
if(a_left)
|
||||||
overlays += "[a_left.icon_state]_left"
|
overlays += "[a_left.icon_state]_left"
|
||||||
for(var/O in a_left.attached_overlays)
|
for(var/O in a_left.attached_overlays)
|
||||||
overlays += "[O]_l"
|
overlays += "[O]_l"
|
||||||
if(a_right)
|
if(a_right)
|
||||||
src.overlays += "[a_right.icon_state]_right"
|
src.overlays += "[a_right.icon_state]_right"
|
||||||
for(var/O in a_right.attached_overlays)
|
for(var/O in a_right.attached_overlays)
|
||||||
overlays += "[O]_r"
|
overlays += "[O]_r"
|
||||||
if(master)
|
if(master)
|
||||||
master.update_icon()
|
master.update_icon()
|
||||||
|
|
||||||
/* if(special_assembly)
|
/* if(special_assembly)
|
||||||
special_assembly.update_icon()
|
special_assembly.update_icon()
|
||||||
if(special_assembly:small_icon_state)
|
if(special_assembly:small_icon_state)
|
||||||
src.overlays += special_assembly:small_icon_state
|
src.overlays += special_assembly:small_icon_state
|
||||||
for(var/O in special_assembly:small_icon_state_overlays)
|
for(var/O in special_assembly:small_icon_state_overlays)
|
||||||
src.overlays += O
|
src.overlays += O
|
||||||
*/
|
*/
|
||||||
|
|
||||||
examine(mob/user)
|
/obj/item/device/assembly_holder/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if ((in_range(src, user) || src.loc == user))
|
if ((in_range(src, user) || src.loc == user))
|
||||||
if (src.secured)
|
if (src.secured)
|
||||||
user << "\The [src] is ready!"
|
to_chat(user, "\The [src] is ready!")
|
||||||
else
|
else
|
||||||
user << "\The [src] can be attached!"
|
to_chat(user, "\The [src] can be attached!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
HasProximity(atom/movable/AM as mob|obj)
|
/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
|
||||||
if(a_left)
|
if(a_left)
|
||||||
a_left.HasProximity(AM)
|
a_left.HasProximity(AM)
|
||||||
if(a_right)
|
if(a_right)
|
||||||
a_right.HasProximity(AM)
|
a_right.HasProximity(AM)
|
||||||
if(special_assembly)
|
if(special_assembly)
|
||||||
special_assembly.HasProximity(AM)
|
special_assembly.HasProximity(AM)
|
||||||
|
|
||||||
|
|
||||||
Crossed(atom/movable/AM as mob|obj)
|
/obj/item/device/assembly_holder/Crossed(atom/movable/AM as mob|obj)
|
||||||
if(a_left)
|
if(a_left)
|
||||||
a_left.Crossed(AM)
|
a_left.Crossed(AM)
|
||||||
if(a_right)
|
if(a_right)
|
||||||
a_right.Crossed(AM)
|
a_right.Crossed(AM)
|
||||||
if(special_assembly)
|
if(special_assembly)
|
||||||
special_assembly.Crossed(AM)
|
special_assembly.Crossed(AM)
|
||||||
|
|
||||||
|
|
||||||
on_found(mob/finder as mob)
|
/obj/item/device/assembly_holder/on_found(mob/finder as mob)
|
||||||
if(a_left)
|
if(a_left)
|
||||||
a_left.on_found(finder)
|
a_left.on_found(finder)
|
||||||
if(a_right)
|
if(a_right)
|
||||||
a_right.on_found(finder)
|
a_right.on_found(finder)
|
||||||
if(special_assembly)
|
if(special_assembly)
|
||||||
if(istype(special_assembly, /obj/item))
|
if(istype(special_assembly, /obj/item))
|
||||||
var/obj/item/S = special_assembly
|
var/obj/item/S = special_assembly
|
||||||
S.on_found(finder)
|
S.on_found(finder)
|
||||||
|
|
||||||
|
|
||||||
Move()
|
/obj/item/device/assembly_holder/Move()
|
||||||
..()
|
..()
|
||||||
if(a_left && a_right)
|
if(a_left && a_right)
|
||||||
a_left.holder_movement()
|
a_left.holder_movement()
|
||||||
a_right.holder_movement()
|
a_right.holder_movement()
|
||||||
// if(special_assembly)
|
// if(special_assembly)
|
||||||
// special_assembly:holder_movement()
|
// special_assembly:holder_movement()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
/obj/item/device/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||||
if(a_left && a_right)
|
if(a_left && a_right)
|
||||||
a_left.holder_movement()
|
a_left.holder_movement()
|
||||||
a_right.holder_movement()
|
a_right.holder_movement()
|
||||||
// if(special_assembly)
|
// if(special_assembly)
|
||||||
// special_assembly:Holder_Movement()
|
// special_assembly:Holder_Movement()
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/device/assembly_holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(isscrewdriver(W))
|
if(isscrewdriver(W))
|
||||||
if(!a_left || !a_right)
|
if(!a_left || !a_right)
|
||||||
user << "\red BUG:Assembly part missing, please report this!"
|
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
|
||||||
return
|
|
||||||
a_left.toggle_secure()
|
|
||||||
a_right.toggle_secure()
|
|
||||||
secured = !secured
|
|
||||||
if(secured)
|
|
||||||
user << "\blue \The [src] is ready!"
|
|
||||||
else
|
|
||||||
user << "\blue \The [src] can now be taken apart!"
|
|
||||||
update_icon()
|
|
||||||
return
|
return
|
||||||
else if(W.IsSpecialAssembly())
|
a_left.toggle_secure()
|
||||||
attach_special(W, user)
|
a_right.toggle_secure()
|
||||||
|
secured = !secured
|
||||||
|
if(secured)
|
||||||
|
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
|
||||||
else
|
else
|
||||||
..()
|
to_chat(user, "<span class='notice'>\The [src] can now be taken apart!</span>")
|
||||||
|
update_icon()
|
||||||
return
|
return
|
||||||
|
else if(W.IsSpecialAssembly())
|
||||||
|
attach_special(W, user)
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/user as mob)
|
/obj/item/device/assembly_holder/attack_self(mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if(src.secured)
|
if(src.secured)
|
||||||
if(!a_left || !a_right)
|
if(!a_left || !a_right)
|
||||||
user << "\red Assembly part missing!"
|
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
|
||||||
return
|
return
|
||||||
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
|
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
|
||||||
switch(alert("Which side would you like to use?",,"Left","Right"))
|
switch(alert("Which side would you like to use?",,"Left","Right"))
|
||||||
if("Left") a_left.attack_self(user)
|
if("Left") a_left.attack_self(user)
|
||||||
if("Right") a_right.attack_self(user)
|
if("Right") a_right.attack_self(user)
|
||||||
return
|
return
|
||||||
else
|
|
||||||
if(!istype(a_left,/obj/item/device/assembly/igniter))
|
|
||||||
a_left.attack_self(user)
|
|
||||||
if(!istype(a_right,/obj/item/device/assembly/igniter))
|
|
||||||
a_right.attack_self(user)
|
|
||||||
else
|
else
|
||||||
var/turf/T = get_turf(src)
|
if(!istype(a_left,/obj/item/device/assembly/igniter))
|
||||||
if(!T) return 0
|
a_left.attack_self(user)
|
||||||
if(a_left)
|
if(!istype(a_right,/obj/item/device/assembly/igniter))
|
||||||
a_left:holder = null
|
a_right.attack_self(user)
|
||||||
a_left.loc = T
|
else
|
||||||
if(a_right)
|
var/turf/T = get_turf(src)
|
||||||
a_right:holder = null
|
if(!T) return 0
|
||||||
a_right.loc = T
|
if(a_left)
|
||||||
spawn(0)
|
a_left:holder = null
|
||||||
qdel(src)
|
a_left.loc = T
|
||||||
return
|
if(a_right)
|
||||||
|
a_right:holder = null
|
||||||
|
a_right.loc = T
|
||||||
|
spawn(0)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
process_activation(var/obj/D, var/normal = 1, var/special = 1)
|
/obj/item/device/assembly_holder/process_activation(var/obj/D, var/normal = 1, var/special = 1)
|
||||||
if(!D) return 0
|
if(!D) return 0
|
||||||
if(!secured)
|
if(!secured)
|
||||||
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||||
if((normal) && (a_right) && (a_left))
|
if((normal) && (a_right) && (a_left))
|
||||||
if(a_right != D)
|
if(a_right != D)
|
||||||
a_right.pulsed(0)
|
a_right.pulsed(0)
|
||||||
if(a_left != D)
|
if(a_left != D)
|
||||||
a_left.pulsed(0)
|
a_left.pulsed(0)
|
||||||
if(master)
|
if(master)
|
||||||
master.receive_signal()
|
master.receive_signal()
|
||||||
// if(special && special_assembly)
|
// if(special && special_assembly)
|
||||||
// if(!special_assembly == D)
|
// if(!special_assembly == D)
|
||||||
// special_assembly.dothings()
|
// special_assembly.dothings()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking)
|
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking)
|
||||||
@@ -242,36 +242,36 @@
|
|||||||
|
|
||||||
loc.verbs += /obj/item/device/assembly_holder/timer_igniter/verb/configure
|
loc.verbs += /obj/item/device/assembly_holder/timer_igniter/verb/configure
|
||||||
|
|
||||||
detached()
|
/obj/item/device/assembly_holder/timer_igniter/detached()
|
||||||
loc.verbs -= /obj/item/device/assembly_holder/timer_igniter/verb/configure
|
loc.verbs -= /obj/item/device/assembly_holder/timer_igniter/verb/configure
|
||||||
..()
|
..()
|
||||||
|
|
||||||
verb/configure()
|
/obj/item/device/assembly_holder/timer_igniter/verb/configure()
|
||||||
set name = "Set Timer"
|
set name = "Set Timer"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in usr
|
set src in usr
|
||||||
|
|
||||||
if ( !(usr.stat || usr.restrained()) )
|
if ( !(usr.stat || usr.restrained()) )
|
||||||
var/obj/item/device/assembly_holder/holder
|
var/obj/item/device/assembly_holder/holder
|
||||||
if(istype(src,/obj/item/weapon/grenade/chem_grenade))
|
if(istype(src,/obj/item/weapon/grenade/chem_grenade))
|
||||||
var/obj/item/weapon/grenade/chem_grenade/gren = src
|
var/obj/item/weapon/grenade/chem_grenade/gren = src
|
||||||
holder=gren.detonator
|
holder=gren.detonator
|
||||||
var/obj/item/device/assembly/timer/tmr = holder.a_left
|
var/obj/item/device/assembly/timer/tmr = holder.a_left
|
||||||
if(!istype(tmr,/obj/item/device/assembly/timer))
|
if(!istype(tmr,/obj/item/device/assembly/timer))
|
||||||
tmr = holder.a_right
|
tmr = holder.a_right
|
||||||
if(!istype(tmr,/obj/item/device/assembly/timer))
|
if(!istype(tmr,/obj/item/device/assembly/timer))
|
||||||
usr << "<span class='notice'>This detonator has no timer.</span>"
|
to_chat(usr, "<span class='notice'>This detonator has no timer.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(tmr.timing)
|
if(tmr.timing)
|
||||||
usr << "<span class='notice'>Clock is ticking already.</span>"
|
to_chat(usr, "<span class='notice'>Clock is ticking already.</span>")
|
||||||
else
|
|
||||||
var/ntime = input("Enter desired time in seconds", "Time", "5") as num
|
|
||||||
if (ntime>0 && ntime<1000)
|
|
||||||
tmr.time = ntime
|
|
||||||
name = initial(name) + "([tmr.time] secs)"
|
|
||||||
usr << "<span class='notice'>Timer set to [tmr.time] seconds.</span>"
|
|
||||||
else
|
|
||||||
usr << "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>"
|
|
||||||
else
|
else
|
||||||
usr << "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>"
|
var/ntime = input("Enter desired time in seconds", "Time", "5") as num
|
||||||
|
if (ntime>0 && ntime<1000)
|
||||||
|
tmr.time = ntime
|
||||||
|
name = initial(name) + "([tmr.time] secs)"
|
||||||
|
to_chat(usr, "<span class='notice'>Timer set to [tmr.time] seconds.</span>")
|
||||||
|
else
|
||||||
|
to_chat(usr, "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>")
|
||||||
|
else
|
||||||
|
to_chat(usr, "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>")
|
||||||
|
|||||||
@@ -2,36 +2,36 @@
|
|||||||
name = "igniter"
|
name = "igniter"
|
||||||
desc = "A small electronic device able to ignite combustable substances."
|
desc = "A small electronic device able to ignite combustable substances."
|
||||||
icon_state = "igniter"
|
icon_state = "igniter"
|
||||||
origin_tech = list(TECH_MAGNET = 1)
|
origin_tech = list(TECH_MAGNET = 1)
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||||
|
|
||||||
secured = 1
|
secured = 1
|
||||||
wires = WIRE_RECEIVE
|
wires = WIRE_RECEIVE
|
||||||
|
|
||||||
|
/obj/item/device/assembly/igniter/activate()
|
||||||
|
if(!..()) return 0//Cooldown check
|
||||||
|
|
||||||
|
if(holder && istype(holder.loc,/obj/item/weapon/grenade/chem_grenade))
|
||||||
|
var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc
|
||||||
|
grenade.prime()
|
||||||
|
else
|
||||||
|
var/turf/location = get_turf(loc)
|
||||||
|
if(location)
|
||||||
|
location.hotspot_expose(1000,1000)
|
||||||
|
if (istype(src.loc,/obj/item/device/assembly_holder))
|
||||||
|
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
|
||||||
|
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
|
||||||
|
if (tank && tank.modded)
|
||||||
|
tank.explode()
|
||||||
|
|
||||||
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||||
|
s.set_up(3, 1, src)
|
||||||
|
s.start()
|
||||||
|
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/igniter/attack_self(mob/user as mob)
|
||||||
activate()
|
activate()
|
||||||
if(!..()) return 0//Cooldown check
|
add_fingerprint(user)
|
||||||
|
return
|
||||||
if(holder && istype(holder.loc,/obj/item/weapon/grenade/chem_grenade))
|
|
||||||
var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc
|
|
||||||
grenade.prime()
|
|
||||||
else
|
|
||||||
var/turf/location = get_turf(loc)
|
|
||||||
if(location)
|
|
||||||
location.hotspot_expose(1000,1000)
|
|
||||||
if (istype(src.loc,/obj/item/device/assembly_holder))
|
|
||||||
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
|
|
||||||
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
|
|
||||||
if (tank && tank.modded)
|
|
||||||
tank.explode()
|
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
||||||
s.set_up(3, 1, src)
|
|
||||||
s.start()
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/user as mob)
|
|
||||||
activate()
|
|
||||||
add_fingerprint(user)
|
|
||||||
return
|
|
||||||
@@ -15,145 +15,141 @@
|
|||||||
var/visible = 0
|
var/visible = 0
|
||||||
var/obj/effect/beam/i_beam/first = null
|
var/obj/effect/beam/i_beam/first = null
|
||||||
|
|
||||||
proc
|
/obj/item/device/assembly/infra/activate()
|
||||||
trigger_beam()
|
|
||||||
|
|
||||||
|
|
||||||
activate()
|
|
||||||
if(!..()) return 0//Cooldown check
|
if(!..()) return 0//Cooldown check
|
||||||
on = !on
|
on = !on
|
||||||
update_icon()
|
update_icon()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
toggle_secure()
|
/obj/item/device/assembly/infra/toggle_secure()
|
||||||
secured = !secured
|
secured = !secured
|
||||||
if(secured)
|
if(secured)
|
||||||
processing_objects.Add(src)
|
processing_objects.Add(src)
|
||||||
else
|
else
|
||||||
on = 0
|
on = 0
|
||||||
if(first) qdel(first)
|
if(first) qdel(first)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
update_icon()
|
|
||||||
return secured
|
|
||||||
|
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
overlays.Cut()
|
return secured
|
||||||
attached_overlays = list()
|
|
||||||
if(on)
|
|
||||||
overlays += "infrared_on"
|
|
||||||
attached_overlays += "infrared_on"
|
|
||||||
|
|
||||||
if(holder)
|
|
||||||
holder.update_icon()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
process()//Old code
|
/obj/item/device/assembly/infra/update_icon()
|
||||||
if(!on)
|
overlays.Cut()
|
||||||
if(first)
|
attached_overlays = list()
|
||||||
qdel(first)
|
if(on)
|
||||||
return
|
overlays += "infrared_on"
|
||||||
|
attached_overlays += "infrared_on"
|
||||||
|
|
||||||
if((!(first) && (secured && (istype(loc, /turf) || (holder && istype(holder.loc, /turf))))))
|
if(holder)
|
||||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam((holder ? holder.loc : loc) )
|
holder.update_icon()
|
||||||
I.master = src
|
return
|
||||||
I.density = 1
|
|
||||||
I.set_dir(dir)
|
|
||||||
step(I, I.dir)
|
|
||||||
if(I)
|
|
||||||
I.density = 0
|
|
||||||
first = I
|
|
||||||
I.vis_spread(visible)
|
|
||||||
spawn(0)
|
|
||||||
if(I)
|
|
||||||
//world << "infra: setting limit"
|
|
||||||
I.limit = 8
|
|
||||||
//world << "infra: processing beam \ref[I]"
|
|
||||||
I.process()
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
attack_hand()
|
/obj/item/device/assembly/infra/process()//Old code
|
||||||
qdel(first)
|
if(!on)
|
||||||
..()
|
if(first)
|
||||||
return
|
qdel(first)
|
||||||
|
|
||||||
|
|
||||||
Move()
|
|
||||||
var/t = dir
|
|
||||||
..()
|
|
||||||
set_dir(t)
|
|
||||||
qdel(first)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
holder_movement()
|
|
||||||
if(!holder) return 0
|
|
||||||
// set_dir(holder.dir)
|
|
||||||
qdel(first)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
trigger_beam()
|
|
||||||
if((!secured)||(!on)||(cooldown > 0)) return 0
|
|
||||||
pulse(0)
|
|
||||||
if(!holder)
|
|
||||||
visible_message("\icon[src] *beep* *beep*")
|
|
||||||
cooldown = 2
|
|
||||||
spawn(10)
|
|
||||||
process_cooldown()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
|
||||||
if(!secured) return
|
|
||||||
user.set_machine(src)
|
|
||||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
|
||||||
user << browse(dat, "window=infra")
|
|
||||||
onclose(user, "infra")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
Topic(href, href_list)
|
|
||||||
if(..()) return 1
|
|
||||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
|
||||||
usr << browse(null, "window=infra")
|
|
||||||
onclose(usr, "infra")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(href_list["state"])
|
if((!(first) && (secured && (istype(loc, /turf) || (holder && istype(holder.loc, /turf))))))
|
||||||
on = !(on)
|
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam((holder ? holder.loc : loc) )
|
||||||
update_icon()
|
I.master = src
|
||||||
|
I.density = 1
|
||||||
if(href_list["visible"])
|
I.set_dir(dir)
|
||||||
visible = !(visible)
|
step(I, I.dir)
|
||||||
|
if(I)
|
||||||
|
I.density = 0
|
||||||
|
first = I
|
||||||
|
I.vis_spread(visible)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
if(first)
|
if(I)
|
||||||
first.vis_spread(visible)
|
//world << "infra: setting limit"
|
||||||
|
I.limit = 8
|
||||||
|
//world << "infra: processing beam \ref[I]"
|
||||||
|
I.process()
|
||||||
|
return
|
||||||
|
return
|
||||||
|
|
||||||
if(href_list["close"])
|
|
||||||
usr << browse(null, "window=infra")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(usr)
|
/obj/item/device/assembly/infra/attack_hand()
|
||||||
attack_self(usr)
|
qdel(first)
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/Move()
|
||||||
|
var/t = dir
|
||||||
|
..()
|
||||||
|
set_dir(t)
|
||||||
|
qdel(first)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/holder_movement()
|
||||||
|
if(!holder) return 0
|
||||||
|
// set_dir(holder.dir)
|
||||||
|
qdel(first)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/proc/trigger_beam()
|
||||||
|
if((!secured)||(!on)||(cooldown > 0)) return 0
|
||||||
|
pulse(0)
|
||||||
|
if(!holder)
|
||||||
|
visible_message("\icon[src] *beep* *beep*")
|
||||||
|
cooldown = 2
|
||||||
|
spawn(10)
|
||||||
|
process_cooldown()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||||
|
if(!secured) return
|
||||||
|
user.set_machine(src)
|
||||||
|
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||||
|
user << browse(dat, "window=infra")
|
||||||
|
onclose(user, "infra")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/Topic(href, href_list, state = deep_inventory_state)
|
||||||
|
if(..()) return 1
|
||||||
|
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||||
|
usr << browse(null, "window=infra")
|
||||||
|
onclose(usr, "infra")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(href_list["state"])
|
||||||
|
on = !(on)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
verb/rotate()//This could likely be better
|
if(href_list["visible"])
|
||||||
set name = "Rotate Infrared Laser"
|
visible = !(visible)
|
||||||
set category = "Object"
|
spawn(0)
|
||||||
set src in usr
|
if(first)
|
||||||
|
first.vis_spread(visible)
|
||||||
|
|
||||||
set_dir(turn(dir, 90))
|
if(href_list["close"])
|
||||||
|
usr << browse(null, "window=infra")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(usr)
|
||||||
|
attack_self(usr)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/infra/verb/rotate()//This could likely be better
|
||||||
|
set name = "Rotate Infrared Laser"
|
||||||
|
set category = "Object"
|
||||||
|
set src in usr
|
||||||
|
|
||||||
|
set_dir(turn(dir, 90))
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************IBeam*********************************/
|
/***************************IBeam*********************************/
|
||||||
|
|||||||
@@ -7,107 +7,107 @@
|
|||||||
var/armed = 0
|
var/armed = 0
|
||||||
|
|
||||||
|
|
||||||
examine(mob/user)
|
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if(armed)
|
if(armed)
|
||||||
user << "It looks like it's armed."
|
to_chat(user, "It looks like it's armed.")
|
||||||
|
|
||||||
|
/obj/item/device/assembly/mousetrap/update_icon()
|
||||||
|
if(armed)
|
||||||
|
icon_state = "mousetraparmed"
|
||||||
|
else
|
||||||
|
icon_state = "mousetrap"
|
||||||
|
if(holder)
|
||||||
|
holder.update_icon()
|
||||||
|
|
||||||
|
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
|
||||||
|
if(!armed)
|
||||||
|
return
|
||||||
|
var/obj/item/organ/external/affecting = null
|
||||||
|
if(ishuman(target))
|
||||||
|
var/mob/living/carbon/human/H = target
|
||||||
|
switch(type)
|
||||||
|
if("feet")
|
||||||
|
if(!H.shoes)
|
||||||
|
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||||
|
H.Weaken(3)
|
||||||
|
if("l_hand", "r_hand")
|
||||||
|
if(!H.gloves)
|
||||||
|
affecting = H.get_organ(type)
|
||||||
|
H.Stun(3)
|
||||||
|
if(affecting)
|
||||||
|
if(affecting.take_damage(1, 0))
|
||||||
|
H.UpdateDamageIcon()
|
||||||
|
H.updatehealth()
|
||||||
|
else if(ismouse(target))
|
||||||
|
var/mob/living/simple_animal/mouse/M = target
|
||||||
|
visible_message("\red <b>SPLAT!</b>")
|
||||||
|
M.splat()
|
||||||
|
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||||
|
layer = MOB_LAYER - 0.2
|
||||||
|
armed = 0
|
||||||
update_icon()
|
update_icon()
|
||||||
if(armed)
|
pulse(0)
|
||||||
icon_state = "mousetraparmed"
|
|
||||||
else
|
|
||||||
icon_state = "mousetrap"
|
|
||||||
if(holder)
|
|
||||||
holder.update_icon()
|
|
||||||
|
|
||||||
proc/triggered(mob/target as mob, var/type = "feet")
|
|
||||||
if(!armed)
|
/obj/item/device/assembly/mousetrap/attack_self(mob/living/user as mob)
|
||||||
|
if(!armed)
|
||||||
|
user << "<span class='notice'>You arm [src].</span>"
|
||||||
|
else
|
||||||
|
if((CLUMSY in user.mutations) && prob(50))
|
||||||
|
var/which_hand = "l_hand"
|
||||||
|
if(!user.hand)
|
||||||
|
which_hand = "r_hand"
|
||||||
|
triggered(user, which_hand)
|
||||||
|
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||||
|
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||||
return
|
return
|
||||||
var/obj/item/organ/external/affecting = null
|
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||||
if(ishuman(target))
|
armed = !armed
|
||||||
var/mob/living/carbon/human/H = target
|
update_icon()
|
||||||
switch(type)
|
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||||
if("feet")
|
|
||||||
if(!H.shoes)
|
|
||||||
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
|
||||||
H.Weaken(3)
|
|
||||||
if("l_hand", "r_hand")
|
|
||||||
if(!H.gloves)
|
|
||||||
affecting = H.get_organ(type)
|
|
||||||
H.Stun(3)
|
|
||||||
if(affecting)
|
|
||||||
if(affecting.take_damage(1, 0))
|
|
||||||
H.UpdateDamageIcon()
|
|
||||||
H.updatehealth()
|
|
||||||
else if(ismouse(target))
|
|
||||||
var/mob/living/simple_animal/mouse/M = target
|
|
||||||
visible_message("\red <b>SPLAT!</b>")
|
|
||||||
M.splat()
|
|
||||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
|
||||||
layer = MOB_LAYER - 0.2
|
|
||||||
armed = 0
|
|
||||||
update_icon()
|
|
||||||
pulse(0)
|
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/user as mob)
|
||||||
if(!armed)
|
if(armed)
|
||||||
user << "<span class='notice'>You arm [src].</span>"
|
if((CLUMSY in user.mutations) && prob(50))
|
||||||
else
|
var/which_hand = "l_hand"
|
||||||
if((CLUMSY in user.mutations) && prob(50))
|
if(!user.hand)
|
||||||
var/which_hand = "l_hand"
|
which_hand = "r_hand"
|
||||||
if(!user.hand)
|
triggered(user, which_hand)
|
||||||
which_hand = "r_hand"
|
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||||
triggered(user, which_hand)
|
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
return
|
||||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
..()
|
||||||
return
|
|
||||||
user << "<span class='notice'>You disarm [src].</span>"
|
|
||||||
armed = !armed
|
|
||||||
update_icon()
|
|
||||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
|
||||||
|
|
||||||
|
|
||||||
attack_hand(mob/living/user as mob)
|
/obj/item/device/assembly/mousetrap/Crossed(AM as mob|obj)
|
||||||
if(armed)
|
if(armed)
|
||||||
if((CLUMSY in user.mutations) && prob(50))
|
if(ishuman(AM))
|
||||||
var/which_hand = "l_hand"
|
var/mob/living/carbon/H = AM
|
||||||
if(!user.hand)
|
if(H.m_intent == "run")
|
||||||
which_hand = "r_hand"
|
triggered(H)
|
||||||
triggered(user, which_hand)
|
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
"<span class='warning'>You accidentally step on [src]</span>")
|
||||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
if(ismouse(AM))
|
||||||
return
|
triggered(AM)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
Crossed(AM as mob|obj)
|
/obj/item/device/assembly/mousetrap/on_found(mob/living/finder as mob)
|
||||||
if(armed)
|
if(armed)
|
||||||
if(ishuman(AM))
|
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||||
var/mob/living/carbon/H = AM
|
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||||
if(H.m_intent == "run")
|
triggered(finder, finder.hand ? "l_hand" : "r_hand")
|
||||||
triggered(H)
|
return 1 //end the search!
|
||||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
return 0
|
||||||
"<span class='warning'>You accidentally step on [src]</span>")
|
|
||||||
if(ismouse(AM))
|
|
||||||
triggered(AM)
|
|
||||||
..()
|
|
||||||
|
|
||||||
|
|
||||||
on_found(mob/living/finder as mob)
|
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
|
||||||
if(armed)
|
if(!armed)
|
||||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
return ..()
|
||||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||||
triggered(finder, finder.hand ? "l_hand" : "r_hand")
|
triggered(null)
|
||||||
return 1 //end the search!
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
hitby(A as mob|obj)
|
|
||||||
if(!armed)
|
|
||||||
return ..()
|
|
||||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
|
||||||
triggered(null)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/assembly/mousetrap/armed
|
/obj/item/device/assembly/mousetrap/armed
|
||||||
@@ -124,4 +124,4 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
layer = TURF_LAYER+0.2
|
layer = TURF_LAYER+0.2
|
||||||
usr << "<span class='notice'>You hide [src].</span>"
|
to_chat(usr, "<span class='notice'>You hide [src].</span>")
|
||||||
@@ -15,152 +15,147 @@
|
|||||||
|
|
||||||
var/range = 2
|
var/range = 2
|
||||||
|
|
||||||
proc
|
/obj/item/device/assembly/prox_sensor/activate()
|
||||||
toggle_scan()
|
if(!..()) return 0//Cooldown check
|
||||||
sense()
|
timing = !timing
|
||||||
|
update_icon()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
activate()
|
/obj/item/device/assembly/prox_sensor/toggle_secure()
|
||||||
if(!..()) return 0//Cooldown check
|
secured = !secured
|
||||||
timing = !timing
|
if(secured)
|
||||||
update_icon()
|
processing_objects.Add(src)
|
||||||
return 0
|
else
|
||||||
|
scanning = 0
|
||||||
|
timing = 0
|
||||||
|
processing_objects.Remove(src)
|
||||||
|
update_icon()
|
||||||
|
return secured
|
||||||
|
|
||||||
|
|
||||||
toggle_secure()
|
/obj/item/device/assembly/prox_sensor/HasProximity(atom/movable/AM as mob|obj)
|
||||||
secured = !secured
|
if(!istype(AM))
|
||||||
if(secured)
|
log_debug("DEBUG: HasProximity called with [AM] on [src] ([usr]).")
|
||||||
processing_objects.Add(src)
|
|
||||||
else
|
|
||||||
scanning = 0
|
|
||||||
timing = 0
|
|
||||||
processing_objects.Remove(src)
|
|
||||||
update_icon()
|
|
||||||
return secured
|
|
||||||
|
|
||||||
|
|
||||||
HasProximity(atom/movable/AM as mob|obj)
|
|
||||||
if(!istype(AM))
|
|
||||||
log_debug("DEBUG: HasProximity called with [AM] on [src] ([usr]).")
|
|
||||||
return
|
|
||||||
if (istype(AM, /obj/effect/beam)) return
|
|
||||||
if (AM.move_speed < 12) sense()
|
|
||||||
return
|
return
|
||||||
|
if (istype(AM, /obj/effect/beam)) return
|
||||||
|
if (AM.move_speed < 12) sense()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
sense()
|
/obj/item/device/assembly/prox_sensor/proc/sense()
|
||||||
var/turf/mainloc = get_turf(src)
|
var/turf/mainloc = get_turf(src)
|
||||||
// if(scanning && cooldown <= 0)
|
// if(scanning && cooldown <= 0)
|
||||||
// mainloc.visible_message("\icon[src] *boop* *boop*", "*boop* *boop*")
|
// mainloc.visible_message("\icon[src] *boop* *boop*", "*boop* *boop*")
|
||||||
if((!holder && !secured)||(!scanning)||(cooldown > 0)) return 0
|
if((!holder && !secured)||(!scanning)||(cooldown > 0)) return 0
|
||||||
pulse(0)
|
pulse(0)
|
||||||
if(!holder)
|
if(!holder)
|
||||||
mainloc.visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
mainloc.visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||||
cooldown = 2
|
cooldown = 2
|
||||||
spawn(10)
|
spawn(10)
|
||||||
process_cooldown()
|
process_cooldown()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
process()
|
/obj/item/device/assembly/prox_sensor/process()
|
||||||
if(scanning)
|
if(scanning)
|
||||||
var/turf/mainloc = get_turf(src)
|
var/turf/mainloc = get_turf(src)
|
||||||
for(var/mob/living/A in range(range,mainloc))
|
for(var/mob/living/A in range(range,mainloc))
|
||||||
if (A.move_speed < 12)
|
if (A.move_speed < 12)
|
||||||
sense()
|
sense()
|
||||||
|
|
||||||
if(timing && (time >= 0))
|
if(timing && (time >= 0))
|
||||||
time--
|
time--
|
||||||
if(timing && time <= 0)
|
if(timing && time <= 0)
|
||||||
timing = 0
|
timing = 0
|
||||||
toggle_scan()
|
toggle_scan()
|
||||||
time = 10
|
time = 10
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
dropped()
|
/obj/item/device/assembly/prox_sensor/dropped()
|
||||||
spawn(0)
|
spawn(0)
|
||||||
sense()
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
toggle_scan()
|
|
||||||
if(!secured) return 0
|
|
||||||
scanning = !scanning
|
|
||||||
update_icon()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
update_icon()
|
|
||||||
overlays.Cut()
|
|
||||||
attached_overlays = list()
|
|
||||||
if(timing)
|
|
||||||
overlays += "prox_timing"
|
|
||||||
attached_overlays += "prox_timing"
|
|
||||||
if(scanning)
|
|
||||||
overlays += "prox_scanning"
|
|
||||||
attached_overlays += "prox_scanning"
|
|
||||||
if(holder)
|
|
||||||
holder.update_icon()
|
|
||||||
if(holder && istype(holder.loc,/obj/item/weapon/grenade/chem_grenade))
|
|
||||||
var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc
|
|
||||||
grenade.primed(scanning)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
Move()
|
|
||||||
..()
|
|
||||||
sense()
|
sense()
|
||||||
return
|
return
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
interact(mob/user as mob)//TODO: Change this to the wires thingy
|
/obj/item/device/assembly/prox_sensor/proc/toggle_scan()
|
||||||
if(!secured)
|
if(!secured) return 0
|
||||||
user.show_message("\red The [name] is unsecured!")
|
scanning = !scanning
|
||||||
return 0
|
update_icon()
|
||||||
var/second = time % 60
|
return
|
||||||
var/minute = (time - second) / 60
|
|
||||||
var/dat = text("<TT><B>Proximity Sensor</B>\n[] []:[]\n<A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT>", (timing ? text("<A href='?src=\ref[];time=0'>Arming</A>", src) : text("<A href='?src=\ref[];time=1'>Not Arming</A>", src)), minute, second, src, src, src, src)
|
|
||||||
dat += text("<BR>Range: <A href='?src=\ref[];range=-1'>-</A> [] <A href='?src=\ref[];range=1'>+</A>", src, range, src)
|
/obj/item/device/assembly/prox_sensor/update_icon()
|
||||||
dat += "<BR><A href='?src=\ref[src];scanning=1'>[scanning?"Armed":"Unarmed"]</A> (Movement sensor active when armed!)"
|
overlays.Cut()
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
attached_overlays = list()
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
if(timing)
|
||||||
user << browse(dat, "window=prox")
|
overlays += "prox_timing"
|
||||||
onclose(user, "prox")
|
attached_overlays += "prox_timing"
|
||||||
|
if(scanning)
|
||||||
|
overlays += "prox_scanning"
|
||||||
|
attached_overlays += "prox_scanning"
|
||||||
|
if(holder)
|
||||||
|
holder.update_icon()
|
||||||
|
if(holder && istype(holder.loc,/obj/item/weapon/grenade/chem_grenade))
|
||||||
|
var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc
|
||||||
|
grenade.primed(scanning)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/prox_sensor/Move()
|
||||||
|
..()
|
||||||
|
sense()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/prox_sensor/interact(mob/user as mob)//TODO: Change this to the wires thingy
|
||||||
|
if(!secured)
|
||||||
|
user.show_message("\red The [name] is unsecured!")
|
||||||
|
return 0
|
||||||
|
var/second = time % 60
|
||||||
|
var/minute = (time - second) / 60
|
||||||
|
var/dat = text("<TT><B>Proximity Sensor</B>\n[] []:[]\n<A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT>", (timing ? text("<A href='?src=\ref[];time=0'>Arming</A>", src) : text("<A href='?src=\ref[];time=1'>Not Arming</A>", src)), minute, second, src, src, src, src)
|
||||||
|
dat += text("<BR>Range: <A href='?src=\ref[];range=-1'>-</A> [] <A href='?src=\ref[];range=1'>+</A>", src, range, src)
|
||||||
|
dat += "<BR><A href='?src=\ref[src];scanning=1'>[scanning?"Armed":"Unarmed"]</A> (Movement sensor active when armed!)"
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||||
|
user << browse(dat, "window=prox")
|
||||||
|
onclose(user, "prox")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/prox_sensor/Topic(href, href_list, state = deep_inventory_state)
|
||||||
|
if(..()) return 1
|
||||||
|
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||||
|
usr << browse(null, "window=prox")
|
||||||
|
onclose(usr, "prox")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(href_list["scanning"])
|
||||||
|
toggle_scan()
|
||||||
|
|
||||||
Topic(href, href_list)
|
if(href_list["time"])
|
||||||
if(..()) return 1
|
timing = text2num(href_list["time"])
|
||||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
update_icon()
|
||||||
usr << browse(null, "window=prox")
|
|
||||||
onclose(usr, "prox")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(href_list["scanning"])
|
if(href_list["tp"])
|
||||||
toggle_scan()
|
var/tp = text2num(href_list["tp"])
|
||||||
|
time += tp
|
||||||
if(href_list["time"])
|
time = min(max(round(time), 0), 600)
|
||||||
timing = text2num(href_list["time"])
|
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if(href_list["tp"])
|
|
||||||
var/tp = text2num(href_list["tp"])
|
|
||||||
time += tp
|
|
||||||
time = min(max(round(time), 0), 600)
|
|
||||||
|
|
||||||
if(href_list["range"])
|
|
||||||
var/r = text2num(href_list["range"])
|
|
||||||
range += r
|
|
||||||
range = min(max(range, 1), 5)
|
|
||||||
|
|
||||||
if(href_list["close"])
|
|
||||||
usr << browse(null, "window=prox")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(usr)
|
|
||||||
attack_self(usr)
|
|
||||||
|
|
||||||
|
if(href_list["range"])
|
||||||
|
var/r = text2num(href_list["range"])
|
||||||
|
range += r
|
||||||
|
range = min(max(range, 1), 5)
|
||||||
|
|
||||||
|
if(href_list["close"])
|
||||||
|
usr << browse(null, "window=prox")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(usr)
|
||||||
|
attack_self(usr)
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
return
|
return
|
||||||
if(istype(W, /obj/item/weapon/screwdriver))
|
if(istype(W, /obj/item/weapon/screwdriver))
|
||||||
status = !status
|
status = !status
|
||||||
user << "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>"
|
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -17,171 +17,171 @@
|
|||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
var/deadman = 0
|
var/deadman = 0
|
||||||
|
|
||||||
New()
|
/obj/item/device/assembly/signaler/New()
|
||||||
..()
|
..()
|
||||||
spawn(40)
|
spawn(40)
|
||||||
set_frequency(frequency)
|
set_frequency(frequency)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
activate()
|
/obj/item/device/assembly/signaler/activate()
|
||||||
if(cooldown > 0) return 0
|
if(cooldown > 0) return 0
|
||||||
cooldown = 2
|
cooldown = 2
|
||||||
spawn(10)
|
spawn(10)
|
||||||
process_cooldown()
|
process_cooldown()
|
||||||
|
|
||||||
signal()
|
signal()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
update_icon()
|
/obj/item/device/assembly/signaler/update_icon()
|
||||||
if(holder)
|
if(holder)
|
||||||
holder.update_icon()
|
holder.update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
interact(mob/user as mob, flag1)
|
/obj/item/device/assembly/signaler/interact(mob/user as mob, flag1)
|
||||||
var/t1 = "-------"
|
var/t1 = "-------"
|
||||||
// if ((src.b_stat && !( flag1 )))
|
// if ((src.b_stat && !( flag1 )))
|
||||||
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? text("<A href='?src=\ref[];wires=4'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=4'>Mend Wire</A>", src)), (src.wires & 2 ? text("<A href='?src=\ref[];wires=2'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=2'>Mend Wire</A>", src)), (src.wires & 1 ? text("<A href='?src=\ref[];wires=1'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=1'>Mend Wire</A>", src)))
|
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? text("<A href='?src=\ref[];wires=4'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=4'>Mend Wire</A>", src)), (src.wires & 2 ? text("<A href='?src=\ref[];wires=2'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=2'>Mend Wire</A>", src)), (src.wires & 1 ? text("<A href='?src=\ref[];wires=1'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=1'>Mend Wire</A>", src)))
|
||||||
// else
|
// else
|
||||||
// t1 = "-------" Speaker: [src.listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
|
// t1 = "-------" Speaker: [src.listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
|
||||||
var/dat = {"
|
var/dat = {"
|
||||||
<TT>
|
<TT>
|
||||||
|
|
||||||
<A href='byond://?src=\ref[src];send=1'>Send Signal</A><BR>
|
<A href='byond://?src=\ref[src];send=1'>Send Signal</A><BR>
|
||||||
<B>Frequency/Code</B> for signaler:<BR>
|
<B>Frequency/Code</B> for signaler:<BR>
|
||||||
Frequency:
|
Frequency:
|
||||||
<A href='byond://?src=\ref[src];freq=-10'>-</A>
|
<A href='byond://?src=\ref[src];freq=-10'>-</A>
|
||||||
<A href='byond://?src=\ref[src];freq=-2'>-</A>
|
<A href='byond://?src=\ref[src];freq=-2'>-</A>
|
||||||
[format_frequency(src.frequency)]
|
[format_frequency(src.frequency)]
|
||||||
<A href='byond://?src=\ref[src];freq=2'>+</A>
|
<A href='byond://?src=\ref[src];freq=2'>+</A>
|
||||||
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
|
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
|
||||||
|
|
||||||
Code:
|
Code:
|
||||||
<A href='byond://?src=\ref[src];code=-5'>-</A>
|
<A href='byond://?src=\ref[src];code=-5'>-</A>
|
||||||
<A href='byond://?src=\ref[src];code=-1'>-</A>
|
<A href='byond://?src=\ref[src];code=-1'>-</A>
|
||||||
[src.code]
|
[src.code]
|
||||||
<A href='byond://?src=\ref[src];code=1'>+</A>
|
<A href='byond://?src=\ref[src];code=1'>+</A>
|
||||||
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
|
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
|
||||||
[t1]
|
[t1]
|
||||||
</TT>"}
|
</TT>"}
|
||||||
user << browse(dat, "window=radio")
|
user << browse(dat, "window=radio")
|
||||||
onclose(user, "radio")
|
onclose(user, "radio")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/signaler/Topic(href, href_list, state = deep_inventory_state)
|
||||||
|
if(..()) return 1
|
||||||
|
|
||||||
|
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||||
|
usr << browse(null, "window=radio")
|
||||||
|
onclose(usr, "radio")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if (href_list["freq"])
|
||||||
|
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
||||||
|
if(new_frequency < RADIO_LOW_FREQ || new_frequency > RADIO_HIGH_FREQ)
|
||||||
|
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||||
|
set_frequency(new_frequency)
|
||||||
|
|
||||||
Topic(href, href_list)
|
if(href_list["code"])
|
||||||
if(..()) return 1
|
src.code += text2num(href_list["code"])
|
||||||
|
src.code = round(src.code)
|
||||||
|
src.code = min(100, src.code)
|
||||||
|
src.code = max(1, src.code)
|
||||||
|
|
||||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
if(href_list["send"])
|
||||||
usr << browse(null, "window=radio")
|
spawn( 0 )
|
||||||
onclose(usr, "radio")
|
signal()
|
||||||
return
|
|
||||||
|
|
||||||
if (href_list["freq"])
|
if(usr)
|
||||||
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
attack_self(usr)
|
||||||
if(new_frequency < RADIO_LOW_FREQ || new_frequency > RADIO_HIGH_FREQ)
|
|
||||||
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
|
||||||
set_frequency(new_frequency)
|
|
||||||
|
|
||||||
if(href_list["code"])
|
return
|
||||||
src.code += text2num(href_list["code"])
|
|
||||||
src.code = round(src.code)
|
|
||||||
src.code = min(100, src.code)
|
|
||||||
src.code = max(1, src.code)
|
|
||||||
|
|
||||||
if(href_list["send"])
|
/obj/item/device/assembly/signaler/attackby(obj/item/weapon/W, mob/user, params)
|
||||||
spawn( 0 )
|
if(issignaler(W))
|
||||||
signal()
|
var/obj/item/device/assembly/signaler/signaler2 = W
|
||||||
|
if(secured && signaler2.secured)
|
||||||
|
code = signaler2.code
|
||||||
|
frequency = signaler2.frequency
|
||||||
|
to_chat(user, "You transfer the frequency and code of [signaler2] to [src].")
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
if(usr)
|
/obj/item/device/assembly/signaler/proc/signal()
|
||||||
attack_self(usr)
|
if(!radio_connection) return
|
||||||
|
|
||||||
return
|
var/datum/signal/signal = new
|
||||||
|
signal.source = src
|
||||||
attackby(obj/item/weapon/W, mob/user, params)
|
signal.encryption = code
|
||||||
if(issignaler(W))
|
signal.data["message"] = "ACTIVATE"
|
||||||
var/obj/item/device/assembly/signaler/signaler2 = W
|
radio_connection.post_signal(src, signal)
|
||||||
if(secured && signaler2.secured)
|
return
|
||||||
code = signaler2.code
|
|
||||||
frequency = signaler2.frequency
|
|
||||||
user << "You transfer the frequency and code of [signaler2] to [src]"
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
|
|
||||||
proc/signal()
|
|
||||||
if(!radio_connection) return
|
|
||||||
|
|
||||||
var/datum/signal/signal = new
|
|
||||||
signal.source = src
|
|
||||||
signal.encryption = code
|
|
||||||
signal.data["message"] = "ACTIVATE"
|
|
||||||
radio_connection.post_signal(src, signal)
|
|
||||||
return
|
|
||||||
/*
|
/*
|
||||||
for(var/obj/item/device/assembly/signaler/S in world)
|
for(var/obj/item/device/assembly/signaler/S in world)
|
||||||
if(!S) continue
|
if(!S) continue
|
||||||
if(S == src) continue
|
if(S == src) continue
|
||||||
if((S.frequency == src.frequency) && (S.code == src.code))
|
if((S.frequency == src.frequency) && (S.code == src.code))
|
||||||
spawn(0)
|
spawn(0)
|
||||||
if(S) S.pulse(0)
|
if(S) S.pulse(0)
|
||||||
return 0*/
|
return 0*/
|
||||||
|
|
||||||
|
|
||||||
pulse(var/radio = 0)
|
/obj/item/device/assembly/signaler/pulse(var/radio = 0)
|
||||||
if(src.connected && src.wires)
|
if(src.connected && src.wires)
|
||||||
connected.Pulse(src)
|
connected.Pulse(src)
|
||||||
else if(holder)
|
else if(holder)
|
||||||
holder.process_activation(src, 1, 0)
|
holder.process_activation(src, 1, 0)
|
||||||
else
|
else
|
||||||
..(radio)
|
..(radio)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
receive_signal(datum/signal/signal)
|
/obj/item/device/assembly/signaler/receive_signal(datum/signal/signal)
|
||||||
if(!signal) return 0
|
if(!signal) return 0
|
||||||
if(signal.encryption != code) return 0
|
if(signal.encryption != code) return 0
|
||||||
if(!(src.wires & WIRE_RADIO_RECEIVE)) return 0
|
if(!(src.wires & WIRE_RADIO_RECEIVE)) return 0
|
||||||
pulse(1)
|
pulse(1)
|
||||||
|
|
||||||
if(!holder)
|
if(!holder)
|
||||||
for(var/mob/O in hearers(1, src.loc))
|
for(var/mob/O in hearers(1, src.loc))
|
||||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/signaler/proc/set_frequency(new_frequency)
|
||||||
|
if(!frequency)
|
||||||
return
|
return
|
||||||
|
if(!radio_controller)
|
||||||
|
sleep(20)
|
||||||
proc/set_frequency(new_frequency)
|
if(!radio_controller)
|
||||||
if(!frequency)
|
|
||||||
return
|
|
||||||
if(!radio_controller)
|
|
||||||
sleep(20)
|
|
||||||
if(!radio_controller)
|
|
||||||
return
|
|
||||||
radio_controller.remove_object(src, frequency)
|
|
||||||
frequency = new_frequency
|
|
||||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
|
||||||
return
|
return
|
||||||
|
radio_controller.remove_object(src, frequency)
|
||||||
|
frequency = new_frequency
|
||||||
|
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||||
|
return
|
||||||
|
|
||||||
process()
|
/obj/item/device/assembly/signaler/process()
|
||||||
if(!deadman)
|
if(!deadman)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
if(!M || !ismob(M))
|
if(!M || !ismob(M))
|
||||||
if(prob(5))
|
if(prob(5))
|
||||||
signal()
|
signal()
|
||||||
deadman = 0
|
deadman = 0
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
else if(prob(5))
|
else if(prob(5))
|
||||||
M.visible_message("[M]'s finger twitches a bit over [src]'s signal button!")
|
M.visible_message("[M]'s finger twitches a bit over [src]'s signal button!")
|
||||||
return
|
return
|
||||||
|
|
||||||
verb/deadman_it()
|
/obj/item/device/assembly/signaler/verb/deadman_it()
|
||||||
set src in usr
|
set src in usr
|
||||||
set name = "Threaten to push the button!"
|
set name = "Threaten to push the button!"
|
||||||
set desc = "BOOOOM!"
|
set desc = "BOOOOM!"
|
||||||
deadman = 1
|
deadman = 1
|
||||||
processing_objects.Add(src)
|
processing_objects.Add(src)
|
||||||
log_and_message_admins("is threatening to trigger a signaler deadman's switch")
|
log_and_message_admins("is threatening to trigger a signaler deadman's switch")
|
||||||
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")
|
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")
|
||||||
|
|
||||||
/obj/item/device/assembly/signaler/Destroy()
|
/obj/item/device/assembly/signaler/Destroy()
|
||||||
if(radio_controller)
|
if(radio_controller)
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
name = "timer"
|
name = "timer"
|
||||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||||
icon_state = "timer"
|
icon_state = "timer"
|
||||||
origin_tech = list(TECH_MAGNET = 1)
|
origin_tech = list(TECH_MAGNET = 1)
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||||
|
|
||||||
wires = WIRE_PULSE
|
wires = WIRE_PULSE
|
||||||
|
|
||||||
@@ -12,97 +12,94 @@
|
|||||||
var/timing = 0
|
var/timing = 0
|
||||||
var/time = 10
|
var/time = 10
|
||||||
|
|
||||||
proc
|
|
||||||
timer_end()
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/activate()
|
||||||
|
if(!..()) return 0//Cooldown check
|
||||||
|
|
||||||
activate()
|
timing = !timing
|
||||||
if(!..()) return 0//Cooldown check
|
|
||||||
|
|
||||||
timing = !timing
|
|
||||||
|
|
||||||
update_icon()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
toggle_secure()
|
|
||||||
secured = !secured
|
|
||||||
if(secured)
|
|
||||||
processing_objects.Add(src)
|
|
||||||
else
|
|
||||||
timing = 0
|
|
||||||
processing_objects.Remove(src)
|
|
||||||
update_icon()
|
|
||||||
return secured
|
|
||||||
|
|
||||||
|
|
||||||
timer_end()
|
|
||||||
if(!secured) return 0
|
|
||||||
pulse(0)
|
|
||||||
if(!holder)
|
|
||||||
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
|
||||||
cooldown = 2
|
|
||||||
spawn(10)
|
|
||||||
process_cooldown()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
process()
|
|
||||||
if(timing && (time > 0))
|
|
||||||
time--
|
|
||||||
if(timing && time <= 0)
|
|
||||||
timing = 0
|
|
||||||
timer_end()
|
|
||||||
time = 10
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
overlays.Cut()
|
return 0
|
||||||
attached_overlays = list()
|
|
||||||
if(timing)
|
|
||||||
overlays += "timer_timing"
|
/obj/item/device/assembly/timer/toggle_secure()
|
||||||
attached_overlays += "timer_timing"
|
secured = !secured
|
||||||
if(holder)
|
if(secured)
|
||||||
holder.update_icon()
|
processing_objects.Add(src)
|
||||||
|
else
|
||||||
|
timing = 0
|
||||||
|
processing_objects.Remove(src)
|
||||||
|
update_icon()
|
||||||
|
return secured
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/proc/timer_end()
|
||||||
|
if(!secured) return 0
|
||||||
|
pulse(0)
|
||||||
|
if(!holder)
|
||||||
|
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||||
|
cooldown = 2
|
||||||
|
spawn(10)
|
||||||
|
process_cooldown()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/process()
|
||||||
|
if(timing && (time > 0))
|
||||||
|
time--
|
||||||
|
if(timing && time <= 0)
|
||||||
|
timing = 0
|
||||||
|
timer_end()
|
||||||
|
time = 10
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/update_icon()
|
||||||
|
overlays.Cut()
|
||||||
|
attached_overlays = list()
|
||||||
|
if(timing)
|
||||||
|
overlays += "timer_timing"
|
||||||
|
attached_overlays += "timer_timing"
|
||||||
|
if(holder)
|
||||||
|
holder.update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/interact(mob/user as mob)//TODO: Have this use the wires
|
||||||
|
if(!secured)
|
||||||
|
user.show_message("\red The [name] is unsecured!")
|
||||||
|
return 0
|
||||||
|
var/second = time % 60
|
||||||
|
var/minute = (time - second) / 60
|
||||||
|
var/dat = text("<TT><B>Timing Unit</B>\n[] []:[]\n<A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT>", (timing ? text("<A href='?src=\ref[];time=0'>Timing</A>", src) : text("<A href='?src=\ref[];time=1'>Not Timing</A>", src)), minute, second, src, src, src, src)
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||||
|
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||||
|
user << browse(dat, "window=timer")
|
||||||
|
onclose(user, "timer")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/assembly/timer/Topic(href, href_list, state = deep_inventory_state)
|
||||||
|
if(..()) return 1
|
||||||
|
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||||
|
usr << browse(null, "window=timer")
|
||||||
|
onclose(usr, "timer")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(href_list["time"])
|
||||||
|
timing = text2num(href_list["time"])
|
||||||
|
update_icon()
|
||||||
|
|
||||||
interact(mob/user as mob)//TODO: Have this use the wires
|
if(href_list["tp"])
|
||||||
if(!secured)
|
var/tp = text2num(href_list["tp"])
|
||||||
user.show_message("\red The [name] is unsecured!")
|
time += tp
|
||||||
return 0
|
time = min(max(round(time), 0), 600)
|
||||||
var/second = time % 60
|
|
||||||
var/minute = (time - second) / 60
|
if(href_list["close"])
|
||||||
var/dat = text("<TT><B>Timing Unit</B>\n[] []:[]\n<A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT>", (timing ? text("<A href='?src=\ref[];time=0'>Timing</A>", src) : text("<A href='?src=\ref[];time=1'>Not Timing</A>", src)), minute, second, src, src, src, src)
|
usr << browse(null, "window=timer")
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
|
||||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
|
||||||
user << browse(dat, "window=timer")
|
|
||||||
onclose(user, "timer")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(usr)
|
||||||
|
attack_self(usr)
|
||||||
|
|
||||||
Topic(href, href_list)
|
return
|
||||||
if(..()) return 1
|
|
||||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
|
||||||
usr << browse(null, "window=timer")
|
|
||||||
onclose(usr, "timer")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(href_list["time"])
|
|
||||||
timing = text2num(href_list["time"])
|
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if(href_list["tp"])
|
|
||||||
var/tp = text2num(href_list["tp"])
|
|
||||||
time += tp
|
|
||||||
time = min(max(round(time), 0), 600)
|
|
||||||
|
|
||||||
if(href_list["close"])
|
|
||||||
usr << browse(null, "window=timer")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(usr)
|
|
||||||
attack_self(usr)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|||||||
@@ -19,4 +19,14 @@
|
|||||||
up to 18,446,744,073,709,551,616 unique addresses, one of which is assigned to this device."
|
up to 18,446,744,073,709,551,616 unique addresses, one of which is assigned to this device."
|
||||||
|
|
||||||
description_antag = "Electromagnetic pulses will cause the device to disconnect all linked communicators. Turning off the Exonet node at the Telecomms \
|
description_antag = "Electromagnetic pulses will cause the device to disconnect all linked communicators. Turning off the Exonet node at the Telecomms \
|
||||||
satellite will also accomplish this, but for all communicators on and near the station. This may be needed to allow for a quiet kill or capture."
|
satellite will also accomplish this, but for all communicators on and near the station. This may be needed to allow for a quiet kill or capture."
|
||||||
|
|
||||||
|
/obj/item/device/electronic_assembly/device
|
||||||
|
description_info = "This is the guts of a 'device' type electronic assembly, and can either be used in this form or can be used inside of the assembly to \
|
||||||
|
allow it to interact with other assembly type devices (igniter, signaler, proximity sensor, etc). This device has unique inputs that allow it to either send \
|
||||||
|
or receive pulsed signals from an attached items when inside an electronic assembly device frame (looks not unlike a signaler). Ensure the assembly is closed \
|
||||||
|
before placing it inside the frame."
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly
|
||||||
|
description_info = "This is the casing for the 'device' type of electronic assembly. It behaves like any other 'assembly' type device such as an igniter or signaler \
|
||||||
|
and can be attached to others in the same way. Use the 'toggle-open' verb (right click) or a crowbar to pop the electronic device open to add components and close when finished."
|
||||||
@@ -31,9 +31,10 @@ var/list/all_integrated_circuits = list()
|
|||||||
var/extended_desc = null
|
var/extended_desc = null
|
||||||
var/list/inputs = list()
|
var/list/inputs = list()
|
||||||
var/list/outputs = list()
|
var/list/outputs = list()
|
||||||
var/list/activators = list()
|
var/list/activators = list() //associated_list, = 1 for inbound, = 0 for outbound
|
||||||
var/next_use = 0 //Uses world.time
|
var/next_use = 0 //Uses world.time
|
||||||
var/complexity = 1 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
|
var/complexity = 1 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
|
||||||
|
var/size = null //This acts as a limitation on building machines, bigger components cost more 'space'. -1 for size 0
|
||||||
var/cooldown_per_use = 1 SECOND // Circuits are limited in how many times they can be work()'d by this variable.
|
var/cooldown_per_use = 1 SECOND // Circuits are limited in how many times they can be work()'d by this variable.
|
||||||
var/power_draw_per_use = 0 // How much power is drawn when work()'d.
|
var/power_draw_per_use = 0 // How much power is drawn when work()'d.
|
||||||
var/power_draw_idle = 0 // How much power is drawn when doing nothing.
|
var/power_draw_idle = 0 // How much power is drawn when doing nothing.
|
||||||
@@ -41,5 +42,6 @@ var/list/all_integrated_circuits = list()
|
|||||||
var/category_text = "NO CATEGORY THIS IS A BUG" // To show up on circuit printer, and perhaps other places.
|
var/category_text = "NO CATEGORY THIS IS A BUG" // To show up on circuit printer, and perhaps other places.
|
||||||
var/autopulse = -1 // When input is received, the circuit will pulse itself if set to 1. 0 means it won't. -1 means it is permanently off.
|
var/autopulse = -1 // When input is received, the circuit will pulse itself if set to 1. 0 means it won't. -1 means it is permanently off.
|
||||||
var/removable = TRUE // Determines if a circuit is removable from the assembly.
|
var/removable = TRUE // Determines if a circuit is removable from the assembly.
|
||||||
|
var/displayed_name = ""
|
||||||
|
var/allow_multitool = 1 // Allows additional multitool functionality
|
||||||
|
// Used as a global var, (Do not set manually in children).
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#define IC_COMPONENTS_BASE 20
|
#define IC_COMPONENTS_BASE 20
|
||||||
#define IC_COMPLEXITY_BASE 80
|
#define IC_COMPLEXITY_BASE 60
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly
|
/obj/item/device/electronic_assembly
|
||||||
name = "electronic assembly"
|
name = "electronic assembly"
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
var/opened = 0
|
var/opened = 0
|
||||||
var/obj/item/weapon/cell/device/battery = null // Internal cell which most circuits need to work.
|
var/obj/item/weapon/cell/device/battery = null // Internal cell which most circuits need to work.
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly/medium
|
/obj/item/device/electronic_assembly/medium
|
||||||
name = "electronic mechanism"
|
name = "electronic mechanism"
|
||||||
icon_state = "setup_medium"
|
icon_state = "setup_medium"
|
||||||
@@ -38,8 +39,8 @@
|
|||||||
name = "electronic implant"
|
name = "electronic implant"
|
||||||
icon_state = "setup_implant"
|
icon_state = "setup_implant"
|
||||||
w_class = ITEMSIZE_TINY
|
w_class = ITEMSIZE_TINY
|
||||||
max_components = IC_COMPONENTS_BASE / 2
|
max_components = IC_COMPONENTS_BASE / 4
|
||||||
max_complexity = IC_COMPLEXITY_BASE / 2
|
max_complexity = IC_COMPLEXITY_BASE / 4
|
||||||
var/obj/item/weapon/implant/integrated_circuit/implant = null
|
var/obj/item/weapon/implant/integrated_circuit/implant = null
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly/New()
|
/obj/item/device/electronic_assembly/New()
|
||||||
@@ -82,14 +83,19 @@
|
|||||||
/obj/item/device/electronic_assembly/implant/resolve_nano_host()
|
/obj/item/device/electronic_assembly/implant/resolve_nano_host()
|
||||||
return implant
|
return implant
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly/interact(mob/user)
|
/obj/item/device/electronic_assembly/proc/check_interactivity(mob/user)
|
||||||
if(!CanInteract(user, physical_state))
|
if(!CanInteract(user, physical_state))
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/device/electronic_assembly/interact(mob/user)
|
||||||
|
if(!check_interactivity(user))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/total_parts = 0
|
var/total_parts = 0
|
||||||
var/total_complexity = 0
|
var/total_complexity = 0
|
||||||
for(var/obj/item/integrated_circuit/part in contents)
|
for(var/obj/item/integrated_circuit/part in contents)
|
||||||
total_parts++
|
total_parts += part.size
|
||||||
total_complexity = total_complexity + part.complexity
|
total_complexity = total_complexity + part.complexity
|
||||||
var/HTML = list()
|
var/HTML = list()
|
||||||
|
|
||||||
@@ -103,14 +109,30 @@
|
|||||||
else
|
else
|
||||||
HTML += "<span class='danger'>No powercell detected!</span>"
|
HTML += "<span class='danger'>No powercell detected!</span>"
|
||||||
HTML += "<br><br>"
|
HTML += "<br><br>"
|
||||||
HTML += "Components;<br>"
|
HTML += "Components:<hr>"
|
||||||
|
HTML += "Built in:<br>"
|
||||||
|
|
||||||
|
|
||||||
|
//Put removable circuits in separate categories from non-removable
|
||||||
|
for(var/obj/item/integrated_circuit/circuit in contents)
|
||||||
|
if(!circuit.removable)
|
||||||
|
HTML += "<a href=?src=\ref[circuit];examine=1;from_assembly=1>[circuit.displayed_name]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];rename=1;from_assembly=1>\[Rename\]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];scan=1;from_assembly=1>\[Scan with Debugger\]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];bottom=\ref[circuit];from_assembly=1>\[Move to Bottom\]</a>"
|
||||||
|
HTML += "<br>"
|
||||||
|
|
||||||
|
HTML += "<hr>"
|
||||||
|
HTML += "Removable:<br>"
|
||||||
|
|
||||||
for(var/obj/item/integrated_circuit/circuit in contents)
|
for(var/obj/item/integrated_circuit/circuit in contents)
|
||||||
HTML += "<a href=?src=\ref[circuit];examine=1>[circuit.name]</a> | "
|
|
||||||
HTML += "<a href=?src=\ref[circuit];rename=1>\[Rename\]</a> | "
|
|
||||||
HTML += "<a href=?src=\ref[circuit];scan=1>\[Scan with Debugger\]</a> | "
|
|
||||||
if(circuit.removable)
|
if(circuit.removable)
|
||||||
HTML += "<a href=?src=\ref[circuit];remove=1>\[Remove\]</a>"
|
HTML += "<a href=?src=\ref[circuit];examine=1;from_assembly=1>[circuit.displayed_name]</a> | "
|
||||||
HTML += "<br>"
|
HTML += "<a href=?src=\ref[circuit];rename=1;from_assembly=1>\[Rename\]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];scan=1;from_assembly=1>\[Scan with Debugger\]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];remove=1;from_assembly=1>\[Remove\]</a> | "
|
||||||
|
HTML += "<a href=?src=\ref[circuit];bottom=\ref[circuit];from_assembly=1>\[Move to Bottom\]</a>"
|
||||||
|
HTML += "<br>"
|
||||||
|
|
||||||
HTML += "</body></html>"
|
HTML += "</body></html>"
|
||||||
user << browse(jointext(HTML,null), "window=assembly-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1")
|
user << browse(jointext(HTML,null), "window=assembly-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||||
@@ -140,11 +162,11 @@
|
|||||||
set desc = "Rename your circuit, useful to stay organized."
|
set desc = "Rename your circuit, useful to stay organized."
|
||||||
|
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
if(!CanInteract(M, physical_state))
|
if(!check_interactivity(M))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
||||||
if(src && input && CanInteract(M, physical_state))
|
if(src && input)
|
||||||
to_chat(M, "<span class='notice'>The machine now has a label reading '[input]'.</span>")
|
to_chat(M, "<span class='notice'>The machine now has a label reading '[input]'.</span>")
|
||||||
name = input
|
name = input
|
||||||
|
|
||||||
@@ -191,7 +213,7 @@
|
|||||||
/obj/item/device/electronic_assembly/proc/get_part_size()
|
/obj/item/device/electronic_assembly/proc/get_part_size()
|
||||||
. = 0
|
. = 0
|
||||||
for(var/obj/item/integrated_circuit/part in contents)
|
for(var/obj/item/integrated_circuit/part in contents)
|
||||||
. += part.w_class
|
. += part.size
|
||||||
|
|
||||||
// Returns true if the circuit made it inside.
|
// Returns true if the circuit made it inside.
|
||||||
/obj/item/device/electronic_assembly/proc/add_circuit(var/obj/item/integrated_circuit/IC, var/mob/user)
|
/obj/item/device/electronic_assembly/proc/add_circuit(var/obj/item/integrated_circuit/IC, var/mob/user)
|
||||||
@@ -206,7 +228,7 @@
|
|||||||
var/total_part_size = get_part_size()
|
var/total_part_size = get_part_size()
|
||||||
var/total_complexity = get_part_complexity()
|
var/total_complexity = get_part_complexity()
|
||||||
|
|
||||||
if((total_part_size + IC.w_class) > max_components)
|
if((total_part_size + IC.size) > max_components)
|
||||||
to_chat(user, "<span class='warning'>You can't seem to add the '[IC.name]', as there's insufficient space.</span>")
|
to_chat(user, "<span class='warning'>You can't seem to add the '[IC.name]', as there's insufficient space.</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
if((total_complexity + IC.complexity) > max_complexity)
|
if((total_complexity + IC.complexity) > max_complexity)
|
||||||
@@ -234,16 +256,18 @@
|
|||||||
/obj/item/device/electronic_assembly/attackby(var/obj/item/I, var/mob/user)
|
/obj/item/device/electronic_assembly/attackby(var/obj/item/I, var/mob/user)
|
||||||
if(istype(I, /obj/item/integrated_circuit))
|
if(istype(I, /obj/item/integrated_circuit))
|
||||||
if(!user.unEquip(I))
|
if(!user.unEquip(I))
|
||||||
return 0
|
return FALSE
|
||||||
if(add_circuit(I, user))
|
if(add_circuit(I, user))
|
||||||
to_chat(user, "<span class='notice'>You slide \the [I] inside \the [src].</span>")
|
to_chat(user, "<span class='notice'>You slide \the [I] inside \the [src].</span>")
|
||||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
return TRUE
|
||||||
else if(istype(I, /obj/item/weapon/crowbar))
|
else if(istype(I, /obj/item/weapon/crowbar))
|
||||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
opened = !opened
|
opened = !opened
|
||||||
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
||||||
update_icon()
|
update_icon()
|
||||||
|
return TRUE
|
||||||
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || istype(I, /obj/item/weapon/screwdriver))
|
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || istype(I, /obj/item/weapon/screwdriver))
|
||||||
if(opened)
|
if(opened)
|
||||||
interact(user)
|
interact(user)
|
||||||
@@ -264,20 +288,38 @@
|
|||||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
to_chat(user, "<span class='notice'>You slot \the [cell] inside \the [src]'s power supplier.</span>")
|
to_chat(user, "<span class='notice'>You slot \the [cell] inside \the [src]'s power supplier.</span>")
|
||||||
interact(user)
|
interact(user)
|
||||||
|
return TRUE
|
||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly/attack_self(mob/user)
|
/obj/item/device/electronic_assembly/attack_self(mob/user)
|
||||||
|
if(!check_interactivity(user))
|
||||||
|
return
|
||||||
if(opened)
|
if(opened)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
|
var/list/input_selection = list()
|
||||||
var/list/available_inputs = list()
|
var/list/available_inputs = list()
|
||||||
for(var/obj/item/integrated_circuit/input/input in contents)
|
for(var/obj/item/integrated_circuit/input/input in contents)
|
||||||
if(input.can_be_asked_input)
|
if(input.can_be_asked_input)
|
||||||
available_inputs.Add(input)
|
available_inputs.Add(input)
|
||||||
var/obj/item/integrated_circuit/input/choice = input(user, "What do you want to interact with?", "Interaction") as null|anything in available_inputs
|
var/i = 0
|
||||||
if(choice && CanInteract(user, physical_state))
|
for(var/obj/item/integrated_circuit/s in available_inputs)
|
||||||
|
if(s.name == input.name && s.displayed_name == input.displayed_name && s != input)
|
||||||
|
i++
|
||||||
|
var/disp_name= "[input.displayed_name] \[[input.name]\]"
|
||||||
|
if(i)
|
||||||
|
disp_name += " ([i+1])"
|
||||||
|
input_selection.Add(disp_name)
|
||||||
|
|
||||||
|
var/obj/item/integrated_circuit/input/choice
|
||||||
|
if(available_inputs)
|
||||||
|
var/selection = input(user, "What do you want to interact with?", "Interaction") as null|anything in input_selection
|
||||||
|
if(selection)
|
||||||
|
var/index = input_selection.Find(selection)
|
||||||
|
choice = available_inputs[index]
|
||||||
|
|
||||||
|
if(choice)
|
||||||
choice.ask_for_input(user)
|
choice.ask_for_input(user)
|
||||||
|
|
||||||
/obj/item/device/electronic_assembly/emp_act(severity)
|
/obj/item/device/electronic_assembly/emp_act(severity)
|
||||||
@@ -295,4 +337,5 @@
|
|||||||
/obj/item/device/electronic_assembly/proc/give_power(amount)
|
/obj/item/device/electronic_assembly/proc/give_power(amount)
|
||||||
if(battery && battery.give(amount * CELLRATE))
|
if(battery && battery.give(amount * CELLRATE))
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
84
code/modules/integrated_electronics/core/device.dm
Normal file
84
code/modules/integrated_electronics/core/device.dm
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/obj/item/device/assembly/electronic_assembly
|
||||||
|
name = "electronic device"
|
||||||
|
desc = "It's a case for building electronics with. It can be attached to other small devices."
|
||||||
|
icon_state = "setup_device"
|
||||||
|
var/opened = 0
|
||||||
|
|
||||||
|
var/obj/item/device/electronic_assembly/device/EA
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/New()
|
||||||
|
EA = new(src)
|
||||||
|
EA.holder = src
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob)
|
||||||
|
if (iscrowbar(I) )
|
||||||
|
toggle_open(user)
|
||||||
|
else if (opened)
|
||||||
|
EA.attackby(I, user)
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/proc/toggle_open(mob/user)
|
||||||
|
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
|
opened = !opened
|
||||||
|
EA.opened = opened
|
||||||
|
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
||||||
|
secured = 1
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/update_icon()
|
||||||
|
if(EA)
|
||||||
|
icon_state = initial(icon_state)
|
||||||
|
else
|
||||||
|
icon_state = initial(icon_state)+"0"
|
||||||
|
if(opened)
|
||||||
|
icon_state = icon_state + "-open"
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/attack_self(mob/user as mob)
|
||||||
|
if(EA)
|
||||||
|
EA.attack_self(user)
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||||
|
if(EA)
|
||||||
|
for(var/obj/item/integrated_circuit/built_in/device_input/I in EA.contents)
|
||||||
|
I.do_work()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/examine(mob/user)
|
||||||
|
.=..(user, 1)
|
||||||
|
if(EA)
|
||||||
|
for(var/obj/item/integrated_circuit/IC in EA.contents)
|
||||||
|
IC.external_examine(user)
|
||||||
|
|
||||||
|
/obj/item/device/assembly/electronic_assembly/verb/toggle()
|
||||||
|
set src in usr
|
||||||
|
set category = "Object"
|
||||||
|
set name = "Open/Close Device Assembly"
|
||||||
|
set desc = "Open or close device assembly!"
|
||||||
|
|
||||||
|
toggle_open(usr)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/electronic_assembly/device
|
||||||
|
name = "electronic device"
|
||||||
|
icon_state = "setup_device"
|
||||||
|
desc = "It's a tiny electronic device with specific use for attaching to other devices."
|
||||||
|
var/obj/item/device/assembly/electronic_assembly/holder
|
||||||
|
w_class = ITEMSIZE_TINY
|
||||||
|
max_components = IC_COMPONENTS_BASE * 3/4
|
||||||
|
max_complexity = IC_COMPLEXITY_BASE * 3/4
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/electronic_assembly/device/New()
|
||||||
|
..()
|
||||||
|
var/obj/item/integrated_circuit/built_in/device_input/input = new(src)
|
||||||
|
var/obj/item/integrated_circuit/built_in/device_output/output = new(src)
|
||||||
|
input.assembly = src
|
||||||
|
output.assembly = src
|
||||||
|
|
||||||
|
/obj/item/device/electronic_assembly/device/check_interactivity(mob/user)
|
||||||
|
if(!CanInteract(user, state = deep_inventory_state))
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
@@ -42,3 +42,17 @@
|
|||||||
return null
|
return null
|
||||||
return activators[pin_number]
|
return activators[pin_number]
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/proc/handle_wire(var/datum/integrated_io/pin, var/obj/item/device/integrated_electronics/tool)
|
||||||
|
if(istype(tool, /obj/item/device/integrated_electronics/wirer))
|
||||||
|
var/obj/item/device/integrated_electronics/wirer/wirer = tool
|
||||||
|
if(pin)
|
||||||
|
wirer.wire(pin, usr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
else if(istype(tool, /obj/item/device/integrated_electronics/debugger))
|
||||||
|
var/obj/item/device/integrated_electronics/debugger/debugger = tool
|
||||||
|
if(pin)
|
||||||
|
debugger.write_data(pin, usr)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
@@ -4,9 +4,9 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/item/integrated_circuit/examine(mob/user)
|
/obj/item/integrated_circuit/examine(mob/user)
|
||||||
. = ..()
|
|
||||||
external_examine(user)
|
|
||||||
interact(user)
|
interact(user)
|
||||||
|
external_examine(user)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
// This should be used when someone is examining while the case is opened.
|
// This should be used when someone is examining while the case is opened.
|
||||||
/obj/item/integrated_circuit/proc/internal_examine(mob/user)
|
/obj/item/integrated_circuit/proc/internal_examine(mob/user)
|
||||||
@@ -31,6 +31,9 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/integrated_circuit/New()
|
/obj/item/integrated_circuit/New()
|
||||||
|
displayed_name = name
|
||||||
|
if(!size) size = w_class
|
||||||
|
if(size == -1) size = 0
|
||||||
setup_io(inputs, /datum/integrated_io/input)
|
setup_io(inputs, /datum/integrated_io/input)
|
||||||
setup_io(outputs, /datum/integrated_io/output)
|
setup_io(outputs, /datum/integrated_io/output)
|
||||||
setup_io(activators, /datum/integrated_io/activate)
|
setup_io(activators, /datum/integrated_io/activate)
|
||||||
@@ -58,22 +61,31 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
for(var/datum/integrated_io/io in inputs + outputs + activators)
|
for(var/datum/integrated_io/io in inputs + outputs + activators)
|
||||||
io.scramble()
|
io.scramble()
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/proc/check_interactivity(mob/user)
|
||||||
|
if(assembly)
|
||||||
|
return assembly.check_interactivity(user)
|
||||||
|
else if(!CanInteract(user, physical_state))
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
/obj/item/integrated_circuit/verb/rename_component()
|
/obj/item/integrated_circuit/verb/rename_component()
|
||||||
set name = "Rename Circuit"
|
set name = "Rename Circuit"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set desc = "Rename your circuit, useful to stay organized."
|
set desc = "Rename your circuit, useful to stay organized."
|
||||||
|
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
if(!CanInteract(M, physical_state))
|
if(!check_interactivity(M))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/input = sanitizeSafe(input("What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
var/input = sanitizeSafe(input("What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
||||||
if(src && input && CanInteract(M, physical_state))
|
if(src && input && assembly.check_interactivity(M))
|
||||||
to_chat(M, "<span class='notice'>The circuit '[src.name]' is now labeled '[input]'.</span>")
|
to_chat(M, "<span class='notice'>The circuit '[src.name]' is now labeled '[input]'.</span>")
|
||||||
name = input
|
displayed_name = input
|
||||||
|
|
||||||
/obj/item/integrated_circuit/interact(mob/user)
|
/obj/item/integrated_circuit/interact(mob/user)
|
||||||
if(!CanInteract(user, physical_state))
|
if(!check_interactivity(user))
|
||||||
|
return
|
||||||
|
if(!assembly)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/window_height = 350
|
var/window_height = 350
|
||||||
@@ -85,14 +97,17 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
var/table_middle_width = "40%"
|
var/table_middle_width = "40%"
|
||||||
|
|
||||||
var/HTML = list()
|
var/HTML = list()
|
||||||
HTML += "<html><head><title>[src.name]</title></head><body>"
|
HTML += "<html><head><title>[src.displayed_name]</title></head><body>"
|
||||||
HTML += "<div align='center'>"
|
HTML += "<div align='center'>"
|
||||||
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 80%'>"
|
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 80%'>"
|
||||||
|
|
||||||
|
HTML += "<br><a href='?src=\ref[src];return=1'>\[Return to Assembly\]</a>"
|
||||||
|
|
||||||
HTML += "<br><a href='?src=\ref[src];'>\[Refresh\]</a> | "
|
HTML += "<br><a href='?src=\ref[src];'>\[Refresh\]</a> | "
|
||||||
HTML += "<a href='?src=\ref[src];rename=1'>\[Rename\]</a> | "
|
HTML += "<a href='?src=\ref[src];rename=1'>\[Rename\]</a> | "
|
||||||
HTML += "<a href='?src=\ref[src];scan=1'>\[Scan with Debugger\]</a> | "
|
HTML += "<a href='?src=\ref[src];scan=1'>\[Scan with Device\]</a> | "
|
||||||
HTML += "<a href='?src=\ref[src];remove=1'>\[Remove\]</a><br>"
|
if(src.removable)
|
||||||
|
HTML += "<a href='?src=\ref[src];remove=1'>\[Remove\]</a><br>"
|
||||||
|
|
||||||
HTML += "<colgroup>"
|
HTML += "<colgroup>"
|
||||||
HTML += "<col style='width: [table_edge_width]'>"
|
HTML += "<col style='width: [table_edge_width]'>"
|
||||||
@@ -113,37 +128,31 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
if(1)
|
if(1)
|
||||||
io = get_pin_ref(IC_INPUT, i)
|
io = get_pin_ref(IC_INPUT, i)
|
||||||
if(io)
|
if(io)
|
||||||
|
words += "<b><a href=?src=\ref[src];pin_name=1;pin=\ref[io]>[io.name]</a> <a href=?src=\ref[src];pin_data=1;pin=\ref[io]>[io.display_data()]</a></b><br>"
|
||||||
if(io.linked.len)
|
if(io.linked.len)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]><b>[io.name] [io.display_data()]</b></a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
for(var/datum/integrated_io/linked in io.linked)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
// words += "<a href=?src=\ref[linked.holder];pin_name=1;pin=\ref[linked];link=\ref[io]>\[[linked.name]\]</a>
|
||||||
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder]</a><br>"
|
words += "<a href=?src=\ref[src];pin_unwire=1;pin=\ref[io];link=\ref[linked]>[linked.name]</a> \
|
||||||
else
|
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder.displayed_name]</a><br>"
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>[io.name] [io.display_data()]</a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
|
||||||
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder]</a><br>"
|
|
||||||
if(outputs.len > inputs.len)
|
if(outputs.len > inputs.len)
|
||||||
height = 1
|
height = 1
|
||||||
if(2)
|
if(2)
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
words += "[src.name]<br><br>[src.desc]"
|
words += "[src.displayed_name]<br>([src.name])<hr>[src.desc]"
|
||||||
height = row_height
|
height = row_height
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
if(3)
|
if(3)
|
||||||
io = get_pin_ref(IC_OUTPUT, i)
|
io = get_pin_ref(IC_OUTPUT, i)
|
||||||
if(io)
|
if(io)
|
||||||
|
words += "<b><a href=?src=\ref[src];pin_name=1;pin=\ref[io]>[io.name]</a> <a href=?src=\ref[src];pin_data=1;pin=\ref[io]>[io.display_data()]</a></b><br>"
|
||||||
if(io.linked.len)
|
if(io.linked.len)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]><b>[io.name] [io.display_data()]</b></a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
for(var/datum/integrated_io/linked in io.linked)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
// words += "<a href=?src=\ref[linked.holder];pin_name=1;pin=\ref[linked];link=\ref[io]>\[[linked.name]\]</a>
|
||||||
@ <a href=?src=\ref[linked.holder];examine=1;user=\ref[user]>[linked.holder]</a><br>"
|
words += "<a href=?src=\ref[src];pin_unwire=1;pin=\ref[io];link=\ref[linked]>[linked.name]</a> \
|
||||||
else
|
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder.displayed_name]</a><br>"
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>[io.name] [io.display_data()]</a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
|
||||||
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder]</a><br>"
|
|
||||||
if(inputs.len > outputs.len)
|
if(inputs.len > outputs.len)
|
||||||
height = 1
|
height = 1
|
||||||
HTML += "<td align='center' rowspan='[height]'>[jointext(words, null)]</td>"
|
HTML += "<td align='center' rowspan='[height]'>[jointext(words, null)]</td>"
|
||||||
@@ -152,16 +161,14 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
for(var/activator in activators)
|
for(var/activator in activators)
|
||||||
var/datum/integrated_io/io = activator
|
var/datum/integrated_io/io = activator
|
||||||
var/words = list()
|
var/words = list()
|
||||||
|
|
||||||
|
words += "<b><a href=?src=\ref[src];pin_name=1;pin=\ref[io]><font color='FF0000'>[io.name]</font></a> <a href=?src=\ref[src];pin_data=1;pin=\ref[io]><font color='FF0000'>[io.data?"\<PULSE IN\>":"\<PULSE OUT\>"]</font></a></b><br>"
|
||||||
if(io.linked.len)
|
if(io.linked.len)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]><font color='FF0000'><b>[io.name]</b></font></a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
for(var/datum/integrated_io/linked in io.linked)
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
// words += "<a href=?src=\ref[linked.holder];pin_name=1;pin=\ref[linked];link=\ref[io]>\[[linked.name]\]</a>
|
||||||
@ <a href=?src[src];examine=1;user=\ref[user]>[linked.holder]</a><br>"
|
words += "<a href=?src=\ref[src];pin_unwire=1;pin=\ref[io];link=\ref[linked]><font color='FF0000'>[linked.name]</font></a> \
|
||||||
else
|
@ <a href=?src=\ref[linked.holder];examine=1;><font color='FF0000'>[linked.holder.displayed_name]</font></a><br>"
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]><font color='FF0000'>[io.name]</font></a><br>"
|
|
||||||
for(var/datum/integrated_io/linked in io.linked)
|
|
||||||
words += "<a href=?src=\ref[src];wire=1;pin=\ref[io]>\[[linked.name]\]</a> \
|
|
||||||
@ <a href=?src=\ref[linked.holder];examine=1;>[linked.holder]</a><br>"
|
|
||||||
HTML += "<tr>"
|
HTML += "<tr>"
|
||||||
HTML += "<td colspan='3' align='center'>[jointext(words, null)]</td>"
|
HTML += "<td colspan='3' align='center'>[jointext(words, null)]</td>"
|
||||||
HTML += "</tr>"
|
HTML += "</tr>"
|
||||||
@@ -182,20 +189,92 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
HTML += "<br><font color='0000AA'>[extended_desc]</font>"
|
HTML += "<br><font color='0000AA'>[extended_desc]</font>"
|
||||||
|
|
||||||
HTML += "</body></html>"
|
HTML += "</body></html>"
|
||||||
user << browse(jointext(HTML, null), "window=circuit-\ref[src];size=[window_width]x[window_height];border=1;can_resize=1;can_close=1;can_minimize=1")
|
if(src.assembly)
|
||||||
|
user << browse(jointext(HTML, null), "window=assembly-\ref[src.assembly];size=[window_width]x[window_height];border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||||
|
else
|
||||||
|
user << browse(jointext(HTML, null), "window=circuit-\ref[src];size=[window_width]x[window_height];border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||||
|
|
||||||
onclose(user, "circuit-\ref[src]")
|
onclose(user, "assembly-\ref[src.assembly]")
|
||||||
|
|
||||||
/obj/item/integrated_circuit/Topic(href, href_list, state = physical_state)
|
/obj/item/integrated_circuit/Topic(href, href_list, state = interactive_state)
|
||||||
|
if(!check_interactivity(usr))
|
||||||
|
return
|
||||||
if(..())
|
if(..())
|
||||||
return 1
|
return 1
|
||||||
var/pin = locate(href_list["pin"]) in inputs + outputs + activators
|
|
||||||
|
var/update = 1
|
||||||
|
var/obj/item/device/electronic_assembly/A = src.assembly
|
||||||
|
var/update_to_assembly = 0
|
||||||
|
var/datum/integrated_io/pin = locate(href_list["pin"]) in inputs + outputs + activators
|
||||||
|
var/datum/integrated_io/linked = null
|
||||||
|
if(href_list["link"])
|
||||||
|
linked = locate(href_list["link"]) in pin.linked
|
||||||
|
|
||||||
var/obj/held_item = usr.get_active_hand()
|
var/obj/held_item = usr.get_active_hand()
|
||||||
|
|
||||||
|
if(href_list["rename"])
|
||||||
|
rename_component(usr)
|
||||||
|
if(href_list["from_assembly"])
|
||||||
|
update = 0
|
||||||
|
var/obj/item/device/electronic_assembly/ea = loc
|
||||||
|
if(istype(ea))
|
||||||
|
ea.interact(usr)
|
||||||
|
|
||||||
|
if(href_list["pin_name"])
|
||||||
|
if (!istype(held_item, /obj/item/device/multitool) || !allow_multitool)
|
||||||
|
href_list["wire"] = 1
|
||||||
|
else
|
||||||
|
var/obj/item/device/multitool/M = held_item
|
||||||
|
M.wire(pin,usr)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(href_list["pin_data"])
|
||||||
|
if (!istype(held_item, /obj/item/device/multitool) || !allow_multitool)
|
||||||
|
href_list["wire"] = 1
|
||||||
|
|
||||||
|
else
|
||||||
|
var/datum/integrated_io/io = pin
|
||||||
|
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 = input("Now type in a string.","[src] string writing") as null|text
|
||||||
|
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)
|
||||||
|
href_list["wire"] = 1
|
||||||
|
else
|
||||||
|
var/obj/item/device/multitool/M = held_item
|
||||||
|
M.unwire(pin, linked, usr)
|
||||||
|
|
||||||
if(href_list["wire"])
|
if(href_list["wire"])
|
||||||
if(istype(held_item, /obj/item/device/integrated_electronics/wirer))
|
if(istype(held_item, /obj/item/device/integrated_electronics/wirer))
|
||||||
var/obj/item/device/integrated_electronics/wirer/wirer = held_item
|
var/obj/item/device/integrated_electronics/wirer/wirer = held_item
|
||||||
if(pin)
|
if(linked)
|
||||||
|
wirer.wire(linked, usr)
|
||||||
|
else if(pin)
|
||||||
wirer.wire(pin, usr)
|
wirer.wire(pin, usr)
|
||||||
|
|
||||||
else if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
|
else if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
|
||||||
@@ -206,10 +285,23 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
to_chat(usr, "<span class='warning'>You can't do a whole lot without the proper tools.</span>")
|
to_chat(usr, "<span class='warning'>You can't do a whole lot without the proper tools.</span>")
|
||||||
|
|
||||||
if(href_list["examine"])
|
if(href_list["examine"])
|
||||||
examine(usr)
|
var/obj/item/integrated_circuit/examined
|
||||||
|
if(href_list["examined"])
|
||||||
|
examined = href_list["examined"]
|
||||||
|
else
|
||||||
|
examined = src
|
||||||
|
examined.interact(usr)
|
||||||
|
update = 0
|
||||||
|
|
||||||
if(href_list["rename"])
|
if(href_list["bottom"])
|
||||||
rename_component(usr)
|
var/obj/item/integrated_circuit/circuit = locate(href_list["bottom"]) in src.assembly.contents
|
||||||
|
var/assy = circuit.assembly
|
||||||
|
if(!circuit)
|
||||||
|
return
|
||||||
|
circuit.loc = null
|
||||||
|
circuit.loc = assy
|
||||||
|
. = 1
|
||||||
|
update_to_assembly = 1
|
||||||
|
|
||||||
if(href_list["scan"])
|
if(href_list["scan"])
|
||||||
if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
|
if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
|
||||||
@@ -219,31 +311,47 @@ a creative player the means to solve many problems. Circuits are held inside an
|
|||||||
else
|
else
|
||||||
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
|
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
|
||||||
else
|
else
|
||||||
to_chat(usr, "<span class='warning'>You need a Debugger set to 'ref' mode to do that.</span>")
|
to_chat(usr, "<span class='warning'>You need a multitool/debugger set to 'ref' mode to do that.</span>")
|
||||||
|
|
||||||
if(href_list["autopulse"])
|
if(href_list["autopulse"])
|
||||||
if(autopulse != -1)
|
if(autopulse != -1)
|
||||||
autopulse = !autopulse
|
autopulse = !autopulse
|
||||||
|
|
||||||
if(href_list["remove"])
|
if(href_list["return"])
|
||||||
if(istype(held_item, /obj/item/weapon/screwdriver))
|
if(A)
|
||||||
if(!removable)
|
update_to_assembly = 1
|
||||||
to_chat(usr, "<span class='warning'>\The [src] seems to be permanently attached to the case.</span>")
|
usr << browse(null, "window=circuit-\ref[src];border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||||
return
|
|
||||||
disconnect_all()
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
forceMove(T)
|
|
||||||
assembly = null
|
|
||||||
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
|
|
||||||
to_chat(usr, "<span class='notice'>You pop \the [src] out of the case, and slide it out.</span>")
|
|
||||||
else
|
else
|
||||||
to_chat(usr, "<span class='warning'>You need a screwdriver to remove components.</span>")
|
to_chat(usr, "<span class='warning'>This circuit is not in an assembly!</span>")
|
||||||
|
|
||||||
|
|
||||||
|
if(href_list["remove"])
|
||||||
|
if(!A)
|
||||||
|
to_chat(usr, "<span class='warning'>This circuit is not in an assembly!</span>")
|
||||||
|
return
|
||||||
|
if(!removable)
|
||||||
|
to_chat(usr, "<span class='warning'>\The [src] seems to be permanently attached to the case.</span>")
|
||||||
|
return
|
||||||
var/obj/item/device/electronic_assembly/ea = loc
|
var/obj/item/device/electronic_assembly/ea = loc
|
||||||
|
disconnect_all()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
forceMove(T)
|
||||||
|
assembly = null
|
||||||
|
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
|
to_chat(usr, "<span class='notice'>You pop \the [src] out of the case, and slide it out.</span>")
|
||||||
|
|
||||||
if(istype(ea))
|
if(istype(ea))
|
||||||
ea.interact(usr)
|
ea.interact(usr)
|
||||||
|
update = 0
|
||||||
return
|
return
|
||||||
|
|
||||||
interact(usr) // To refresh the UI.
|
if(update)
|
||||||
|
if(A && istype(A) && update_to_assembly)
|
||||||
|
A.interact(usr)
|
||||||
|
else
|
||||||
|
interact(usr) // To refresh the UI.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/integrated_circuit/proc/push_data()
|
/obj/item/integrated_circuit/proc/push_data()
|
||||||
for(var/datum/integrated_io/output/O in outputs)
|
for(var/datum/integrated_io/output/O in outputs)
|
||||||
|
|||||||
@@ -165,6 +165,89 @@
|
|||||||
|
|
||||||
io.holder.interact(user) // This is to update the UI.
|
io.holder.interact(user) // This is to update the UI.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/multitool
|
||||||
|
var/datum/integrated_io/selected_io = null
|
||||||
|
var/mode = 0
|
||||||
|
|
||||||
|
/obj/item/device/multitool/attack_self(mob/user)
|
||||||
|
if(selected_io)
|
||||||
|
selected_io = null
|
||||||
|
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/item/device/multitool/update_icon()
|
||||||
|
if(selected_io)
|
||||||
|
if(buffer || connecting || connectable)
|
||||||
|
icon_state = "multitool_tracking"
|
||||||
|
else
|
||||||
|
icon_state = "multitool_red"
|
||||||
|
else
|
||||||
|
if(buffer || connecting || connectable)
|
||||||
|
icon_state = "multitool_tracking_fail"
|
||||||
|
else
|
||||||
|
icon_state = "multitool"
|
||||||
|
|
||||||
|
/obj/item/device/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||||
|
if(!io.holder.assembly)
|
||||||
|
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
if(selected_io)
|
||||||
|
if(io == selected_io)
|
||||||
|
to_chat(user, "<span class='warning'>Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.</span>")
|
||||||
|
return
|
||||||
|
if(io.io_type != selected_io.io_type)
|
||||||
|
to_chat(user, "<span class='warning'>Those two types of channels are incompatable. The first is a [selected_io.io_type], \
|
||||||
|
while the second is a [io.io_type].</span>")
|
||||||
|
return
|
||||||
|
if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly)
|
||||||
|
to_chat(user, "<span class='warning'>Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly.</span>")
|
||||||
|
return
|
||||||
|
selected_io.linked |= io
|
||||||
|
io.linked |= selected_io
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].</span>")
|
||||||
|
selected_io.holder.interact(user) // This is to update the UI.
|
||||||
|
selected_io = null
|
||||||
|
|
||||||
|
else
|
||||||
|
selected_io = io
|
||||||
|
to_chat(user, "<span class='notice'>You link \the multitool to \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
|
||||||
|
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/device/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||||
|
if(!io1.linked.len || !io2.linked.len)
|
||||||
|
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!(io1 in io2.linked) || !(io2 in io1.linked) )
|
||||||
|
to_chat(user, "<span class='warning'>These data pins aren't connected!</span>")
|
||||||
|
return
|
||||||
|
else
|
||||||
|
io1.linked.Remove(io2)
|
||||||
|
io2.linked.Remove(io1)
|
||||||
|
to_chat(user, "<span class='notice'>You clip the data connection between the [io1.holder.displayed_name]'s \
|
||||||
|
[io1.name] and the [io2.holder.displayed_name]'s [io2.name].</span>")
|
||||||
|
io1.holder.interact(user) // This is to update the UI.
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/bag/circuits
|
/obj/item/weapon/storage/bag/circuits
|
||||||
name = "circuit kit"
|
name = "circuit kit"
|
||||||
desc = "This kit's essential for any circuitry projects."
|
desc = "This kit's essential for any circuitry projects."
|
||||||
@@ -178,7 +261,8 @@
|
|||||||
/obj/item/device/electronic_assembly,
|
/obj/item/device/electronic_assembly,
|
||||||
/obj/item/device/integrated_electronics,
|
/obj/item/device/integrated_electronics,
|
||||||
/obj/item/weapon/crowbar,
|
/obj/item/weapon/crowbar,
|
||||||
/obj/item/weapon/screwdriver
|
/obj/item/weapon/screwdriver,
|
||||||
|
/obj/item/device/multitool
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/bag/circuits/basic/New()
|
/obj/item/weapon/storage/bag/circuits/basic/New()
|
||||||
@@ -186,7 +270,7 @@
|
|||||||
spawn(2 SECONDS) // So the list has time to initialize.
|
spawn(2 SECONDS) // So the list has time to initialize.
|
||||||
// for(var/obj/item/integrated_circuit/IC in all_integrated_circuits)
|
// for(var/obj/item/integrated_circuit/IC in all_integrated_circuits)
|
||||||
// if(IC.spawn_flags & IC_SPAWN_DEFAULT)
|
// if(IC.spawn_flags & IC_SPAWN_DEFAULT)
|
||||||
// for(var/i = 1 to 3)
|
// for(var/i = 1 to 4)
|
||||||
// new IC.type(src)
|
// new IC.type(src)
|
||||||
new /obj/item/weapon/storage/bag/circuits/mini/arithmetic(src)
|
new /obj/item/weapon/storage/bag/circuits/mini/arithmetic(src)
|
||||||
new /obj/item/weapon/storage/bag/circuits/mini/trig(src)
|
new /obj/item/weapon/storage/bag/circuits/mini/trig(src)
|
||||||
@@ -201,10 +285,11 @@
|
|||||||
new /obj/item/weapon/storage/bag/circuits/mini/power(src)
|
new /obj/item/weapon/storage/bag/circuits/mini/power(src)
|
||||||
|
|
||||||
new /obj/item/device/electronic_assembly(src)
|
new /obj/item/device/electronic_assembly(src)
|
||||||
new /obj/item/device/integrated_electronics/wirer(src)
|
new /obj/item/device/assembly/electronic_assembly(src)
|
||||||
new /obj/item/device/integrated_electronics/debugger(src)
|
new /obj/item/device/assembly/electronic_assembly(src)
|
||||||
new /obj/item/weapon/crowbar(src)
|
new /obj/item/device/multitool(src)
|
||||||
new /obj/item/weapon/screwdriver(src)
|
new /obj/item/weapon/screwdriver(src)
|
||||||
|
new /obj/item/weapon/crowbar(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
/obj/item/weapon/storage/bag/circuits/all/New()
|
/obj/item/weapon/storage/bag/circuits/all/New()
|
||||||
@@ -231,7 +316,6 @@
|
|||||||
new /obj/item/device/integrated_electronics/wirer(src)
|
new /obj/item/device/integrated_electronics/wirer(src)
|
||||||
new /obj/item/device/integrated_electronics/debugger(src)
|
new /obj/item/device/integrated_electronics/debugger(src)
|
||||||
new /obj/item/weapon/crowbar(src)
|
new /obj/item/weapon/crowbar(src)
|
||||||
new /obj/item/weapon/screwdriver(src)
|
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
/obj/item/weapon/storage/bag/circuits/mini/
|
/obj/item/weapon/storage/bag/circuits/mini/
|
||||||
@@ -254,7 +338,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -271,7 +355,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -288,7 +372,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -305,7 +389,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -322,7 +406,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -339,7 +423,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -356,7 +440,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -373,7 +457,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -390,7 +474,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -407,7 +491,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -423,7 +507,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -439,7 +523,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
|
|
||||||
@@ -456,10 +540,10 @@
|
|||||||
..()
|
..()
|
||||||
for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
for(var/obj/item/integrated_circuit/power/IC in all_integrated_circuits)
|
for(var/obj/item/integrated_circuit/power/IC in all_integrated_circuits)
|
||||||
if(IC.spawn_flags & spawn_flags_to_use)
|
if(IC.spawn_flags & spawn_flags_to_use)
|
||||||
for(var/i = 1 to 3)
|
for(var/i = 1 to 4)
|
||||||
new IC.type(src)
|
new IC.type(src)
|
||||||
make_exact_fit()
|
make_exact_fit()
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"\<NUM\> H"
|
"\<NUM\> H"
|
||||||
)
|
)
|
||||||
outputs = list("\<NUM\> result")
|
outputs = list("\<NUM\> result")
|
||||||
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
|
activators = list("compute" = 1, "on computed" = 0)
|
||||||
category_text = "Arithmetic"
|
category_text = "Arithmetic"
|
||||||
autopulse = 1
|
autopulse = 1
|
||||||
power_draw_per_use = 5 // Math is pretty cheap.
|
power_draw_per_use = 5 // Math is pretty cheap.
|
||||||
|
|||||||
28
code/modules/integrated_electronics/subtypes/built_in.dm
Normal file
28
code/modules/integrated_electronics/subtypes/built_in.dm
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/obj/item/integrated_circuit/built_in
|
||||||
|
name = "integrated circuit"
|
||||||
|
desc = "It's a tiny chip! This one doesn't seem to do much, however."
|
||||||
|
icon = 'icons/obj/electronic_assemblies.dmi'
|
||||||
|
icon_state = "template"
|
||||||
|
size = -1
|
||||||
|
w_class = ITEMSIZE_TINY
|
||||||
|
removable = FALSE // Determines if a circuit is removable from the assembly.
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/built_in/device_input
|
||||||
|
name = "assembly input"
|
||||||
|
desc = "A built in chip for handling pulses from attached assembly items."
|
||||||
|
complexity = 0 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
|
||||||
|
activators = list("on pulsed" = 0)
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/built_in/device_input/do_work()
|
||||||
|
activate_pin(1)
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/built_in/device_output
|
||||||
|
name = "assembly out"
|
||||||
|
desc = "A built in chip for pulsing attached assembly items."
|
||||||
|
complexity = 0 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
|
||||||
|
activators = list("pulse attached" = 1)
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/built_in/device_output/do_work()
|
||||||
|
if(istype(assembly, /obj/item/device/electronic_assembly/device))
|
||||||
|
var/obj/item/device/electronic_assembly/device/device = assembly
|
||||||
|
device.holder.pulse()
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
complexity = 2
|
complexity = 2
|
||||||
inputs = list("input")
|
inputs = list("input")
|
||||||
outputs = list("output")
|
outputs = list("output")
|
||||||
activators = list("\<PULSE IN\> convert", "\<PULSE OUT\> on convert")
|
activators = list("convert" = 1, "on convert" = 0)
|
||||||
category_text = "Converter"
|
category_text = "Converter"
|
||||||
autopulse = 1
|
autopulse = 1
|
||||||
power_draw_per_use = 10
|
power_draw_per_use = 10
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
/obj/item/integrated_circuit/converter/num2text
|
/obj/item/integrated_circuit/converter/num2text
|
||||||
name = "number to string"
|
name = "number to string"
|
||||||
desc = "This circuit can convert a number variable into a string."
|
desc = "This circuit can convert a number variable into a string."
|
||||||
|
extended_desc = "Because of game limitations null/false variables will output a '0' string."
|
||||||
icon_state = "num-string"
|
icon_state = "num-string"
|
||||||
inputs = list("\<NUM\> input")
|
inputs = list("\<NUM\> input")
|
||||||
outputs = list("\<TEXT\> output")
|
outputs = list("\<TEXT\> output")
|
||||||
@@ -26,6 +27,8 @@
|
|||||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||||
if(incoming && isnum(incoming))
|
if(incoming && isnum(incoming))
|
||||||
result = num2text(incoming)
|
result = num2text(incoming)
|
||||||
|
else if(!incoming)
|
||||||
|
result = "0"
|
||||||
|
|
||||||
set_pin_data(IC_OUTPUT, 1, result)
|
set_pin_data(IC_OUTPUT, 1, result)
|
||||||
push_data()
|
push_data()
|
||||||
@@ -107,8 +110,8 @@
|
|||||||
push_data()
|
push_data()
|
||||||
activate_pin(2)
|
activate_pin(2)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/converter/concatenatior
|
/obj/item/integrated_circuit/converter/concatenator
|
||||||
name = "concatenatior"
|
name = "concatenator"
|
||||||
desc = "This joins many strings or numbers together to get one big string."
|
desc = "This joins many strings or numbers together to get one big string."
|
||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list(
|
inputs = list(
|
||||||
@@ -122,10 +125,10 @@
|
|||||||
"\<TEXT/NUM\> H"
|
"\<TEXT/NUM\> H"
|
||||||
)
|
)
|
||||||
outputs = list("\<TEXT\> result")
|
outputs = list("\<TEXT\> result")
|
||||||
activators = list("\<PULSE IN\> concatenate", "\<PULSE OUT\> on concatenated")
|
activators = list("concatenate" = 1, "on concatenated" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
/obj/item/integrated_circuit/converter/concatenatior/do_work()
|
/obj/item/integrated_circuit/converter/concatenator/do_work()
|
||||||
var/result = null
|
var/result = null
|
||||||
for(var/datum/integrated_io/input/I in inputs)
|
for(var/datum/integrated_io/input/I in inputs)
|
||||||
I.pull_data()
|
I.pull_data()
|
||||||
@@ -139,6 +142,44 @@
|
|||||||
outgoing.push_data()
|
outgoing.push_data()
|
||||||
activate_pin(2)
|
activate_pin(2)
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/converter/separator
|
||||||
|
name = "separator"
|
||||||
|
desc = "This splits as single string into two at the relative split point."
|
||||||
|
extended_desc = "This circuits splits a given string into two, based on the string, and the index value. \
|
||||||
|
The index splits the string <b>after</b> the given index, including spaces. So 'a person' with an index of '3' \
|
||||||
|
will split into 'a p' and 'erson'."
|
||||||
|
complexity = 4
|
||||||
|
inputs = list(
|
||||||
|
"\<TEXT\> string",
|
||||||
|
"\<NUM\> index",
|
||||||
|
)
|
||||||
|
outputs = list(
|
||||||
|
"\<TEXT\> before split",
|
||||||
|
"\<TEXT\> after split"
|
||||||
|
)
|
||||||
|
activators = list("separate" = 1, "on separated" = 0)
|
||||||
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/converter/separator/do_work()
|
||||||
|
var/text = get_pin_data(IC_INPUT, 1)
|
||||||
|
var/index = get_pin_data(IC_INPUT, 2)
|
||||||
|
|
||||||
|
var/split = min(index+1, length(text))
|
||||||
|
|
||||||
|
var/before_text = copytext(text, 1, split)
|
||||||
|
var/after_text = copytext(text, split, 0)
|
||||||
|
|
||||||
|
var/datum/integrated_io/outgoing1 = outputs[1]
|
||||||
|
var/datum/integrated_io/outgoing2 = outputs[2]
|
||||||
|
outgoing1.data = before_text
|
||||||
|
outgoing2.data = after_text
|
||||||
|
outgoing1.push_data()
|
||||||
|
outgoing2.push_data()
|
||||||
|
|
||||||
|
activate_pin(2)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/integrated_circuit/converter/radians2degrees
|
/obj/item/integrated_circuit/converter/radians2degrees
|
||||||
name = "radians to degrees converter"
|
name = "radians to degrees converter"
|
||||||
desc = "Converts radians to degrees."
|
desc = "Converts radians to degrees."
|
||||||
@@ -182,7 +223,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list("\<NUM\> X1", "\<NUM\> Y1", "\<NUM\> X2", "\<NUM\> Y2")
|
inputs = list("\<NUM\> X1", "\<NUM\> Y1", "\<NUM\> X2", "\<NUM\> Y2")
|
||||||
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
||||||
activators = list("\<PULSE IN\> compute rel coordinates", "\<PULSE OUT\> on convert")
|
activators = list("compute rel coordinates" = 1, "on convert" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
|
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
|
||||||
|
|||||||
@@ -44,9 +44,9 @@
|
|||||||
icon_state = "splitter"
|
icon_state = "splitter"
|
||||||
complexity = 3
|
complexity = 3
|
||||||
activators = list(
|
activators = list(
|
||||||
"incoming pulse",
|
"pulse" = 1,
|
||||||
"outgoing pulse A",
|
"pulse A" = 0,
|
||||||
"outgoing pulse B"
|
"pulse B" = 0
|
||||||
)
|
)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 2
|
power_draw_per_use = 2
|
||||||
@@ -64,11 +64,11 @@
|
|||||||
icon_state = "splitter4"
|
icon_state = "splitter4"
|
||||||
complexity = 5
|
complexity = 5
|
||||||
activators = list(
|
activators = list(
|
||||||
"incoming pulse",
|
"pulse" = 1,
|
||||||
"outgoing pulse A",
|
"pulse A" = 0,
|
||||||
"outgoing pulse B",
|
"pulse B" = 0,
|
||||||
"outgoing pulse C",
|
"pulse C" = 0,
|
||||||
"outgoing pulse D"
|
"pulse D" = 0
|
||||||
)
|
)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
@@ -79,15 +79,15 @@
|
|||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
complexity = 9
|
complexity = 9
|
||||||
activators = list(
|
activators = list(
|
||||||
"incoming pulse",
|
"incoming pulse" = 1,
|
||||||
"outgoing pulse A",
|
"outgoing pulse A" = 0,
|
||||||
"outgoing pulse B",
|
"outgoing pulse B" = 0,
|
||||||
"outgoing pulse C",
|
"outgoing pulse C" = 0,
|
||||||
"outgoing pulse D",
|
"outgoing pulse D" = 0,
|
||||||
"outgoing pulse E",
|
"outgoing pulse E" = 0,
|
||||||
"outgoing pulse F",
|
"outgoing pulse F" = 0,
|
||||||
"outgoing pulse G",
|
"outgoing pulse G" = 0,
|
||||||
"outgoing pulse H"
|
"outgoing pulse H" = 0
|
||||||
)
|
)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 8
|
power_draw_per_use = 8
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
icon_state = "mux2"
|
icon_state = "mux2"
|
||||||
inputs = list("input selection")
|
inputs = list("input selection")
|
||||||
outputs = list("output")
|
outputs = list("output")
|
||||||
activators = list("select")
|
activators = list("select" = 1, "on select" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
var/number_of_inputs = 2
|
var/number_of_inputs = 2
|
||||||
@@ -120,7 +120,10 @@
|
|||||||
|
|
||||||
if(isnum(input_index) && (input_index >= 1 && input_index < inputs.len))
|
if(isnum(input_index) && (input_index >= 1 && input_index < inputs.len))
|
||||||
output = get_pin_data(IC_INPUT, input_index + 1)
|
output = get_pin_data(IC_INPUT, input_index + 1)
|
||||||
|
|
||||||
set_pin_data(IC_OUTPUT, 1, output)
|
set_pin_data(IC_OUTPUT, 1, output)
|
||||||
|
push_data()
|
||||||
|
activate_pin(2)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/transfer/multiplexer/medium
|
/obj/item/integrated_circuit/transfer/multiplexer/medium
|
||||||
name = "four multiplexer"
|
name = "four multiplexer"
|
||||||
@@ -147,7 +150,7 @@
|
|||||||
icon_state = "dmux2"
|
icon_state = "dmux2"
|
||||||
inputs = list("output selection","input")
|
inputs = list("output selection","input")
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("select")
|
activators = list("select" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
var/number_of_outputs = 2
|
var/number_of_outputs = 2
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
can_be_asked_input = 1
|
can_be_asked_input = 1
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE OUT\> on pressed")
|
activators = list("on pressed" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
|
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
can_be_asked_input = 1
|
can_be_asked_input = 1
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<NUM\> on" = 0)
|
outputs = list("\<NUM\> on" = 0)
|
||||||
activators = list("\<PULSE OUT\> on toggle")
|
activators = list("on toggle" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
/obj/item/integrated_circuit/input/toggle_button/ask_for_input(mob/user) // Ditto.
|
/obj/item/integrated_circuit/input/toggle_button/ask_for_input(mob/user) // Ditto.
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
can_be_asked_input = 1
|
can_be_asked_input = 1
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<NUM\> number entered")
|
outputs = list("\<NUM\> number entered")
|
||||||
activators = list("\<PULSE OUT\> on entered")
|
activators = list("on entered" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
can_be_asked_input = 1
|
can_be_asked_input = 1
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<TEXT\> string entered")
|
outputs = list("\<TEXT\> string entered")
|
||||||
activators = list("\<PULSE OUT\> on entered")
|
activators = list("on entered" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list("\<REF\> target")
|
inputs = list("\<REF\> target")
|
||||||
outputs = list("\<NUM\> total health %", "\<NUM\> total missing health")
|
outputs = list("\<NUM\> total health %", "\<NUM\> total missing health")
|
||||||
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
|
activators = list("scan" = 1, "on scanned" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||||
power_draw_per_use = 40
|
power_draw_per_use = 40
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
"\<NUM\> oxy damage",
|
"\<NUM\> oxy damage",
|
||||||
"\<NUM\> clone damage"
|
"\<NUM\> clone damage"
|
||||||
)
|
)
|
||||||
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
|
activators = list("scan" = 1, "on scanned" = 0)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
|
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
|
||||||
power_draw_per_use = 80
|
power_draw_per_use = 80
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
that is holding the machine containing it."
|
that is holding the machine containing it."
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("located ref")
|
outputs = list("located ref")
|
||||||
activators = list("locate")
|
activators = list("locate" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 20
|
power_draw_per_use = 20
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
random."
|
random."
|
||||||
inputs = list("desired type ref")
|
inputs = list("desired type ref")
|
||||||
outputs = list("located ref")
|
outputs = list("located ref")
|
||||||
activators = list("locate")
|
activators = list("locate" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 30
|
power_draw_per_use = 30
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list("\<NUM\> frequency","\<NUM\> code")
|
inputs = list("\<NUM\> frequency","\<NUM\> code")
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE IN\> send signal","\<PULSE OUT\> on signal sent", "\<PULSE OUT\> on signal received")
|
activators = list("send signal" = 1,"on signal sent" = 0, "on signal received" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2)
|
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2)
|
||||||
power_draw_idle = 5
|
power_draw_idle = 5
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list("\<TEXT\> target EPv2 address", "\<TEXT\> data to send", "\<TEXT\> secondary text")
|
inputs = list("\<TEXT\> target EPv2 address", "\<TEXT\> data to send", "\<TEXT\> secondary text")
|
||||||
outputs = list("\<TEXT\> address received", "\<TEXT\> data received", "\<TEXT\> secondary text received")
|
outputs = list("\<TEXT\> address received", "\<TEXT\> data received", "\<TEXT\> secondary text received")
|
||||||
activators = list("\<PULSE IN\> send data", "\<PULSE OUT\> on data received")
|
activators = list("send data" = 1, "on data received" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2)
|
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2)
|
||||||
power_draw_per_use = 50
|
power_draw_per_use = 50
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
||||||
activators = list("\<PULSE IN\> get coordinates", "\<PULSE OUT\> on get coordinates")
|
activators = list("get coordinates" = 1, "on get coordinates" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 30
|
power_draw_per_use = 30
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
complexity = 8
|
complexity = 8
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<TEXT\> speaker", "\<TEXT\> message")
|
outputs = list("\<TEXT\> speaker", "\<TEXT\> message")
|
||||||
activators = list("\<PULSE OUT\> on message received", "\<PULSE OUT\> on translation")
|
activators = list("on message received" = 1, "on translation" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 15
|
power_draw_per_use = 15
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@
|
|||||||
complexity = 12
|
complexity = 12
|
||||||
inputs = list("\<NUM\> ignore storage" = 1)
|
inputs = list("\<NUM\> ignore storage" = 1)
|
||||||
outputs = list("\<REF\> scanned")
|
outputs = list("\<REF\> scanned")
|
||||||
activators = list("\<PULSE OUT\> on scanned")
|
activators = list("on scanned" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 120
|
power_draw_per_use = 120
|
||||||
|
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
icon_state = "screen"
|
icon_state = "screen"
|
||||||
inputs = list("\<TEXT/NUM\> displayed data")
|
inputs = list("\<TEXT/NUM\> displayed data")
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE IN\> load data")
|
activators = list("load data" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 10
|
power_draw_per_use = 10
|
||||||
autopulse = 1
|
autopulse = 1
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE IN\> toggle light")
|
activators = list("toggle light" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
var/light_toggled = 0
|
var/light_toggled = 0
|
||||||
var/light_brightness = 3
|
var/light_brightness = 3
|
||||||
@@ -545,7 +545,7 @@
|
|||||||
"\<NUM\> frequency"
|
"\<NUM\> frequency"
|
||||||
)
|
)
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("play sound")
|
activators = list("play sound" = 1)
|
||||||
power_draw_per_use = 20
|
power_draw_per_use = 20
|
||||||
var/list/sounds = list()
|
var/list/sounds = list()
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@
|
|||||||
cooldown_per_use = 4 SECONDS
|
cooldown_per_use = 4 SECONDS
|
||||||
inputs = list("text")
|
inputs = list("text")
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("to speech")
|
activators = list("to speech" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 60
|
power_draw_per_use = 60
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE."
|
extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE."
|
||||||
complexity = 3
|
complexity = 3
|
||||||
outputs = list("result")
|
outputs = list("result")
|
||||||
activators = list("\<PULSE IN\> compare")
|
activators = list("compare" = 1)
|
||||||
category_text = "Logic"
|
category_text = "Logic"
|
||||||
autopulse = 1
|
autopulse = 1
|
||||||
power_draw_per_use = 1
|
power_draw_per_use = 1
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/obj/item/integrated_circuit/logic/binary
|
/obj/item/integrated_circuit/logic/binary
|
||||||
inputs = list("\<ANY\> A","\<ANY\> B")
|
inputs = list("\<ANY\> A","\<ANY\> B")
|
||||||
activators = list("\<PULSE IN\> compare", "\<PULSE OUT\> on true result", "\<PULSE OUT\> on false result")
|
activators = list("compare" = 1, "on true result" = 0, "on false result" = 0)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/logic/binary/do_work()
|
/obj/item/integrated_circuit/logic/binary/do_work()
|
||||||
pull_data()
|
pull_data()
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
/obj/item/integrated_circuit/logic/unary
|
/obj/item/integrated_circuit/logic/unary
|
||||||
inputs = list("\<ANY\> A")
|
inputs = list("\<ANY\> A")
|
||||||
activators = list("\<PULSE IN\> compare", "\<PULSE OUT\> on compare")
|
activators = list("compare" = 1, "on compare" = 0)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/logic/unary/do_work()
|
/obj/item/integrated_circuit/logic/unary/do_work()
|
||||||
pull_data()
|
pull_data()
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
desc = "This gate inverts what's fed into it."
|
desc = "This gate inverts what's fed into it."
|
||||||
icon_state = "not"
|
icon_state = "not"
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
activators = list("\<PULSE IN\> invert", "\<PULSE OUT\> on inverted")
|
activators = list("invert" = 1, "on inverted" = 0)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/logic/unary/not/do_check(var/datum/integrated_io/A)
|
/obj/item/integrated_circuit/logic/unary/not/do_check(var/datum/integrated_io/A)
|
||||||
return !A.data
|
return !A.data
|
||||||
|
|||||||
@@ -10,13 +10,14 @@
|
|||||||
normal limitations to firearms, such as ammunition requirements and firing delays, still hold true if fired by the mechanism."
|
normal limitations to firearms, such as ammunition requirements and firing delays, still hold true if fired by the mechanism."
|
||||||
complexity = 20
|
complexity = 20
|
||||||
w_class = ITEMSIZE_NORMAL
|
w_class = ITEMSIZE_NORMAL
|
||||||
|
size = 3
|
||||||
inputs = list(
|
inputs = list(
|
||||||
"\<NUM\> target X rel",
|
"\<NUM\> target X rel",
|
||||||
"\<NUM\> target Y rel"
|
"\<NUM\> target Y rel"
|
||||||
)
|
)
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list(
|
activators = list(
|
||||||
"\<PULSE IN\> fire"
|
"fire" = 1
|
||||||
)
|
)
|
||||||
var/obj/item/weapon/gun/installed_gun = null
|
var/obj/item/weapon/gun/installed_gun = null
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
return
|
return
|
||||||
user.drop_from_inventory(gun)
|
user.drop_from_inventory(gun)
|
||||||
installed_gun = gun
|
installed_gun = gun
|
||||||
|
size += gun.w_class
|
||||||
gun.forceMove(src)
|
gun.forceMove(src)
|
||||||
user << "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>"
|
user << "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>"
|
||||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
@@ -45,52 +47,58 @@
|
|||||||
if(installed_gun)
|
if(installed_gun)
|
||||||
installed_gun.forceMove(get_turf(src))
|
installed_gun.forceMove(get_turf(src))
|
||||||
user << "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>"
|
user << "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>"
|
||||||
|
size = initial(size)
|
||||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
installed_gun = null
|
installed_gun = null
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>There's no weapon to remove from the mechanism.</span>"
|
user << "<span class='notice'>There's no weapon to remove from the mechanism.</span>"
|
||||||
|
|
||||||
/obj/item/integrated_circuit/manipulation/weapon_firing/do_work()
|
/obj/item/integrated_circuit/manipulation/weapon_firing/do_work()
|
||||||
if(..())
|
if(!installed_gun)
|
||||||
if(!installed_gun)
|
return
|
||||||
|
|
||||||
|
var/datum/integrated_io/target_x = inputs[1]
|
||||||
|
var/datum/integrated_io/target_y = inputs[2]
|
||||||
|
|
||||||
|
if(src.assembly)
|
||||||
|
if(isnum(target_x.data))
|
||||||
|
target_x.data = round(target_x.data)
|
||||||
|
if(isnum(target_y.data))
|
||||||
|
target_y.data = round(target_y.data)
|
||||||
|
|
||||||
|
var/turf/T = get_turf(src.assembly)
|
||||||
|
|
||||||
|
if(target_x.data == 0 && target_y.data == 0) // Don't shoot ourselves.
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/integrated_io/target_x = inputs[1]
|
// We need to do this in order to enable relative coordinates, as locate() only works for absolute coordinates.
|
||||||
var/datum/integrated_io/target_y = inputs[2]
|
var/i
|
||||||
|
if(target_x.data > 0)
|
||||||
|
i = abs(target_x.data)
|
||||||
|
while(i > 0)
|
||||||
|
T = get_step(T, EAST)
|
||||||
|
i--
|
||||||
|
else
|
||||||
|
i = abs(target_x.data)
|
||||||
|
while(i > 0)
|
||||||
|
T = get_step(T, WEST)
|
||||||
|
i--
|
||||||
|
|
||||||
if(target_x.data && target_y.data && isnum(target_x.data) && isnum(target_y.data))
|
i = 0
|
||||||
var/turf/T = get_turf(src)
|
if(target_y.data > 0)
|
||||||
|
i = abs(target_y.data)
|
||||||
|
while(i > 0)
|
||||||
|
T = get_step(T, NORTH)
|
||||||
|
i--
|
||||||
|
else if(target_y.data < 0)
|
||||||
|
i = abs(target_y.data)
|
||||||
|
while(i > 0)
|
||||||
|
T = get_step(T, SOUTH)
|
||||||
|
i--
|
||||||
|
|
||||||
if(target_x.data == 0 && target_y.data == 0) // Don't shoot ourselves.
|
if(!T)
|
||||||
return
|
return
|
||||||
|
installed_gun.Fire_userless(T)
|
||||||
// We need to do this in order to enable relative coordinates, as locate() only works for absolute coordinates.
|
|
||||||
var/i
|
|
||||||
if(target_x.data > 0)
|
|
||||||
i = abs(target_x.data)
|
|
||||||
while(i)
|
|
||||||
T = get_step(T, EAST)
|
|
||||||
i--
|
|
||||||
else if(target_x.data < 0)
|
|
||||||
i = abs(target_x.data)
|
|
||||||
while(i)
|
|
||||||
T = get_step(T, WEST)
|
|
||||||
i--
|
|
||||||
|
|
||||||
if(target_y.data > 0)
|
|
||||||
i = abs(target_y.data)
|
|
||||||
while(i)
|
|
||||||
T = get_step(T, NORTH)
|
|
||||||
i--
|
|
||||||
else if(target_y.data < 0)
|
|
||||||
i = abs(target_y.data)
|
|
||||||
while(i)
|
|
||||||
T = get_step(T, SOUTH)
|
|
||||||
i--
|
|
||||||
|
|
||||||
if(!T)
|
|
||||||
return
|
|
||||||
installed_gun.Fire_userless(T)
|
|
||||||
|
|
||||||
/obj/item/integrated_circuit/manipulation/locomotion
|
/obj/item/integrated_circuit/manipulation/locomotion
|
||||||
name = "locomotion circuit"
|
name = "locomotion circuit"
|
||||||
@@ -110,9 +118,10 @@
|
|||||||
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."
|
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 = ITEMSIZE_NORMAL
|
w_class = ITEMSIZE_NORMAL
|
||||||
complexity = 20
|
complexity = 20
|
||||||
|
// size = 5
|
||||||
inputs = list("dir num")
|
inputs = list("dir num")
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("step towards dir")
|
activators = list("step towards dir" = 1)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 100
|
power_draw_per_use = 100
|
||||||
|
|
||||||
@@ -125,4 +134,82 @@
|
|||||||
if(assembly.loc == T) // Check if we're held by someone. If the loc is the floor, we're not held.
|
if(assembly.loc == T) // Check if we're held by someone. If the loc is the floor, we're not held.
|
||||||
var/datum/integrated_io/wanted_dir = inputs[1]
|
var/datum/integrated_io/wanted_dir = inputs[1]
|
||||||
if(isnum(wanted_dir.data))
|
if(isnum(wanted_dir.data))
|
||||||
step(assembly, wanted_dir.data)
|
step(assembly, wanted_dir.data)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade
|
||||||
|
name = "grenade primer"
|
||||||
|
desc = "This circuit comes with the ability to attach most types of grenades at prime them at will."
|
||||||
|
extended_desc = "Time between priming and detonation is limited to between 1 to 12 seconds but is optional. \
|
||||||
|
If unset, not a number, or a number less than 1 then the grenade's built-in timing will be used. \
|
||||||
|
Beware: Once primed there is no aborting the process!"
|
||||||
|
icon_state = "grenade"
|
||||||
|
complexity = 30
|
||||||
|
size = 2
|
||||||
|
inputs = list("\<NUM\> detonation time")
|
||||||
|
outputs = list()
|
||||||
|
activators = list("prime grenade" = 1)
|
||||||
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
|
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 4)
|
||||||
|
var/obj/item/weapon/grenade/attached_grenade
|
||||||
|
var/pre_attached_grenade_type
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/New()
|
||||||
|
..()
|
||||||
|
if(pre_attached_grenade_type)
|
||||||
|
var/grenade = new pre_attached_grenade_type(src)
|
||||||
|
attach_grenade(grenade)
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/Destroy()
|
||||||
|
if(attached_grenade && !attached_grenade.active)
|
||||||
|
attached_grenade.dropInto(loc)
|
||||||
|
detach_grenade()
|
||||||
|
. =..()
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/attackby(var/obj/item/weapon/grenade/G, var/mob/user)
|
||||||
|
if(istype(G))
|
||||||
|
if(attached_grenade)
|
||||||
|
to_chat(user, "<span class='warning'>There is already a grenade attached!</span>")
|
||||||
|
else if(user.unEquip(G, force=1))
|
||||||
|
user.visible_message("<span class='warning'>\The [user] attaches \a [G] to \the [src]!</span>", "<span class='notice'>You attach \the [G] to \the [src].</span>")
|
||||||
|
attach_grenade(G)
|
||||||
|
G.forceMove(src)
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/attack_self(var/mob/user)
|
||||||
|
if(attached_grenade)
|
||||||
|
user.visible_message("<span class='warning'>\The [user] removes \an [attached_grenade] from \the [src]!</span>", "<span class='notice'>You remove \the [attached_grenade] from \the [src].</span>")
|
||||||
|
user.put_in_any_hand_if_possible(attached_grenade) || attached_grenade.dropInto(loc)
|
||||||
|
detach_grenade()
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/do_work()
|
||||||
|
if(attached_grenade && !attached_grenade.active)
|
||||||
|
var/datum/integrated_io/detonation_time = inputs[1]
|
||||||
|
if(isnum(detonation_time.data) && detonation_time.data > 0)
|
||||||
|
attached_grenade.det_time = between(1, detonation_time.data, 12) SECONDS
|
||||||
|
attached_grenade.activate()
|
||||||
|
var/atom/holder = loc
|
||||||
|
log_and_message_admins("activated a grenade assembly. Last touches: Assembly: [holder.fingerprintslast] Circuit: [fingerprintslast] Grenade: [attached_grenade.fingerprintslast]")
|
||||||
|
|
||||||
|
// These procs do not relocate the grenade, that's the callers responsibility
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/proc/attach_grenade(var/obj/item/weapon/grenade/G)
|
||||||
|
attached_grenade = G
|
||||||
|
destroyed_event.register(attached_grenade, src, /obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade)
|
||||||
|
size += G.w_class
|
||||||
|
desc += " \An [attached_grenade] is attached to it!"
|
||||||
|
|
||||||
|
/obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade()
|
||||||
|
if(!attached_grenade)
|
||||||
|
return
|
||||||
|
destroyed_event.unregister(attached_grenade, src, /obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade)
|
||||||
|
attached_grenade = null
|
||||||
|
size = initial(size)
|
||||||
|
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.
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
complexity = 1
|
complexity = 1
|
||||||
inputs = list("input pin 1")
|
inputs = list("input pin 1")
|
||||||
outputs = list("output pin 1")
|
outputs = list("output pin 1")
|
||||||
activators = list("set")
|
activators = list("set" = 1, "on set")
|
||||||
category_text = "Memory"
|
category_text = "Memory"
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 1
|
power_draw_per_use = 1
|
||||||
@@ -29,12 +29,13 @@
|
|||||||
var/datum/integrated_io/I = inputs[i]
|
var/datum/integrated_io/I = inputs[i]
|
||||||
var/datum/integrated_io/O = outputs[i]
|
var/datum/integrated_io/O = outputs[i]
|
||||||
O.data = I.data
|
O.data = I.data
|
||||||
|
O.push_data()
|
||||||
|
activate_pin(2)
|
||||||
|
|
||||||
/obj/item/integrated_circuit/memory/medium
|
/obj/item/integrated_circuit/memory/medium
|
||||||
name = "memory circuit"
|
name = "memory circuit"
|
||||||
desc = "This circuit can store four pieces of data."
|
desc = "This circuit can store four pieces of data."
|
||||||
icon_state = "memory4"
|
icon_state = "memory4"
|
||||||
w_class = ITEMSIZE_SMALL
|
|
||||||
complexity = 4
|
complexity = 4
|
||||||
inputs = list("input pin 1","input pin 2","input pin 3","input pin 4")
|
inputs = list("input pin 1","input pin 2","input pin 3","input pin 4")
|
||||||
outputs = list("output pin 1","output pin 2","output pin 3","output pin 4")
|
outputs = list("output pin 1","output pin 2","output pin 3","output pin 4")
|
||||||
@@ -45,7 +46,6 @@
|
|||||||
name = "large memory circuit"
|
name = "large memory circuit"
|
||||||
desc = "This big circuit can hold eight pieces of data."
|
desc = "This big circuit can hold eight pieces of data."
|
||||||
icon_state = "memory8"
|
icon_state = "memory8"
|
||||||
w_class = ITEMSIZE_SMALL
|
|
||||||
complexity = 8
|
complexity = 8
|
||||||
inputs = list(
|
inputs = list(
|
||||||
"input pin 1",
|
"input pin 1",
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
complexity = 1
|
complexity = 1
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("output pin")
|
outputs = list("output pin")
|
||||||
activators = list("push data")
|
activators = list("push data" = 0)
|
||||||
var/accepting_refs = 0
|
var/accepting_refs = 0
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
complexity = 16
|
complexity = 16
|
||||||
inputs = list("\<REF\> target")
|
inputs = list("\<REF\> target")
|
||||||
outputs = list("\<NUM\> target cell charge", "\<NUM\> target cell max charge", "\<NUM\> target cell percentage")
|
outputs = list("\<NUM\> target cell charge", "\<NUM\> target cell max charge", "\<NUM\> target cell percentage")
|
||||||
activators = list("\<PULSE IN\> transmit")
|
activators = list("transmit" = 1)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4, TECH_POWER = 4, TECH_MAGNET = 3)
|
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4, TECH_POWER = 4, TECH_MAGNET = 3)
|
||||||
power_draw_per_use = 500 // Inefficency has to come from somewhere.
|
power_draw_per_use = 500 // Inefficency has to come from somewhere.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
cooldown_per_use = 30 SECONDS
|
cooldown_per_use = 30 SECONDS
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("create smoke")
|
activators = list("create smoke" = 1)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 3)
|
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 3)
|
||||||
volume = 100
|
volume = 100
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
cooldown_per_use = 6 SECONDS
|
cooldown_per_use = 6 SECONDS
|
||||||
inputs = list("\<REF\> target", "\<NUM\> injection amount" = 5)
|
inputs = list("\<REF\> target", "\<NUM\> injection amount" = 5)
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE IN\> inject")
|
activators = list("inject" = 1)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
volume = 30
|
volume = 30
|
||||||
power_draw_per_use = 15
|
power_draw_per_use = 15
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
complexity = 8
|
complexity = 8
|
||||||
inputs = list("\<REF\> source", "\<REF\> target", "\<NUM\> injection amount" = 10)
|
inputs = list("\<REF\> source", "\<REF\> target", "\<NUM\> injection amount" = 10)
|
||||||
outputs = list()
|
outputs = list()
|
||||||
activators = list("\<PULSE IN\> transfer reagents", "\<PULSE OUT\> on transfer")
|
activators = list("transfer reagents" = 1, "on transfer" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||||
var/transfer_amount = 10
|
var/transfer_amount = 10
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
complexity = 25
|
complexity = 25
|
||||||
inputs = list("\<REF\> target")
|
inputs = list("\<REF\> target")
|
||||||
outputs = list("\<NUM\> dir")
|
outputs = list("\<NUM\> dir")
|
||||||
activators = list("\<PULSE IN\> calculate dir", "\<PULSE OUT\> on calculated")
|
activators = list("calculate dir" = 1, "on calculated" = 0)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 5)
|
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 5)
|
||||||
power_draw_per_use = 40
|
power_draw_per_use = 40
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
This circuit is set to send a pulse after a delay of two seconds."
|
This circuit is set to send a pulse after a delay of two seconds."
|
||||||
icon_state = "delay-20"
|
icon_state = "delay-20"
|
||||||
var/delay = 2 SECONDS
|
var/delay = 2 SECONDS
|
||||||
activators = list("\<PULSE IN\> incoming","\<PULSE OUT\> outgoing")
|
activators = list("incoming"= 1,"outgoing" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 2
|
power_draw_per_use = 2
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
var/ticks_completed = 0
|
var/ticks_completed = 0
|
||||||
var/is_running = FALSE
|
var/is_running = FALSE
|
||||||
inputs = list("\<NUM\> enable ticking" = 0)
|
inputs = list("\<NUM\> enable ticking" = 0)
|
||||||
activators = list("\<PULSE OUT\> outgoing pulse")
|
activators = list("outgoing pulse" = 0)
|
||||||
spawn_flags = IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
icon_state = "clock"
|
icon_state = "clock"
|
||||||
inputs = list()
|
inputs = list()
|
||||||
outputs = list("\<TEXT\> time", "\<NUM\> hours", "\<NUM\> minutes", "\<NUM\> seconds")
|
outputs = list("\<TEXT\> time", "\<NUM\> hours", "\<NUM\> minutes", "\<NUM\> seconds")
|
||||||
activators = list("\<PULSE IN\> get time","\<PULSE OUT\> on time got")
|
activators = list("get time" = 1,"on time got" = 0)
|
||||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||||
power_draw_per_use = 4
|
power_draw_per_use = 4
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"\<NUM\> H"
|
"\<NUM\> H"
|
||||||
)
|
)
|
||||||
outputs = list("\<NUM\> result")
|
outputs = list("\<NUM\> result")
|
||||||
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
|
activators = list("compute" = 1, "on computed" = 0)
|
||||||
category_text = "Trig"
|
category_text = "Trig"
|
||||||
extended_desc = "Input and output are in degrees."
|
extended_desc = "Input and output are in degrees."
|
||||||
autopulse = 1
|
autopulse = 1
|
||||||
|
|||||||
@@ -1543,7 +1543,7 @@ CIRCUITS BELOW
|
|||||||
|
|
||||||
/datum/design/item/custom_circuit_assembly
|
/datum/design/item/custom_circuit_assembly
|
||||||
name = "Small custom assembly"
|
name = "Small custom assembly"
|
||||||
desc = "An customizable assembly for simple, small devices."
|
desc = "A customizable assembly for simple, small devices."
|
||||||
id = "assembly-small"
|
id = "assembly-small"
|
||||||
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 2, TECH_POWER = 2)
|
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 2, TECH_POWER = 2)
|
||||||
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||||
@@ -1552,7 +1552,7 @@ CIRCUITS BELOW
|
|||||||
|
|
||||||
/datum/design/item/custom_circuit_assembly/medium
|
/datum/design/item/custom_circuit_assembly/medium
|
||||||
name = "Medium custom assembly"
|
name = "Medium custom assembly"
|
||||||
desc = "An customizable assembly suited for more ambitious mechanisms."
|
desc = "A customizable assembly suited for more ambitious mechanisms."
|
||||||
id = "assembly-medium"
|
id = "assembly-medium"
|
||||||
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3, TECH_POWER = 3)
|
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3, TECH_POWER = 3)
|
||||||
materials = list(DEFAULT_WALL_MATERIAL = 20000)
|
materials = list(DEFAULT_WALL_MATERIAL = 20000)
|
||||||
@@ -1561,7 +1561,7 @@ CIRCUITS BELOW
|
|||||||
|
|
||||||
/datum/design/item/custom_circuit_assembly/drone
|
/datum/design/item/custom_circuit_assembly/drone
|
||||||
name = "Drone custom assembly"
|
name = "Drone custom assembly"
|
||||||
desc = "An customizable assembly optimized for autonomous devices."
|
desc = "A customizable assembly optimized for autonomous devices."
|
||||||
id = "assembly-drone"
|
id = "assembly-drone"
|
||||||
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_POWER = 4)
|
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_POWER = 4)
|
||||||
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||||
@@ -1570,7 +1570,7 @@ CIRCUITS BELOW
|
|||||||
|
|
||||||
/datum/design/item/custom_circuit_assembly/large
|
/datum/design/item/custom_circuit_assembly/large
|
||||||
name = "Large custom assembly"
|
name = "Large custom assembly"
|
||||||
desc = "An customizable assembly for large machines."
|
desc = "A customizable assembly for large machines."
|
||||||
id = "assembly-large"
|
id = "assembly-large"
|
||||||
req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4, TECH_POWER = 4)
|
req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4, TECH_POWER = 4)
|
||||||
materials = list(DEFAULT_WALL_MATERIAL = 40000)
|
materials = list(DEFAULT_WALL_MATERIAL = 40000)
|
||||||
@@ -1586,6 +1586,15 @@ CIRCUITS BELOW
|
|||||||
build_path = /obj/item/weapon/implant/integrated_circuit
|
build_path = /obj/item/weapon/implant/integrated_circuit
|
||||||
sort_string = "VCAAE"
|
sort_string = "VCAAE"
|
||||||
|
|
||||||
|
/datum/design/item/custom_circuit_assembly/device
|
||||||
|
name = "Device custom assembly"
|
||||||
|
desc = "An customizable assembly designed to interface with other devices."
|
||||||
|
id = "assembly-device"
|
||||||
|
req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2, TECH_POWER = 2)
|
||||||
|
materials = list(DEFAULT_WALL_MATERIAL = 5000)
|
||||||
|
build_path = /obj/item/device/assembly/electronic_assembly
|
||||||
|
sort_string = "VCAAF"
|
||||||
|
|
||||||
/datum/design/item/translator
|
/datum/design/item/translator
|
||||||
name = "handheld translator"
|
name = "handheld translator"
|
||||||
id = "translator"
|
id = "translator"
|
||||||
|
|||||||
@@ -30,14 +30,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/datum/unit_test/integrated_circuits/concatenatior
|
/datum/unit_test/integrated_circuits/concatenator
|
||||||
name = "Converter Circuits: Concatenatior"
|
name = "Converter Circuits: concatenator"
|
||||||
circuit_type = /obj/item/integrated_circuit/converter/concatenatior
|
circuit_type = /obj/item/integrated_circuit/converter/concatenator
|
||||||
inputs_to_give = list("Lorem", " ", "ipsum", "...")
|
inputs_to_give = list("Lorem", " ", "ipsum", "...")
|
||||||
expected_outputs = list("Lorem ipsum...")
|
expected_outputs = list("Lorem ipsum...")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/datum/unit_test/integrated_circuits/floor/radians2degrees
|
/datum/unit_test/integrated_circuits/floor/radians2degrees
|
||||||
name = "Converter Circuits: Radians2Degrees"
|
name = "Converter Circuits: Radians2Degrees"
|
||||||
circuit_type = /obj/item/integrated_circuit/converter/radians2degrees
|
circuit_type = /obj/item/integrated_circuit/converter/radians2degrees
|
||||||
|
|||||||
50
html/changelogs/LorenLuke-IEC changes.yml
Normal file
50
html/changelogs/LorenLuke-IEC changes.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: LorenLuke
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- experiment: "Gives IECs some TLC (see below)."
|
||||||
|
- rscadd: "Adds 'Separator' circuit, allowing the player to now divide strings."
|
||||||
|
- rscadd: "Adds 'grenade' circuit, allowing the player to detonate a stored grenade in an assembly."
|
||||||
|
- rscadd: "Adds 'device' electronic assembly, allowing an 'assembly'-type (signaler/igniter) circuit to be used to interact with others."
|
||||||
|
- tweak: "Modifies some storage and complexity constants."
|
||||||
|
- tweak: "Adds 'size' variable for manual setting."
|
||||||
|
- tweak: "No longer requires screwdriver to remove components."
|
||||||
|
- tweak: "Enables multitool to wire/debug circuits with lesser functionality (can disable via variable)."
|
||||||
|
- tweak: "IECs no longer drown the player in windows, each assembly always uses only one window."
|
||||||
|
- tweak: "Added functionality to UI to help with user experience of above point."
|
||||||
|
- rscadd: "Adds 'on set' output pulses to multiplexer and memory circuits."
|
||||||
|
- bugfix: "Fixes multiplexer and memory circuits not pushing data to attached circuits."
|
||||||
|
- bugfix: "Number to string converts null inputs as '0' due to engine limitations (at least they work)."
|
||||||
|
- bugfix: "Gun manipulator circuit now functions properly (and can read '0' value inputs)."
|
||||||
|
- wip: "Phase 1/2 for wiring rework."
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
@@ -1449,6 +1449,7 @@
|
|||||||
#include "code\modules\hydroponics\trays\tray_update_icons.dm"
|
#include "code\modules\hydroponics\trays\tray_update_icons.dm"
|
||||||
#include "code\modules\integrated_electronics\_defines.dm"
|
#include "code\modules\integrated_electronics\_defines.dm"
|
||||||
#include "code\modules\integrated_electronics\core\assemblies.dm"
|
#include "code\modules\integrated_electronics\core\assemblies.dm"
|
||||||
|
#include "code\modules\integrated_electronics\core\device.dm"
|
||||||
#include "code\modules\integrated_electronics\core\helpers.dm"
|
#include "code\modules\integrated_electronics\core\helpers.dm"
|
||||||
#include "code\modules\integrated_electronics\core\integrated_circuit.dm"
|
#include "code\modules\integrated_electronics\core\integrated_circuit.dm"
|
||||||
#include "code\modules\integrated_electronics\core\pins.dm"
|
#include "code\modules\integrated_electronics\core\pins.dm"
|
||||||
@@ -1456,6 +1457,7 @@
|
|||||||
#include "code\modules\integrated_electronics\passive\passive.dm"
|
#include "code\modules\integrated_electronics\passive\passive.dm"
|
||||||
#include "code\modules\integrated_electronics\passive\power.dm"
|
#include "code\modules\integrated_electronics\passive\power.dm"
|
||||||
#include "code\modules\integrated_electronics\subtypes\arithmetic.dm"
|
#include "code\modules\integrated_electronics\subtypes\arithmetic.dm"
|
||||||
|
#include "code\modules\integrated_electronics\subtypes\built_in.dm"
|
||||||
#include "code\modules\integrated_electronics\subtypes\converters.dm"
|
#include "code\modules\integrated_electronics\subtypes\converters.dm"
|
||||||
#include "code\modules\integrated_electronics\subtypes\data_transfer.dm"
|
#include "code\modules\integrated_electronics\subtypes\data_transfer.dm"
|
||||||
#include "code\modules\integrated_electronics\subtypes\input_output.dm"
|
#include "code\modules\integrated_electronics\subtypes\input_output.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user