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

@@ -638,7 +638,7 @@
if(!holder) return
STFU_ghosts = !STFU_ghosts
usr << "You will now [STFU_ghosts ? "hear" : "not hear"] ghsots"
usr << "You will now [STFU_ghosts ? "hear" : "not hear"] ghosts"
/client/proc/toggle_hear_radio()
set name = "Toggle Hear Radio"

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

View File

@@ -6,22 +6,21 @@
item_state = "assembly"
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
m_amt = 100
throwforce = 5
w_class = 1.0
w_class = 2.0
throw_speed = 3
throw_range = 10
var
secured = 0
obj/item/device/assembly_left = null
obj/item/device/assembly_right = null
obj/assembly_special = null
obj/item/device/assembly/a_left = null
obj/item/device/assembly/a_right = null
obj/special_assembly = 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)
process_activation(var/obj/item/device/D)
IsAssemblyHolder()
@@ -30,7 +29,7 @@
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
if((!D)||(!D2)) return 0
if((!D.IsAssembly())||(!D2.IsAssembly())) return 0
if((!isassembly(D))||(!isassembly(D2))) return 0
if((D:secured)||(D2:secured)) return 0
if(user)
user.remove_from_mob(D)
@@ -39,8 +38,8 @@
D2:holder = src
D.loc = src
D2.loc = src
assembly_left = D
assembly_right = D2
a_left = D
a_right = D2
src.name = "[D.name] [D2.name] assembly"
update_icon()
return 1
@@ -51,28 +50,28 @@
if(!O.IsSpecialAssembly()) return 0
/*
if(O:Attach_Holder())
assembly_special = O
special_assembly = O
update_icon()
src.name = "[assembly_left.name] [assembly_right.name] [assembly_special.name] assembly"
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
*/
return
update_icon()
src.overlays = null
if(assembly_left)
src.overlays += assembly_left:small_icon_state_left
for(var/O in assembly_left:small_icon_state_overlays)
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)
if(assembly_right)
src.overlays += assembly_right:small_icon_state_right
for(var/O in assembly_right:small_icon_state_overlays)
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)
/* 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)
/* if(special_assembly)
special_assembly.update_icon()
if(special_assembly:small_icon_state)
src.overlays += special_assembly:small_icon_state
for(var/O in special_assembly:small_icon_state_overlays)
src.overlays += O
*/
@@ -88,52 +87,47 @@
HasProximity(atom/movable/AM as mob|obj)
if(assembly_left)
assembly_left.HasProximity(AM)
if(assembly_right)
assembly_right.HasProximity(AM)
if(assembly_special)
assembly_special.HasProximity(AM)
if(a_left)
a_left.HasProximity(AM)
if(a_right)
a_right.HasProximity(AM)
if(special_assembly)
special_assembly.HasProximity(AM)
return
Move()
..()
if(assembly_left)
assembly_left:Holder_Movement()
if(assembly_right)
assembly_right:Holder_Movement()
if(assembly_special)
assembly_special:Holder_Movement()
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
// if(special_assembly)
// special_assembly: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()
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
// if(special_assembly)
// special_assembly:Holder_Movement()
..()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(!assembly_left || !assembly_right)
if(!a_left || !a_right)
user.show_message("\red BUG:Assembly part missing, please report this!")
return
if(src.secured)
src.secured = 0
assembly_left:Unsecure()
assembly_right:Unsecure()
user.show_message("\blue The [src.name] can now be taken apart!")
else
src.secured = 1
assembly_left:Secure()
assembly_right:Secure()
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
user.show_message("\blue The [src.name] is ready!")
else
user.show_message("\blue The [src.name] can now be taken apart!")
update_icon()
return
else if(W.IsSpecialAssembly())
@@ -146,44 +140,41 @@
attack_self(mob/user as mob)
src.add_fingerprint(user)
if(src.secured)
if(!assembly_left || !assembly_right)
if(!a_left || !a_right)
user.show_message("\red Assembly part missing!")
return
if(istype(assembly_left,assembly_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"))
if("Left")
assembly_left.attack_self(user)
if("Right")
assembly_right.attack_self(user)
if("Left") a_left.attack_self(user)
if("Right") a_right.attack_self(user)
return
else
assembly_left.attack_self(user)
assembly_right.attack_self(user)
a_left.attack_self(user)
a_right.attack_self(user)
else
var/turf/T = get_turf(src)
if(!T) return 0
if(assembly_left)
assembly_left:holder = null
assembly_left.loc = T
if(assembly_right)
assembly_right:holder = null
assembly_right.loc = T
if(a_left)
a_left:holder = null
a_left.loc = T
if(a_right)
a_right:holder = null
a_right.loc = T
spawn(0)
del(src)
return
Process_Activation(var/obj/D, var/normal = 1, var/special = 1)
process_activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D) return 0
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()
if((normal) && (a_right) && (a_left))
if(a_right != D)
a_right.pulsed(0)
if(a_left != D)
a_left.pulsed(0)
// if(special && special_assembly)
// if(!special_assembly == D)
// special_assembly.dothings()
return 1

View File

@@ -1,111 +1,27 @@
/obj/item/device/igniter
/obj/item/device/assembly/igniter
name = "igniter"
desc = "A small electronic device able to ignite combustable substances. Does not function well as a lighter."
icon = 'new_assemblies.dmi'
icon_state = "igniter"
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
m_amt = 100
throwforce = 5
w_class = 1.0
throw_speed = 3
throw_range = 10
m_amt = 500
g_amt = 50
w_amt = 10
origin_tech = "magnets=1"
var
secured = 1
small_icon_state_left = "igniter_left"
small_icon_state_right = "igniter_right"
list/small_icon_state_overlays = null
obj/holder = null
cooldown = 0
proc
Activate()//Called when this assembly is pulsed by another one
Secure()
Unsecure()
Attach_Assembly(var/obj/A, var/mob/user)
Process_cooldown()
Holder_Movement()
secured = 1
small_icon_state_left = "igniter_left"
small_icon_state_right = "igniter_right"
IsAssembly()
activate()
if(!..()) return 0//Cooldown check
var/turf/location = get_turf(loc)
if(location) location.hotspot_expose(1000,1000)
return 1
Process_cooldown()
src.cooldown--
if(src.cooldown <= 0) return 0
spawn(10)
src.Process_cooldown()
return 1
Activate()
if((!secured) || (cooldown > 0))
return 0
var/turf/location = get_turf(src.loc)
if(location)
location.hotspot_expose(1000,1000)
cooldown = 2
spawn(10)
Process_cooldown()
return 1
Secure()
if(secured)
return 0
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
else
..()
return
attack_self(mob/user as mob)
src.add_fingerprint(user)
add_fingerprint(user)
spawn( 5 )
Activate()
activate()
return
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

View File

@@ -1,96 +1,42 @@
/obj/item/device/infra
/obj/item/device/assembly/infra
name = "Infrared Beam"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
icon = 'new_assemblies.dmi'
icon_state = "infrared_old"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
item_state = "electronic"
m_amt = 150
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
secured = 0
small_icon_state_left = "infrared_left"
small_icon_state_right = "infrared_right"
list/small_icon_state_overlays = null
obj/holder = null
cooldown = 0//To prevent spam
scanning = 0
visible = 0
obj/effect/beam/i_beam/first = null
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
beam_trigger()
trigger_beam()
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
activate()
if(!..()) return 0//Cooldown check
src.scanning = !src.scanning
update_icon()
spawn(10)
Process_cooldown()
return 0
return 1
Secure()
toggle_secure()
secured = !secured
if(secured)
return 0
secured = 1
processing_objects.Add(src)//removal is taken care of it process()
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
scanning = 0
if(src.first) del(src.first)
processing_objects.Remove(src)
update_icon()
return secured
update_icon()
@@ -105,12 +51,13 @@
return
process()
process()//Old code
if(!scanning)
if(!src.first)
if(src.first)
del(src.first)
return
if ((!( src.first ) && (src.secured && (istype(src.loc, /turf) || (src.holder && istype(src.holder.loc, /turf))))))
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) )
I.master = src
I.density = 1
@@ -127,9 +74,6 @@
//world << "infra: processing beam \ref[I]"
I.process()
return
if(!secured)
processing_objects.Remove(src)
return
@@ -147,27 +91,25 @@
return
Holder_Movement()
holder_movement()
if(!holder) return 0
src.dir = holder.dir
// src.dir = holder.dir
del(src.first)
return 1
beam_trigger()
trigger_beam()
if((!secured)||(!scanning)||(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
attack_self(mob/user as mob)
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)))
@@ -180,32 +122,32 @@
Topic(href, href_list)
..()
if(get_dist(src, usr) <= 1)
if (href_list["state"])
src.scanning = !(src.scanning)
update_icon()
if (href_list["visible"])
src.visible = !(src.visible)
spawn( 0 )
if (src.first)
src.first.vis_spread(src.visible)
if (href_list["close"])
usr << browse(null, "window=infra")
return
if(usr)
src.attack_self(usr)
else
if(get_dist(src, usr) > 1)
usr << browse(null, "window=infra")
onclose(usr, "infra")
return
if (href_list["state"])
src.scanning = !(src.scanning)
update_icon()
if (href_list["visible"])
src.visible = !(src.visible)
spawn( 0 )
if(src.first)
src.first.vis_spread(src.visible)
if (href_list["close"])
usr << browse(null, "window=infra")
return
if(usr)
src.attack_self(usr)
return
verb/rotate()//This really could be better but I dont want to redo it right now
verb/rotate()//This could likely be better
set name = "Rotate Infrared Laser"
set category = "Object"
set src in usr
@@ -214,22 +156,6 @@
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
/***************************IBeam*********************************/
@@ -238,29 +164,27 @@
icon = 'projectiles.dmi'
icon_state = "ibeam"
var/obj/effect/beam/i_beam/next = null
var/obj/item/device/infra/master = null
var/obj/item/device/assembly/infra/master = null
var/limit = null
var/visible = 0.0
var/left = null
// var/master = null
anchored = 1.0
flags = TABLEPASS
/obj/effect/beam/i_beam/proc/hit()
//world << "beam \ref[src]: hit"
if (src.master)
if(src.master)
//world << "beam hit \ref[src]: calling master \ref[master].hit"
src.master.beam_trigger()
//SN src = null
src.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
spawn( 0 )
if (src.next)
spawn(0)
if(src.next)
//world << "i_beam \ref[src] : is next [next.type] \ref[next], calling spread"
src.next.vis_spread(v)
return
@@ -269,17 +193,17 @@
/obj/effect/beam/i_beam/process()
//world << "i_beam \ref[src] : process"
if ((src.loc.density || !( src.master )))
if((src.loc.density || !( src.master )))
//SN src = null
// world << "beam hit loc [loc] or no master [master], deleting"
del(src)
return
//world << "proccess: [src.left] left"
if (src.left > 0)
if(src.left > 0)
src.left--
if (src.left < 1)
if (!( src.visible ))
if(src.left < 1)
if(!( src.visible ))
src.invisibility = 101
else
src.invisibility = 0
@@ -295,7 +219,7 @@
//world << "created new beam \ref[I] at [I.x] [I.y] [I.z]"
step(I, I.dir)
if (I)
if(I)
//world << "step worked, now at [I.x] [I.y] [I.z]"
if (!( src.next ))
//world << "no src.next"
@@ -312,13 +236,11 @@
return
else
//world << "is a next: \ref[next], deleting beam \ref[I]"
//I = null
del(I)
else
//src.next = null
//world << "step failed, deleting \ref[src.next]"
del(src.next)
spawn( 10 )
spawn(10)
src.process()
return
return
@@ -332,7 +254,7 @@
return
/obj/effect/beam/i_beam/HasEntered(atom/movable/AM as mob|obj)
if (istype(AM, /obj/effect/beam))
if(istype(AM, /obj/effect/beam))
return
spawn( 0 )
src.hit()

View File

@@ -1,140 +1,75 @@
/obj/item/device/prox_sensor
/obj/item/device/assembly/prox_sensor
name = "proximity sensor"
desc = "Used for scanning and alerting when someone enters a certain proximity."
icon = 'new_assemblies.dmi'
icon_state = "prox"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
item_state = "electronic"
m_amt = 300
m_amt = 800
g_amt = 200
w_amt = 50
origin_tech = "magnets=1"
secured = 0
small_icon_state_left = "prox_left"
small_icon_state_right = "prox_right"
var
secured = 0
small_icon_state_left = "prox_left"
small_icon_state_right = "prox_right"
list/small_icon_state_overlays = null
obj/holder = null
scanning = 0
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()
toggle_scan()
sense()
IsAssembly()
return 1
Process_cooldown()
src.cooldown--
if(src.cooldown <= 0) return 0
spawn(10)
src.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()
if(secured) return 0
secured = 1
processing_objects.Add(src)//removal is taken care of it process()
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
toggle_secure()
secured = !secured
if(secured)
processing_objects.Add(src)
else
..()
return
scanning = 0
timing = 0
processing_objects.Remove(src)
update_icon()
return secured
HasProximity(atom/movable/AM as mob|obj)
if (istype(AM, /obj/effect/beam))
return
if (AM.move_speed < 12)
src.sense()
if (istype(AM, /obj/effect/beam)) return
if (AM.move_speed < 12) sense()
return
sense()
if((!secured)||(!scanning)||(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
toggle_scan()
if(!secured)
if(scanning)
scanning = 0
src.timing = 0
processing_objects.Remove(src)
update_icon()
if(timing && (time >= 0))
time--
if(time <= 0)
timing = 0
toggle_scan()
time = 10
return
dropped()
spawn(0)
src.sense()
sense()
return
return
@@ -143,17 +78,18 @@
if(!secured) return 0
scanning = !scanning
update_icon()
return
update_icon()
src.overlays = null
src.small_icon_state_overlays = list()
overlays = null
small_icon_state_overlays = list()
if(timing)
src.overlays += text("prox_timing")
src.small_icon_state_overlays += text("prox_timing")
overlays += text("prox_timing")
small_icon_state_overlays += text("prox_timing")
if(scanning)
src.overlays += text("prox_scanning")
src.small_icon_state_overlays += text("prox_scanning")
overlays += text("prox_scanning")
small_icon_state_overlays += text("prox_scanning")
if(holder)
holder.update_icon()
return
@@ -161,28 +97,17 @@
Move()
..()
src.sense()
sense()
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: Change this to the wires thingy
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>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>", (src.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)
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 += "<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>"
@@ -193,26 +118,29 @@
Topic(href, href_list)
..()
if(get_dist(src, usr) <= 1)
if (href_list["scanning"])
toggle_scan()
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=prox")
return
if(usr)
src.attack_self(usr)
else
if(get_dist(src, usr) > 1)
usr << browse(null, "window=prox")
onclose(usr, "prox")
return
if(href_list["scanning"])
toggle_scan()
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=prox")
return
if(usr)
attack_self(usr)
return

View File

@@ -1,2 +1,107 @@
//Signalers are now an assembly item, not sure if I should put it in here.
//Currently in game/objects/radio/signaler.dm
/obj/item/device/assembly/signaler
name = "Remote Signaling Device"
desc = "Used to remotely activate devices."
icon_state = "signaller"
item_state = "signaler"
m_amt = 1000
g_amt = 200
w_amt = 100
origin_tech = "magnets=1"
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
frequency = 100
delay = 0
airlock_wire = null
proc
send_signal()
activate()
if(!..()) return 0//Cooldown check
signal()
pulse(0)
if(istype(src.loc, /obj/machinery/door/airlock) && src.airlock_wire && src.wires)
var/obj/machinery/door/airlock/A = src.loc
A.pulse(src.airlock_wire)
// pulse(1)//?
return 1
interact(mob/user as mob, flag1)
var/t1 = "-------"
// 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)))
// 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>
var/dat = {"
<TT>
<A href='byond://?src=\ref[src];send=1'>Send Signal</A><BR>
<B>Frequency/Code</B> for signaler:<BR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
[src.frequency]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
Code:
<A href='byond://?src=\ref[src];code=-5'>-</A>
<A href='byond://?src=\ref[src];code=-1'>-</A>
[src.code]
<A href='byond://?src=\ref[src];code=1'>+</A>
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
[t1]
</TT>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
Topic(href, href_list)
//..()
if(usr.stat)
return
if ((usr.contents.Find(src) || (usr.contents.Find(src.holder) || (in_range(src, usr) && istype(src.loc, /turf)))))
usr.machine = src
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = round(src.frequency)
src.frequency = min(100, src.frequency)
src.frequency = max(1, src.frequency)
return
if(href_list["code"])
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"])
spawn( 0 )
send_signal()
return
// if(href_list["listen"])
// src.listening = text2num(href_list["listen"])
else
usr << browse(null, "window=radio")
return
return
proc/signal()//will have to do for now
for(var/obj/item/device/assembly/signaler/S in world)
if(!S) continue
if(S == src) continue
if((S.frequency == src.frequency) && (S.code == src.code))
S.pulsed(1)
return 1
return 0

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

View File

@@ -20,8 +20,7 @@ datum
proc
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some
if(!istype(M, /mob/living))
return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO
if(!istype(M, /mob/living)) return 0
var/datum/reagent/self = src
src = null //of the reagent to the mob on TOUCHING it.
@@ -56,7 +55,7 @@ datum
if(prob(chance) && !block)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume/2)
return
return 1
reaction_obj(var/obj/O, var/volume) //By default we transfer a small part of the reagent to the object
src = null //if it can hold reagents. nope!
@@ -799,8 +798,9 @@ datum
color = "#13BC5E" // rgb: 19, 188, 94
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(!..()) return
src = null
if ( (method==TOUCH && prob(33)) || method==INGEST)
if((method==TOUCH && prob(33)) || method==INGEST)
randmuti(M)
if(prob(98))
randmutb(M)

View File

@@ -120,7 +120,7 @@
src.state = 2
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
A.amount = 1
if(istype(W, /obj/item/device/radio/signaler))
if(issignaler(W))
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You attach the wireless signaller unit to the circutry."
user.drop_item()
@@ -131,8 +131,8 @@
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the remote signalling device."
src.state = 3
new /obj/item/device/radio/signaler( src.loc, 1 )
if(istype(W, /obj/item/device/prox_sensor) && motion == 0)
new /obj/item/device/assembly/signaler( src.loc, 1 )
if(isprox(W) && motion == 0)
// if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
// W:use(1)
@@ -141,7 +141,7 @@
if(istype(W, /obj/item/weapon/crowbar) && motion)
playsound(src.loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the proximity sensor."
new /obj/item/device/prox_sensor( src.loc, 1 )
new /obj/item/device/assembly/prox_sensor( src.loc, 1 )
motion = 0
if(istype(W, /obj/item/stack/sheet/glass))
if(W:amount >= 1)
@@ -1601,7 +1601,7 @@
flags = FPRINT | OPENCONTAINER
attackby(var/obj/D, mob/user as mob)
if(istype(D, /obj/item/device/prox_sensor))
if(isprox(D))
var/obj/item/weapon/bucket_sensor/B = new /obj/item/weapon/bucket_sensor
B.loc = user
if (user.r_hand == D)

View File

@@ -12,7 +12,7 @@ Space suit parts
see_face = 0.0
item_state = "space"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 2, taser = 2, bomb = 0, bio = 25, rad = 25)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -25,11 +25,10 @@ Space suit parts
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
heat_transfer_coefficient = 0.02
radiation_protection = 0.25
protective_temperature = 1000
flags = FPRINT | TABLEPASS | SUITSPACE
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 3
armor = list(melee = 20, bullet = 5, laser = 10, taser = 3, bomb = 15, bio = 30, rad = 40)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)

View File

@@ -6,7 +6,7 @@
flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES
see_face = 0.0
permeability_coefficient = 0.01
armor = list(melee = 60, bullet = 50, laser = 50, taser = 25, bomb = 50, bio = 20, rad = 20)
armor = list(melee = 60, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 20, rad = 20)
@@ -15,7 +15,7 @@
desc = "That's not red paint. That's real blood."
icon_state = "deathsquad"
item_state = "deathsquad"
armor = list(melee = 65, bullet = 55, laser = 35, taser = 20, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
@@ -23,7 +23,7 @@
name = "officer's beret"
desc = "An armored beret commonly used by special operations officers."
icon_state = "beret_badge"
armor = list(melee = 65, bullet = 55, laser = 35, taser = 20, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
@@ -48,7 +48,7 @@
desc = "Yarr."
icon_state = "pirate"
item_state = "pirate"
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/suit/space/pirate
@@ -59,4 +59,4 @@
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 0
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)

View File

@@ -3,10 +3,9 @@
name = "ninja hood"
icon_state = "s-ninja"
item_state = "s-ninja_mask"
radiation_protection = 0.25
see_face = 1
allowed = list(/obj/item/weapon/cell)
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25)
/obj/item/clothing/suit/space/space_ninja
@@ -15,10 +14,9 @@
icon_state = "s-ninja"
item_state = "s-ninja_suit"
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/cell)
radiation_protection = 0.75
protective_temperature = 5000
slowdown = 0
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
var
//Important parts of the suit.

