Did a bit of work on assemblies.

The rev icons bug might be fixed now. 
Removed the old logged say file as it is no longer used and contained questionable material.
People should no longer spawn on the wizard station for a second at round start.
Removed the old intercept vars as they have not been used in a good while. 
Blob is more or less back to its old state but still has the lava sprite, can we please get some new sprites for it.
Fixed the door on the prison station, it can now actually be used again.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2163 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-09-09 06:15:38 +00:00
parent 6b868e69b3
commit bae5834be3
24 changed files with 662 additions and 760 deletions
+53 -2
View File
@@ -2,6 +2,7 @@
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.
*/
@@ -27,7 +28,7 @@ Desc: If true is an assembly that can work with the holder
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
@@ -90,6 +91,8 @@ Desc: If true is an assembly that can work with the holder
return
*/
/*
Name: IsAssemblyHolder
Desc: If true is an object that can hold an assemblyholder object
@@ -98,5 +101,53 @@ Desc: If true is an object that can hold an assemblyholder object
return 0
/*
proc
Process_Activation(var/obj/item/device/D)
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
list/small_icon_state_overlays = null//Same here
obj/holder = null
cooldown = 0//To prevent spam
proc
Activate()//Called when this assembly is pulsed by another one
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
Attach_Holder(var/obj/H, var/mob/user)//Called when an assembly holder attempts to attach, sets src's loc in here
Activate()
if(cooldown > 0)
return 0
cooldown = 2
spawn(10)
Process_cooldown()
//Rest of code here
return 0
Process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
Process_cooldown()
return 1
Attach_Holder(var/obj/H, var/mob/user)
if(!H) return 0
if(!H.IsAssemblyHolder()) return 0
//Remember to have it set its loc somewhere in here
*/
+58 -34
View File
@@ -16,10 +16,11 @@
secured = 0
obj/item/device/assembly_left = null
obj/item/device/assembly_right = null
//The "other" thing will go here
obj/assembly_special = null
proc
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
attach_special(var/obj/O, var/mob/user)
Process_Activation(var/obj/item/device/D)
@@ -45,6 +46,18 @@
return 1
attach_special(var/obj/O, var/mob/user)
if(!O) return
if(!O.IsSpecialAssembly()) return 0
/*
if(O:Attach_Holder())
assembly_special = O
update_icon()
src.name = "[assembly_left.name] [assembly_right.name] [assembly_special.name] assembly"
*/
return
update_icon()
src.overlays = null
if(assembly_left)
@@ -55,9 +68,13 @@
src.overlays += assembly_right:small_icon_state_right
for(var/O in assembly_right:small_icon_state_overlays)
src.overlays += text("[]_r", O)
// if(other)
// other.update_icon()
/* if(assembly_special)
assembly_special.update_icon()
if(assembly_special:small_icon_state)
src.overlays += assembly_special:small_icon_state
for(var/O in assembly_special:small_icon_state_overlays)
src.overlays += O
*/
examine()
set src in view()
@@ -71,28 +88,33 @@
HasProximity(atom/movable/AM as mob|obj)
if(!assembly_left || !assembly_right) return 0
assembly_left.HasProximity(AM)
assembly_right.HasProximity(AM)
Move()//I dont like this but it will do for now
var/t = src.dir
..()
if(istype(assembly_left,/obj/item/device/infra))
assembly_left.dir = t
del(assembly_left:first)
if(istype(assembly_right,/obj/item/device/infra))
assembly_right.dir = t
del(assembly_right:first)
if(assembly_left)
assembly_left.HasProximity(AM)
if(assembly_right)
assembly_right.HasProximity(AM)
if(assembly_special)
assembly_special.HasProximity(AM)
return
attack_hand()//I dont like this one either
if(istype(assembly_left,/obj/item/device/infra))
del(assembly_left:first)
if(istype(assembly_right,/obj/item/device/infra))
del(assembly_right:first)
Move()
..()
if(assembly_left)
assembly_left:Holder_Movement()
if(assembly_right)
assembly_right:Holder_Movement()
if(assembly_special)
assembly_special:Holder_Movement()
return
attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
if(assembly_left)
assembly_left:Holder_Movement()
if(assembly_right)
assembly_right:Holder_Movement()
if(assembly_special)
assembly_special:Holder_Movement()
..()
return
@@ -100,7 +122,7 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(!assembly_left || !assembly_right)
user.show_message("\red Assembly part missing!")
user.show_message("\red BUG:Assembly part missing, please report this!")
return
if(src.secured)
src.secured = 0
@@ -114,6 +136,8 @@
user.show_message("\blue The [src.name] is ready!")
update_icon()
return
else if(W.IsSpecialAssembly())
attach_special(W, user)
else
..()
return
@@ -149,16 +173,17 @@
return
Process_Activation(var/obj/item/device/D)
Process_Activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D) return 0
if(assembly_left == D)
assembly_right:Activate()
//If anymore things can be on a holder this will have to be edited
else if(assembly_right == D)
assembly_left:Activate()
// else if(assemblyother == D)
// assembly_left.Activate()
// assembly_right.Activate()
if((normal) && (assembly_right) && (assembly_left))
if(assembly_right != D)
assembly_right:Activate()
if(assembly_left != D)
assembly_left:Activate()
if((special) && (assembly_special))
if(!assembly_special == D)
assembly_left:Activate()
assembly_right:Activate()
return 1
@@ -170,4 +195,3 @@
+7
View File
@@ -25,6 +25,7 @@
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
beam_trigger()
@@ -146,6 +147,12 @@
return
Holder_Movement()
if(!holder) return 0
src.dir = holder.dir
del(src.first)
beam_trigger()
if((!secured)||(!scanning)||(cooldown > 0)) return 0
if((holder)&&(holder.IsAssemblyHolder()))