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
+127 -57
View File
@@ -1,97 +1,167 @@
/*
Desc: Sorta a hack/workaround to get interfaceish things into this engine.
To use an interface just override the proc in your object and set it to return true.
If an object returns true for one of these it should have ALL of the commented out procs and vars defined in its class.
There may be some example code in procs below the defines to help explain things, but you don't have to use it.
*/
/*
Name: IsAssembly
Desc: If true is an assembly that can work with the holder
*/
/obj/proc/IsAssembly()
/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."
icon = 'new_assemblies.dmi'
icon_state = ""
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
w_class = 2.0
m_amt = 100
g_amt = 0
w_amt = 0
throwforce = 2
throw_speed = 3
throw_range = 10
origin_tech = "magnets=1"
var
secured = 1
small_icon_state_left = null
small_icon_state_right = null
list/small_icon_state_overlays = null
obj/holder = null
obj/item/device/assembly_holder/holder = null
cooldown = 0//To prevent spam
wires = WIRE_RECEIVE | WIRE_PULSE
var/const
WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder
WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly
WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
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()//Called when the holder is moved
IsAssembly()
return 1
activate() //What the device does when turned on
pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
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
toggle_secure() //Code that has to happen when the assembly is un\secured goes here
attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
process_cooldown() //Called via spawn(10) to have it count down the cooldown var
holder_movement() //Called when the holder is moved
interact(mob/user as mob) //Called when attack_self is called
Process_cooldown()
process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
Process_cooldown()
process_cooldown()
return 1
Activate()
if((!secured) || (cooldown > 0))//Make sure to add something using cooldown or such to prevent spam
return 0
pulsed(var/radio = 0)
if(holder && (wires & WIRE_RECEIVE))
activate()
if(radio && (wires & WIRE_RADIO_RECEIVE))
activate()
return 1
pulse(var/radio = 0)
if(holder && (wires & WIRE_PULSE))
holder.process_activation(src, 1, 0)
if(holder && (wires & WIRE_PULSE_SPECIAL))
holder.process_activation(src, 0, 1)
// if(radio && (wires & WIRE_RADIO_PULSE))
//Not sure what goes here quite yet send signal?
return 1
activate()
if(!secured || (cooldown > 0)) return 0
cooldown = 2
spawn(10)
Process_cooldown()
return 0
Secure()
if(secured)
return 0
secured = 1
process_cooldown()
return 1
Unsecure()
if(!secured)
return 0
secured = 0
return 1
toggle_secure()
secured = !secured
update_icon()
return secured
Attach_Assembly(var/obj/A, var/mob/user)
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 [src.name]!")
if(holder.attach(A,src,user))
user.show_message("\blue You attach the [A.name] to the [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(isassembly(W))
var/obj/item/device/assembly/A = W
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
if(isscrewdriver(W))
if(src.secured)
Unsecure()
user.show_message("\blue The [src.name] can now be attached!")
if(toggle_secure())
user.show_message("\blue The [name] is ready!")
else
Secure()
user.show_message("\blue The [src.name] is ready!")
user.show_message("\blue The [name] can now be attached!")
return
else
..()
..()
return
*/
process()
processing_objects.Remove(src)
return
examine()
set src in view()
..()
if((in_range(src, usr) || loc == usr))
if(secured)
usr.show_message("The [name] is ready!")
else
usr.show_message("The [name] can be attached!")
return
attack_self(mob/user as mob)
if(!user) return 0
user.machine = src
interact(user)
return 1
interact(mob/user as mob)
return //HTML MENU FOR WIRES GOES HERE
/*
Name: IsAssemblyHolder