Moved into their own folder and got split into three files.
Damage  zones have been regrouped slightly to make it easier to deal with them. Currently the organ groups are head, l/r leg, l/r arm, and head.

Attacking:
Armor is properly checked.
Currently aiming for the chest gives a higher chance to stun whereas the head will stun for longer.
Stungloves/Disarm now show up in the attack log.
Stungloves ignore intent.

Silicon:
AI units can now move between cams that are not on the ss13 network.
Cyborg's alert screen should not longer pop up every time they get an alert if they have opened it once during the round.
Robot vision now uses the standard amount of energy.

Gamemodes:
Added Deuryn's unrev message.
Runes can only be examined if you are close to them.
Moved the Loyalty implants to the HoS' locker at the request of HerpA.
Nuke agents now come with explosive implants that will activate upon death.

Projectiles:
Once again went though the gun code and cleaned things up, it is much better now.
Bullet_act fixed up and most mobs now use the one in living, just overload it if they need to do something diff.
Freeze /caplaser/xbow no longer have an infinite loop.
Shotguns have to be pumped manually.

Went though the latest runtime log.

Power cells now use return on their give/use procs

Assemblies have been reworked and are nearly finished, just need to finish up the special assembly code, redo the signalers, and add one or two new assembly items.
Laying down will now only take 3 ticks to get up, from 5.

You can no longer punch people on the spawn screen.

This is a big one and was cleared by two heads, TK will only allow you to pick up items.  If you have an item in your hand it will act normal.

This revision got much larger than originally intended my tests show everything is working fine, but you never know.  Ill likely do more mob teaks in the next few days.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2333 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-10-08 10:38:01 +00:00
parent ad80137505
commit 62e28c2abf
148 changed files with 6638 additions and 8653 deletions

View File

@@ -1,154 +1,81 @@
/obj/item/device/timer
/obj/item/device/assembly/timer
name = "timer"
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
icon = 'new_assemblies.dmi'
icon_state = "timer"
item_state = "electronic"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
m_amt = 100
m_amt = 500
g_amt = 50
w_amt = 10
origin_tech = "magnets=1"
secured = 0
small_icon_state_left = "timer_left"
small_icon_state_right = "timer_right"
var
secured = 0
small_icon_state_left = "timer_left"
small_icon_state_right = "timer_right"
list/small_icon_state_overlays = null
obj/holder = null
cooldown = 0//To prevent spam
timing = 0
time = 0
time = 10
proc
Activate()//Called when this assembly is pulsed by another one
Secure()//Code that has to happen when the assembly is ready goes here
Unsecure()//Code that has to happen when the assembly is taken off of the ready state goes here
Attach_Assembly(var/obj/A, var/mob/user)//Called when an assembly is attacked by another
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
Holder_Movement()
timer_end()
IsAssembly()
return 1
Process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
Process_cooldown()
return 1
Activate()
if((!secured) || (cooldown > 0))
return 0
cooldown = 2
src.timing = !src.timing
activate()
if(!..()) return 0//Cooldown check
timing = !timing
update_icon()
spawn(10)
Process_cooldown()
return 0
Secure()
toggle_secure()
secured = !secured
if(secured)
return 0
processing_objects.Add(src)//removal is taken care of it process()
secured = 1
return 1
Unsecure()
if(!secured)
return 0
secured = 0
return 1
Attach_Assembly(var/obj/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 [src.name]!")
return 1
return 0
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.IsAssembly())
var/obj/item/device/D = W
if((!D:secured) && (!src.secured))
Attach_Assembly(D,user)
if(isscrewdriver(W))
if(src.secured)
Unsecure()
user.show_message("\blue The [src.name] can now be attached!")
else
Secure()
user.show_message("\blue The [src.name] is ready!")
return
processing_objects.Add(src)
else
..()
return
timing = 0
processing_objects.Remove(src)
update_icon()
return secured
timer_end()
if((!secured)||(cooldown > 0)) return 0
if((holder)&&(holder.IsAssemblyHolder()))
spawn(0)
holder:Process_Activation(src)
return
pulse(0)
for(var/mob/O in hearers(null, null))
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
cooldown = 2
spawn(10)
Process_cooldown()
process_cooldown()
return
process()
if((src.timing) && (src.time >= 0))
src.time--
if(src.time <= 0)
src.timing = 0
src.time = 0
timer_end()
update_icon()
if(!secured)
src.timing = 0
processing_objects.Remove(src)
update_icon()
if(timing && (time >= 0))
time--
if(time <= 0)
timing = 0
timer_end()
time = 10
return
update_icon()
src.overlays = null
src.small_icon_state_overlays = list()
overlays = null
small_icon_state_overlays = list()
if(timing)
src.overlays += text("timer_timing")
src.small_icon_state_overlays += text("timer_timing")
overlays += text("timer_timing")
small_icon_state_overlays += text("timer_timing")
if(holder)
holder.update_icon()
return
examine()
set src in view()
..()
if ((in_range(src, usr) || src.loc == usr))
if (src.secured)
usr.show_message("The [src.name] is ready!")
else
usr.show_message("The [src.name] can be attached!")
return
attack_self(mob/user as mob)
interact(mob/user as mob)//TODO: Have this use the wires
if(!secured)
user.show_message("\red The [src.name] is unsecured!")
user.show_message("\red The [name] is unsecured!")
return 0
var/second = src.time % 60
var/minute = (src.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>", (src.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)
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")
@@ -158,24 +85,25 @@
Topic(href, href_list)
..()
if(get_dist(src, usr) <= 1)
if (href_list["time"])
src.timing = text2num(href_list["time"])
update_icon()
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.time += tp
src.time = min(max(round(src.time), 0), 600)
if (href_list["close"])
usr << browse(null, "window=timer")
return
if(usr)
src.attack_self(usr)
else
if(get_dist(src, usr) > 1)
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