View File

@@ -3,8 +3,7 @@
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "rig-engineering"
item_state = "rig_helm"
radiation_protection = 0.25
armor = list(melee = 40, bullet = 5, laser = 20, taser = 5, bomb = 35, bio = 50, rad = 50)
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 50, rad = 50)
allowed = list(/obj/item/device/flashlight)
/obj/item/clothing/head/helmet/space/rig/mining
@@ -12,24 +11,23 @@
icon_state = "rig-mining"
item_state = "rig_helm"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has extra protection against common mining hazards."
armor = list(melee = 45, bullet = 10, laser = 20, taser = 5, bomb = 35, bio = 50, rad = 25) //Slightly more robust since it doesn't have extra radiation shielding.
armor = list(melee = 45, bullet = 10, laser = 20,energy = 5, bomb = 35, bio = 50, rad = 25) //Slightly more robust since it doesn't have extra radiation shielding.
/obj/item/clothing/head/helmet/space/rig/elite
name = "Elite RIG helmet"
icon_state = "whiterig"
item_state = "whiterig"
desc = "A special armored helmet designed for work in space battlefield conditions."
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 40, bio = 50, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 40, bio = 50, rad = 30)
/obj/item/clothing/suit/space/rig
name = "engineer RIG suit"
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "rig-engineering"
item_state = "rig_suit"
radiation_protection = 0.50
protective_temperature = 5000 //For not dieing near a fire, but still not being great in a full inferno
slowdown = 2
armor = list(melee = 40, bullet = 5, laser = 20, taser = 5, bomb = 35, bio = 50, rad = 50)
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 50, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/satchel,/obj/item/device/t_scanner)
/obj/item/clothing/suit/space/rig/mining
@@ -37,7 +35,7 @@
item_state = "rig_suit"
name = "mining RIG suit"
desc = "A special suit that protects against hazardous, low pressure environments. Has extra protection against common mining hazards."
armor = list(melee = 45, bullet = 10, laser = 20, taser = 5, bomb = 35, bio = 50, rad = 25) //Slightly more robust since it doesn't have extra radiation shielding.
armor = list(melee = 45, bullet = 10, laser = 20,energy = 5, bomb = 35, bio = 50, rad = 25) //Slightly more robust since it doesn't have extra radiation shielding.
/obj/item/clothing/suit/space/rig/elite
icon_state = "whiterig"
@@ -45,5 +43,5 @@
name = "Elite RIG suit"
desc = "A special suit that protects against hazardous, low pressure battlefield enviroments. Designed to hold larger oxygen tanks and advanced Nanotrasen tools."
protective_temperature = 10000
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 40, bio = 50, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 40, bio = 50, rad = 30)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/satchel,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)

View File

@@ -4,7 +4,7 @@
icon_state = "syndicate"
item_state = "syndicate"
desc = "Has a tag: Totally not property of an enemy corporation, honest."
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/suit/space/syndicate
@@ -15,7 +15,7 @@
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
@@ -165,7 +165,7 @@
desc = "Professionals Have Standards, Be Polite, Be Efficient, Have a plan to kill everyone you meet."
icon_state = "syndicate-helm-black"
item_state = "syndicate-helm-black"
armor = list(melee = 65, bullet = 55, laser = 35, taser = 20, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/suit/space/syndicate/elite
@@ -174,7 +174,7 @@
icon_state = "syndicate-black"
item_state = "syndicate-black"
slowdown = 1
armor = list(melee = 80, bullet = 60, laser = 50, taser = 25, bomb = 50, bio = 10, rad = 0)
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0)

View File

@@ -1,6 +1,6 @@
/obj/item/projectile/hivebotbullet
damage = 5
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
damage = 5
damage_type = BRUTE
/obj/effect/critter/hivebot
name = "Hivebot"

View File

@@ -4,14 +4,14 @@
/datum/recipe/telebacon
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meat,
/obj/item/device/radio/signaler
/obj/item/device/assembly/signaler
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
/datum/recipe/syntitelebacon
items = list(
/obj/item/weapon/syntiflesh,
/obj/item/device/radio/signaler
/obj/item/device/assembly/signaler
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon

View File

@@ -68,16 +68,6 @@
return ..(gibbed)
/mob/living/blob/bullet_act(var/obj/item/projectile/Proj, var/datum/organ/external/def_zone)
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
bruteloss += Proj.mobdamage[BRUTE]
if(2)
fireloss += Proj.mobdamage[BURN]
return
/mob/living/blob/blob_act()
src << "The blob attempts to reabsorb you."
toxloss += 20

View File

@@ -167,35 +167,34 @@
set category = "Alien"
if(powerc(50))
if(!isalien(target))
toxloss -= 50
src << "\green You spit neurotoxin at [target]."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [src] spits neurotoxin at [target]!"
//I'm not motivated enough to revise this. Prjectile code in general needs update.
var/turf/T = loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
if(!U || !T)
return
while(U && !istype(U,/turf))
U = U.loc
if(!istype(T, /turf))
return
if (U == T)
usr.bullet_act(src, src.get_organ_target())
return
if(!istype(U, /turf))
return
var/obj/item/projectile/dart/A = new /obj/item/projectile/dart(usr.loc)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
//
A.process()
else
if(isalien(target))
src << "\green Your allies are not a valid target."
return
toxloss -= 50
src << "\green You spit neurotoxin at [target]."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [src] spits neurotoxin at [target]!"
//I'm not motivated enough to revise this. Prjectile code in general needs update.
var/turf/T = loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
if(!U || !T)
return
while(U && !istype(U,/turf))
U = U.loc
if(!istype(T, /turf))
return
if (U == T)
usr.bullet_act(src, src.get_organ_target())
return
if(!istype(U, /turf))
return
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
A.process()
return

View File

@@ -21,13 +21,6 @@
src.hand = 1
drop_item()
src.hand = h
if (istype(src.wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank))
var/obj/item/clothing/suit/armor/a_i_a_ptank/A = src.wear_suit
bombers += "[src.key] has detonated a suicide bomb. Temp = [A.part4.air_contents.temperature-T0C]."
// world << "Detected that [src.key] is wearing a bomb" debug stuff
if(A.status && prob(90))
// world << "Bomb has ignited?"
A.part4.ignite()
if (src.key)
spawn(10)

View File

@@ -74,110 +74,7 @@
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [toxloss]")
/mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj)
var/shielded = 0
if(prob(80))
for(var/mob/living/carbon/metroid/M in view(1,src))
if(M.Victim == src)
M.bullet_act(Proj)
return
for(var/obj/item/weapon/cloaking_device/S in src)
if (S.active)
shielded = 1
S.active = 0
S.icon_state = "shield0"
if ((shielded && Proj.flag != "bullet"))
if (Proj.flag)
src << "\blue Your shield was disturbed by a laser!"
if(paralysis <= 12) paralysis = 12
updatehealth()
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(Proj)
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
var/d = Proj.mobdamage[BRUTE]
if(!Proj.nodamage) bruteloss += d
updatehealth()
if(2)
var/d = Proj.mobdamage[BURN]
if(!Proj.nodamage) fireloss += d
updatehealth()
if(3)
var/d = Proj.mobdamage[TOX]
if(!Proj.nodamage) toxloss += d
updatehealth()
if(4)
var/d = Proj.mobdamage[OXY]
if(!Proj.nodamage) oxyloss += d
updatehealth()
if(5)
var/d = Proj.mobdamage[CLONE]
if(!Proj.nodamage) cloneloss += d
updatehealth()
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
if(Proj.effectmod["stun"] == SET)
stunned = Proj.effects["stun"]
else
stunned += Proj.effects["stun"]
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
if(Proj.effectmod["weak"] == SET)
weakened = Proj.effects["weak"]
else
weakened += Proj.effects["weak"]
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
if(Proj.effectmod["paralysis"] == SET)
paralysis = Proj.effects["paralysis"]
else
paralysis += Proj.effects["paralysis"]
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
if(Proj.effectmod["stutter"] == SET)
stuttering = Proj.effects["stutter"]
else
stuttering += Proj.effects["stutter"]
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
if(Proj.effectmod["drowsyness"] == SET)
drowsyness = Proj.effects["drowsyness"]
else
drowsyness += Proj.effects["drowsyness"]
// Aliums not effected by radiation damage
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
if(Proj.effectmod["eyeblur"] == SET)
eye_blurry = Proj.effects["eyeblur"]
else
eye_blurry += Proj.effects["eyeblur"]
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
return
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
/mob/living/carbon/alien/humanoid/emp_act(severity)
if(wear_suit) wear_suit.emp_act(severity)

View File

@@ -66,101 +66,8 @@
stat(null, "Plasma Stored: [toxloss]")
//This is okay I guess unless we add alien shields or something. Should be cleaned up a bit.
/mob/living/carbon/alien/larva/bullet_act(var/obj/item/projectile/Proj)
///mob/living/carbon/alien/larva/bullet_act(var/obj/item/projectile/Proj) taken care of in living
if(prob(80))
for(var/mob/living/carbon/metroid/M in view(1,src))
if(M.Victim == src)
M.bullet_act(Proj)
return
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(Proj)
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
var/d = Proj.mobdamage[BRUTE]
if(!Proj.nodamage) bruteloss += d
updatehealth()
if(2)
var/d = Proj.mobdamage[BURN]
if(!Proj.nodamage) fireloss += d
updatehealth()
if(3)
var/d = Proj.mobdamage[TOX]
if(!Proj.nodamage) toxloss += d
updatehealth()
if(4)
var/d = Proj.mobdamage[OXY]
if(!Proj.nodamage) oxyloss += d
updatehealth()
if(5)
var/d = Proj.mobdamage[CLONE]
if(!Proj.nodamage) cloneloss += d
updatehealth()
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
if(Proj.effectmod["stun"] == SET)
stunned = Proj.effects["stun"]
else
stunned += Proj.effects["stun"]
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
if(Proj.effectmod["weak"] == SET)
weakened = Proj.effects["weak"]
else
weakened += Proj.effects["weak"]
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
if(Proj.effectmod["paralysis"] == SET)
paralysis = Proj.effects["paralysis"]
else
paralysis += Proj.effects["paralysis"]
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
if(Proj.effectmod["stutter"] == SET)
stuttering = Proj.effects["stutter"]
else
stuttering += Proj.effects["stutter"]
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
if(Proj.effectmod["drowsyness"] == SET)
drowsyness = Proj.effects["drowsyness"]
else
drowsyness += Proj.effects["drowsyness"]
// Aliums not effected by radiation damage
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
if(Proj.effectmod["eyeblur"] == SET)
eye_blurry = Proj.effects["eyeblur"]
else
eye_blurry += Proj.effects["eyeblur"]
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
return
/mob/living/carbon/alien/larva/emp_act(severity)
..()

View File

@@ -11,9 +11,9 @@
back = jetpack
return
bullet_act(flags)
take_overall_damage(15,0)
return
// bullet_act(flags)
// take_overall_damage(15,0)
// return
movement_delay()
return -5

View File

