mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Some assembly fixes and tidying up. Plus, improved infrared emitters, with new sprites by Pewtershmitz!
Removed the infra sensor, as it was buggy, and, to be perfectly honest, utterly pointless. Slightly improved and moved dice code. Fixes issue 366. Fixes issue 317. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4555 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1563,22 +1563,6 @@
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
|
||||
/obj/item/weapon/dice // -- TLE
|
||||
name = "d6"
|
||||
desc = "A dice with six sides."
|
||||
var/sides = 6
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "d66"
|
||||
|
||||
/obj/item/weapon/dice/New()
|
||||
icon_state = "[name][rand(sides)]"
|
||||
|
||||
/obj/item/weapon/dice/d20 // -- TLE
|
||||
name = "d20"
|
||||
desc = "A dice with twenty sides."
|
||||
sides = 20
|
||||
icon_state = "d2020"
|
||||
|
||||
/obj/item/weapon/pai_cable
|
||||
desc = "A flexible coated cable with a universal jack on one end."
|
||||
name = "data cable"
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/obj/item/device/infra_sensor/process()
|
||||
if (src.passive)
|
||||
for(var/obj/effect/beam/i_beam/I in range(2, src.loc))
|
||||
I.left = 2
|
||||
return 1
|
||||
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
return null
|
||||
|
||||
/obj/item/device/infra_sensor/proc/burst()
|
||||
for(var/obj/effect/beam/i_beam/I in range(src.loc))
|
||||
I.left = 8
|
||||
/* for(var/obj/item/device/infra/I in range(src.loc))ugh will have to fix this
|
||||
I.visible = 1
|
||||
spawn( 0 )
|
||||
if ((I && I.first))
|
||||
I.first.vis_spread(1)
|
||||
return
|
||||
for(var/obj/item/assembly/rad_infra/I in range(src.loc))
|
||||
I.part2.visible = 1
|
||||
spawn( 0 )
|
||||
if ((I.part2 && I.part2.first))
|
||||
I.part2.first.vis_spread(1)
|
||||
return*/
|
||||
return
|
||||
|
||||
/obj/item/device/infra_sensor/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat = text("<TT><B>Infrared Sensor</B><BR>\n<B>Passive Emitter</B>: []<BR>\n<B>Active Emitter</B>: <A href='?src=\ref[];active=0'>Burst Fire</A>\n</TT>", (src.passive ? text("<A href='?src=\ref[];passive=0'>On</A>", src) : text("<A href='?src=\ref[];passive=1'>Off</A>", src)), src)
|
||||
user << browse(dat, "window=infra_sensor")
|
||||
onclose(user, "infra_sensor")
|
||||
return
|
||||
|
||||
/obj/item/device/infra_sensor/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (usr.contents.Find(src.master) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))))
|
||||
usr.machine = src
|
||||
if (href_list["passive"])
|
||||
src.passive = !( src.passive )
|
||||
if(passive)
|
||||
processing_objects.Add(src)
|
||||
if (href_list["active"])
|
||||
spawn( 0 )
|
||||
src.burst()
|
||||
return
|
||||
if (!( src.master ))
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=infra_sensor")
|
||||
onclose(usr, "infra_sensor")
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -1,22 +1,27 @@
|
||||
/obj/item/weapon/dice
|
||||
name = "d6"
|
||||
desc = "A dice with six sides."
|
||||
var/sides = 6
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "d66"
|
||||
|
||||
/obj/item/weapon/dice/New()
|
||||
icon_state = "[name][rand(sides)]"
|
||||
|
||||
/obj/item/weapon/dice/d20
|
||||
name = "d20"
|
||||
desc = "A dice with twenty sides."
|
||||
sides = 20
|
||||
icon_state = "d2020"
|
||||
|
||||
/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE
|
||||
var/temp_sides
|
||||
if(src.sides < 1)
|
||||
temp_sides = 2
|
||||
else
|
||||
temp_sides = src.sides
|
||||
var/result = rand(1,temp_sides)
|
||||
/obj/item/weapon/dice/attack_self(mob/user as mob)
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(temp_sides == 20 && result == 20)
|
||||
if(sides == 20 && result == 20)
|
||||
comment = "Nat 20!"
|
||||
else if(temp_sides == 20 && result == 1)
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
user << text("\red You throw a [src]. It lands on a [result]. [comment]")
|
||||
icon_state = "[name][result]"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == (user))
|
||||
continue
|
||||
else
|
||||
O.show_message(text("\red [user] has thrown a [src]. It lands on [result]. [comment]"), 1)
|
||||
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
|
||||
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
|
||||
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
|
||||
@@ -1,37 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
|
||||
/proc/isassembly(O)
|
||||
if(istype(O, /obj/item/device/assembly))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isigniter(O)
|
||||
if(istype(O, /obj/item/device/assembly/igniter))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isinfared(O)
|
||||
if(istype(O, /obj/item/device/assembly/infra))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isprox(O)
|
||||
if(istype(O, /obj/item/device/assembly/prox_sensor))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/issignaler(O)
|
||||
if(istype(O, /obj/item/device/assembly/signaler))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/istimer(O)
|
||||
if(istype(O, /obj/item/device/assembly/timer))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/assembly
|
||||
name = "assembly"
|
||||
desc = "A small electronic device that should never exist."
|
||||
@@ -49,9 +15,7 @@
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
var/secured = 1
|
||||
var/small_icon_state_left = null
|
||||
var/small_icon_state_right = null
|
||||
var/list/small_icon_state_overlays = null
|
||||
var/list/attached_overlays = null
|
||||
var/obj/item/device/assembly_holder/holder = null
|
||||
var/cooldown = 0//To prevent spam
|
||||
var/wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
@@ -130,7 +94,7 @@
|
||||
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.show_message("\blue You attach the [A.name] to the [name]!")
|
||||
user << "\blue You attach \the [A] to \the [src]!"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -143,9 +107,9 @@
|
||||
return
|
||||
if(isscrewdriver(W))
|
||||
if(toggle_secure())
|
||||
user.show_message("\blue The [name] is ready!")
|
||||
user << "\blue \The [src] is ready!"
|
||||
else
|
||||
user.show_message("\blue The [name] can now be attached!")
|
||||
user << "\blue \The [src] can now be attached!"
|
||||
return
|
||||
..()
|
||||
return
|
||||
@@ -161,9 +125,9 @@
|
||||
..()
|
||||
if((in_range(src, usr) || loc == usr))
|
||||
if(secured)
|
||||
usr.show_message("The [name] is ready!")
|
||||
usr << "\The [src] is ready!"
|
||||
else
|
||||
usr.show_message("The [name] can be attached!")
|
||||
usr << "\The [src] can be attached!"
|
||||
return
|
||||
|
||||
|
||||
@@ -177,26 +141,6 @@
|
||||
interact(mob/user as mob)
|
||||
return //HTML MENU FOR WIRES GOES HERE
|
||||
|
||||
/*
|
||||
Name: IsAssemblyHolder
|
||||
Desc: If true is an object that can hold an assemblyholder object
|
||||
*/
|
||||
/obj/proc/IsAssemblyHolder()
|
||||
return 0
|
||||
/*
|
||||
proc
|
||||
Process_Activation(var/obj/D, var/normal = 1, var/special = 1)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Name: IsSpecialAssembly
|
||||
Desc: If true is an object that can be attached to an assembly holder but is a special thing like a plasma can or door
|
||||
*/
|
||||
|
||||
/obj/proc/IsSpecialAssembly()
|
||||
return 0
|
||||
/*
|
||||
var/small_icon_state = null//If this obj will go inside the assembly use this for icons
|
||||
var/list/small_icon_state_overlays = null//Same here
|
||||
|
||||
44
code/modules/assembly/helpers.dm
Normal file
44
code/modules/assembly/helpers.dm
Normal file
@@ -0,0 +1,44 @@
|
||||
/proc/isassembly(O)
|
||||
if(istype(O, /obj/item/device/assembly))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isigniter(O)
|
||||
if(istype(O, /obj/item/device/assembly/igniter))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isinfared(O)
|
||||
if(istype(O, /obj/item/device/assembly/infra))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isprox(O)
|
||||
if(istype(O, /obj/item/device/assembly/prox_sensor))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/issignaler(O)
|
||||
if(istype(O, /obj/item/device/assembly/signaler))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/istimer(O)
|
||||
if(istype(O, /obj/item/device/assembly/timer))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/*
|
||||
Name: IsSpecialAssembly
|
||||
Desc: If true is an object that can be attached to an assembly holder but is a special thing like a plasma can or door
|
||||
*/
|
||||
|
||||
/obj/proc/IsSpecialAssembly()
|
||||
return 0
|
||||
|
||||
/*
|
||||
Name: IsAssemblyHolder
|
||||
Desc: If true is an object that can hold an assemblyholder object
|
||||
*/
|
||||
/obj/proc/IsAssemblyHolder()
|
||||
return 0
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/item/device/assembly_holder
|
||||
name = "Assembly"
|
||||
desc = "Holds various devices"//Fix this by adding dynamic desc
|
||||
icon = 'icons/obj/assemblies/new_assemblies.dmi'
|
||||
icon_state = "holder"
|
||||
item_state = "assembly"
|
||||
@@ -44,7 +43,7 @@
|
||||
D2.loc = src
|
||||
a_left = D
|
||||
a_right = D2
|
||||
src.name = "[D.name] [D2.name] assembly"
|
||||
name = "[D.name]-[D2.name] assembly"
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -52,8 +51,8 @@
|
||||
attach_special(var/obj/O, var/mob/user)
|
||||
if(!O) return
|
||||
if(!O.IsSpecialAssembly()) return 0
|
||||
/*
|
||||
if(O:Attach_Holder())
|
||||
|
||||
/* if(O:Attach_Holder())
|
||||
special_assembly = O
|
||||
update_icon()
|
||||
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
|
||||
@@ -62,15 +61,16 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
src.overlays = null
|
||||
overlays = null
|
||||
if(a_left)
|
||||
src.overlays += a_left:small_icon_state_left
|
||||
for(var/O in a_left:small_icon_state_overlays)
|
||||
src.overlays += text("[]_l", O)
|
||||
overlays += "[initial(a_left.icon_state)]_left" //the initial() is probably unnecessary, but you just know
|
||||
for(var/O in a_left.attached_overlays) //someone is gonna fuck around with the icon_state in the future
|
||||
overlays += "[O]_l"
|
||||
if(a_right)
|
||||
src.overlays += a_right:small_icon_state_right
|
||||
for(var/O in a_right:small_icon_state_overlays)
|
||||
src.overlays += text("[]_r", O)
|
||||
src.overlays += "[initial(a_right.icon_state)]_right"
|
||||
for(var/O in a_right.attached_overlays)
|
||||
overlays += "[O]_r"
|
||||
|
||||
/* if(special_assembly)
|
||||
special_assembly.update_icon()
|
||||
if(special_assembly:small_icon_state)
|
||||
@@ -84,9 +84,9 @@
|
||||
..()
|
||||
if ((in_range(src, usr) || src.loc == usr))
|
||||
if (src.secured)
|
||||
usr.show_message("The [src.name] is ready!")
|
||||
usr << "\The [src] is ready!"
|
||||
else
|
||||
usr.show_message("The [src.name] can be attached!")
|
||||
usr << "\The [src] can be attached!"
|
||||
return
|
||||
|
||||
|
||||
@@ -123,15 +123,15 @@
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(!a_left || !a_right)
|
||||
user.show_message("\red BUG:Assembly part missing, please report this!")
|
||||
user << "\red BUG:Assembly part missing, please report this!"
|
||||
return
|
||||
a_left.toggle_secure()
|
||||
a_right.toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
user.show_message("\blue The [src.name] is ready!")
|
||||
user << "\blue \The [src] is ready!"
|
||||
else
|
||||
user.show_message("\blue The [src.name] can now be taken apart!")
|
||||
user << "\blue \The [src] can now be taken apart!"
|
||||
update_icon()
|
||||
return
|
||||
else if(W.IsSpecialAssembly())
|
||||
@@ -145,7 +145,7 @@
|
||||
src.add_fingerprint(user)
|
||||
if(src.secured)
|
||||
if(!a_left || !a_right)
|
||||
user.show_message("\red Assembly part missing!")
|
||||
user << "\red Assembly part missing!"
|
||||
return
|
||||
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"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/device/assembly/igniter
|
||||
name = "igniter"
|
||||
desc = "A small electronic device able to ignite combustable substances. Does not function well as a lighter."
|
||||
desc = "A small electronic device able to ignite combustable substances."
|
||||
icon_state = "igniter"
|
||||
m_amt = 500
|
||||
g_amt = 50
|
||||
@@ -8,8 +8,6 @@
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
secured = 1
|
||||
small_icon_state_left = "igniter_left"
|
||||
small_icon_state_right = "igniter_right"
|
||||
|
||||
|
||||
activate()
|
||||
@@ -20,8 +18,6 @@
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
spawn( 5 )
|
||||
activate()
|
||||
return
|
||||
return
|
||||
return
|
||||
@@ -1,19 +1,17 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/infra
|
||||
name = "Infrared Beam"
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared_old"
|
||||
icon_state = "infrared"
|
||||
m_amt = 1000
|
||||
g_amt = 500
|
||||
w_amt = 100
|
||||
origin_tech = "magnets=2"
|
||||
|
||||
secured = 0
|
||||
small_icon_state_left = "infrared_left"
|
||||
small_icon_state_right = "infrared_right"
|
||||
|
||||
var/scanning = 0
|
||||
var/on = 0
|
||||
var/visible = 0
|
||||
var/obj/effect/beam/i_beam/first = null
|
||||
|
||||
@@ -23,7 +21,7 @@
|
||||
|
||||
activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
src.scanning = !src.scanning
|
||||
on = !on
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -33,19 +31,19 @@
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
scanning = 0
|
||||
if(src.first) del(src.first)
|
||||
on = 0
|
||||
if(first) del(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
update_icon()
|
||||
src.overlays = null
|
||||
src.small_icon_state_overlays = list()
|
||||
if(scanning)
|
||||
src.overlays += text("infrared_old2")
|
||||
src.small_icon_state_overlays += text("infrared_on")
|
||||
overlays = null
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
attached_overlays += "infrared_on"
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
@@ -53,23 +51,23 @@
|
||||
|
||||
|
||||
process()//Old code
|
||||
if(!scanning)
|
||||
if(src.first)
|
||||
del(src.first)
|
||||
if(!on)
|
||||
if(first)
|
||||
del(first)
|
||||
return
|
||||
|
||||
if((!( src.first ) && (src.secured && (istype(src.loc, /turf) || (src.holder && istype(src.holder.loc, /turf))))))
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam( (src.holder ? src.holder.loc : src.loc) )
|
||||
if((!(first) && (secured && (istype(loc, /turf) || (holder && istype(holder.loc, /turf))))))
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam((holder ? holder.loc : loc) )
|
||||
I.master = src
|
||||
I.density = 1
|
||||
I.dir = src.dir
|
||||
I.dir = dir
|
||||
step(I, I.dir)
|
||||
if (I)
|
||||
if(I)
|
||||
I.density = 0
|
||||
src.first = I
|
||||
I.vis_spread(src.visible)
|
||||
spawn( 0 )
|
||||
if (I)
|
||||
first = I
|
||||
I.vis_spread(visible)
|
||||
spawn(0)
|
||||
if(I)
|
||||
//world << "infra: setting limit"
|
||||
I.limit = 8
|
||||
//world << "infra: processing beam \ref[I]"
|
||||
@@ -79,31 +77,30 @@
|
||||
|
||||
|
||||
attack_hand()
|
||||
del(src.first)
|
||||
del(first)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Move()
|
||||
var/t = src.dir
|
||||
var/t = dir
|
||||
..()
|
||||
src.dir = t
|
||||
del(src.first)
|
||||
dir = t
|
||||
del(first)
|
||||
return
|
||||
|
||||
|
||||
holder_movement()
|
||||
if(!holder) return 0
|
||||
// src.dir = holder.dir
|
||||
del(src.first)
|
||||
// dir = holder.dir
|
||||
del(first)
|
||||
return 1
|
||||
|
||||
|
||||
trigger_beam()
|
||||
if((!secured)||(!scanning)||(cooldown > 0)) return 0
|
||||
if((!secured)||(!on)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
for(var/mob/O in hearers(null, null))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
visible_message("\icon[src] *beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
@@ -113,7 +110,7 @@
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.machine = src
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (src.scanning ? 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)))
|
||||
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")
|
||||
@@ -128,22 +125,22 @@
|
||||
onclose(usr, "infra")
|
||||
return
|
||||
|
||||
if (href_list["state"])
|
||||
src.scanning = !(src.scanning)
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
|
||||
if (href_list["visible"])
|
||||
src.visible = !(src.visible)
|
||||
spawn( 0 )
|
||||
if(src.first)
|
||||
src.first.vis_spread(src.visible)
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
spawn(0)
|
||||
if(first)
|
||||
first.vis_spread(visible)
|
||||
|
||||
if (href_list["close"])
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
|
||||
if(usr)
|
||||
src.attack_self(usr)
|
||||
attack_self(usr)
|
||||
|
||||
return
|
||||
|
||||
@@ -153,7 +150,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
dir = turn(dir, 90)
|
||||
return
|
||||
|
||||
|
||||
@@ -175,63 +172,62 @@
|
||||
|
||||
/obj/effect/beam/i_beam/proc/hit()
|
||||
//world << "beam \ref[src]: hit"
|
||||
if(src.master)
|
||||
if(master)
|
||||
//world << "beam hit \ref[src]: calling master \ref[master].hit"
|
||||
src.master.trigger_beam()
|
||||
master.trigger_beam()
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/proc/vis_spread(v)
|
||||
//world << "i_beam \ref[src] : vis_spread"
|
||||
src.visible = v
|
||||
visible = v
|
||||
spawn(0)
|
||||
if(src.next)
|
||||
if(next)
|
||||
//world << "i_beam \ref[src] : is next [next.type] \ref[next], calling spread"
|
||||
src.next.vis_spread(v)
|
||||
next.vis_spread(v)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/process()
|
||||
//world << "i_beam \ref[src] : process"
|
||||
|
||||
if((src.loc.density || !( src.master )))
|
||||
//SN src = null
|
||||
if((loc.density || !(master)))
|
||||
// world << "beam hit loc [loc] or no master [master], deleting"
|
||||
del(src)
|
||||
return
|
||||
//world << "proccess: [src.left] left"
|
||||
|
||||
if(src.left > 0)
|
||||
src.left--
|
||||
if(src.left < 1)
|
||||
if(!( src.visible ))
|
||||
src.invisibility = 101
|
||||
if(left > 0)
|
||||
left--
|
||||
if(left < 1)
|
||||
if(!(visible))
|
||||
invisibility = 101
|
||||
else
|
||||
src.invisibility = 0
|
||||
invisibility = 0
|
||||
else
|
||||
src.invisibility = 0
|
||||
invisibility = 0
|
||||
|
||||
|
||||
//world << "now [src.left] left"
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam( src.loc )
|
||||
I.master = src.master
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
|
||||
I.master = master
|
||||
I.density = 1
|
||||
I.dir = src.dir
|
||||
I.dir = dir
|
||||
//world << "created new beam \ref[I] at [I.x] [I.y] [I.z]"
|
||||
step(I, I.dir)
|
||||
|
||||
if(I)
|
||||
//world << "step worked, now at [I.x] [I.y] [I.z]"
|
||||
if (!( src.next ))
|
||||
//world << "no src.next"
|
||||
if(!(next))
|
||||
//world << "no next"
|
||||
I.density = 0
|
||||
//world << "spreading"
|
||||
I.vis_spread(src.visible)
|
||||
src.next = I
|
||||
spawn( 0 )
|
||||
//world << "limit = [src.limit] "
|
||||
if ((I && src.limit > 0))
|
||||
I.limit = src.limit - 1
|
||||
I.vis_spread(visible)
|
||||
next = I
|
||||
spawn(0)
|
||||
//world << "limit = [limit] "
|
||||
if((I && limit > 0))
|
||||
I.limit = limit - 1
|
||||
//world << "calling next process"
|
||||
I.process()
|
||||
return
|
||||
@@ -239,10 +235,10 @@
|
||||
//world << "is a next: \ref[next], deleting beam \ref[I]"
|
||||
del(I)
|
||||
else
|
||||
//world << "step failed, deleting \ref[src.next]"
|
||||
del(src.next)
|
||||
//world << "step failed, deleting \ref[next]"
|
||||
del(next)
|
||||
spawn(10)
|
||||
src.process()
|
||||
process()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -251,18 +247,18 @@
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Bumped()
|
||||
src.hit()
|
||||
hit()
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/HasEntered(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
spawn( 0 )
|
||||
src.hit()
|
||||
spawn(0)
|
||||
hit()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Del()
|
||||
del(src.next)
|
||||
del(next)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/prox_sensor
|
||||
name = "proximity sensor"
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
@@ -10,8 +8,6 @@
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
secured = 0
|
||||
small_icon_state_left = "prox_left"
|
||||
small_icon_state_right = "prox_right"
|
||||
|
||||
var/scanning = 0
|
||||
var/timing = 0
|
||||
@@ -50,8 +46,7 @@
|
||||
sense()
|
||||
if((!secured)||(!scanning)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
for(var/mob/O in hearers(null, null))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
@@ -84,13 +79,13 @@
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
small_icon_state_overlays = list()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += text("prox_timing")
|
||||
small_icon_state_overlays += text("prox_timing")
|
||||
overlays += "prox_timing"
|
||||
attached_overlays += "prox_timing"
|
||||
if(scanning)
|
||||
overlays += text("prox_scanning")
|
||||
small_icon_state_overlays += text("prox_scanning")
|
||||
overlays += "prox_scanning"
|
||||
attached_overlays += "prox_scanning"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/signaler
|
||||
name = "Remote Signaling Device"
|
||||
name = "remote signaling device"
|
||||
desc = "Used to remotely activate devices."
|
||||
icon_state = "signaller"
|
||||
item_state = "signaler"
|
||||
@@ -12,8 +10,6 @@
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
|
||||
secured = 1
|
||||
small_icon_state_left = "signaller_left"
|
||||
small_icon_state_right = "signaller_right"
|
||||
|
||||
var/code = 30
|
||||
var/frequency = 1457
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/timer
|
||||
name = "timer"
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
@@ -10,8 +8,6 @@
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
secured = 0
|
||||
small_icon_state_left = "timer_left"
|
||||
small_icon_state_right = "timer_right"
|
||||
|
||||
var/timing = 0
|
||||
var/time = 10
|
||||
@@ -61,10 +57,10 @@
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
small_icon_state_overlays = list()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += text("timer_timing")
|
||||
small_icon_state_overlays += text("timer_timing")
|
||||
overlays += "timer_timing"
|
||||
attached_overlays += "timer_timing"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -613,7 +613,6 @@
|
||||
#include "code\game\objects\items\devices\chameleonproj.dm"
|
||||
#include "code\game\objects\items\devices\flash.dm"
|
||||
#include "code\game\objects\items\devices\flashlight.dm"
|
||||
#include "code\game\objects\items\devices\infra_sensor.dm"
|
||||
#include "code\game\objects\items\devices\lightreplacer.dm"
|
||||
#include "code\game\objects\items\devices\multitool.dm"
|
||||
#include "code\game\objects\items\devices\paicard.dm"
|
||||
@@ -808,6 +807,7 @@
|
||||
#include "code\modules\admin\verbs\ticklag.dm"
|
||||
#include "code\modules\admin\verbs\tripAI.dm"
|
||||
#include "code\modules\assembly\assembly.dm"
|
||||
#include "code\modules\assembly\helpers.dm"
|
||||
#include "code\modules\assembly\holder.dm"
|
||||
#include "code\modules\assembly\igniter.dm"
|
||||
#include "code\modules\assembly\infrared.dm"
|
||||
|
||||
Reference in New Issue
Block a user