@@ -1,46 +1,89 @@
/mob/living/carbon/human
name = "human"
real_name = "human"
voice_name = "human"
icon = 'mob.dmi'
icon_state = "m-none"
var/r_hair = 0.0
var/g_hair = 0.0
var/b_hair = 0.0
var/h_style = "Short Hair"
var/r_facial = 0.0
var/g_facial = 0.0
var/b_facial = 0.0
var/f_style = "Shaved"
var/r_eyes = 0.0
var/g_eyes = 0.0
var/b_eyes = 0.0
var/s_tone = 0.0
var/age = 30.0
var/b_type = "A+"
var/obj/item/clothing/suit/wear_suit = null
var/obj/item/clothing/under/w_uniform = null
var/obj/item/clothing/shoes/shoes = null
var/obj/item/weapon/belt = null
var/obj/item/clothing/gloves/gloves = null
var/obj/item/clothing/glasses/glasses = null
var/obj/item/clothing/head/head = null
var/obj/item/clothing/ears/ears = null
var/obj/item/weapon/card/id/wear_id = null
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
var/obj/item/weapon/s_store = null
var/obj/item/weapon/h_store = null
var/icon/stand_icon = null
var/icon/lying_icon = null
var/last_b_state = 1.0
var/image/face_standing = null
var/image/face_lying = null
var/hair_icon_state = "hair_a"
var/face_icon_state = "bald"
var/list/body_standing = list()
var/list/body_lying = list()
var/mutantrace = null
var/list/organs = list()
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
nodamage = 1
/mob/living/carbon/human/New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
if (!dna)
dna = new /datum/dna( null )
if(!dna) dna = new /datum/dna(null)
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
var/datum/organ/external/chest/chest = new /datum/organ/external/chest(src)
var/datum/organ/external/head/head = new /datum/organ/external/head(src)
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm(src)
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm(src)
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg(src)
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg(src)
chest.owner = src
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
groin.owner = src
var/datum/organ/external/head/head = new /datum/organ/external/head( src )
head.owner = src
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
l_arm.owner = src
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
r_arm.owner = src
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
l_hand.owner = src
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
r_hand.owner = src
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
l_leg.owner = src
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
l_arm.owner = src
r_leg.owner = src
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
l_foot.owner = src
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
r_foot.owner = src
organs["chest"] = chest
organs["groin"] = groin
organs["head"] = head
organs["l_arm"] = l_arm
organs["r_arm"] = r_arm
organs["l_hand"] = l_hand
organs["r_hand"] = r_hand
organs["l_leg"] = l_leg
organs["r_leg"] = r_leg
organs["l_foot"] = l_foot
organs["r_foot"] = r_foot
l_leg.owner = src
organs += chest
organs += head
organs += r_arm
organs += l_arm
organs += r_leg
organs += l_leg
var/g = "m"
if (gender == MALE)
@@ -62,14 +105,7 @@
..()
organStructure = new /obj/effect/organstructure/human(src)
/mob/living/carbon/human/cyborg
New()
..()
if(organStructure) //hacky, but it's not supposed to be in for a long time anyway
del(organStructure)
organStructure = new /obj/effect/organstructure/cyber(src)
// organStructure = new /obj/effect/organstructure/human(src)
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
@@ -176,8 +212,8 @@
/mob/living/carbon/human/ex_act(severity)
flick("flash", flash)
// /obj/item/clothing/suit/bomb_suit( src )
// /obj/item/clothing/head/bomb_hood( src )
// /obj/item/clothing/suit/bomb_suit(src)
// /obj/item/clothing/head/bomb_hood(src)
if (stat == 2 && client)
gib(1)
@@ -242,18 +278,18 @@
temp.take_damage(b_loss * 0.05, f_loss * 0.05)
if("r_arm")
temp.take_damage(b_loss * 0.05, f_loss * 0.05)
if("l_hand")
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)
/* if("l_hand")
/ temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)
if("r_hand")
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)*/
if("l_leg")
temp.take_damage(b_loss * 0.05, f_loss * 0.05)
if("r_leg")
temp.take_damage(b_loss * 0.05, f_loss * 0.05)
if("l_foot")
/* if("l_foot")
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)
if("r_foot")
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)
temp.take_damage(b_loss * 0.0225, f_loss * 0.0225)*/
UpdateDamageIcon()
@@ -267,13 +303,13 @@
show_message("\red The blob attacks you!")
var/list/zones = list("head","chest","chest", "groin", "l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")
var/list/zones = list("head","chest","chest", "groin", "l_arm", "r_arm", "l_leg", "r_leg")
var/zone = pick(zones)
var/datum/organ/external/temp = organs["[zone]"]
switch(zone)
switch(zone)//This really needs an update badly
if ("head")
if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(99)))
if (prob(20))
@@ -958,7 +994,7 @@
if (wear_suit)
if (wear_suit.blood_DNA)
var/icon/stain_icon = null
if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat || /obj/item/clothing/suit/armor/a_i_a_ptank))
if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat))
stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]")
else if (istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat))
stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]")
@@ -1101,11 +1137,7 @@
*/
last_b_state = stat
/mob/living/carbon/human/hand_p(mob/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
/mob/living/carbon/human/hand_p(mob/M as mob)//update needed
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
@@ -1130,11 +1162,6 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
/*else if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return*/
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -1155,224 +1182,12 @@
src = null
src = H.monkeyize()
contract_disease(D,1,0)
return
/mob/living/carbon/human/attack_paw(mob/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
if (istype(wear_suit, /obj/item/clothing/suit/space))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
else if (istype(wear_suit, /obj/item/clothing/suit/space/santa))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
else if (istype(wear_suit, /obj/item/clothing/suit/bio_suit))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
else if (istype(wear_suit, /obj/item/clothing/suit/armor))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
/*else if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
if (prob(25))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return*/
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg", "groin")
if (istype(organs[text("[]", dam_zone)], /datum/organ/external))
var/datum/organ/external/temp = organs[text("[]", dam_zone)]
if (temp.take_damage(damage, 0))
UpdateDamageIcon()
else
UpdateDamage()
updatehealth()
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
var/mob/living/carbon/human/H = src
src = null
src = H.monkeyize()
contract_disease(D,1,0)
return
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("grab")
//This will be changed to skin, where we can skin a dead human corpse//Actually, that sounds kind of impractical./N
if (M == src)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("hurt")
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30) // How much damage aliens do to humans? Increasing -- TLE
// I've decreased the chance of humans being protected by uniforms. Now aliens can actually damage them.
var/datum/organ/external/affecting = organs["chest"]
var/t = M.zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/def_zone = ran_zone(t)
if (organs[def_zone])
affecting = organs[def_zone]
if ((istype(affecting, /datum/organ/external) && prob(95)))
playsound(loc, 'slice.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if (def_zone == "head")
if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(5)))
if (prob(20))
affecting.take_damage(damage, 0)
else
show_message("\red You have been protected from a hit to the head.")
return
if (damage >= 25)
if (weakened < 10)
weakened = rand(10, 15)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded []!</B>", M, src), 1, "\red You hear someone fall.", 2)
affecting.take_damage(damage)
else
if (def_zone == "chest")
if ((((wear_suit && wear_suit.body_parts_covered & UPPER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(10)))
show_message("\blue You have been protected from a hit to the chest.")
return
if (damage >= 25)
if (prob(50))
if (weakened < 5)
weakened = 5
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(stat != 2) stat = 1
affecting.take_damage(damage)
else
if (def_zone == "groin")
if ((((wear_suit && wear_suit.body_parts_covered & LOWER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(1)))
show_message("\blue You have been protected from a hit to the lower chest.")
return
if (damage >= 25)
if (prob(50))
if (weakened < 3)
weakened = 3
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else
if (stunned < 3)
stunned = 3
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(stat != 2) stat = 1
affecting.take_damage(damage)
else
affecting.take_damage(damage)
UpdateDamageIcon()
updatehealth()
else
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M] has lunged at [src] but missed!</B>"), 1)
if ("disarm")
var/damage = 5
var/datum/organ/external/affecting = organs["chest"]
var/t = M.zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/def_zone = ran_zone(t)
if (organs[def_zone])
affecting = organs[def_zone]
if (w_uniform)
w_uniform.add_fingerprint(M)
var/randn = rand(1, 100)
if (randn <= 90)
playsound(loc, 'pierce.ogg', 25, 1, -1)
if (weakened < 15)
weakened = rand(10, 15)
affecting.take_damage(damage)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
else
if (randn <= 99)
playsound(loc, 'slash.ogg', 25, 1, -1)
drop_item()
affecting.take_damage(damage)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
else
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
return
/mob/living/carbon/human/attack_metroid(mob/living/carbon/metroid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if(M.Victim) return // can't attack while eating!
if (health > -100)
@@ -1389,23 +1204,12 @@
damage = rand(5, 25)
var/dam_zone = pick("head", "chest", "l_hand", "r_hand", "l_leg", "r_leg", "groin")
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
if (dam_zone == "chest")
if ((((wear_suit && wear_suit.body_parts_covered & UPPER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(10)))
if(prob(20))
show_message("\blue You have been protected from a hit to the chest.")
return
if (istype(organs[text("[]", dam_zone)], /datum/organ/external))
var/datum/organ/external/temp = organs[text("[]", dam_zone)]
if (temp.take_damage(damage, 0))
UpdateDamageIcon()
else
UpdateDamage()
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, CLONE, affecting, armor_block)
UpdateDamageIcon()
if(M.powerlevel > 0)
@@ -1448,186 +1252,6 @@
return
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
if ((M.gloves && M.gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
if(M.gloves.uses > 0)
M.gloves.uses--
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
else
M.gloves.elecgen = 0
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
else
if (M.a_intent == "grab")
if (M == src)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else
if (M.a_intent == "hurt" && !(M.gloves && M.gloves.elecgen == 1))
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = 0
if(organStructure && organStructure.arms)
damage = rand(organStructure.arms.minDamage,organStructure.arms.maxDamage)
else
damage = rand(1, 9) //oh boy
var/datum/organ/external/affecting = organs["chest"]
var/t = M.zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/def_zone = ran_zone(t)
if (organs[text("[]", def_zone)])
affecting = organs[text("[]", def_zone)]
if ((istype(affecting, /datum/organ/external) && prob(90)))
if (M.mutations & HULK)
damage += 5
spawn(0)
paralysis += 1
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
if (def_zone == "head")
if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(99)))
if (prob(20))
affecting.take_damage(damage, 0)
else
show_message("\red You have been protected from a hit to the head.")
return
if (damage > 4.9)
if (weakened < 10)
weakened = rand(10, 15)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
affecting.take_damage(damage)
else
if (def_zone == "chest")
if ((((wear_suit && wear_suit.body_parts_covered & UPPER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(85)))
show_message("\red You have been protected from a hit to the chest.")
return
if (damage > 4.9)
if (prob(50))
if (weakened < 5)
weakened = 5
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has knocked down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(stat != 2) stat = 1
affecting.take_damage(damage)
else
if (def_zone == "groin")
if ((((wear_suit && wear_suit.body_parts_covered & LOWER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(75)))
show_message("\red You have been protected from a hit to the lower chest.")
return
if (damage > 4.9)
if (prob(50))
if (weakened < 3)
weakened = 3
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has knocked down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else
if (stunned < 3)
stunned = 3
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(stat != 2) stat = 1
affecting.take_damage(damage)
else
affecting.take_damage(damage)
UpdateDamageIcon()
updatehealth()
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
return
else
if (!( lying ) && !(M.gloves && M.gloves.elecgen == 1))
if (w_uniform)
w_uniform.add_fingerprint(M)
var/randn = rand(1, 100)
if (randn <= 25)
weakened = 2
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
else
if (randn <= 60)
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
return
/mob/living/carbon/human/restrained()
if (handcuffed)
@@ -1877,9 +1501,7 @@
if("belt")
message = text("\red <B>[] is trying to take off the [] from []'s belt!</B>", source, target.belt, target)
if("suit")
if(istype(target.wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank))//Exception for suicide vests.
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
else if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove)
if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
@@ -2153,13 +1775,14 @@ It can still be worn/put on as normal.
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
if(istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.l_hand = item
item.loc = target
item.add_fingerprint(target)
if(item)
loc = target
item.layer = 20
target.l_hand = item
item.loc = target
item.add_fingerprint(target)
if("r_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
//SN src = null
@@ -2232,15 +1855,7 @@ It can still be worn/put on as normal.
target.w_uniform = item
item.loc = target
if("suit")
if (target.wear_suit)
if(istype(target.wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank))//triggers suicide vest if someone else tries to take it off/N
var/obj/item/clothing/suit/armor/a_i_a_ptank/A = target.wear_suit//mostly a copy from death.dm code.
bombers += "[target.key] has detonated a suicide bomb. Temp = [A.part4.air_contents.temperature-T0C]."
if(A.status && prob(90))
A.part4.ignite()
return
if(istype(target.wear_suit, /obj/item/clothing)&& !target.wear_suit:canremove)
if(!istype(target.wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank)) return//Can remove the suicide vest if it didn't trigger.
if(target.wear_suit)
var/obj/item/W = target.wear_suit
target.u_equip(W)
if (target.client)
@@ -2419,75 +2034,6 @@ It can still be worn/put on as normal.
del(src)
return
/mob/living/carbon/human/proc/TakeDamage(zone, brute, burn)
var/datum/organ/external/E = organs[text("[]", zone)]
if (istype(E, /datum/organ/external))
if (E.take_damage(brute, burn))
UpdateDamageIcon()
else
UpdateDamage()
else
return 0
return
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
var/datum/organ/external/E = organs[text("[]", zone)]
if (istype(E, /datum/organ/external))
if (E.heal_damage(brute, burn))
UpdateDamageIcon()
else
UpdateDamage()
else
return 0
return
/mob/living/carbon/human/proc/UpdateDamage()
bruteloss = 0
fireloss = 0
var/datum/organ/external/O
for(var/t in organs)
O = organs[t]
if (istype(O, /datum/organ/external))
bruteloss += O.brute_dam
fireloss += O.burn_dam
return
// new damage icon system
// now constructs damage icon for each organ from mask * damage field
/mob/living/carbon/human/proc/UpdateDamageIcon()
del(body_standing)
body_standing = list()
del(body_lying)
body_lying = list()
bruteloss = 0
fireloss = 0
var/datum/organ/external/O
for(var/t in organs)
O = organs[t]
if (istype(O, /datum/organ/external))
bruteloss += O.brute_dam
fireloss += O.burn_dam
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
// world << "[O.icon_name] [O.damage_state] \icon[DI]"
body_standing += DI
DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons
DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY)
// world << "[O.r_name]2 [O.d_i_state]-2 \icon[DI]"
body_lying += DI
//body_standing += new /icon( 'dam_zones.dmi', text("[]", O.d_i_state) )
//body_lying += new /icon( 'dam_zones.dmi', text("[]2", O.d_i_state) )
/mob/living/carbon/human/show_inv(mob/user as mob)
user.machine = src
@@ -2593,16 +2139,14 @@ It can still be worn/put on as normal.
/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn)
var/list/datum/organ/external/parts = list()
for(var/organ_name in organs)
var/datum/organ/external/organ = organs[organ_name]
for(var/datum/organ/external/organ in organs)
if((brute && organ.brute_dam) || (burn && organ.burn_dam))
parts += organ
return parts
/mob/living/carbon/human/proc/get_damageable_organs()
var/list/datum/organ/external/parts = list()
for(var/organ_name in organs)
var/datum/organ/external/organ = organs[organ_name]
for(var/datum/organ/external/organ in organs)
if(organ.brute_dam + organ.burn_dam < organ.max_damage)
parts += organ
return parts
@@ -2710,3 +2254,17 @@ It can still be worn/put on as normal.
/mob/living/carbon/human/IsAdvancedToolUser()
return 1//Humans can use guns and such
/mob/living/carbon/human/updatehealth()
if(src.nodamage)
src.health = 100
src.stat = 0
return
bruteloss = 0
fireloss = 0
for(var/datum/organ/external/O in organs)
src.bruteloss += O.brute_dam
src.fireloss += O.burn_dam
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss

View File

@@ -0,0 +1,74 @@
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(check_shields(0, M.name))
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("grab")
if(M == src) return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt")
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
if(!damage)
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
visible_message("\red <B>[M] has lunged at [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
playsound(loc, 'slice.ogg', 25, 1, -1)
visible_message("\red <B>[M] has slashed at [src]!</B>")
apply_damage(damage, BRUTE, affecting, armor_block)
if (damage >= 25)
visible_message("\red <B>[M] has wounded [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
UpdateDamageIcon()
updatehealth()
if("disarm")
var/randn = rand(1, 100)
if (randn <= 90)
playsound(loc, 'pierce.ogg', 25, 1, -1)
if (weakened < 15)
weakened = rand(10, 15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
else
if (randn <= 99)
playsound(loc, 'slash.ogg', 25, 1, -1)
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
else
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
return

View File

@@ -0,0 +1,120 @@
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
if(check_shields(0, M.name))
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
if((M.gloves && M.gloves.elecgen == 1))
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
if(M.gloves.uses <= 0)
M.gloves.elecgen = 0
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
M << "\red Not enough charge! "
return
M.gloves.uses--
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return 1
switch(M.a_intent)
if("help")
if(health > 0)
help_shake_act(M)
return 1
if(M.health < -75) return 0
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
M << "\blue <B>Remove your mask!</B>"
return 0
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
M << "\blue <B>Remove his mask!</B>"
return 0
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn(0)
O.process()
return 1
if("grab")
if(M == src) return 0
if(w_uniform) w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M)
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
visible_message("\red [M] has grabbed [src] passively!")
return 1
if("hurt")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
var/damage = rand(0, 9)
if(!damage)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M.mutations & HULK) damage += 5
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has punched [src]!</B>")
apply_damage(damage, BRUTE, affecting, armor_block)
if(damage >= 9)
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
UpdateDamageIcon()
updatehealth()
if("disarm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
if(w_uniform)
w_uniform.add_fingerprint(M)
var/datum/organ/external/affecting = organs[ran_zone(M.zone_sel.selecting)]
var/randn = rand(1, 100)
if (randn <= 25)
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] has pushed [src]!</B>")
return
if(randn <= 60)
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] has disarmed [src]!</B>")
return
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
return

View File

@@ -0,0 +1,25 @@
/mob/living/carbon/human/attack_paw(mob/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg", "groin")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
UpdateDamageIcon()
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
var/mob/living/carbon/human/H = src
src = null
src = H.monkeyize()
contract_disease(D,1,0)
return

View File

@@ -0,0 +1,80 @@
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
var/datum/organ/external/E = get_organ(zone)
if(istype(E, /datum/organ/external))
if (E.heal_damage(brute, burn))
UpdateDamageIcon()
else
UpdateDamage()
else
return 0
return
/mob/living/carbon/human/proc/UpdateDamage()
bruteloss = 0
fireloss = 0
for(var/datum/organ/external/O in organs)
if(istype(O, /datum/organ/external))
bruteloss += O.brute_dam
fireloss += O.burn_dam
return
// new damage icon system
// now constructs damage icon for each organ from mask * damage field
/mob/living/carbon/human/UpdateDamageIcon()
del(body_standing)
body_standing = list()
del(body_lying)
body_lying = list()
UpdateDamage()
for(var/datum/organ/external/O in organs)
if(istype(O, /datum/organ/external))
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
// world << "[O.icon_name] [O.damage_state] \icon[DI]"
body_standing += DI
DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons
DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY)
// world << "[O.r_name]2 [O.d_i_state]-2 \icon[DI]"
body_lying += DI
/mob/living/carbon/human/proc/get_organ(var/zone)
if(!zone) zone = "chest"
for(var/datum/organ/external/O in organs)
if(O.name == zone)
return O
return null
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
if((damagetype != BRUTE) && (damagetype != BURN))
..(damage, damagetype, def_zone, blocked)
return 1
if(blocked >= 2) return 0
var/datum/organ/external/organ = null
if(isorgan(def_zone))
organ = def_zone
else
if(!def_zone) def_zone = ran_zone(def_zone)
organ = get_organ(check_zone(def_zone))
if(!organ) return 0
if(blocked)
damage = (damage/(blocked+1))
switch(damagetype)
if(BRUTE)
organ.take_damage(damage, 0)
if(BURN)
organ.take_damage(0, damage)
UpdateDamageIcon()
updatehealth()
return 1

View File

@@ -8,301 +8,114 @@ emp_act
*/
/mob/living/carbon/human/bullet_act(A as obj, var/datum/organ/external/def_zone)
//Preparing the var for grabbing the armor information, can't grab the values yet because we don't know what kind of bullet was used. --NEO
var/obj/item/projectile/P = A//I really don't like how metroids are scattered throughout the code
if(prob(80))
for(var/mob/living/carbon/metroid/M in view(1,src))
if(M.Victim == src)
M.bullet_act(A) // the bullet hits them, not src!
return
var/list/hand_held_shields = list("/obj/item/weapon/shield/riot","/obj/item/weapon/melee/energy/sword")
if(l_hand)
if(is_type_in_list(l_hand, hand_held_shields))//Current base is the prob(50-d/3) Should likely give the things their own block prob
if(prob(50 - round(P.damage / 3)))
show_message("\red You block the [P.name] with your [l_hand.name]!", 4)
if(r_hand)
if(is_type_in_list(r_hand, hand_held_shields))
if(prob(50 - round(P.damage / 3)))
show_message("\red You block the [P.name] with your [l_hand.name]!", 4)
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C)
if(C.active)
C.attack_self(src)//Should shut it off
src << "\blue Your [C.name] was disrupted!"
stunned = max(stunned, rand(2,4))//Why in the hell did this use to be 120 para
var/datum/organ/external/affecting
if(!def_zone)
var/organ = organs[ran_zone("chest")]
if (istype(organ, /datum/organ/external))
affecting = organ
else
affecting = organs["[def_zone]"]
if(!affecting)
return
if(locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe && A)
return safe.bullet_act(A)
var/absorb = 0
var/soften = 0
for(var/i = 1, i<= P.mobdamage.len, i++)
switch(i)
if(1)
var/d = P.mobdamage[BRUTE]
if(d)
var/list/armor = getarmor(affecting, P.flag)
if (prob(armor["armor"]))
absorb = 1
else
if(prob(armor["armor"])/2)
soften = 1
d = d / 2
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2)
return 2
return (..())
if(!P.nodamage) affecting.take_damage(d, 0)
UpdateDamageIcon()
updatehealth()
if(2)
var/d = P.mobdamage[BURN]
if(d)
var/list/armor = getarmor(affecting, P.flag)
if (prob(armor["armor"]))
absorb = 1
else
if(prob(armor["armor"])/2)
soften = 1
d = d / 2
if(!P.nodamage) affecting.take_damage(0, d)
UpdateDamageIcon()
updatehealth()
if(3)
var/d = P.mobdamage[TOX]
if(d)
var/list/armor = getarmor(affecting, P.flag)
if (prob(armor["armor"]))
absorb = 1
else
if(prob(armor["armor"])/2)
soften = 1
d = d / 2
if(!P.nodamage) toxloss += d
UpdateDamageIcon()
updatehealth()
if(4)
var/d = P.mobdamage[OXY]
if(d)
var/list/armor = getarmor(affecting, P.flag)
if (prob(armor["armor"]))
absorb = 1
else
if(prob(armor["armor"])/2)
soften = 1
d = d / 2
if(!P.nodamage) oxyloss += d
UpdateDamageIcon()
updatehealth()
if(5)
var/d = P.mobdamage[CLONE]
if(d)
var/list/armor = getarmor(affecting, P.flag)
if (prob(armor["armor"]))
absorb = 1
else
if(prob(armor["armor"])/2)
soften = 1
d = d / 2
if(!nodamage) cloneloss += d
UpdateDamageIcon()
updatehealth()
/////////////////// All the unique projectile stuff goes here ///////////////////
if(absorb)
show_message("\red Your armor absorbs the blow!", 4)
return // a projectile can be deflected/absorbed given the right amount of protection
if(soften)
show_message("\red Your armor only softens the blow!", 4)
var/nostutter = 0
if(P.effects["stun"] && prob(P.effectprob["stun"]))
var/list/armor = getarmor(affecting, "taser")
if (!prob(armor["armor"]))
if(P.effectmod["stun"] == SET)
stunned = P.effects["stun"]
else
stunned += P.effects["stun"]
else
nostutter = 1
if(P.effects["weak"] && prob(P.effectprob["weak"]))
if(P.effectmod["weak"] == SET)
weakened = P.effects["weak"]
else
weakened += P.effects["weak"]
if(P.effects["paralysis"] && prob(P.effectprob["paralysis"]))
if(P.effectmod["paralysis"] == SET)
paralysis = P.effects["paralysis"]
else
paralysis += P.effects["paralysis"]
if(P.effects["stutter"] && prob(P.effectprob["stutter"]) && !nostutter)
if(P.effectmod["stutter"] == SET)
stuttering = P.effects["stutter"]
else
stuttering += P.effects["stutter"]
if(P.effects["drowsyness"] && prob(P.effectprob["drowsyness"]))
if(P.effectmod["drowsyness"] == SET)
drowsyness = P.effects["drowsyness"]
else
drowsyness += P.effects["drowsyness"]
if(P.effects["radiation"] && prob(P.effectprob["radiation"]))
var/list/armor = getarmor(affecting, "rad")
if (!prob(armor["armor"]))
if(P.effectmod["radiation"] == SET)
radiation = P.effects["radiation"]
else
radiation += P.effects["radiation"]
if(P.effects["eyeblur"] && prob(P.effectprob["eyeblur"]))
if(P.effectmod["eyeblur"] == SET)
eye_blurry = P.effects["eyeblur"]
else
eye_blurry += P.effects["eyeblur"]
if(P.effects["emp"])
var/emppulse = P.effects["emp"]
if(prob(P.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
return
/mob/living/carbon/human/proc/getarmor(var/datum/organ/external/def_zone, var/type)
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
var/armorval = 0
var/organnum = 0
if(def_zone)
if(isorgan(def_zone))
return checkarmor(def_zone, type)
var/datum/organ/external/affecting = get_organ(ran_zone(def_zone))
return checkarmor(affecting, type)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
if(istype(def_zone))
return checkarmor(def_zone, type)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value. --NEO
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
for(var/datum/organ/external/organ in organs)
if(istype(organ))
armorval += checkarmor(organ, type)
organnum++
return armorval/max(organnum, 1)
else
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
for(var/organ_name in organs)
var/datum/organ/external/organ = organs[organ_name]
if (istype(organ))
var/list/organarmor = checkarmor(organ, type)
armorval += organarmor["armor"]
organnum++
//world << "Debug text: full body armor check in progress, [organ.name] is best protected against [type] damage by [organarmor["clothes"]], with a value of [organarmor["armor"]]"
//world << "Debug text: full body armor check complete, average of [armorval/organnum] protection against [type] damage."
return armorval/organnum
return 0
/mob/living/carbon/human/proc/checkarmor(var/datum/organ/external/def_zone, var/type)
if (!type)
return
var/obj/item/clothing/best
var/armorval = 0
//I don't really like the way this is coded, but I can't think of a better way to check what they're actually wearing as opposed to something they're holding. --NEO
if(head && istype(head,/obj/item/clothing))
if(def_zone.body_part & head.body_parts_covered)
if(head.armor[type] > armorval)
armorval = head.armor[type]
best = head
if(wear_mask && istype(wear_mask,/obj/item/clothing))
if(def_zone.body_part & wear_mask.body_parts_covered)
if(wear_mask.armor[type] > armorval)
armorval = wear_mask.armor[type]
best = wear_mask
if(wear_suit && istype(wear_suit,/obj/item/clothing))
if(def_zone.body_part & wear_suit.body_parts_covered)
if(wear_suit.armor[type] > armorval)
armorval = wear_suit.armor[type]
best = wear_suit
if(w_uniform && istype(w_uniform,/obj/item/clothing))
if(def_zone.body_part & w_uniform.body_parts_covered)
if(w_uniform.armor[type] > armorval)
armorval = w_uniform.armor[type]
best = w_uniform
if(shoes && istype(shoes,/obj/item/clothing))
if(def_zone.body_part & shoes.body_parts_covered)
if(shoes.armor[type] > armorval)
armorval = shoes.armor[type]
best = shoes
if(gloves && istype(gloves,/obj/item/clothing))
if(def_zone.body_part & gloves.body_parts_covered)
if(gloves.armor[type] > armorval)
armorval = gloves.armor[type]
best = gloves
var/list/result = list(clothes = best, armor = armorval)
return result
if(!type) return 0
var/protection = 0
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
for(var/bp in body_parts)
if(!bp) continue
if(bp && istype(bp ,/obj/item/clothing))
var/obj/item/clothing/C = bp
if(C.body_parts_covered & def_zone.body_part)
protection += C.armor[type]
return protection
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
var/list/hand_held_shields = list("/obj/item/weapon/shield/riot","/obj/item/weapon/melee/energy/sword")
if(l_hand && is_type_in_list(l_hand, hand_held_shields))//Current base is the prob(50-d/3)
if(prob(50 - round(damage / 3)))
show_message("\red You block [attack_text] with your [l_hand.name]!", 4)
return 1
if(r_hand && is_type_in_list(r_hand, hand_held_shields))
if(prob(50 - round(damage / 3)))
show_message("\red You block [attack_text] with your [l_hand.name]!", 4)
return 1
return 0
/mob/living/carbon/human/emp_act(severity)
/*if(wear_suit) wear_suit.emp_act(severity)
if(w_uniform) w_uniform.emp_act(severity)
if(shoes) shoes.emp_act(severity)
if(belt) belt.emp_act(severity)
if(gloves) gloves.emp_act(severity)
if(glasses) glasses.emp_act(severity)
if(head) head.emp_act(severity)
if(ears) ears.emp_act(severity)
if(wear_id) wear_id.emp_act(severity)
if(r_store) r_store.emp_act(severity)
if(l_store) l_store.emp_act(severity)
if(s_store) s_store.emp_act(severity)
if(h_store) h_store.emp_act(severity)
..()*/
for(var/obj/O in src)
if(!O) continue
O.emp_act(severity)
..()
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
if(!I || !user) return 0
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
var/hit_area = parse_zone(affecting.name)
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
if(check_shields(I.force, "the [I.name]"))
world << "SHIELDS"
return 0
var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].")
if(armor >= 2) return 0
apply_damage(I.force, I.damtype, affecting, armor)
var/bloody = 0
if((I.damtype == BRUTE) && prob(25 + (I.force * 2)))
src.add_blood(src)
if(prob(33))
bloody = 1
var/turf/location = loc
if(istype(location, /turf/simulated))
location.add_blood(src)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.gloves) H.gloves.add_blood(src)
else H.add_blood(src)
if(H.wear_suit) H.wear_suit.add_blood(src)
else if(H.w_uniform) H.w_uniform.add_blood(src)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(prob(I.force))
apply_effect(20, PARALYZE, armor)
visible_message("\red <B>[src] has been knocked unconscious!</B>")
if(src != user)
ticker.mode.remove_revolutionary(mind)
if(bloody)//Apply blood
if(wear_mask) wear_mask.add_blood(src)
if(head) head.add_blood(src)
if(glasses && prob(33)) glasses.add_blood(src)
if("chest")//Easier to score a stun but lasts less time
if(prob((I.force + 10)))
apply_effect(5, WEAKEN, armor)
visible_message("\red <B>[src] has been knocked down!</B>")
if(bloody)
if(src.wear_suit) src.wear_suit.add_blood(src)
if(src.w_uniform) src.w_uniform.add_blood(src)
src.UpdateDamageIcon()

View File

@@ -6,7 +6,7 @@
//Do we have a working jetpack
if(istype(back, /obj/item/weapon/tank/jetpack))
var/obj/item/weapon/tank/jetpack/J = back
if(J.allow_thrust(0.01, src))
if(J.allow_thrust(0.005, src))
inertia_dir = 0
return 1

View File

@@ -576,23 +576,15 @@
switch(body_part)
if(HEAD)
TakeDamage("head", 0, 2.5*discomfort)
apply_damage(2.5*discomfort, BURN, "head")
if(UPPER_TORSO)
TakeDamage("chest", 0, 2.5*discomfort)
if(LOWER_TORSO)
TakeDamage("groin", 0, 2.0*discomfort)
apply_damage(2.5*discomfort, BURN, "chest")
if(LEGS)
TakeDamage("l_leg", 0, 0.6*discomfort)
TakeDamage("r_leg", 0, 0.6*discomfort)
apply_damage(0.6*discomfort, BURN, "l_leg")
apply_damage(0.6*discomfort, BURN, "r_leg")
if(ARMS)
TakeDamage("l_arm", 0, 0.4*discomfort)
TakeDamage("r_arm", 0, 0.4*discomfort)
if(FEET)
TakeDamage("l_foot", 0, 0.25*discomfort)
TakeDamage("r_foot", 0, 0.25*discomfort)
if(HANDS)
TakeDamage("l_hand", 0, 0.25*discomfort)
TakeDamage("r_hand", 0, 0.25*discomfort)
apply_damage(0.4*discomfort, BURN, "l_arm")
apply_damage(0.4*discomfort, BURN, "r_arm")
handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
@@ -659,7 +651,7 @@
handle_regular_status_updates()
health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
// health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -669,7 +661,7 @@
sleeping--
if(resting)
weakened = max(weakened, 5)
weakened = max(weakened, 3)
if(health < -100 || brain_op_stage == 4.0)
death()

View File

@@ -140,62 +140,9 @@
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
if(Proj)
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, Proj) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(Proj)
attacked += 10
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
var/d = Proj.mobdamage[BRUTE]
if(!Proj.nodamage) bruteloss += d
updatehealth()
if(2)
var/d = Proj.mobdamage[BURN]
if(!Proj.nodamage) fireloss += d
updatehealth()
if(3)
var/d = Proj.mobdamage[TOX]
if(!Proj.nodamage) toxloss += d
updatehealth()
if(4)
var/d = Proj.mobdamage[OXY]
if(!Proj.nodamage) oxyloss += d
updatehealth()
if(5)
var/d = Proj.mobdamage[CLONE]
if(!Proj.nodamage) cloneloss += d
updatehealth()
if(Proj.flag == "taser" && prob(35))
// Metroids have a small chance of "absorbing" taser shots. Deal /w it
powerlevel++
src << "<i>I have absorbed the electrode projectile...</i>"
// K
// ~~~~ N
// Metroids aren't effected by extra status effect. DO NOT NERF THIS PLZ THNX - LOVE, DOOHL 3===========D ~~~~ HONK
// ~~~~ H
//EMP is special and yes they are because emp
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
..(Proj)
return 0
/mob/living/carbon/metroid/emp_act(severity)

View File

@@ -106,89 +106,7 @@
health = 100 - oxyloss - toxloss - fireloss - bruteloss
return
/mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)
if(prob(80))
for(var/mob/living/carbon/metroid/M in view(1,src))
if(M.Victim == src)
M.bullet_act(Proj)
return
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
var/d = Proj.mobdamage[BRUTE]
if(!Proj.nodamage) src.take_organ_damage(d)
updatehealth()
if(2)
var/d = Proj.mobdamage[BURN]
if(!Proj.nodamage) src.take_organ_damage(0, d)
updatehealth()
if(3)
var/d = Proj.mobdamage[TOX]
if(!Proj.nodamage) toxloss += d
updatehealth()
if(4)
var/d = Proj.mobdamage[OXY]
if(!Proj.nodamage) oxyloss += d
updatehealth()
if(5)
var/d = Proj.mobdamage[CLONE]
if(!Proj.nodamage) cloneloss += d
updatehealth()
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
if(Proj.effectmod["stun"] == SET)
stunned = Proj.effects["stun"]
else
stunned += Proj.effects["stun"]
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
if(Proj.effectmod["weak"] == SET)
weakened = Proj.effects["weak"]
else
weakened += Proj.effects["weak"]
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
if(Proj.effectmod["paralysis"] == SET)
paralysis = Proj.effects["paralysis"]
else
paralysis += Proj.effects["paralysis"]
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
if(Proj.effectmod["stutter"] == SET)
stuttering = Proj.effects["stutter"]
else
stuttering += Proj.effects["stutter"]
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
if(Proj.effectmod["drowsyness"] == SET)
drowsyness = Proj.effects["drowsyness"]
else
drowsyness += Proj.effects["drowsyness"]
if(Proj.effects["radiation"] && prob(Proj.effectprob["radiation"]))
if(Proj.effectmod["radiation"] == SET)
radiation = Proj.effects["radiation"]
else
radiation += Proj.effects["radiation"]
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
if(Proj.effectmod["eyeblur"] == SET)
eye_blurry = Proj.effects["eyeblur"]
else
eye_blurry += Proj.effects["eyeblur"]
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
/mob/living/carbon/monkey/hand_p(mob/M as mob)
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))

View File

@@ -0,0 +1,72 @@
/*
apply_damage(a,b,c)
args
a:damage - How much damage to take
b:damage_type - What type of damage to take, brute, burn
c:def_zone - Where to take the damage if its brute or burn
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
if(!damage || (blocked >= 2)) return 0
switch(damagetype)
if(BRUTE)
bruteloss += (damage/(blocked+1))
if(BURN)
if(mutations & COLD_RESISTANCE) damage = 0
fireloss += (damage/(blocked+1))
if(TOX)
toxloss += (damage/(blocked+1))
if(OXY)
oxyloss += (damage/(blocked+1))
if(CLONE)
cloneloss += (damage/(blocked+1))
UpdateDamageIcon()
updatehealth()
return 1
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0)
if(blocked >= 2) return 0
if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
if(burn) apply_damage(burn, BURN, def_zone, blocked)
if(tox) apply_damage(tox, TOX, def_zone, blocked)
if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
if(clone) apply_damage(clone, CLONE, def_zone, blocked)
return 1
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
stunned = max(stunned,(effect/(blocked+1)))
if(WEAKEN)
weakened = max(weakened,(effect/(blocked+1)))
if(PARALYZE)
paralysis = max(paralysis,(effect/(blocked+1)))
if(IRRADIATE)
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
if(STUTTER)
stuttering = max(stuttering,(effect/(blocked+1)))
if(EYE_BLUR)
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
if(DROWSY)
drowsyness = max(drowsyness,(effect/(blocked+1)))
UpdateDamageIcon()
updatehealth()
return 1
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/blocked = 0)
if(blocked >= 2) return 0
if(stun) apply_effect(stun, STUN, blocked)
if(weaken) apply_effect(weaken, WEAKEN, blocked)
if(paralyze) apply_effect(paralyze, PARALYZE, blocked)
if(irradiate) apply_effect(irradiate, IRRADIATE, blocked)
if(stutter) apply_effect(stutter, STUTTER, blocked)
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
return 1

View File

@@ -1,105 +1,19 @@
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.oxyloss += src.health + 200
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
src << "\blue You have given up life and succumbed to death."
/mob/living/bullet_act(var/obj/item/projectile/Proj)
for(var/i = 1, i<= Proj.mobdamage.len, i++)
switch(i)
if(1)
if (istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
if (H.organs[text("[]", dam_zone)])
var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
if (affecting.take_damage(Proj.mobdamage[BRUTE], 0))
H.UpdateDamageIcon()
else
H.UpdateDamage()
src.updatehealth()
else
if(!nodamage) src.take_organ_damage(Proj.mobdamage[BRUTE])
if(2)
var/d = Proj.mobdamage[BURN]
if(!Proj.nodamage) fireloss += d
updatehealth()
if(3)
var/d = Proj.mobdamage[TOX]
if(!Proj.nodamage) toxloss += d
updatehealth()
if(4)
var/d = Proj.mobdamage[OXY]
if(!Proj.nodamage) oxyloss += d
updatehealth()
if(5)
var/d = Proj.mobdamage[CLONE]
if(!Proj.nodamage) cloneloss += d
updatehealth()
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
if(Proj.effectmod["stun"] == SET)
stunned = Proj.effects["stun"]
else
stunned += Proj.effects["stun"]
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
if(Proj.effectmod["weak"] == SET)
weakened = Proj.effects["weak"]
else
weakened += Proj.effects["weak"]
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
if(Proj.effectmod["paralysis"] == SET)
paralysis = Proj.effects["paralysis"]
else
paralysis += Proj.effects["paralysis"]
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
if(Proj.effectmod["stutter"] == SET)
stuttering = Proj.effects["stutter"]
else
stuttering += Proj.effects["stutter"]
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
if(Proj.effectmod["drowsyness"] == SET)
drowsyness = Proj.effects["drowsyness"]
else
drowsyness += Proj.effects["drowsyness"]
if(Proj.effects["radiation"] && prob(Proj.effectprob["radiation"]))
if(Proj.effectmod["radiation"] == SET)
radiation = Proj.effects["radiation"]
else
radiation += Proj.effects["radiation"]
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
if(Proj.effectmod["eyeblur"] == SET)
eye_blurry = Proj.effects["eyeblur"]
else
eye_blurry += Proj.effects["eyeblur"]
..()
/mob/living/proc/updatehealth()
if (!src.nodamage)
if(organStructure && organStructure.chest)
health = organStructure.chest.maxHealth - oxyloss - toxloss - fireloss - bruteloss
else
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss
if(!src.nodamage)
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss
else
src.health = 100
src.stat = 0
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
@@ -236,4 +150,7 @@
src.handcuffed = initial(src.handcuffed)
if(src.stat > 1) src.stat=0
..()
return
return
/mob/living/proc/UpdateDamageIcon()
return

View File

@@ -0,0 +1,53 @@
/*
run_armor_check(a,b)
args
a:def_zone - What part is getting hit, if null will check entire body
b:attack_flag - What type of attack, bullet, laser, energy, melee
Returns
0 - no block
1 - halfblock
2 - fullblock
*/
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null)
var/armor = getarmor(def_zone, attack_flag)
var/absorb = 0
if(prob(armor))
absorb += 1
if(prob(armor))
absorb += 1
if(absorb >= 2)
if(absorb_text)
show_message("[absorb_text]")
else
show_message("\red Your armor absorbs the blow!")
return 2
if(absorb == 1)
if(absorb_text)
show_message("[soften_text]",4)
else
show_message("\red Your armor softens the blow!")
return 1
return 0
/mob/living/proc/getarmor(var/def_zone, var/type)
return 0
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C && C.active)
C.attack_self(src)//Should shut it off
src << "\blue Your [C.name] was disrupted!"
stunned = max(stunned, 2)
var/absorb = run_armor_check(def_zone, P.flag)
if(absorb >= 2)
P.on_hit(src,2)
return 2
if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type)
P.on_hit(src, absorb)
return absorb

View File

@@ -276,19 +276,9 @@
return
/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj)
// AI bullet code is pretty simple. No other effect really need to be added.
if(!Proj.nodamage) bruteloss += Proj.damage
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
..(Proj)
updatehealth()
return 2
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)

View File

@@ -26,7 +26,7 @@
T.hologram.dir = direct
return//Relay move and then return if that's the case.
if(!old) return
if(!old) return
var/dx = 0
var/dy = 0
@@ -43,16 +43,8 @@
var/list/old_types = dd_text2list("[A.type]", "/")
for(var/obj/machinery/camera/current in world)
if(user.network != current.network)
continue // different network (syndicate)
if(ticker.mode.name == "AI malfunction")
if(current.z != user.z && (user.network != "Prison") && (user.network != "SS13"))
continue
else
if(current.z != user.z && (user.network != "Prison") && (user.network != "AI Satellite"))
continue // different viewing plane
if(!current.status)
continue // ignore disabled cameras
if(user.network != current.network) continue
if(!current.status) continue // ignore disabled cameras
//make sure it's the right direction
if(dx && (current.x * dx <= old.x * dx))

View File

@@ -114,18 +114,7 @@
src.updatehealth()
return
/mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
bruteloss += Proj.damage
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
updatehealth()
return
//mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)

View File

@@ -59,12 +59,6 @@
src.cell.use(5)
if(src.module_state_3)
src.cell.use(5)
if (sight_mode & BORGMESON)
src.cell.use(50)
if (sight_mode & BORGTHERM)
src.cell.use(100)
if (sight_mode & BORGXRAY)
src.cell.use(200)
src.cell.use(1)
src.blinded = 0
src.stat = 0

View File

@@ -247,18 +247,10 @@
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
if(!Proj.nodamage) bruteloss += Proj.damage
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
..(Proj)
updatehealth()
if(prob(75) && Proj.damage > 0) spark_system.start()
return
return 2
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
@@ -316,7 +308,7 @@
C = O
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
src << text("--- [class] alarm detected in [A.name]!")
if (viewalerts) robot_alerts()
// if (viewalerts) robot_alerts()
return 1
@@ -334,7 +326,7 @@
L -= I
if (cleared)
src << text("--- [class] alarm in [A.name] has been cleared.")
if (viewalerts) robot_alerts()
// if (viewalerts) robot_alerts()
return !cleared

View File

@@ -226,7 +226,6 @@ obj/item/weapon/robot_module/syndicate
*/ //Merged with Service borg, not a death, just a transformation
obj/item/weapon/robot_module/syndicate/New()
src.modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
src.modules += new /obj/item/weapon/card/emag(src)

View File

@@ -24,4 +24,32 @@
return
/mob/living/silicon/IsAdvancedToolUser()
return 1
return 1
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
if(!Proj.nodamage) bruteloss += Proj.damage
Proj.on_hit(src,2)
return 2
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
/*
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
stunned = max(stunned,(effect/(blocked+1)))
if(WEAKEN)
weakened = max(weakened,(effect/(blocked+1)))
if(PARALYZE)
paralysis = max(paralysis,(effect/(blocked+1)))
if(IRRADIATE)
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
if(STUTTER)
stuttering = max(stuttering,(effect/(blocked+1)))
if(EYE_BLUR)
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
if(DROWSY)
drowsyness = max(drowsyness,(effect/(blocked+1)))
UpdateDamageIcon()
updatehealth()
return 1*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,222 @@
/obj/item/weapon/grab
name = "grab"
icon = 'screen1.dmi'
icon_state = "grabbed"
var/obj/screen/grab/hud1 = null
var/mob/affecting = null
var/mob/assailant = null
var/state = 1.0
var/killing = 0.0
var/allow_upgrade = 1.0
var/last_suffocate = 1.0
layer = 21
abstract = 1.0
item_state = "nothing"
w_class = 5.0
/obj/item/weapon/grab/proc/throw()
if(affecting)
var/grabee = affecting
spawn(0)
del(src)
return grabee
return null
/obj/item/weapon/grab/proc/synch()
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
del(src)
if (assailant.r_hand == src)
hud1.screen_loc = ui_rhand
else
hud1.screen_loc = ui_lhand
return
/obj/item/weapon/grab/process()
if(!assailant || !affecting)
del(src)
return
if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))))
//SN src = null
del(src)
return
if (assailant.client)
assailant.client.screen -= hud1
assailant.client.screen += hud1
if (assailant.pulling == affecting)
assailant.pulling = null
if (state <= 2)
allow_upgrade = 1
if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
var/obj/item/weapon/grab/G = assailant.l_hand
if (G.affecting != affecting)
allow_upgrade = 0
if ((assailant.r_hand && assailant.r_hand != src && istype(assailant.r_hand, /obj/item/weapon/grab)))
var/obj/item/weapon/grab/G = assailant.r_hand
if (G.affecting != affecting)
allow_upgrade = 0
if (state == 2)
var/h = affecting.hand
affecting.hand = 0
affecting.drop_item()
affecting.hand = 1
affecting.drop_item()
affecting.hand = h
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
if (G.state == 2)
allow_upgrade = 0
//Foreach goto(341)
if (allow_upgrade)
hud1.icon_state = "reinforce"
else
hud1.icon_state = "!reinforce"
else
if (!( affecting.buckled ))
affecting.loc = assailant.loc
if ((killing && state == 3))
affecting.stunned = max(5, affecting.stunned)
affecting.paralysis = max(3, affecting.paralysis)
affecting.losebreath = min(affecting.losebreath + 2, 3)
return
/obj/item/weapon/grab/proc/s_click(obj/screen/S as obj)
if (assailant.next_move > world.time)
return
if ((!( assailant.canmove ) || assailant.lying))
//SN src = null
del(src)
return
switch(S.id)
if(1.0)
if (state >= 3)
if (!( killing ))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has temporarily tightened his grip on []!", assailant, affecting), 1)
//Foreach goto(97)
assailant.next_move = world.time + 10
//affecting.stunned = max(2, affecting.stunned)
//affecting.paralysis = max(1, affecting.paralysis)
affecting.losebreath = min(affecting.losebreath + 1, 3)
last_suffocate = world.time
flick("disarm/killf", S)
else
return
/obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj)
//if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 )))
// return
if ((!( assailant.canmove ) || assailant.lying))
del(src)
return
switch(S.id)
if(1.0)
if (state < 2)
if (!( allow_upgrade ))
return
if (prob(75))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has grabbed [] aggressively (now hands)!", assailant, affecting), 1)
state = 2
icon_state = "grabbed1"
else
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has failed to grab [] aggressively!", assailant, affecting), 1)
del(src)
return
else
if (state < 3)
if(istype(affecting, /mob/living/carbon/human))
var/mob/living/carbon/human/H = affecting
if(H.mutations & FAT)
assailant << "\blue You can't strangle [affecting] through all that fat!"
return
/*Hrm might want to add this back in
//we should be able to strangle the Captain if he is wearing a hat
for(var/obj/item/clothing/C in list(H.head, H.wear_suit, H.wear_mask, H.w_uniform))
if(C.body_parts_covered & HEAD)
assailant << "\blue You have to take off [affecting]'s [C.name] first!"
return
if(istype(H.wear_suit, /obj/item/clothing/suit/space) || istype(H.wear_suit, /obj/item/clothing/suit/armor) || istype(H.wear_suit, /obj/item/clothing/suit/bio_suit) || istype(H.wear_suit, /obj/item/clothing/suit/swat_suit))
assailant << "\blue You can't strangle [affecting] through their suit collar!"
return
*/
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has reinforced his grip on [] (now neck)!", assailant, affecting), 1)
state = 3
icon_state = "grabbed+1"
if (!( affecting.buckled ))
affecting.loc = assailant.loc
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
hud1.icon_state = "disarm/kill"
hud1.name = "disarm/kill"
else
if (state >= 3)
killing = !( killing )
if (killing)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has tightened his grip on []'s neck!", assailant, affecting), 1)
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
assailant.next_move = world.time + 10
affecting.losebreath += 1
hud1.icon_state = "disarm/kill1"
else
hud1.icon_state = "disarm/kill"
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has loosened the grip on []'s neck!", assailant, affecting), 1)
else
return
/obj/item/weapon/grab/New()
..()
hud1 = new /obj/screen/grab( src )
hud1.icon_state = "reinforce"
hud1.name = "Reinforce Grab"
hud1.id = 1
hud1.master = src
return
/obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob)
if (M == affecting)
if (state < 3)
s_dbclick(hud1)
else
s_click(hud1)
return
if(M == assailant && state >= 2)
if( ( ishuman(user) && (user.mutations & FAT) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
var/mob/living/carbon/attacker = user
for(var/mob/N in viewers(user, null))
if(N.client)
N.show_message(text("\red <B>[user] is attempting to devour [affecting]!</B>"), 1)
if(istype(user, /mob/living/carbon/alien/humanoid/hunter))
if(!do_mob(user, affecting)||!do_after(user, 30)) return
else
if(!do_mob(user, affecting)||!do_after(user, 100)) return
for(var/mob/N in viewers(user, null))
if(N.client)
N.show_message(text("\red <B>[user] devours [affecting]!</B>"), 1)
affecting.loc = user
attacker.stomach_contents.Add(affecting)
del(src)
/obj/item/weapon/grab/dropped()
del(src)
return
/obj/item/weapon/grab/Del()
del(hud1)
..()
return

View File

@@ -0,0 +1,232 @@
// fun if you want to typecast humans/monkeys/etc without writing long path-filled lines.
/proc/ishuman(A)
if(istype(A, /mob/living/carbon/human))
return 1
return 0
/proc/ismonkey(A)
if(A && istype(A, /mob/living/carbon/monkey))
return 1
return 0
/proc/isbrain(A)
if(A && istype(A, /mob/living/carbon/brain))
return 1
return 0
/proc/isalien(A)
if(istype(A, /mob/living/carbon/alien))
return 1
return 0
/proc/isalienadult(A)
if(istype(A, /mob/living/carbon/alien/humanoid))
return 1
return 0
/proc/islarva(A)
if(istype(A, /mob/living/carbon/alien/larva))
return 1
return 0
/proc/ismetroid(A)
if(istype(A, /mob/living/carbon/metroid))
return 1
return 0
/proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot))
return 1
return 0
/proc/isanimal(A)
if(istype(A, /mob/living/simple_animal))
return 1
return 0
/proc/iscorgi(A)
if(istype(A, /mob/living/simple_animal/corgi))
return 1
return 0
/*proc/ishivebot(A)
if(A && istype(A, /mob/living/silicon/hivebot))
return 1
return 0*/
/*proc/ishivemainframe(A)
if(A && istype(A, /mob/living/silicon/hive_mainframe))
return 1
return 0*/
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
return 0
/proc/iscarbon(A)
if(istype(A, /mob/living/carbon))
return 1
return 0
/proc/issilicon(A)
if(istype(A, /mob/living/silicon))
return 1
return 0
/proc/isliving(A)
if(istype(A, /mob/living))
return 1
return 0
proc/isobserver(A)
if(istype(A, /mob/dead/observer))
return 1
return 0
proc/isorgan(A)
if(istype(A, /datum/organ/external))
return 1
return 0
/proc/hsl2rgb(h, s, l)
return
/proc/check_zone(zone)
if(!zone) return "chest"
switch(zone)
if("eyes")
zone = "head"
if("mouth")
zone = "head"
if("l_hand")
zone = "l_arm"
if("r_hand")
zone = "r_arm"
if("l_foot")
zone = "l_leg"
if("r_foot")
zone = "r_leg"
if("groin")
zone = "chest"
return zone
/proc/ran_zone(zone, probability)
zone = check_zone(zone)
if(!probability) probability = 90
if(probability == 100) return zone
if(zone == "chest")
if(prob(probability)) return "chest"
var/t = rand(1, 9)
switch(t)
if(1 to 3) return "head"
if(4 to 6) return "l_arm"
if(7 to 9) return "r_arm"
if(prob(probability * 0.75)) return zone
return "chest"
/proc/stars(n, pr)
if (pr == null)
pr = 25
if (pr <= 0)
return null
else
if (pr >= 100)
return n
var/te = n
var/t = ""
n = length(n)
var/p = null
p = 1
while(p <= n)
if ((copytext(te, p, p + 1) == " " || prob(pr)))
t = text("[][]", t, copytext(te, p, p + 1))
else
t = text("[]*", t)
p++
return t
/proc/stutter(n)
var/te = html_decode(n)
var/t = ""//placed before the message. Not really sure what it's for.
n = length(n)//length of the entire word
var/p = null
p = 1//1 is the start of any word
while(p <= n)//while P, which starts at 1 is less or equal to N which is the length.
var/n_letter = copytext(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time.
if (prob(80) && (ckey(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")))
if (prob(10))
n_letter = text("[n_letter]-[n_letter]-[n_letter]-[n_letter]")//replaces the current letter with this instead.
else
if (prob(20))
n_letter = text("[n_letter]-[n_letter]-[n_letter]")
else
if (prob(5))
n_letter = null
else
n_letter = text("[n_letter]-[n_letter]")
t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word.
p++//for each letter p is increased to find where the next letter will be.
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
/proc/ninjaspeak(n)
/*
The difference with stutter is that this proc can stutter more than 1 letter
The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma.
It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N
*/
var/te = html_decode(n)
var/t = ""
n = length(n)
var/p = 1
while(p <= n)
var/n_letter
var/n_mod = rand(1,4)
if(p+n_mod>n+1)
n_letter = copytext(te, p, n+1)
else
n_letter = copytext(te, p, p+n_mod)
if (prob(50))
if (prob(30))
n_letter = text("[n_letter]-[n_letter]-[n_letter]")
else
n_letter = text("[n_letter]-[n_letter]")
else
n_letter = text("[n_letter]")
t = text("[t][n_letter]")
p=p+n_mod
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
/proc/shake_camera(mob/M, duration, strength=1)
if(!M || !M.client || M.shakecamera)
return
spawn(1)
var/oldeye=M.client.eye
var/x
M.shakecamera = 1
for(x=0; x<duration, x++)
M.client.eye = locate(dd_range(1,M.loc.x+rand(-strength,strength),world.maxx),dd_range(1,M.loc.y+rand(-strength,strength),world.maxy),M.loc.z)
sleep(1)
M.shakecamera = 0
M.client.eye=oldeye
/proc/findname(msg)
for(var/mob/M in world)
if (M.real_name == text("[msg]"))
return 1
return 0

View File

@@ -97,6 +97,7 @@
mob.control_object.loc = get_step(mob.control_object,direct)
return
/client/Move(n, direct)
if(mob.control_object) Move_object(direct)
@@ -142,15 +143,13 @@
if("run")
if(mob.drowsyness > 0)
move_delay += 6
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveRunDelay
else
move_delay += 1
// if(mob.organStructure && mob.organStructure.legs)
// move_delay += mob.organStructure.legs.moveRunDelay
move_delay += 1
if("walk")
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveWalkDelay
else
move_delay += 7
// if(mob.organStructure && mob.organStructure.legs)
// move_delay += mob.organStructure.legs.moveWalkDelay
move_delay += 7
move_delay += mob.movement_delay()
//We are now going to move

View File

@@ -0,0 +1,113 @@
/datum/organ
var
name = "organ"
owner = null
proc/process()
return 0
proc/receive_chem(chemical as obj)
return 0
/****************************************************
EXTERNAL ORGANS
****************************************************/
/datum/organ/external
name = "external"
var
icon_name = null
body_part = null
damage_state = "00"
brute_dam = 0
burn_dam = 0
bandaged = 0
max_damage = 0
wound_size = 0
max_size = 0
proc/take_damage(brute, burn)
if((brute <= 0) && (burn <= 0)) return 0
if((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage)
src.brute_dam += brute
src.burn_dam += burn
else
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
if(can_inflict)
if (brute > 0 && burn > 0)
brute = can_inflict/2
burn = can_inflict/2
var/ratio = brute / (brute + burn)
src.brute_dam += ratio * can_inflict
src.burn_dam += (1 - ratio) * can_inflict
else
if (brute > 0)
brute = can_inflict
src.brute_dam += brute
else
burn = can_inflict
src.burn_dam += burn
else
return 0
var/result = src.update_icon()
return result
proc/heal_damage(brute, burn)
src.brute_dam = max(0, src.brute_dam - brute)
src.burn_dam = max(0, src.burn_dam - burn)
return update_icon()
proc/get_damage() //returns total damage
return src.brute_dam + src.burn_dam //could use src.health?
// new damage icon system
// returns just the brute/burn damage code
proc/damage_state_text()
var/tburn = 0
var/tbrute = 0
if(burn_dam ==0)
tburn =0
else if (src.burn_dam < (src.max_damage * 0.25 / 2))
tburn = 1
else if (src.burn_dam < (src.max_damage * 0.75 / 2))
tburn = 2
else
tburn = 3
if (src.brute_dam == 0)
tbrute = 0
else if (src.brute_dam < (src.max_damage * 0.25 / 2))
tbrute = 1
else if (src.brute_dam < (src.max_damage * 0.75 / 2))
tbrute = 2
else
tbrute = 3
return "[tbrute][tburn]"
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
proc/update_icon()
var/n_is = src.damage_state_text()
if (n_is != src.damage_state)
src.damage_state = n_is
return 1
return 0
/****************************************************
INTERNAL ORGANS
****************************************************/
/datum/organ/internal
name = "internal"

View File

@@ -0,0 +1,62 @@
/datum/organ/external/chest
name = "chest"
icon_name = "chest"
max_damage = 150
body_part = UPPER_TORSO
/*/datum/organ/external/groin
name = "groin"
icon_name = "groin"
body_part = LOWER_TORSO
*/
/datum/organ/external/head
name = "head"
icon_name = "head"
max_damage = 125
body_part = HEAD
/datum/organ/external/l_arm
name = "l_arm"
icon_name = "l_arm"
max_damage = 75
body_part = ARM_LEFT
/datum/organ/external/l_leg
name = "l_leg"
icon_name = "l_leg"
max_damage = 75
body_part = LEG_LEFT
/datum/organ/external/r_arm
name = "r_arm"
icon_name = "r_arm"
max_damage = 75
body_part = ARM_RIGHT
/datum/organ/external/r_leg
name = "r_leg"
icon_name = "r_leg"
max_damage = 75
body_part = LEG_RIGHT
/*Leaving these here in case we want to use them later
/datum/organ/external/l_foot
name = "l foot"
icon_name = "l_foot"
body_part = FOOT_LEFT
/datum/organ/external/r_foot
name = "r foot"
icon_name = "r_foot"
body_part = FOOT_RIGHT
/datum/organ/external/r_hand
name = "r hand"
icon_name = "r_hand"
body_part = HAND_RIGHT
/datum/organ/external/l_hand
name = "l hand"
icon_name = "l_hand"
body_part = HAND_LEFT
*/

View File

@@ -0,0 +1,47 @@
/datum/organ/internal/blood_vessels
name = "blood vessels"
var/heart = null
var/lungs = null
var/kidneys = null
/datum/organ/internal/brain
name = "brain"
var/head = null
/datum/organ/internal/excretory
name = "excretory"
var/excretory = 7.0
var/blood_vessels = null
/datum/organ/internal/heart
name = "heart"
/datum/organ/internal/immune_system
name = "immune system"
var/blood_vessels = null
var/isys = null
/datum/organ/internal/intestines
name = "intestines"
var/intestines = 3.0
var/blood_vessels = null
/datum/organ/internal/liver
name = "liver"
var/intestines = null
var/blood_vessels = null
/datum/organ/internal/lungs
name = "lungs"
var/lungs = 3.0
var/throat = null
var/blood_vessels = null
/datum/organ/internal/stomach
name = "stomach"
var/intestines = null
/datum/organ/internal/throat
name = "throat"
var/lungs = null
var/stomach = null

View File

@@ -1,83 +0,0 @@
/datum/organ/proc/process()
return
/datum/organ/proc/receive_chem(chemical as obj)
return
/datum/organ/external/proc/take_damage(brute, burn)
if ((brute <= 0 && burn <= 0))
return 0
if ((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage)
src.brute_dam += brute
src.burn_dam += burn
else
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
if (can_inflict)
if (brute > 0 && burn > 0)
brute = can_inflict/2
burn = can_inflict/2
var/ratio = brute / (brute + burn)
src.brute_dam += ratio * can_inflict
src.burn_dam += (1 - ratio) * can_inflict
else
if (brute > 0)
brute = can_inflict
src.brute_dam += brute
else
burn = can_inflict
src.burn_dam += burn
else
return 0
var/result = src.update_icon()
return result
/datum/organ/external/proc/heal_damage(brute, burn)
src.brute_dam = max(0, src.brute_dam - brute)
src.burn_dam = max(0, src.burn_dam - burn)
return update_icon()
/datum/organ/external/proc/get_damage() //returns total damage
return src.brute_dam + src.burn_dam //could use src.health?
// new damage icon system
// returns just the brute/burn damage code
/datum/organ/external/proc/damage_state_text()
var/tburn = 0
var/tbrute = 0
if(burn_dam ==0)
tburn =0
else if (src.burn_dam < (src.max_damage * 0.25 / 2))
tburn = 1
else if (src.burn_dam < (src.max_damage * 0.75 / 2))
tburn = 2
else
tburn = 3
if (src.brute_dam == 0)
tbrute = 0
else if (src.brute_dam < (src.max_damage * 0.25 / 2))
tbrute = 1
else if (src.brute_dam < (src.max_damage * 0.75 / 2))
tbrute = 2
else
tbrute = 3
return "[tbrute][tburn]"
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
/datum/organ/external/proc/update_icon()
var/n_is = src.damage_state_text()
if (n_is != src.damage_state)
src.damage_state = n_is
return 1
else
return 0
return

527
code/modules/mob/screen.dm Normal file
View File

@@ -0,0 +1,527 @@
/obj/screen
name = "screen"
icon = 'screen1.dmi'
layer = 20.0
unacidable = 1
var/id = 0.0
var/obj/master
/obj/screen/close
name = "close"
master = null
/obj/screen/grab
name = "grab"
master = null
/obj/screen/storage
name = "storage"
master = null
/obj/screen/zone_sel
name = "Damage Zone"
icon = 'zone_sel.dmi'
icon_state = "blank"
var/selecting = "chest"
screen_loc = "EAST+1,NORTH"
/obj/screen/zone_sel/MouseDown(location, control,params)
// Changes because of 4.0
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
if (icon_y < 2)
return
else if (icon_y < 5)
if ((icon_x > 9 && icon_x < 23))
if (icon_x < 16)
selecting = "r_foot"
else
selecting = "l_foot"
else if (icon_y < 11)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 16)
selecting = "r_leg"
else
selecting = "l_leg"
else if (icon_y < 12)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 14)
selecting = "r_leg"
else if (icon_x < 19)
selecting = "groin"
else
selecting = "l_leg"
else
return
else if (icon_y < 13)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_hand"
else if (icon_x < 13)
selecting = "r_leg"
else if (icon_x < 20)
selecting = "groin"
else if (icon_x < 21)
selecting = "l_leg"
else
selecting = "l_hand"
else
return
else if (icon_y < 14)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_hand"
else if (icon_x < 21)
selecting = "groin"
else
selecting = "l_hand"
else
return
else if (icon_y < 16)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 13)
selecting = "r_hand"
else if (icon_x < 20)
selecting = "chest"
else
selecting = "l_hand"
else
return
else if (icon_y < 23)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_arm"
else if (icon_x < 21)
selecting = "chest"
else
selecting = "l_arm"
else
return
else if (icon_y < 24)
if ((icon_x > 11 && icon_x < 21))
selecting = "chest"
else
return
else if (icon_y < 25)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 16)
selecting = "head"
else if (icon_x < 17)
selecting = "mouth"
else
selecting = "head"
else
return
else if (icon_y < 26)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 18)
selecting = "mouth"
else
selecting = "head"
else
return
else if (icon_y < 27)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 16)
selecting = "eyes"
else if (icon_x < 17)
selecting = "mouth"
else if (icon_x < 18)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 28)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 14)
selecting = "head"
else if (icon_x < 19)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 29)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 16)
selecting = "eyes"
else if (icon_x < 17)
selecting = "head"
else if (icon_x < 18)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 31)
if ((icon_x > 11 && icon_x < 21))
selecting = "head"
else
return
else
return
overlays = null
overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", selecting))
return
/obj/screen/grab/Click()
master:s_click(src)
return
/obj/screen/grab/DblClick()
master:s_dbclick(src)
return
/obj/screen/grab/attack_hand()
return
/obj/screen/grab/attackby()
return
/obj/screen/Click(location, control, params)
var/list/pa = params2list(params)
switch(name)
if("map")
usr.clearmap()
if("maprefresh")
var/obj/machinery/computer/security/seccomp = usr.machine
if(seccomp!=null)
seccomp.drawmap(usr)
else
usr.clearmap()
if("other")
if (usr.hud_used.show_otherinventory)
usr.hud_used.show_otherinventory = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.show_otherinventory = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.other_update()
if("act_intent")
if(pa.Find("left"))
switch(usr.a_intent)
if("help")
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
if("disarm")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
if("hurt")
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
if("grab")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
else
switch(usr.a_intent)
if("help")
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
if("disarm")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
if("hurt")
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
if("grab")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
if("arrowleft")
switch(usr.a_intent)
if("help")
if(issilicon(usr))
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
else
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
if("disarm")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
if("hurt")
if(issilicon(usr))
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
else
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
if("grab")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
if("arrowright")
switch(usr.a_intent)
if("help")
if(issilicon(usr))
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
else
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
if("disarm")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
if("hurt")
if(issilicon(usr))
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
else
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
if("grab")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
if("mov_intent")
switch(usr.m_intent)
if("run")
usr.m_intent = "walk"
usr.hud_used.move_intent.icon_state = "walking"
if("walk")
usr.m_intent = "run"
usr.hud_used.move_intent.icon_state = "running"
if("intent")
if (!( usr.intent ))
switch(usr.a_intent)
if("help")
usr.intent = "13,15"
if("disarm")
usr.intent = "14,15"
if("hurt")
usr.intent = "15,15"
if("grab")
usr.intent = "12,15"
else
usr.intent = null
if("m_intent")
if (!( usr.m_int ))
switch(usr.m_intent)
if("run")
usr.m_int = "13,14"
if("walk")
usr.m_int = "14,14"
if("face")
usr.m_int = "15,14"
else
usr.m_int = null
if("walk")
usr.m_intent = "walk"
usr.m_int = "14,14"
if("face")
usr.m_intent = "face"
usr.m_int = "15,14"
if("run")
usr.m_intent = "run"
usr.m_int = "13,14"
if("hurt")
usr.a_intent = "hurt"
usr.intent = "15,15"
if("grab")
usr.a_intent = "grab"
usr.intent = "12,15"
if("disarm")
if (istype(usr, /mob/living/carbon/human))
var/mob/M = usr
M.a_intent = "disarm"
M.intent = "14,15"
if("help")
usr.a_intent = "help"
usr.intent = "13,15"
if("Reset Machine")
usr.machine = null
if("internal")
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
if (usr.internal)
usr.internal = null
if (usr.internals)
usr.internals.icon_state = "internal0"
else
if (!( istype(usr.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(usr.back, /obj/item/weapon/tank))
usr.internal = usr.back
else if (ishuman(usr) && istype(usr:s_store, /obj/item/weapon/tank))
usr.internal = usr:s_store
else if (ishuman(usr) && istype(usr:belt, /obj/item/weapon/tank))
usr.internal = usr:belt
else if (istype(usr.l_hand, /obj/item/weapon/tank))
usr.internal = usr.l_hand
else if (istype(usr.r_hand, /obj/item/weapon/tank))
usr.internal = usr.r_hand
if (usr.internal)
//for(var/mob/M in viewers(usr, 1))
// M.show_message(text("[] is now running on internals.", usr), 1)
usr << "You are now running on internals."
if (usr.internals)
usr.internals.icon_state = "internal1"
if("pull")
usr.pulling = null
if("sleep")
usr.sleeping = !( usr.sleeping )
if("rest")
usr.resting = !( usr.resting )
if("throw")
if (!usr.stat && isturf(usr.loc) && !usr.restrained())
usr:toggle_throw_mode()
if("drop")
usr.drop_item_v()
if("swap")
usr:swap_hand()
if("hand")
usr:swap_hand()
if("resist")
if (usr.next_move < world.time)
return
usr.next_move = world.time + 20
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
for(var/obj/O in usr.requests)
del(O)
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
if (G.state == 1)
del(G)
else
if (G.state == 2)
if (prob(25))
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s grip!", usr, G.assailant), 1)
del(G)
else
if (G.state == 3)
if (prob(5))
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1)
del(G)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
usr.next_move = world.time + 100
usr.last_special = world.time + 100
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 50))
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
usr << "\green You successfully break your handcuffs."
del(usr:handcuffed)
usr:handcuffed = null
else
usr << "\red You attempt to remove your handcuffs. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to remove the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
usr << "\blue You successfully remove your handcuffs."
usr:handcuffed:loc = usr:loc
usr:handcuffed = null
if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)
usr.next_move = world.time + 100
usr.last_special = world.time + 100
usr << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to unbuckle themself!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:buckled) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
usr << "\blue You successfully unbuckle yourself."
usr:buckled.manual_unbuckle_all(usr)
if("module")
if(issilicon(usr))
if(usr:module)
return
usr:pick_module()
if("radio")
if(issilicon(usr))
usr:radio_menu()
if("panel")
if(issilicon(usr))
usr:installed_modules()
if("store")
if(issilicon(usr))
usr:uneq_active()
if("module1")
if(usr:module_state_1)
if(usr:module_active != usr:module_state_1)
usr:inv1.icon_state = "inv1 +a"
usr:inv2.icon_state = "inv2"
usr:inv3.icon_state = "inv3"
usr:module_active = usr:module_state_1
else
usr:inv1.icon_state = "inv1"
usr:module_active = null
if("module2")
if(usr:module_state_2)
if(usr:module_active != usr:module_state_2)
usr:inv1.icon_state = "inv1"
usr:inv2.icon_state = "inv2 +a"
usr:inv3.icon_state = "inv3"
usr:module_active = usr:module_state_2
else
usr:inv2.icon_state = "inv2"
usr:module_active = null
if("module3")
if(usr:module_state_3)
if(usr:module_active != usr:module_state_3)
usr:inv1.icon_state = "inv1"
usr:inv2.icon_state = "inv2"
usr:inv3.icon_state = "inv3 +a"
usr:module_active = usr:module_state_3
else
usr:inv3.icon_state = "inv3"
usr:module_active = null
else
DblClick()
return
/obj/screen/attack_hand(mob/user as mob, using)
user.db_click(name, using)
return
/obj/screen/attack_paw(mob/user as mob, using)
user.db_click(name, using)
return

View File

@@ -31,24 +31,29 @@
// use power from a cell
/obj/item/weapon/cell/proc/use(var/amount)
charge = max(0, charge-amount)
if(rigged && amount > 0)
explode()
return 0
if(charge < amount) return 0
charge = (charge - amount)
return 1
// recharge the cell
/obj/item/weapon/cell/proc/give(var/amount)
if(rigged && amount > 0)
explode()
return 0
if(maxcharge < amount) return 0
var/power_used = min(maxcharge-charge,amount)
if(crit_fail)
power_used = 0
else if(prob(reliability))
charge += power_used
else
if(crit_fail) return 0
if(!prob(reliability))
minor_fault++
if(prob(minor_fault))
crit_fail = 1
power_used = 0
if(rigged && amount > 0)
explode()
return 0
charge += power_used
return power_used

View File

@@ -175,13 +175,7 @@ field_generator power level display
if(Proj.flag != "bullet")
power += Proj.damage
update_icon()
if(Proj.effects["emp"])
var/emppulse = Proj.effects["emp"]
if(prob(Proj.effectprob["emp"]))
empulse(src, emppulse, emppulse)
else
empulse(src, 0, emppulse)
return
return 0
Del()

View File

@@ -31,7 +31,7 @@ var/global/list/uneatable = list(
event_chance = 15 //Prob for event each tick
target = null //its target. moves towards the target if it has one
last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
teleport_del = 0
teleport_del = 1
New(loc, var/starting_energy = 50, var/temp = 0)
src.energy = starting_energy
@@ -280,7 +280,7 @@ var/global/list/uneatable = list(
if(!move_self)
return 0
if(target && prob(80))
if(target && prob(60))
movement_dir = get_dir(src,target) //moves to a singulo beacon, if there is one
else if(!(movement_dir in cardinal))
movement_dir = pick(NORTH, SOUTH, EAST, WEST)
@@ -396,44 +396,11 @@ var/global/list/uneatable = list(
if (src.energy>200)
toxloss = round(((src.energy-150)/50)*4,1)
radiation = round(((src.energy-150)/50)*5,1)
for(var/mob/living/carbon/M in view(toxrange, src.loc))
if(istype(M,/mob/living/carbon/human))
var/P = 0
if(M:wear_suit)
P += M:wear_suit.radiation_protection
if(M:head)
P += M:head.radiation_protection
if (P > 0)
if (P >= 1)
if(M:wear_suit)
M << "The [M:wear_suit] beeps, indicating it just received a burst of radiation. Good thing you had it on."
else if (M:head)
M << "The [M:head] beeps, indicating it just received a burst of radiation. Good thing you had it on."
else
M << "Your body deflects all the radiation"
return
if (toxloss >= 100)
toxloss = 100 - (P * 100) //a suit and/or headgear which protects you from 10% radiation will make you only receive 90 damage even if you're showered with a MILLION points of toxloss
else
toxloss = toxloss - (P * toxloss)
if (radiation > 15)
radiation = 15 - (15 * P)
else
radiation = radiation - (P * radiation)
if(M:wear_suit)
M << "\red The [M:wear_suit] absorbs some of the radiation from the singularity."
else if (M:head)
M << "\red The [M:head] absorbs some of the radiation from the singularity."
else
M << "\red Your body protects you from some of the radiation."
else
if(prob(50))
M << "\red <b>You feel odd.</b>"
else
M << "\red <b>You feel sick.</b>"
M.toxloss += toxloss
M.radiation += radiation
M.updatehealth()
for(var/mob/living/M in view(toxrange, src.loc))
if(istype(M,/mob/living/))
M.apply_effect(rand(radiation), IRRADIATE)
toxloss = (toxloss - (toxloss*M.getarmor(null, "rad")))
M.apply_effect(toxloss, TOX)
return
@@ -444,8 +411,7 @@ var/global/list/uneatable = list(
M << "\blue You look directly into The [src.name], good thing you had your protective eyewear on!"
return
M << "\red You look directly into The [src.name] and feel weak."
if (M:stunned < 3)
M.stunned = 3
M.apply_effect(3, STUN)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] stares blankly at The []!</B>", M, src), 1)
return

View File

@@ -58,11 +58,13 @@
throw_range = 10
var
list/stored_ammo = list()
ammo_type = "/obj/item/ammo_casing"
max_ammo = 7
New()
for(var/i = 1, i <= 7, i++)
stored_ammo += new /obj/item/ammo_casing(src)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
update_icon()

View File

@@ -1,60 +1,47 @@
/obj/item/ammo_magazine/a75//Still needs to be gone through
/obj/item/ammo_magazine/a75
name = "ammo magazine (.75)"
icon_state = "gyro"
New()
for(var/i = 1, i <= 8, i++)
stored_ammo += new /obj/item/ammo_casing/a75(src)
update_icon()
ammo_type = "/obj/item/ammo_casing/a75"
max_ammo = 8
/obj/item/ammo_magazine/c38
name = "speed loader (.38)"
icon_state = "38"
New()
for(var/i = 1, i <= 7, i++)
stored_ammo += new /obj/item/ammo_casing/c38(src)
update_icon()
ammo_type = "/obj/item/ammo_casing/c38"
max_ammo = 7
/obj/item/ammo_magazine/a418
name = "ammo box (.418)"
icon_state = "418"
New()
for(var/i = 1, i <= 7, i++)
stored_ammo += new /obj/item/ammo_casing/a418(src)
update_icon()
ammo_type = "/obj/item/ammo_casing/a418"
max_ammo = 7
/obj/item/ammo_magazine/a666
name = "ammo box (.666)"
icon_state = "666"
New()
for(var/i = 1, i <= 2, i++)
stored_ammo += new /obj/item/ammo_casing/a666(src)
update_icon()
ammo_type = "/obj/item/ammo_casing/a666"
max_ammo = 4
/obj/item/ammo_magazine/c9mm
name = "Ammunition Box (9mm)"
icon_state = "9mm"
origin_tech = "combat=3;materials=2"
New()
for(var/i = 1, i <= 30, i++)
stored_ammo += new /obj/item/ammo_casing/c9mm(src)
update_icon()
ammo_type = "/obj/item/ammo_casing/c9mm"
max_ammo = 30
update_icon()
desc = text("There are [] round\s left!", stored_ammo.len)
/obj/item/ammo_magazine/c45
name = "Ammunition Box (.45)"
icon_state = "9mm"
origin_tech = "combat=3;materials=2"
New()
for(var/i = 1, i <= 30, i++)
stored_ammo += new /obj/item/ammo_casing/c45(src)
update_icon()
update_icon()
desc = text("There are [] round\s left!", stored_ammo.len)
ammo_type = "/obj/item/ammo_casing/c45"
max_ammo = 30

View File

@@ -1,37 +1,37 @@
/obj/item/ammo_casing/a418
desc = "A .418 bullet casing."
caliber = "357"
projectile_type = "/obj/item/projectile/suffocationbullet"
projectile_type = "/obj/item/projectile/bullet/suffocationbullet"
/obj/item/ammo_casing/a75
desc = "A .75 bullet casing."
caliber = "75"
projectile_type = "/obj/item/projectile/gyro"
projectile_type = "/obj/item/projectile/bullet/gyro"
/obj/item/ammo_casing/a666
desc = "A .666 bullet casing."
caliber = "357"
projectile_type = "/obj/item/projectile/cyanideround"
projectile_type = "/obj/item/projectile/bullet/cyanideround"
/obj/item/ammo_casing/c38
desc = "A .38 bullet casing."
caliber = "38"
projectile_type = "/obj/item/projectile/weakbullet"
projectile_type = "/obj/item/projectile/bullet/weakbullet"
/obj/item/ammo_casing/c9mm
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = "/obj/item/projectile/weakbullet"
projectile_type = "/obj/item/projectile/bullet/weakbullet"
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
caliber = ".45"
projectile_type = "/obj/item/projectile/midbullet"
projectile_type = "/obj/item/projectile/bullet/midbullet"
/obj/item/ammo_casing/shotgun
@@ -39,7 +39,7 @@
desc = "A 12 gauge shell."
icon_state = "gshell"
caliber = "shotgun"
projectile_type = "/obj/item/projectile"
projectile_type = "/obj/item/projectile/bullet"
m_amt = 12500
@@ -54,7 +54,7 @@
name = "beanbag shell"
desc = "A weak beanbag shell."
icon_state = "bshell"
projectile_type = "/obj/item/projectile/weakbullet"
projectile_type = "/obj/item/projectile/bullet/weakbullet"
m_amt = 500
@@ -62,7 +62,7 @@
name = "stun shell"
desc = "A stunning shell."
icon_state = "stunshell"
projectile_type = "/obj/item/projectile/stunshot"
projectile_type = "/obj/item/projectile/bullet/stunshot"
m_amt = 2500
@@ -70,5 +70,5 @@
name = "shotgun darts"
desc = "A dart for use in shotguns."
icon_state = "blshell" //someone, draw the icon, please.
projectile_type = "/obj/item/projectile/dart"
projectile_type = "/obj/item/projectile/energy/dart"
m_amt = 12500

View File

@@ -10,46 +10,23 @@
throwforce = 5
throw_speed = 4
throw_range = 5
force = 5.0//They now do the ave damage
force = 5.0
origin_tech = "combat=1"
var
fire_sound = 'Gunshot.ogg'
obj/item/projectile/in_chamber
obj/item/projectile/in_chamber = null
caliber = ""
silenced = 0
badmin = 0
recoil = 0
proc
load_into_chamber()
badmin_ammo()
special_check(var/mob/M)
load_into_chamber()
in_chamber = new /obj/item/projectile/weakbullet(src)
return 1
badmin_ammo() //CREEEEEED!!!!!!!!!
switch(badmin)
if(1)
in_chamber = new /obj/item/projectile/electrode(src)
if(2)
in_chamber = new /obj/item/projectile/weakbullet(src)
if(3)
in_chamber = new /obj/item/projectile(src)
if(4)
in_chamber = new /obj/item/projectile/beam(src)
if(5)
in_chamber = new /obj/item/projectile/beam/pulse(src)
else
return 0
if(!istype(src, /obj/item/weapon/gun/energy))
var/obj/item/ammo_casing/AC = new(get_turf(src))
AC.name = "bullet casing"
AC.desc = "This casing has the NT Insignia etched into the side."
return 1
return 0
special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
@@ -62,12 +39,9 @@
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)//TODO: go over this
if (flag)
return //we're placing gun on a table or in backpack --rastaf0
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy))
return
if(istype(target, /obj/effect/proc_holder/spell))
return
if(flag) return //we're placing gun on a table or in backpack
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
if(istype(user, /mob/living))
var/mob/living/M = user
if ((M.mutations & CLOWN) && prob(50))
@@ -76,6 +50,7 @@
M.drop_item()
del(src)
return
if (!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return
@@ -87,30 +62,20 @@
if (!istype(targloc) || !istype(curloc))
return
if(badmin)
badmin_ammo()
else if(!special_check(user))
if(!special_check(user)) return
if(!load_into_chamber())
user << "\red *click*";
return
else if(!load_into_chamber())
user << "\red *click* *click*";
return
if(istype(src, /obj/item/weapon/gun/projectile/shotgun))//TODO: Get this out of here, parent objects should check child types as little as possible
var/obj/item/weapon/gun/projectile/shotgun/S = src
if(S.pumped >= S.maxpump)
S.pump()
return
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(!in_chamber)
return
if(!in_chamber) return
in_chamber.firer = user
in_chamber.def_zone = user.get_organ_target()
in_chamber.def_zone = user.zone_sel.selecting
if(targloc == curloc)
user.bullet_act(in_chamber)
@@ -118,11 +83,6 @@
update_icon()
return
if(istype(src, /obj/item/weapon/gun/energy/freeze))
var/obj/item/projectile/freeze/F = in_chamber
var/obj/item/weapon/gun/energy/freeze/Fgun = src
F.temperature = Fgun.temperature
if(recoil)
spawn()
shake_camera(user, recoil + 1, recoil)
@@ -139,142 +99,6 @@
sleep(1)
in_chamber = null
if(istype(src, /obj/item/weapon/gun/projectile/shotgun))
var/obj/item/weapon/gun/projectile/shotgun/S = src
S.pumped++
update_icon()
return
/obj/item/weapon/gun/projectile
desc = "A classic revolver. Uses 357 ammo"
name = "revolver"
icon_state = "revolver"
caliber = "357"
origin_tech = "combat=2;materials=2;syndicate=6"
w_class = 3.0
m_amt = 1000
var
list/loaded = list()
max_shells = 7
load_method = 0 //0 = Single shells or quick loader, 1 = magazine
// Shotgun variables
pumped = 0
maxpump = 1
list/Storedshots = list()
load_into_chamber()
if(!loaded.len)
if(Storedshots.len > 0)
if(istype(src, /obj/item/weapon/gun/projectile/shotgun))
var/obj/item/weapon/gun/projectile/shotgun/S = src
S.pump(loc)
return 0
if(istype(src, /obj/item/weapon/gun/projectile/shotgun) && pumped >= maxpump)
return 1
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
if(!istype(src, /obj/item/weapon/gun/projectile/shotgun))
AC.loc = get_turf(src) //Eject casing onto ground.
else
Storedshots += AC
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
return 1
else
return 0
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing(src)
update_icon()
attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = 0
if(istype(A, /obj/item/ammo_magazine))
var/obj/item/ammo_magazine/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
if(loaded.len >= max_shells)
break
if(AC.caliber == caliber && loaded.len < max_shells)
AC.loc = src
AM.stored_ammo -= AC
loaded += AC
num_loaded++
else if(istype(A, /obj/item/ammo_casing) && !load_method)
var/obj/item/ammo_casing/AC = A
if(AC.caliber == caliber && loaded.len < max_shells)
user.drop_item()
AC.loc = src
loaded += AC
num_loaded++
if(num_loaded)
user << text("\blue You load [] shell\s into the gun!", num_loaded)
A.update_icon()
return
update_icon()
desc = initial(desc) + text(" Has [] rounds remaining.", loaded.len)
/obj/item/weapon/gun/energy
icon_state = "energy"
name = "energy gun"
desc = "A basic energy-based gun with two settings: Stun and kill."
fire_sound = 'Taser.ogg'
var
var/obj/item/weapon/cell/power_supply
mode = 0 //0 = stun, 1 = kill
charge_cost = 100 //How much energy is needed to fire.
emp_act(severity)
power_supply.use(round(power_supply.maxcharge / severity))
update_icon()
..()
New()
power_supply = new(src)
power_supply.give(power_supply.maxcharge)
load_into_chamber()
if(in_chamber)
return 1
if(!power_supply)
return 0
if(power_supply.charge < charge_cost)
return 0
switch (mode)
if(0)
in_chamber = new /obj/item/projectile/electrode(src)
if(1)
in_chamber = new /obj/item/projectile/beam(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src.name] is now set to kill."
if(1)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src.name] is now set to stun."
update_icon()
return
update_icon()
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
icon_state = text("[][]", initial(icon_state), ratio)

View File

@@ -1,647 +1,44 @@
/obj/item/weapon/gun/energy
icon_state = "energy"
name = "energy gun"
desc = "A basic energy-based gun with two settings: Stun and kill."
fire_sound = 'Taser.ogg'
/obj/item/weapon/gun/energy/laser
name = "laser gun"
icon_state = "laser"
fire_sound = 'Laser.ogg'
w_class = 3.0
m_amt = 2000
origin_tech = "combat=3;magnets=2"
mode = 1 //We don't want laser guns to be on a stun setting. --Superxpdude
attack_self(mob/living/user as mob)
return // We don't want laser guns to be able to change to a stun setting. --Superxpdude
/obj/item/weapon/gun/energy/laser/captain
icon_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
origin_tech = null //forgotten technology of ancients lol
New()
..()
charge()
proc
charge()
if(power_supply.charge < power_supply.maxcharge)
power_supply.give(100)
update_icon()
spawn(50) charge()
//Added this to the cap's laser back before the gun overhaul to make it halfways worth stealing. It's back now. --NEO
/obj/item/weapon/gun/energy/laser/cyborg/load_into_chamber()
if(in_chamber)
return 1
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
R.cell.use(40)
in_chamber = new /obj/item/projectile/beam(src)
return 1
return 0
/obj/item/weapon/gun/energy/pulse_rifle
name = "pulse rifle"
desc = "A heavy-duty, pulse-based energy weapon with multiple fire settings, preferred by front-line combat personnel."
icon_state = "pulse"
force = 10 //The standard high damage
mode = 2
fire_sound = 'pulse.ogg'
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
switch (mode)
if(0)
in_chamber = new /obj/item/projectile/electrode(src)
if(1)
in_chamber = new /obj/item/projectile/beam(src)
if(2)
in_chamber = new /obj/item/projectile/beam/pulse(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
mode++
switch(mode)
if(1)
user << "\red [src.name] is now set to kill."
fire_sound = 'Laser.ogg'
charge_cost = 100
if(2)
user << "\red [src.name] is now set to destroy."
fire_sound = 'pulse.ogg'
charge_cost = 200
else
mode = 0
user << "\red [src.name] is now set to stun."
fire_sound = 'Taser.ogg'
charge_cost = 50
New()
power_supply = new /obj/item/weapon/cell/super(src)
power_supply.give(power_supply.maxcharge)
update_icon()
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty, pulse-based energy weapon. The mode is set to DESTROY. Always destroy."
mode = 2
New()
power_supply = new /obj/item/weapon/cell/infinite(src)
power_supply.give(power_supply.maxcharge)
update_icon()
attack_self(mob/living/user as mob)
return
/obj/item/weapon/gun/energy/pulse_rifle/M1911
name = "m1911-P"
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911-p"
New()
power_supply = new /obj/item/weapon/cell/infinite(src)
power_supply.give(power_supply.maxcharge)
update_icon()
/obj/item/weapon/gun/energy/nuclear
name = "Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
origin_tech = "combat=3;materials=5;powerstorage=3"
var/lightfail = 0
icon_state = "nucgun"
New()
..()
charge()
proc
charge()
if(power_supply.charge < power_supply.maxcharge)
if(failcheck())
power_supply.give(100)
update_icon()
if(!crit_fail)
spawn(50) charge()
failcheck()
lightfail = 0
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
for (var/mob/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
if (src in M.contents)
M << "\red Your gun feels pleasantly warm for a moment."
else
M << "\red You feel a warm sensation."
M.radiation += rand(1,40)
lightfail = 1
else
for (var/mob/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
if (src in M.contents)
M << "\red Your gun's reactor overloads!"
M << "\red You feel a wave of heat wash over you."
M.radiation += 100
crit_fail = 1 //break the gun so it stops recharging
update_icon()
update_charge()
if (crit_fail)
overlays += "nucgun-whee"
return
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
overlays += text("nucgun-[]", ratio)
update_reactor()
if(crit_fail)
overlays += "nucgun-crit"
return
if(lightfail)
overlays += "nucgun-medium"
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
overlays += "nucgun-light"
else
overlays += "nucgun-clean"
update_mode()
if (mode == 2)
overlays += "nucgun-stun"
else if (mode == 1)
overlays += "nucgun-kill"
var
obj/item/weapon/cell/power_supply //What type of power cell this uses
charge_cost = 100 //How much energy is needed to fire.
cell_type = "/obj/item/weapon/cell"
projectile_type = "/obj/item/projectile"
emp_act(severity)
..()
reliability -= round(15/severity)
update_icon()
overlays = null
update_charge()
update_reactor()
update_mode()
/obj/item/weapon/gun/energy/taser
name = "taser gun"
desc = "A small, low capacity gun used for non-lethal takedowns."
icon_state = "taser"
fire_sound = 'Taser.ogg'
charge_cost = 100
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/electrode(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
New()
power_supply = new /obj/item/weapon/cell/crap(src)
power_supply.give(power_supply.maxcharge)
/obj/item/weapon/gun/energy/taser/cyborg/load_into_chamber()
if(in_chamber)
return 1
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
R.cell.use(40)
in_chamber = new /obj/item/projectile/electrode(src)
return 1
return 0
/obj/item/weapon/gun/energy/lasercannon//TODO: go over this one
name = "laser cannon"
desc = "A heavy-duty laser cannon."
icon_state = "lasercannon"
fire_sound = 'lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/beam/heavylaser(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
New()
power_supply = new /obj/item/weapon/cell(src)
power_supply.give(power_supply.maxcharge)
power_supply.use(round(power_supply.maxcharge / severity))
update_icon()
/obj/item/weapon/gun/energy/shockgun
name = "shock gun"
desc = "A high tech energy weapon that stuns and burns a target."
icon_state = "shockgun"
fire_sound = 'Laser.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 250
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/beam/fireball(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
New()
power_supply = new /obj/item/weapon/cell(src)
power_supply.give(power_supply.maxcharge)
/obj/item/weapon/gun/energy/ionrifle
name = "ion rifle"
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
icon_state = "ionrifle"
fire_sound = 'Laser.ogg'
origin_tech = "combat=3;magnets=2"//This could likely be changed up a bit
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
charge_cost = 200
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/ion(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
New()
power_supply = new /obj/item/weapon/cell(src)
power_supply.give(power_supply.maxcharge)
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
fire_sound = 'pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 100
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/declone(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
..()
New()
power_supply = new /obj/item/weapon/cell(src)
power_supply.give(power_supply.maxcharge)
/obj/item/weapon/gun/energy/stunrevolver
name = "stun revolver"
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
fire_sound = 'Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/electrode(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
return
New()
power_supply = new /obj/item/weapon/cell(src)
power_supply.give(power_supply.maxcharge)
/obj/item/weapon/gun/energy/freeze
name = "freeze gun"
icon_state = "freezegun"
fire_sound = 'pulse3.ogg'
desc = "A gun that shoots supercooled hydrogen particles to drastically chill a target's body temperature."
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
New()
power_supply = new /obj/item/weapon/cell/crap(src)
power_supply.give(power_supply.maxcharge)
spawn()
Life()
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/freeze(src)
power_supply.use(charge_cost)
return 1
attack_self(mob/living/user as mob)
user.machine = src
var/temp_text = ""
if(temperature > (T0C - 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
..()
if(cell_type)
power_supply = new cell_type(src)
else
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=freezegun;size=450x300")
onclose(user, "freezegun")
Topic(href, href_list)
if (..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(T20C, src.current_temperature+amount)
else
src.current_temperature = max(0, src.current_temperature+amount)
if (istype(src.loc, /mob))
attack_self(src.loc)
src.add_fingerprint(usr)
return
proc/Life()
while(src)
sleep(10)
switch(temperature)
if(0 to 10) charge_cost = 500
if(11 to 50) charge_cost = 150
if(51 to 100) charge_cost = 100
if(101 to 150) charge_cost = 75
if(151 to 200) charge_cost = 50
if(201 to 300) charge_cost = 25
if(current_temperature != temperature)
var/difference = abs(current_temperature - temperature)
if(difference >= 10)
if(current_temperature < temperature)
temperature -= 10
else
temperature += 10
else
temperature = current_temperature
if (istype(src.loc, /mob))
attack_self(src.loc)
/obj/item/weapon/gun/energy/plasma
name = "plasma gun"
icon_state = "plasmagun"
fire_sound = 'pulse3.ogg'
desc = "A gun that fires super heated plasma at targets, thus increasing their overall body temparature and also harming them."
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
New()
power_supply = new /obj/item/weapon/cell/crap(src)
power_supply = new(src)
power_supply.give(power_supply.maxcharge)
spawn()
Life()
return
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/plasma(src)
power_supply.use(charge_cost)
if(in_chamber) return 1
if(!power_supply) return 0
if(!power_supply.use(charge_cost)) return 0
if(!projectile_type) return 0
in_chamber = new projectile_type(src)
return 1
attack_self(mob/living/user as mob)
user.machine = src
var/temp_text = ""
if(temperature < (T0C + 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature+T0C)]&deg;C) ([round(temperature*1.8+459.67)]&deg;F)</FONT>"
else
temp_text = "<FONT color=red>[temperature] ([round(temperature+T0C)]&deg;C) ([round(temperature*1.8+459.67)]&deg;F)</FONT>"
var/dat = {"<B>Plasma Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=plasmagun;size=450x300")
onclose(user, "plasmagun")
Topic(href, href_list)
if (..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount < 0)
src.current_temperature = max(T20C, src.current_temperature+amount)
else
src.current_temperature = min(800, src.current_temperature+amount)
if (istype(src.loc, /mob))
attack_self(src.loc)
src.add_fingerprint(usr)
return
proc/Life()
while(src)
sleep(10)
switch(temperature)
if(601 to 800) charge_cost = 500
if(401 to 600) charge_cost = 150
if(201 to 400) charge_cost = 100
if(101 to 200) charge_cost = 75
if(51 to 100) charge_cost = 50
if(0 to 50) charge_cost = 25
if(current_temperature != temperature)
var/difference = abs(current_temperature + temperature)
if(difference >= 10)
if(current_temperature < temperature)
temperature -= 10
else
temperature += 10
else
temperature = current_temperature
if (istype(src.loc, /mob))
attack_self(src.loc)
/obj/item/weapon/gun/energy/crossbow
name = "mini energy-crossbow"
desc = "A weapon favored by many of the syndicates stealth specialists."
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=5"
silenced = 1
fire_sound = 'Genhit.ogg'
New()
power_supply = new /obj/item/weapon/cell/crap(src)
power_supply.give(power_supply.maxcharge)
charge()
proc/charge()
if(power_supply)
if(power_supply.charge < power_supply.maxcharge) power_supply.give(100)
spawn(50) charge()
update_icon()
return
attack_self(mob/living/user as mob)
return
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge < charge_cost)
return 0
in_chamber = new /obj/item/projectile/bolt(src)
power_supply.use(charge_cost)
return 1
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
icon_state = text("[][]", initial(icon_state), ratio)
/obj/item/weapon/gun/energy/crossbow/cyborg/load_into_chamber()
if(in_chamber)
return 1
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
R.cell.use(20)
in_chamber = new /obj/item/projectile/bolt(src)
return 1
return 0
/obj/item/weapon/gun/energy/crossbow/largecrossbow
name = "Energy Crossbow"
desc = "A weapon favored by syndicate infiltration teams."
icon_state = "crossbow"
w_class = 4.0
item_state = "crossbow"
force = 10
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=5"
silenced = 1
fire_sound = 'Genhit.ogg'
New()
power_supply = new /obj/item/weapon/cell/crap(src)
power_supply.give(power_supply.maxcharge)
charge()
charge()
if(power_supply)
if(power_supply.charge < power_supply.maxcharge) power_supply.give(200)
spawn(20) charge()
update_icon()
return
attack_self(mob/living/user as mob)
return
load_into_chamber()
if(in_chamber)
return 1
if(power_supply.charge <= charge_cost)
return 0
in_chamber = new /obj/item/projectile/largebolt(src)
power_supply.use(charge_cost)
return 1

View File

@@ -0,0 +1,59 @@
/obj/item/weapon/gun/energy/laser
name = "laser gun"
icon_state = "laser"
fire_sound = 'Laser.ogg'
w_class = 3.0
m_amt = 2000
origin_tech = "combat=3;magnets=2"
projectile_type = "/obj/item/projectile/beam"
/obj/item/weapon/gun/energy/laser/captain
icon_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
origin_tech = "combat=5;magnets=4"
var/charge_tick = 0
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(!charge_tick >= 5) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
update_icon()
return 1
/obj/item/weapon/gun/energy/laser/cyborg/load_into_chamber()
if(in_chamber) return 1
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
R.cell.use(40)
in_chamber = new/obj/item/projectile/beam(src)
return 1
return 0
/obj/item/weapon/gun/energy/lasercannon
name = "laser cannon"
desc = "A heavy-duty laser cannon."
icon_state = "lasercannon"
fire_sound = 'lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
projectile_type = "/obj/item/projectile/beam/heavylaser"

View File

@@ -0,0 +1,123 @@
/obj/item/weapon/gun/energy/gun
icon_state = "energy"
name = "energy gun"
desc = "A basic energy-based gun with two settings: Stun and kill."
fire_sound = 'Taser.ogg'
charge_cost = 100 //How much energy is needed to fire.
projectile_type = "/obj/item/projectile/energy/electrode"
var
mode = 0 //0 = stun, 1 = kill
attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src.name] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src.name] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
update_icon()
return
/obj/item/weapon/gun/energy/gun/nuclear
name = "Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
origin_tech = "combat=3;materials=5;powerstorage=3"
var/lightfail = 0
icon_state = "nucgun"
var/charge_tick = 0
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(!charge_tick >= 5) return 0
charge_tick = 0
if(!power_supply) return 0
if(!failcheck()) return 0
power_supply.give(100)
update_icon()
return 1
proc
failcheck()
lightfail = 0
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
for (var/mob/living/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
if (src in M.contents)
M << "\red Your gun feels pleasantly warm for a moment."
else
M << "\red You feel a warm sensation."
M.apply_effect(rand(1,40), IRRADIATE)
lightfail = 1
else
for (var/mob/living/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
if (src in M.contents)
M << "\red Your gun's reactor overloads!"
M << "\red You feel a wave of heat wash over you."
M.apply_effect(100, IRRADIATE)
crit_fail = 1 //break the gun so it stops recharging
processing_objects.Remove(src)
update_icon()
return 0
update_charge()
if (crit_fail)
overlays += "nucgun-whee"
return
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
overlays += text("nucgun-[]", ratio)
update_reactor()
if(crit_fail)
overlays += "nucgun-crit"
return
if(lightfail)
overlays += "nucgun-medium"
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
overlays += "nucgun-light"
else
overlays += "nucgun-clean"
update_mode()
if (mode == 2)
overlays += "nucgun-stun"
else if (mode == 1)
overlays += "nucgun-kill"
emp_act(severity)
..()
reliability -= round(15/severity)
update_icon()
overlays = null
update_charge()
update_reactor()
update_mode()

View File

@@ -0,0 +1,26 @@
/obj/item/weapon/gun/energy/pulse_rifle
name = "pulse rifle"
desc = "A heavy-duty, pulse-based energy weapon, preferred by front-line combat personnel."
icon_state = "pulse"
force = 10
fire_sound = 'pulse.ogg'
charge_cost = 200
projectile_type = "/obj/item/projectile/beam/pulse"
cell_type = "/obj/item/weapon/cell/super"
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty, pulse-based energy weapon."
cell_type = "/obj/item/weapon/cell/infinite"
/obj/item/weapon/gun/energy/pulse_rifle/M1911
name = "m1911-P"
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911-p"
cell_type = "/obj/item/weapon/cell/infinite"

View File

@@ -0,0 +1,21 @@
/obj/item/weapon/gun/energy/ionrifle
name = "ion rifle"
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
icon_state = "ionrifle"
fire_sound = 'Laser.ogg'
origin_tech = "combat=2;magnets=4"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
charge_cost = 100
projectile_type = "/obj/item/projectile/ion"
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
fire_sound = 'pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 100
projectile_type = "/obj/item/projectile/energy/declone"

View File

@@ -0,0 +1,85 @@
/obj/item/weapon/gun/energy/taser
name = "taser gun"
desc = "A small, low capacity gun used for non-lethal takedowns."
icon_state = "taser"
fire_sound = 'Taser.ogg'
charge_cost = 100
projectile_type = "/obj/item/projectile/electrode"
cell_type = "/obj/item/weapon/cell/crap"
/obj/item/weapon/gun/energy/taser/cyborg/load_into_chamber()//TOOD: change this over to the slowly recharge other cell
if(in_chamber)
return 1
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
R.cell.use(charge_cost)
in_chamber = new /obj/item/projectile/energy/electrode(src)
return 1
return 0
/obj/item/weapon/gun/energy/stunrevolver
name = "stun revolver"
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
fire_sound = 'Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
projectile_type = "/obj/item/projectile/electrode"
cell_type = "/obj/item/weapon/cell"
/obj/item/weapon/gun/energy/crossbow
name = "mini energy-crossbow"
desc = "A weapon favored by many of the syndicates stealth specialists."
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=5"
silenced = 1
fire_sound = 'Genhit.ogg'
projectile_type = "/obj/item/projectile/energy/bolt"
cell_type = "/obj/item/weapon/cell/crap"
var/charge_tick = 0
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(!charge_tick >= 5) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
return 1
update_icon()
return
/obj/item/weapon/gun/energy/crossbow/largecrossbow
name = "Energy Crossbow"
desc = "A weapon favored by syndicate infiltration teams."
w_class = 4.0
force = 10
m_amt = 200000
projectile_type = "/obj/item/projectile/largebolt"

View File

@@ -0,0 +1,78 @@
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
fire_sound = 'pulse3.ogg'
desc = "A gun that changes temperatures."
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
projectile_type = "/obj/item/projectile/temp"
cell_type = "/obj/item/weapon/cell/crap"
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
attack_self(mob/living/user as mob)
user.machine = src
var/temp_text = ""
if(temperature > (T0C - 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
else
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=freezegun;size=450x300")
onclose(user, "freezegun")
Topic(href, href_list)
if (..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(500, src.current_temperature+amount)
else
src.current_temperature = max(0, src.current_temperature+amount)
if (istype(src.loc, /mob))
attack_self(src.loc)
src.add_fingerprint(usr)
return
process()
switch(temperature)
if(0 to 100) charge_cost = 1000
if(100 to 250) charge_cost = 500
if(251 to 300) charge_cost = 100
if(301 to 400) charge_cost = 500
if(401 to 500) charge_cost = 1000
if(current_temperature != temperature)
var/difference = abs(current_temperature - temperature)
if(difference >= 10)
if(current_temperature < temperature)
temperature -= 10
else
temperature += 10
else
temperature = current_temperature
if(istype(src.loc, /mob))
attack_self(src.loc)
return

View File

@@ -1,225 +1,63 @@
/obj/item/weapon/gun/projectile/detective
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
name = ".38 revolver"
icon_state = "detective"
caliber = "38"
/obj/item/weapon/gun/projectile
desc = "A classic revolver. Uses 357 ammo"
name = "revolver"
icon_state = "revolver"
caliber = "357"
origin_tech = "combat=2;materials=2"
w_class = 3.0
m_amt = 1000
var
ammo_type = "/obj/item/ammo_casing"
list/loaded = list()
max_shells = 7
load_method = 0 //0 = Single shells or quick loader, 1 = magazine
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/c38(src)
loaded += new ammo_type(src)
update_icon()
special_check(var/mob/living/carbon/human/M)
if(istype(M))
if(istype(M.w_uniform, /obj/item/clothing/under/det) && istype(M.head, /obj/item/clothing/head/det_hat) && istype(M.wear_suit, /obj/item/clothing/suit/det_suit))
return 1
M << "\red You just don't feel cool enough to use this gun looking like that."
load_into_chamber()
if(!loaded.len) return 0
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
AC.loc = get_turf(src) //Eject casing onto ground.
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
return 1
return 0
verb
rename_gun()
set name = "Name Gun"
set desc = "Click to rename your gun. If you're the detective."
var/mob/U = usr
if(ishuman(U)&&U.mind&&U.mind.assigned_role=="Detective")
var/input = input("What do you want to name the gun?",,"")
input = sanitize(input)
if(input)
if(in_range(U,src)&&(!isnull(src))&&!U.stat)
name = input
U << "You name the gun [input]. Say hello to your new friend."
else
U << "\red Can't let you do that, detective!"
else
U << "\red You don't feel cool enough to name this gun, chump."
/obj/item/weapon/gun/projectile/mateba
name = "mateba"
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo."
icon_state = "mateba"
origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/projectile/shotgun
name = "shotgun"
desc = "Useful for sweeping alleys."
icon_state = "shotgun"
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=2;materials=2"
var/recentpump = 0 // to prevent spammage
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/shotgun/beanbag(src)
update_icon()
attack_self(mob/living/user as mob)
if(recentpump) return
pump()
recentpump = 1
sleep(10)
recentpump = 0
attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = 0
if(istype(A, /obj/item/ammo_magazine))
var/obj/item/ammo_magazine/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
if(loaded.len >= max_shells)
break
if(AC.caliber == caliber && loaded.len < max_shells)
AC.loc = src
AM.stored_ammo -= AC
loaded += AC
num_loaded++
else if(istype(A, /obj/item/ammo_casing) && !load_method)
var/obj/item/ammo_casing/AC = A
if(AC.caliber == caliber && loaded.len < max_shells)
user.drop_item()
AC.loc = src
loaded += AC
num_loaded++
if(num_loaded)
user << text("\blue You load [] shell\s into the gun!", num_loaded)
A.update_icon()
return
proc/pump(mob/M)
playsound(M, 'shotgunpump.ogg', 60, 1)
pumped = 0
for(var/obj/item/ammo_casing/AC in Storedshots)
Storedshots -= AC //Remove casing from loaded list.
AC.loc = get_turf(src) //Eject casing onto ground.
update_icon()
desc = initial(desc) + text(" Has [] rounds remaining.", loaded.len)
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"
icon_state = "cshotgun"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
max_shells = 8
origin_tech = "combat=3"
maxpump = 1
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/shotgun(src)
update_icon()
/obj/item/weapon/gun/projectile/shotgun/combat2
name = "security combat shotgun"
icon_state = "cshotgun"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
max_shells = 4
origin_tech = "combat=3"
maxpump = 1
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/shotgun/beanbag(src)
update_icon()
/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "Submachine Gun"
desc = "A lightweight, fast firing gun. Uses 9mm rounds."
icon_state = "saber"
w_class = 3.0
max_shells = 18
caliber = "9mm"
origin_tech = "combat=4;materials=2"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/c9mm(src)
update_icon()
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "Mini-Uzi"
desc = "A lightweight, fast firing gun, for when you REALLY need someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3.0
max_shells = 20
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/c45(src)
update_icon()
/obj/item/weapon/gun/projectile/silenced
name = "Silenced Pistol"
desc = "A small, quiet, easily concealable gun. Uses .45 rounds."
icon_state = "silenced_pistol"
w_class = 3.0
max_shells = 12
caliber = ".45"
silenced = 1
origin_tech = "combat=2;materials=2;syndicate=8"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/c45(src)
update_icon()
/obj/item/weapon/gun/projectile/deagle
name = "Desert Eagle"
desc = "A robust handgun that uses 357 magnum ammo"
icon_state = "deagle"
w_class = 3.0
force = 14.0
max_shells = 9
caliber = "357"
origin_tech = "combat=2;materials=2"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing(src)
update_icon()
/obj/item/weapon/gun/projectile/deagleg
name = "Desert Eagle"
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses 357 ammo."
icon_state = "deagleg"
item_state = "deagleg"
w_class = 3.0
max_shells = 9
caliber = "357"
origin_tech = "combat=2;materials=2"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing(src)
update_icon()
/obj/item/weapon/gun/projectile/deaglecamo
name = "Desert Eagle"
desc = "A Deagle brand Deagle for operators operating operationally. Uses 357 ammo."
icon_state = "deaglecamo"
item_state = "deagleg"
w_class = 3.0
max_shells = 9
caliber = "357"
origin_tech = "combat=2;materials=2"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing(src)
update_icon()
/obj/item/weapon/gun/projectile/gyropistol
name = "Gyrojet Pistol"
desc = "A bulky pistol designed to fire self propelled rounds"
icon_state = "gyropistol"
w_class = 3.0
max_shells = 8
caliber = "a75"
fire_sound = 'Explosion1.ogg'
origin_tech = "combat=3"
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/a75(src)
update_icon()

View File

@@ -0,0 +1,22 @@
/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "Submachine Gun"
desc = "A lightweight, fast firing gun. Uses 9mm rounds."
icon_state = "saber"
w_class = 3.0
max_shells = 18
caliber = "9mm"
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/c9mm"
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "Mini-Uzi"
desc = "A lightweight, fast firing gun, for when you REALLY need someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3.0
max_shells = 20
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"

View File

@@ -0,0 +1,47 @@
/obj/item/weapon/gun/projectile/silenced
name = "Silenced Pistol"
desc = "A small, quiet, easily concealable gun. Uses .45 rounds."
icon_state = "silenced_pistol"
w_class = 3.0
max_shells = 12
caliber = ".45"
silenced = 1
origin_tech = "combat=2;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"
/obj/item/weapon/gun/projectile/deagle
name = "Desert Eagle"
desc = "A robust handgun that uses 357 magnum ammo"
icon_state = "deagle"
force = 14.0
max_shells = 9
/obj/item/weapon/gun/projectile/deagle/gold
name = "Desert Eagle"
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses 357 ammo."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/projectile/deagle/camo
name = "Desert Eagle"
desc = "A Deagle brand Deagle for operators operating operationally. Uses 357 ammo."
icon_state = "deaglecamo"
item_state = "deagleg"
/obj/item/weapon/gun/projectile/gyropistol
name = "Gyrojet Pistol"
desc = "A bulky pistol designed to fire self propelled rounds"
icon_state = "gyropistol"
max_shells = 8
caliber = "a75"
fire_sound = 'Explosion1.ogg'
origin_tech = "combat=3"
ammo_type = "/obj/item/ammo_casing/a75"

View File

@@ -0,0 +1,43 @@
/obj/item/weapon/gun/projectile/detective
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
name = "revolver"
icon_state = "detective"
caliber = "38"
origin_tech = "combat=2;materials=2"
ammo_type = "/obj/item/ammo_casing/c38"
special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(istype(M.w_uniform, /obj/item/clothing/under/det) && istype(M.head, /obj/item/clothing/head/det_hat) && istype(M.wear_suit, /obj/item/clothing/suit/det_suit))
return 1
M << "\red You just don't feel cool enough to use this gun looking like that."
return 0
verb/rename_gun()
set name = "Name Gun"
set desc = "Click to rename your gun. If you're the detective."
var/mob/M = usr
if(!M.mind) return 0
if(!M.mind.assigned_role == "Detective")
M << "\red You don't feel cool enough to name this gun, chump."
return 0
var/input = input("What do you want to name the gun?",,"")
input = sanitize(input)
if(src && input && !M.stat && in_range(M,src))
name = input
M << "You name the gun [input]. Say hello to your new friend."
return 1
/obj/item/weapon/gun/projectile/mateba
name = "mateba"
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo."
icon_state = "mateba"
origin_tech = "combat=2;materials=2"

View File

@@ -0,0 +1,60 @@
/obj/item/weapon/gun/projectile/shotgun
name = "shotgun"
desc = "Useful for sweeping alleys."
icon_state = "shotgun"
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
var
recentpump = 0 // to prevent spammage
pumped = 0
obj/item/ammo_casing/current_shell = null
load_into_chamber()
if(in_chamber) return 1
return 0
attack_self(mob/living/user as mob)
if(recentpump) return
pump()
recentpump = 1
spawn(10)
recentpump = 0
return
proc/pump(mob/M)
playsound(M, 'shotgunpump.ogg', 60, 1)
pumped = 0
if(current_shell)//We have a shell in the chamber
current_shell.loc = get_turf(src)//Eject casing
if(!loaded.len) return 0
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
current_shell = AC
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
return 1
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"
icon_state = "cshotgun"
max_shells = 8
ammo_type = "/obj/item/ammo_casing/shotgun"
/obj/item/weapon/gun/projectile/shotgun/combat2
name = "security combat shotgun"
icon_state = "cshotgun"
max_shells = 4

View File

@@ -14,14 +14,13 @@
icon = 'projectiles.dmi'
icon_state = "bullet"
density = 1
unacidable = 1 //Just to be sure.
anchored = 1 // I'm not sure if it is a good idea. Bullets sucked to space and curve trajectories near singularity could be awesome. --rastaf0
unacidable = 1
flags = FPRINT | TABLEPASS
pass_flags = PASSTABLE
mouse_opacity = 0
var
bumped = 0 //Prevents it from hitting more than one guy at once
def_zone = "" //Aiming at, Also this should be more random its hard to hit things sometimes
def_zone = "" //Aiming at
mob/firer = null//Who shot it
silenced = 0 //Attack message
yo = null
@@ -29,20 +28,33 @@
current = null
turf/original = null
damage = 10 //Damage dealt by projectile. This is used for machinery, critters, anything not under /mob heirarchy
flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, taser, bomb, bio, or rad
damage = 10
damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
nodamage = 0 //Determines if the projectile will skip any damage inflictions
flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb
projectile_type = "/obj/item/projectile"
//Effects
stun = 0
weaken = 0
paralyze = 0
irradiate = 0
stutter = 0
eyeblur = 0
drowsy = 0
list/mobdamage = list(BRUTE = 50, BURN = 0, TOX = 0, OXY = 0, CLONE = 0) //Determines what kind of damage it does to mobs
list/effects = list("stun" = 0, "weak" = 0, "paralysis" = 0, "stutter" = 0, "drowsyness" = 0, "radiation" = 0, "eyeblur" = 0, "emp" = 0) // long list of effects a projectile can inflict on something. !!MUY FLEXIBLE!!~
list/effectprob = list("stun" = 100, "weak" = 100, "paralysis" = 100, "stutter" = 100, "drowsyness" = 100, "radiation" = 100, "eyeblur" = 100, "emp" = 100) // Probability for an effect to execute
list/effectmod = list("stun" = SET, "weak" = SET, "paralysis" = SET, "stutter" = SET, "drowsyness" = SET, "radiation" = SET, "eyeblur" = SET, "emp" = SET) // determines how the effect modifiers will effect a mob's variable
proc/on_hit(var/atom/target, var/blocked = 0)
if(blocked >= 2) return 0//Full block
if(!isliving(target)) return 0
var/mob/living/L = target
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, blocked)
return 1
Bump(atom/A as mob|obj|turf|area)
if(A == firer)
loc = A.loc
return // cannot shoot yourself
return //cannot shoot yourself
if(bumped) return
@@ -72,13 +84,6 @@
for(var/mob/M in A)
M.bullet_act(src, def_zone)
if(istype(src, /obj/item/projectile/freeze))//These could likely be moved
var/obj/item/projectile/freeze/F = src
F.Freeze(A)
else if(istype(src, /obj/item/projectile/plasma))
var/obj/item/projectile/plasma/P = src
P.Heat(A)
density = 0
invisibility = 101
del(src)

View File

@@ -3,51 +3,28 @@
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
mobdamage = list(BRUTE = 0, BURN = 20, TOX = 0, OXY = 0, CLONE = 0)
damage_type = BURN
flag = "laser"
New()
..()
effects["eyeblur"] = 5
effectprob["eyeblur"] = 50
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
mobdamage = list(BRUTE = 10, BURN = 40, TOX = 0, OXY = 0, CLONE = 0)
eyeblur = 2
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
mobdamage = list(BRUTE = 0, BURN = 40, TOX = 0, OXY = 0, CLONE = 0)
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
/obj/item/projectile/beam/deathlaser
name = "death laser"
icon_state = "heavylaser"
damage = 60
mobdamage = list(BRUTE = 10, BURN = 60, TOX = 0, OXY = 0, CLONE = 0)
New()
..()
effects["weak"] = 5
effectprob["weak"] = 15
/obj/item/projectile/beam/fireball
name = "shock"
icon_state = "fireball"
damage = 25
mobdamage = list(BRUTE = 0, BURN = 25, TOX = 0, OXY = 0, CLONE = 0)
New()
..()
effects["stun"] = 10
effects["weak"] = 10
effectprob["weak"] = 25
effects["stutter"] = 10

View File

@@ -1,23 +0,0 @@
/obj/item/projectile/declone
name = "declown"
icon_state = "declone"
damage = 0
mobdamage = list(BRUTE = 0, BURN = 0, TOX = 0, OXY = 0, CLONE = 40)
flag = "bio"
New()
..()
effects["radiation"] = 40
effectmod["radiation"] = ADD
/obj/item/projectile/dart
name = "dart"
icon_state = "toxin"
flag = "bio"
damage = 0
mobdamage = list(BRUTE = 0, BURN = 0, TOX = 10, OXY = 0, CLONE = 0)
New()
..()
effects["weak"] = 5
effectmod["weak"] = ADD

View File

@@ -1,63 +1,49 @@
/obj/item/projectile/weakbullet
damage = 8
mobdamage = list(BRUTE = 8, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
New()
..()
effects["stun"] = 10
effects["weak"] = 10
effects["stutter"] = 2
effectprob["weak"] = 25
/obj/item/projectile/bullet
name = "bullet"
icon_state = "bullet"
damage = 60
damage_type = BRUTE
nodamage = 0
flag = "bullet"
/obj/item/projectile/midbullet
damage = 16
mobdamage = list(BRUTE = 32, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
New()
..()
effects["weak"] = 10
effects["stun"] = 10
/obj/item/projectile/bullet/weakbullet
damage = 10
stun = 5
weaken = 5
/obj/item/projectile/suffocationbullet//How does this even work?
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 15, CLONE = 0)
/obj/item/projectile/bullet/midbullet
damage = 30
/obj/item/projectile/cyanideround//Instakill guns are not a good thing, make them hit a few times
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 40, OXY = 0, CLONE = 0)
/obj/item/projectile/burstbullet
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
name = "co bullet"
damage = 20
mobdamage = list(BRUTE = 20, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
damage_type = OXY
/obj/item/projectile/bullet/cyanideround
name = "poison bullet"
damage = 40
damage_type = TOX
/obj/item/projectile/gyro
/obj/item/projectile/bullet/burstbullet//I think this one needs something for the on hit
name = "exploding bullet"
damage = 20
/obj/item/projectile/bullet/gyro
name ="gyro"
icon_state= "bolter"
damage = 50
mobdamage = list(BRUTE = 50, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
flag = "bullet"
New()
..()
effects["weak"] = 10
effects["stun"] = 10
/obj/item/projectile/stunshot
/obj/item/projectile/bullet/stunshot
name = "stunshot"
icon_state = "bullet"
flag = "bullet"
damage = 5
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
New()
..()
effects["stun"] = 20
effects["weak"] = 20
effectprob["weak"] = 45
effects["stutter"] = 20
stun = 10
weaken = 10
stutter = 10

View File

@@ -1,27 +1,51 @@
/obj/item/projectile/electrode
/obj/item/projectile/energy
name = "energy"
icon_state = "spark"
damage = 0
damage_type = BURN
nodamage = 1
flag = "energy"
/obj/item/projectile/energy/electrode
name = "electrode"
icon_state = "spark"
flag = "taser"
damage = 0
nodamage = 1
New()
..()
effects["stun"] = 10
effects["weak"] = 10
effects["stutter"] = 10
effectprob["weak"] = 25
stun = 10
weaken = 10
stutter = 10
/obj/item/projectile/energy/declone
name = "declown"
icon_state = "declone"
damage_type = CLONE
irradiate = 40
/obj/item/projectile/bolt
/obj/item/projectile/energy/dart
name = "dart"
icon_state = "toxin"
damage = 5
damage_type = TOX
weaken = 5
/obj/item/projectile/energy/bolt
name = "bolt"
icon_state = "cbbolt"
flag = "taser"
damage = 0
nodamage = 1
New()
..()
effects["weak"] = 10
effects["stutter"] = 10
damage = 10
damage_type = TOX
nodamage = 0
weaken = 10
stutter = 10
/obj/item/projectile/energy/bolt/large
name = "largebolt"
damage = 20

View File

@@ -1,14 +0,0 @@
/obj/item/projectile/largebolt
name = "largebolt"
icon_state = "cbbolt"
flag = "rad"
damage = 20
mobdamage = list(BRUTE = 10, BURN = 0, TOX = 10, OXY = 0, CLONE = 0)
New()
..()
effects["radiation"] = 40
effectprob["radiation"] = 95
effects["drowsyness"] = 10
effectprob["drowsyness"] = 25
effectmod["radiation"] = ADD
effectmod["drowsyness"] = SET

View File

@@ -1,35 +1,30 @@
//These could likely use an Onhit proc
/obj/item/projectile/ion
name = "ion bolt"
icon_state = "ion"
flag = "taser"//Need to check this
damage = 0
damage_type = BURN
nodamage = 1
New()
..()
effects["emp"] = 1
effectprob["emp"] = 80
flag = "energy"
/obj/item/projectile/freeze
on_hit(var/atom/target, var/blocked = 0)
empulse(target, 1, 1)
return 1
/obj/item/projectile/temp
name = "freeze beam"
icon_state = "ice_2"
damage = 0
var/temperature = 0
damage_type = BURN
nodamage = 1
flag = "energy"
var/temperature = 300
proc/Freeze(atom/A as mob|obj|turf|area)
if(istype(A, /mob))
var/mob/M = A
if(M.bodytemperature > temperature)
M.bodytemperature = temperature
/obj/item/projectile/plasma
name = "plasma blast"
icon_state = "plasma_2"
damage = 0
var/temperature = 800
proc/Heat(atom/A as mob|obj|turf|area)
if(istype(A, /mob/living/carbon))
var/mob/M = A
if(M.bodytemperature < temperature)
M.bodytemperature = temperature
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
if(istype(target, /mob/living))
var/mob/M = target
M.bodytemperature = temperature
return 1