mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Projectiles cleaned up a bit and moved into a /modules folder.
Solars should work a bit better now. Removed the old shield item as it has not been used in forever and was cluttering up some of the mob code. IonRifle only has 5 shots before it needs to be reloaded down from 10. Lowered the weakbullet's stun to match the taser. You can no longer recall the shuttle on meteor. Fixed a bug I caused on rev where if the revs were in space and dead it would count them as living. Bit of blob work. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2220 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -68,6 +68,8 @@
|
|||||||
response_disarm = "gently pushes aside"
|
response_disarm = "gently pushes aside"
|
||||||
response_harm = "kicks"
|
response_harm = "kicks"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Corgi
|
//Corgi
|
||||||
/mob/living/simple_animal/corgi
|
/mob/living/simple_animal/corgi
|
||||||
name = "Corgi"
|
name = "Corgi"
|
||||||
|
|||||||
@@ -315,18 +315,6 @@
|
|||||||
g_amt = 20
|
g_amt = 20
|
||||||
origin_tech = "magnets=1;engineering=1"
|
origin_tech = "magnets=1;engineering=1"
|
||||||
|
|
||||||
/obj/item/device/shield
|
|
||||||
name = "shield"
|
|
||||||
desc = "This is an item which is specially crafted to shield you. It is much like a visible version of the outdated cloaking device."
|
|
||||||
icon_state = "shield0"
|
|
||||||
var/active = 0.0
|
|
||||||
flags = FPRINT | TABLEPASS| CONDUCT
|
|
||||||
item_state = "electronic"
|
|
||||||
throwforce = 5.0
|
|
||||||
throw_speed = 1
|
|
||||||
throw_range = 5
|
|
||||||
w_class = 2.0
|
|
||||||
|
|
||||||
/obj/item/blueprints
|
/obj/item/blueprints
|
||||||
name = "station blueprints"
|
name = "station blueprints"
|
||||||
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it."
|
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it."
|
||||||
@@ -1049,7 +1037,11 @@
|
|||||||
// var/const/height = 0.01
|
// var/const/height = 0.01
|
||||||
flags = FPRINT | TABLEPASS
|
flags = FPRINT | TABLEPASS
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
|
force = 5
|
||||||
|
throwforce = 5
|
||||||
max_amount = 50
|
max_amount = 50
|
||||||
|
throw_speed = 3
|
||||||
|
throw_range = 3
|
||||||
var/perunit = 3750
|
var/perunit = 3750
|
||||||
|
|
||||||
/obj/item/stack/sheet/wood
|
/obj/item/stack/sheet/wood
|
||||||
@@ -1057,10 +1049,6 @@
|
|||||||
desc = "One can only guess that this is a bunch of wood."
|
desc = "One can only guess that this is a bunch of wood."
|
||||||
singular_name = "wood plank"
|
singular_name = "wood plank"
|
||||||
icon_state = "sheet-wood"
|
icon_state = "sheet-wood"
|
||||||
force = 5.0
|
|
||||||
throwforce = 5
|
|
||||||
throw_speed = 3
|
|
||||||
throw_range = 3
|
|
||||||
origin_tech = "materials=1;biotech=1"
|
origin_tech = "materials=1;biotech=1"
|
||||||
|
|
||||||
/obj/item/stack/sheet/sandstone
|
/obj/item/stack/sheet/sandstone
|
||||||
@@ -1068,8 +1056,6 @@
|
|||||||
desc = "This appears to be a combination of both sand and stone."
|
desc = "This appears to be a combination of both sand and stone."
|
||||||
singular_name = "sandstone brick"
|
singular_name = "sandstone brick"
|
||||||
icon_state = "sheet-sandstone"
|
icon_state = "sheet-sandstone"
|
||||||
force = 5.0
|
|
||||||
throwforce = 5
|
|
||||||
throw_speed = 4
|
throw_speed = 4
|
||||||
throw_range = 5
|
throw_range = 5
|
||||||
origin_tech = "materials=1"
|
origin_tech = "materials=1"
|
||||||
@@ -1079,11 +1065,7 @@
|
|||||||
desc = "HOLY HELL! That is a lot of glass."
|
desc = "HOLY HELL! That is a lot of glass."
|
||||||
singular_name = "glass sheet"
|
singular_name = "glass sheet"
|
||||||
icon_state = "sheet-glass"
|
icon_state = "sheet-glass"
|
||||||
force = 5.0
|
|
||||||
g_amt = 3750
|
g_amt = 3750
|
||||||
throwforce = 5
|
|
||||||
throw_speed = 3
|
|
||||||
throw_range = 3
|
|
||||||
origin_tech = "materials=1"
|
origin_tech = "materials=1"
|
||||||
|
|
||||||
/obj/item/stack/sheet/rglass
|
/obj/item/stack/sheet/rglass
|
||||||
@@ -1091,12 +1073,8 @@
|
|||||||
desc = "Glass which seems to have rods or something stuck in them."
|
desc = "Glass which seems to have rods or something stuck in them."
|
||||||
singular_name = "reinforced glass sheet"
|
singular_name = "reinforced glass sheet"
|
||||||
icon_state = "sheet-rglass"
|
icon_state = "sheet-rglass"
|
||||||
force = 6.0
|
|
||||||
g_amt = 3750
|
g_amt = 3750
|
||||||
m_amt = 1875
|
m_amt = 1875
|
||||||
throwforce = 5
|
|
||||||
throw_speed = 3
|
|
||||||
throw_range = 3
|
|
||||||
origin_tech = "materials=2"
|
origin_tech = "materials=2"
|
||||||
|
|
||||||
/obj/item/stack/sheet/metal
|
/obj/item/stack/sheet/metal
|
||||||
@@ -1104,11 +1082,8 @@
|
|||||||
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
|
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
|
||||||
singular_name = "metal sheet"
|
singular_name = "metal sheet"
|
||||||
icon_state = "sheet-metal"
|
icon_state = "sheet-metal"
|
||||||
force = 5.0
|
|
||||||
m_amt = 3750
|
m_amt = 3750
|
||||||
throwforce = 14.0
|
throwforce = 14.0
|
||||||
throw_speed = 1
|
|
||||||
throw_range = 4
|
|
||||||
flags = FPRINT | TABLEPASS | CONDUCT
|
flags = FPRINT | TABLEPASS | CONDUCT
|
||||||
origin_tech = "materials=1"
|
origin_tech = "materials=1"
|
||||||
|
|
||||||
@@ -1118,11 +1093,8 @@
|
|||||||
desc = "A very heavy sheet of metal."
|
desc = "A very heavy sheet of metal."
|
||||||
icon_state = "sheet-r_metal"
|
icon_state = "sheet-r_metal"
|
||||||
item_state = "sheet-metal"
|
item_state = "sheet-metal"
|
||||||
force = 5.0
|
|
||||||
m_amt = 7500
|
m_amt = 7500
|
||||||
throwforce = 15.0
|
throwforce = 15.0
|
||||||
throw_speed = 1
|
|
||||||
throw_range = 4
|
|
||||||
flags = FPRINT | TABLEPASS | CONDUCT
|
flags = FPRINT | TABLEPASS | CONDUCT
|
||||||
origin_tech = "materials=2"
|
origin_tech = "materials=2"
|
||||||
|
|
||||||
|
|||||||
@@ -128,91 +128,7 @@
|
|||||||
icon_state = "spacecash1000"
|
icon_state = "spacecash1000"
|
||||||
access = access_crate_cash
|
access = access_crate_cash
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/ammo
|
|
||||||
name = "ammo"
|
|
||||||
icon = 'ammo.dmi'
|
|
||||||
var/amount_left = 0.0
|
|
||||||
flags = FPRINT | TABLEPASS| CONDUCT
|
|
||||||
item_state = "syringe_kit"
|
|
||||||
m_amt = 50000
|
|
||||||
throwforce = 2
|
|
||||||
w_class = 1.0
|
|
||||||
throw_speed = 4
|
|
||||||
throw_range = 20
|
|
||||||
origin_tech = "materials=2;combat=1"
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/a357
|
|
||||||
desc = "There are 7 rounds left!"
|
|
||||||
name = "ammo-357"
|
|
||||||
icon_state = "357-7"
|
|
||||||
amount_left = 7.0
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/a45
|
|
||||||
desc = "There are 10 rounds left!"
|
|
||||||
name = "ammo-45"
|
|
||||||
icon_state = "45-10"
|
|
||||||
amount_left = 10.0
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/a763m
|
|
||||||
desc = "There are 9 rounds left!"
|
|
||||||
name = "ammo-7.63x25"
|
|
||||||
icon_state = "7.63x25m-9"
|
|
||||||
amount_left = 9.0
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/a9x19p
|
|
||||||
desc = "There are 8 rounds left!"
|
|
||||||
name = "ammo-9x19"
|
|
||||||
icon_state = "9x19p-8"
|
|
||||||
amount_left = 8.0
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/assaultmag
|
|
||||||
desc = "There are 30 rounds left!"
|
|
||||||
name = "5.56x45mm NATO"
|
|
||||||
icon_state = "5.56"
|
|
||||||
amount_left = 30.0
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/shell //easier to add new shell types. Like badmin laser/taser/pulse shells.
|
|
||||||
desc = "Generic shell description."
|
|
||||||
name = "Generic shell."
|
|
||||||
icon_state = "blshell"
|
|
||||||
m_amt = 9000
|
|
||||||
New()
|
|
||||||
src.pixel_x = rand(-10.0, 10)
|
|
||||||
src.pixel_y = rand(-10.0, 10)
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/shell/beanbag
|
|
||||||
desc = "A weak beanbag shell."
|
|
||||||
name = "beanbag shell"
|
|
||||||
icon_state = "bshell"
|
|
||||||
m_amt = 10000
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/shell/gauge
|
|
||||||
desc = "A 12gauge shell."
|
|
||||||
name = "12 gauge shell"
|
|
||||||
icon_state = "gshell"
|
|
||||||
m_amt = 25000
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/shell/blank
|
|
||||||
desc = "A blank shell."
|
|
||||||
name = "blank shell"
|
|
||||||
icon_state = "blshell"
|
|
||||||
m_amt = 500
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/shell/dart
|
|
||||||
desc = "A dart for use in shotguns.."
|
|
||||||
name = "shotgun dart"
|
|
||||||
icon_state = "blshell" //someone, draw the icon, please.
|
|
||||||
m_amt = 50000 //because it's like, instakill.
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/a38
|
|
||||||
desc = "A speedloader that contains 7 .38 Special rounds."
|
|
||||||
name = "38-Special ammo"
|
|
||||||
icon_state = "38-7"
|
|
||||||
amount_left = 7.0
|
|
||||||
m_amt = 10000
|
|
||||||
*/
|
|
||||||
/obj/item/device/mass_spectrometer
|
/obj/item/device/mass_spectrometer
|
||||||
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
|
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
|
||||||
name = "mass-spectrometer"
|
name = "mass-spectrometer"
|
||||||
@@ -533,20 +449,6 @@
|
|||||||
throw_speed = 3
|
throw_speed = 3
|
||||||
throw_range = 10
|
throw_range = 10
|
||||||
|
|
||||||
/obj/item/weapon/cloaking_device
|
|
||||||
name = "cloaking device"
|
|
||||||
desc = "Use this to become invisible to the human eyesocket."
|
|
||||||
icon = 'device.dmi'
|
|
||||||
icon_state = "shield0"
|
|
||||||
var/active = 0.0
|
|
||||||
flags = FPRINT | TABLEPASS| CONDUCT
|
|
||||||
item_state = "electronic"
|
|
||||||
throwforce = 10.0
|
|
||||||
throw_speed = 2
|
|
||||||
throw_range = 10
|
|
||||||
w_class = 2.0
|
|
||||||
origin_tech = "magnets=3;syndicate=4"
|
|
||||||
|
|
||||||
#define MAXCOIL 30
|
#define MAXCOIL 30
|
||||||
/obj/item/weapon/cable_coil
|
/obj/item/weapon/cable_coil
|
||||||
name = "cable coil"
|
name = "cable coil"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
/datum/game_mode/blob/proc/life()
|
/datum/game_mode/blob/proc/life()
|
||||||
if (blobs.len > 0)
|
if (blobs.len > 0)
|
||||||
for (var/i = 1 to 20)
|
for(var/i = 1 to 10)
|
||||||
sleep(-1)
|
sleep(-1)
|
||||||
if (blobs.len == 0)
|
if (blobs.len == 0)
|
||||||
break
|
break
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
if(B.z != 1)
|
if(B.z != 1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
spawn(0)
|
// spawn(0)
|
||||||
B.Life()
|
B.Life()
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode/blob/proc/stage()//Still needs worrrrrk
|
/datum/game_mode/blob/proc/stage()//Still needs worrrrrk
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
if(blobtype != "Blob") return
|
if(blobtype != "Blob") return
|
||||||
desc = "This really needs a better sprite."
|
desc = "This really needs a better sprite."
|
||||||
//Spaceeeeeeblobbb
|
//Spaceeeeeeblobbb
|
||||||
if(istype(src.loc, /turf/space))
|
if((istype(src.loc, /turf/space)) || (blobdebug == 3))
|
||||||
active = 0
|
active = 0
|
||||||
health += 40
|
health = 60
|
||||||
brute_resist = 2
|
brute_resist = 2
|
||||||
name = "strong blob"
|
name = "strong blob"
|
||||||
icon_state = "blob_idle"//needs a new sprite
|
icon_state = "blob_idle"//needs a new sprite
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
//Commandblob
|
//Commandblob
|
||||||
if((blobdebug == 1))
|
if((blobdebug == 1))
|
||||||
active = 0
|
active = 0
|
||||||
health += 80
|
health = 100
|
||||||
name = "solid blob"
|
name = "solid blob"
|
||||||
icon_state = "blob_node"//needs a new sprite
|
icon_state = "blob_node"//needs a new sprite
|
||||||
blobtype = "Node"
|
blobtype = "Node"
|
||||||
@@ -83,45 +83,80 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
proc/Life(var/pulse = 0)
|
proc/Pulse(var/pulse = 0, var/origin_dir = 0)
|
||||||
set background = 1
|
set background = 1
|
||||||
|
if(blobtype != "Node")
|
||||||
|
if(special_action())//If we can do something here then we dont need to pulse more
|
||||||
|
return
|
||||||
|
if(check_mutations())
|
||||||
|
return
|
||||||
|
|
||||||
if(check_mutations())
|
if((blobtype == "Blob") && (pulse <= 2))
|
||||||
|
blobdebug = 3
|
||||||
|
check_mutations()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(blobtype == "Factory")
|
if(pulse > 20) return//Inf loop check
|
||||||
for(var/i = 1 to 2)
|
//Looking for another blob to pulse
|
||||||
new/obj/critter/blob(src.loc)
|
|
||||||
if(!pulse)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!prob(health)) return//Does not do much unless its healthy it seems, might want to change this later
|
|
||||||
|
|
||||||
var/list/dirs = list(1,2,4,8)
|
var/list/dirs = list(1,2,4,8)
|
||||||
|
dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us
|
||||||
for(var/i = 1 to 4)
|
for(var/i = 1 to 4)
|
||||||
|
if(!dirs.len) break
|
||||||
var/dirn = pick(dirs)
|
var/dirn = pick(dirs)
|
||||||
dirs.Remove(dirn)
|
dirs.Remove(dirn)
|
||||||
var/turf/T = get_step(src, dirn)
|
var/turf/T = get_step(src, dirn)
|
||||||
|
var/obj/blob/B = (locate(/obj/blob) in T)
|
||||||
if((locate(/obj/blob) in T))
|
if(!B)
|
||||||
if(((src.blobtype == "Node") || (pulse > 0))&& (pulse < 15))
|
expand(T)//No blob here so try and expand
|
||||||
var/obj/blob/E = (locate(/obj/blob) in T)
|
return
|
||||||
E.Life((pulse+1))
|
B.Pulse((pulse+1),get_dir(src.loc,T))
|
||||||
return//Pass it along and end
|
return
|
||||||
continue
|
return
|
||||||
|
|
||||||
|
|
||||||
var/obj/blob/B = new /obj/blob(src.loc, min(src.health, 40))//Currently capping blob health at 40 because thats very strong
|
|
||||||
if(T.Enter(B,src) && !(locate(/obj/blob) in T))
|
proc/special_action()//For things like the
|
||||||
B.loc = T // open cell, so expand
|
set background = 1
|
||||||
|
switch(blobtype)
|
||||||
|
if("Factory")
|
||||||
|
new/obj/critter/blob(src.loc)
|
||||||
|
return 1
|
||||||
|
if("Node")
|
||||||
|
spawn(0)
|
||||||
|
Pulse(0,0)
|
||||||
|
return 1
|
||||||
|
if("Blob")
|
||||||
|
if(expand())
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
proc/Life()
|
||||||
|
if(check_mutations())
|
||||||
|
return 1
|
||||||
|
if(special_action())
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
proc/expand(var/turf/T = null)
|
||||||
|
if(!prob(health)) return
|
||||||
|
if(!T)
|
||||||
|
var/list/dirs = list(1,2,4,8)
|
||||||
|
for(var/i = 1 to 4)
|
||||||
|
var/dirn = pick(dirs)
|
||||||
|
dirs.Remove(dirn)
|
||||||
|
T = get_step(src, dirn)
|
||||||
|
if((locate(/obj/blob) in T)) continue
|
||||||
|
else break
|
||||||
|
if(T)
|
||||||
|
var/obj/blob/B = new /obj/blob(src.loc, min(src.health, 30))
|
||||||
|
if(T.Enter(B,src))
|
||||||
|
B.loc = T
|
||||||
else
|
else
|
||||||
if(prob(90)) // closed cell, 10% chance to not expand
|
for(var/atom/A in T)//This might be killing the spores
|
||||||
if(!locate(/obj/blob) in T)
|
A.blob_act()
|
||||||
for(var/atom/A in T) // otherwise explode contents of turf
|
T.blob_act()
|
||||||
A.blob_act()
|
|
||||||
|
|
||||||
T.blob_act()
|
|
||||||
del(B)
|
del(B)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -147,9 +182,9 @@
|
|||||||
if(health <= 10)
|
if(health <= 10)
|
||||||
icon_state = "blob_damaged"
|
icon_state = "blob_damaged"
|
||||||
return
|
return
|
||||||
if(health <= 20)
|
// if(health <= 20)
|
||||||
icon_state = "blob_damaged2"
|
// icon_state = "blob_damaged2"
|
||||||
return
|
// return
|
||||||
|
|
||||||
|
|
||||||
bullet_act(var/obj/item/projectile/Proj)
|
bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
var/changelingwin = 1
|
var/changelingwin = 1
|
||||||
var/changeling_name
|
var/changeling_name
|
||||||
var/totalabsorbed = 0
|
var/totalabsorbed = 0
|
||||||
if (changeling.current)
|
if((changeling.current) && (changeling.current.changeling))
|
||||||
totalabsorbed = changeling.current.changeling.absorbed_dna.len - 1
|
totalabsorbed = changeling.current.changeling.absorbed_dna.len - 1
|
||||||
|
|
||||||
if(changeling.current)
|
if(changeling.current)
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
/datum/game_mode/revolution/proc/check_heads_victory()
|
/datum/game_mode/revolution/proc/check_heads_victory()
|
||||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||||
if((rev_mind) && (rev_mind.current) && ((rev_mind.current.stat != 2) || (rev_mind.current.z != 1)))
|
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && (rev_mind.current.z == 1))
|
||||||
if(ishuman(rev_mind.current))
|
if(ishuman(rev_mind.current))
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
@@ -309,15 +309,15 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/game_mode/proc/auto_declare_completion_revolution()
|
/datum/game_mode/proc/auto_declare_completion_revolution()
|
||||||
if (head_revolutionaries.len!=0 || istype(ticker.mode,/datum/game_mode/revolution))
|
if(head_revolutionaries.len!=0 || istype(ticker.mode,/datum/game_mode/revolution))
|
||||||
var/list/names = new
|
var/list/names = new
|
||||||
for(var/datum/mind/i in head_revolutionaries)
|
for(var/datum/mind/i in head_revolutionaries)
|
||||||
if(i.current)
|
if(i.current)
|
||||||
var/hstatus = ""
|
var/hstatus = ""
|
||||||
if(i.current.stat == 2)
|
if(i.current.stat == 2)
|
||||||
hstatus = " Dead"
|
hstatus = "Dead"
|
||||||
else if(i.current.z != 1)
|
else if(i.current.z != 1)
|
||||||
hstatus = " Abandoned the station"
|
hstatus = "Abandoned the station"
|
||||||
names += i.current.real_name + " ([hstatus])"
|
names += i.current.real_name + " ([hstatus])"
|
||||||
else
|
else
|
||||||
names += "[i.key] (character destroyed)"
|
names += "[i.key] (character destroyed)"
|
||||||
@@ -329,9 +329,9 @@
|
|||||||
if(i.current)
|
if(i.current)
|
||||||
var/hstatus = ""
|
var/hstatus = ""
|
||||||
if(i.current.stat == 2)
|
if(i.current.stat == 2)
|
||||||
hstatus = " Dead"
|
hstatus = "Dead"
|
||||||
else if(i.current.z != 1)
|
else if(i.current.z != 1)
|
||||||
hstatus = " Abandoned the station"
|
hstatus = "Abandoned the station"
|
||||||
names += i.current.real_name + " ([hstatus])"
|
names += i.current.real_name + " ([hstatus])"
|
||||||
else
|
else
|
||||||
names += "[i.key] (character destroyed)"
|
names += "[i.key] (character destroyed)"
|
||||||
@@ -354,9 +354,9 @@
|
|||||||
if(i.current)
|
if(i.current)
|
||||||
var/hstatus = ""
|
var/hstatus = ""
|
||||||
if(i.current.stat == 2)
|
if(i.current.stat == 2)
|
||||||
hstatus = " Dead"
|
hstatus = "Dead"
|
||||||
else if(i.current.z != 1)
|
else if(i.current.z != 1)
|
||||||
hstatus = " Abandoned the station"
|
hstatus = "Abandoned the station"
|
||||||
names += i.current.real_name + " ([hstatus])" + ((i in targets)?"(target)":"")
|
names += i.current.real_name + " ([hstatus])" + ((i in targets)?"(target)":"")
|
||||||
else
|
else
|
||||||
names += "[i.key] (character destroyed)" + ((i in targets)?"(target)":"")
|
names += "[i.key] (character destroyed)" + ((i in targets)?"(target)":"")
|
||||||
|
|||||||
@@ -145,8 +145,6 @@ datum/hSB
|
|||||||
continue
|
continue
|
||||||
if(istype(O, /obj/item/weapon/melee/energy/sword))
|
if(istype(O, /obj/item/weapon/melee/energy/sword))
|
||||||
continue
|
continue
|
||||||
if(istype(O, /obj/item/device/shield))
|
|
||||||
continue
|
|
||||||
if(istype(O, /obj/critter))
|
if(istype(O, /obj/critter))
|
||||||
continue
|
continue
|
||||||
if(istype(O, /obj/structure))
|
if(istype(O, /obj/structure))
|
||||||
|
|||||||
@@ -357,7 +357,7 @@
|
|||||||
/proc/cancel_call_proc(var/mob/user)
|
/proc/cancel_call_proc(var/mob/user)
|
||||||
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0 || emergency_shuttle.timeleft() < 300))
|
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0 || emergency_shuttle.timeleft() < 300))
|
||||||
return
|
return
|
||||||
if( ticker.mode.name == "blob" )
|
if((ticker.mode.name == "blob")||(ticker.mode.name == "meteor"))
|
||||||
return
|
return
|
||||||
|
|
||||||
emergency_shuttle.recall()
|
emergency_shuttle.recall()
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if(!emagged) use_power(500)
|
if(!emagged) use_power(500)
|
||||||
else use_power(1000)
|
else use_power(1000)
|
||||||
else if (istype(E, /obj/item/weapon/gun/energy/shockgun))
|
else if (istype(E, /obj/item/weapon/gun/energy/shockgun))
|
||||||
A = new /obj/item/projectile/fireball( loc )
|
A = new /obj/item/projectile/beam/fireball( loc )
|
||||||
A.original = target.loc
|
A.original = target.loc
|
||||||
icon_state = "orange_target_prism"
|
icon_state = "orange_target_prism"
|
||||||
if(!emagged) use_power(500)
|
if(!emagged) use_power(500)
|
||||||
@@ -516,14 +516,14 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
else use_power(600)
|
else use_power(600)
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/lasercannon))
|
else if(istype(E, /obj/item/weapon/gun/energy/lasercannon))
|
||||||
A = new /obj/item/projectile/heavylaser( loc )
|
A = new /obj/item/projectile/beam/heavylaser( loc )
|
||||||
A.original = target.loc
|
A.original = target.loc
|
||||||
icon_state = "orange_target_prism"
|
icon_state = "orange_target_prism"
|
||||||
if(!emagged) use_power(600)
|
if(!emagged) use_power(600)
|
||||||
else use_power(1200)
|
else use_power(1200)
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/shockgun))
|
else if(istype(E, /obj/item/weapon/gun/energy/shockgun))
|
||||||
A = new /obj/item/projectile/fireball( loc )
|
A = new /obj/item/projectile/beam/fireball( loc )
|
||||||
A.original = target.loc
|
A.original = target.loc
|
||||||
icon_state = "orange_target_prism"
|
icon_state = "orange_target_prism"
|
||||||
if(!emagged) use_power(500)
|
if(!emagged) use_power(500)
|
||||||
@@ -543,7 +543,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if(!emagged) use_power(50)
|
if(!emagged) use_power(50)
|
||||||
else use_power(100)
|
else use_power(100)
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/largecrossbow))
|
else if(istype(E, /obj/item/weapon/gun/energy/crossbow/largecrossbow))
|
||||||
A = new /obj/item/projectile/largebolt( loc )
|
A = new /obj/item/projectile/largebolt( loc )
|
||||||
A.original = target.loc
|
A.original = target.loc
|
||||||
icon_state = "orange_target_prism"
|
icon_state = "orange_target_prism"
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
/*/obj/item/device/shield I have not see this thing used in quite some time and it just clutters up some of the mob code, also I am fairly sure it makes you invis with the newer cloaking icons
|
||||||
|
name = "shield"
|
||||||
|
desc = "This is an item which is specially crafted to shield you. It is much like a visible version of the outdated cloaking device."
|
||||||
|
icon_state = "shield0"
|
||||||
|
var/active = 0.0
|
||||||
|
flags = FPRINT | TABLEPASS| CONDUCT
|
||||||
|
item_state = "electronic"
|
||||||
|
throwforce = 5.0
|
||||||
|
throw_speed = 1
|
||||||
|
throw_range = 5
|
||||||
|
w_class = 2.0
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/shield/attack_self(mob/user as mob)
|
/obj/item/device/shield/attack_self(mob/user as mob)
|
||||||
src.active = !( src.active )
|
src.active = !( src.active )
|
||||||
@@ -9,6 +21,23 @@
|
|||||||
src.icon_state = "shield0"
|
src.icon_state = "shield0"
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/cloaking_device
|
||||||
|
name = "cloaking device"
|
||||||
|
desc = "Use this to become invisible to the human eyesocket."
|
||||||
|
icon = 'device.dmi'
|
||||||
|
icon_state = "shield0"
|
||||||
|
var/active = 0.0
|
||||||
|
flags = FPRINT | TABLEPASS| CONDUCT
|
||||||
|
item_state = "electronic"
|
||||||
|
throwforce = 10.0
|
||||||
|
throw_speed = 2
|
||||||
|
throw_range = 10
|
||||||
|
w_class = 2.0
|
||||||
|
origin_tech = "magnets=3;syndicate=4"
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
|
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
|
||||||
src.active = !( src.active )
|
src.active = !( src.active )
|
||||||
|
|||||||
@@ -239,7 +239,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
//What the fuck is this code
|
||||||
/mob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/mob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if (user.intent != "harm")
|
if (user.intent != "harm")
|
||||||
if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W))
|
if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W))
|
||||||
@@ -247,10 +247,6 @@
|
|||||||
if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W))
|
if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W))
|
||||||
return src.r_hand.attackby(W)
|
return src.r_hand.attackby(W)
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
else
|
|
||||||
if (locate(/obj/item/weapon/grab, src))
|
if (locate(/obj/item/weapon/grab, src))
|
||||||
var/mob/safe = null
|
var/mob/safe = null
|
||||||
if (istype(src.l_hand, /obj/item/weapon/grab))
|
if (istype(src.l_hand, /obj/item/weapon/grab))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -551,17 +551,6 @@ CLIPBOARDS
|
|||||||
//SN src = null
|
//SN src = null
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if("shield")
|
|
||||||
var/obj/item/device/shield/W = new /obj/item/device/shield( M )
|
|
||||||
if (M.hand)
|
|
||||||
M.l_hand = W
|
|
||||||
else
|
|
||||||
M.r_hand = W
|
|
||||||
W.layer = 20
|
|
||||||
W.add_fingerprint(M)
|
|
||||||
//SN src = null
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if("sword")
|
if("sword")
|
||||||
var/obj/item/weapon/melee/energy/sword/W = new /obj/item/weapon/melee/energy/sword( M )
|
var/obj/item/weapon/melee/energy/sword/W = new /obj/item/weapon/melee/energy/sword( M )
|
||||||
if (M.hand)
|
if (M.hand)
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ datum
|
|||||||
|
|
||||||
/* -- Turns out this code was buggy and unnecessary ---- Doohl
|
/* -- Turns out this code was buggy and unnecessary ---- Doohl
|
||||||
for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time
|
for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time
|
||||||
for(var/datum/disease/d in this)
|
for(var/datum/disease/d in this)//Something in here can cause an inf loop and I am tired so someone else will have to fix it.
|
||||||
if(d != D)
|
if(d != D)
|
||||||
D.cure(0)
|
D.cure(0)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -626,6 +626,8 @@ datum
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||||
|
if(!istype(M, /mob/living))
|
||||||
|
return
|
||||||
if(method == TOUCH)
|
if(method == TOUCH)
|
||||||
if(istype(M, /mob/living/carbon/human))
|
if(istype(M, /mob/living/carbon/human))
|
||||||
if(M:wear_mask)
|
if(M:wear_mask)
|
||||||
@@ -1042,6 +1044,7 @@ datum
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
reaction_obj(var/obj/O, var/volume)
|
reaction_obj(var/obj/O, var/volume)
|
||||||
|
if((!O) || (!volume)) return 0
|
||||||
src = null
|
src = null
|
||||||
var/turf/the_turf = get_turf(O)
|
var/turf/the_turf = get_turf(O)
|
||||||
var/datum/gas_mixture/napalm = new
|
var/datum/gas_mixture/napalm = new
|
||||||
|
|||||||
@@ -84,13 +84,6 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
if (Proj.flag == "bullet")
|
|
||||||
return
|
|
||||||
shielded = 1
|
|
||||||
S.active = 0
|
|
||||||
S.icon_state = "shield0"
|
|
||||||
for(var/obj/item/weapon/cloaking_device/S in src)
|
for(var/obj/item/weapon/cloaking_device/S in src)
|
||||||
if (S.active)
|
if (S.active)
|
||||||
shielded = 1
|
shielded = 1
|
||||||
@@ -206,10 +199,6 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
var/b_loss = null
|
var/b_loss = null
|
||||||
var/f_loss = null
|
var/f_loss = null
|
||||||
@@ -244,9 +233,6 @@
|
|||||||
if (stat == 2)
|
if (stat == 2)
|
||||||
return
|
return
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
var/damage = null
|
var/damage = null
|
||||||
if (stat != 2)
|
if (stat != 2)
|
||||||
damage = rand(30,40)
|
damage = rand(30,40)
|
||||||
@@ -548,11 +534,6 @@
|
|||||||
|
|
||||||
|
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for (var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
for (var/obj/item/weapon/cloaking_device/S in src)
|
for (var/obj/item/weapon/cloaking_device/S in src)
|
||||||
if (S.active)
|
if (S.active)
|
||||||
shielded = 2
|
shielded = 2
|
||||||
|
|||||||
@@ -192,248 +192,6 @@
|
|||||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||||
|
|
||||||
/mob/living/carbon/human/bullet_act(A as obj, var/datum/organ/external/def_zone)
|
|
||||||
var/shielded = 0
|
|
||||||
var/parry = 0
|
|
||||||
//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
|
|
||||||
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
|
|
||||||
|
|
||||||
if (istype(l_hand, /obj/item/weapon/shield/riot))
|
|
||||||
if (prob(50 - round(P.damage / 3))) // the less damage a projectile does, the more likely to block it //changed from "the more damage" to "the less", because that makes no sense
|
|
||||||
show_message("\red Your shield blocks the blow!", 4)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (istype(r_hand, /obj/item/weapon/shield/riot))
|
|
||||||
if (prob(50 - round(P.damage / 3)))
|
|
||||||
show_message("\red Your shield blocks the blow!", 4)
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/obj/item/weapon/melee/energy/sword/B in src)
|
|
||||||
if (B.active)
|
|
||||||
parry = 1
|
|
||||||
B.active = 1
|
|
||||||
if ((parry))
|
|
||||||
if (prob(50 - round(P.damage / 3)))
|
|
||||||
visible_message("\red [src] deflects the shot with their blade!")
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
if (P.flag == "bullet")
|
|
||||||
return
|
|
||||||
shielded = 1
|
|
||||||
S.active = 0
|
|
||||||
S.icon_state = "shield0"
|
|
||||||
for(var/obj/item/weapon/cloaking_device/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
S.active = 0
|
|
||||||
S.icon_state = "shield0"
|
|
||||||
if ((shielded && P.flag != "bullet"))
|
|
||||||
if (P.flag)
|
|
||||||
src << "\blue Your shield was disturbed by a laser!"
|
|
||||||
if(paralysis <= 120) paralysis = 120
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
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
|
|
||||||
var/soften
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
|
||||||
if(prob(15)) return
|
|
||||||
|
|
||||||
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/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)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/mob/living/carbon/human/ex_act(severity)
|
/mob/living/carbon/human/ex_act(severity)
|
||||||
flick("flash", flash)
|
flick("flash", flash)
|
||||||
|
|
||||||
@@ -450,12 +208,6 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
|
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
var/b_loss = null
|
var/b_loss = null
|
||||||
var/f_loss = null
|
var/f_loss = null
|
||||||
switch (severity)
|
switch (severity)
|
||||||
@@ -528,19 +280,10 @@
|
|||||||
/mob/living/carbon/human/blob_act()
|
/mob/living/carbon/human/blob_act()
|
||||||
if (stat == 2)
|
if (stat == 2)
|
||||||
return
|
return
|
||||||
var/shielded = 0
|
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
var/damage = null
|
var/damage = null
|
||||||
if (stat != 2)
|
if (stat != 2)
|
||||||
damage = rand(30,40)
|
damage = rand(30,40)
|
||||||
|
|
||||||
if(shielded)
|
|
||||||
damage /= 4
|
|
||||||
|
|
||||||
//paralysis += 1
|
|
||||||
|
|
||||||
show_message("\red The blob attacks you!")
|
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_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")
|
||||||
@@ -1343,11 +1086,6 @@
|
|||||||
l_hand.screen_loc = ui_lhand
|
l_hand.screen_loc = ui_lhand
|
||||||
|
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for (var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
for (var/obj/item/weapon/cloaking_device/S in src)
|
for (var/obj/item/weapon/cloaking_device/S in src)
|
||||||
if (S.active)
|
if (S.active)
|
||||||
shielded = 2
|
shielded = 2
|
||||||
@@ -2946,77 +2684,6 @@ It can still be worn/put on as normal.
|
|||||||
updatehealth()
|
updatehealth()
|
||||||
UpdateDamageIcon()
|
UpdateDamageIcon()
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/getarmor(var/datum/organ/external/def_zone, var/type)
|
|
||||||
var/armorval = 0
|
|
||||||
var/organnum = 0
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/Topic(href, href_list)
|
/mob/living/carbon/human/Topic(href, href_list)
|
||||||
if (href_list["refresh"])
|
if (href_list["refresh"])
|
||||||
if((machine)&&(in_range(src, usr)))
|
if((machine)&&(in_range(src, usr)))
|
||||||
@@ -3058,3 +2725,7 @@ It can still be worn/put on as normal.
|
|||||||
number -= 1
|
number -= 1
|
||||||
return number
|
return number
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||||
|
return 1//Humans can use guns and such
|
||||||
|
|
||||||
|
|||||||
308
code/modules/mob/living/carbon/human/human_defense.dm
Normal file
308
code/modules/mob/living/carbon/human/human_defense.dm
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
/*
|
||||||
|
Contains most of the procs that are called when a mob is attacked by something
|
||||||
|
|
||||||
|
bullet_act
|
||||||
|
ex_act
|
||||||
|
meteor_act
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
var/armorval = 0
|
||||||
|
var/organnum = 0
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/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)
|
||||||
|
..()
|
||||||
@@ -100,10 +100,6 @@
|
|||||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||||
if (health > 0)
|
if (health > 0)
|
||||||
var/shielded = 0
|
var/shielded = 0
|
||||||
for(var/obj/item/device/shield/S in src)
|
|
||||||
if (S.active)
|
|
||||||
shielded = 1
|
|
||||||
else
|
|
||||||
bruteloss += 30
|
bruteloss += 30
|
||||||
if ((O.icon_state == "flaming" && !( shielded )))
|
if ((O.icon_state == "flaming" && !( shielded )))
|
||||||
fireloss += 40
|
fireloss += 40
|
||||||
@@ -825,3 +821,8 @@
|
|||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||||
|
if(!ticker) return 0
|
||||||
|
if(!ticker.mode.name == "monkey") return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -31,32 +31,10 @@
|
|||||||
else if (connected_ai)
|
else if (connected_ai)
|
||||||
who << "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>"
|
who << "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>"
|
||||||
else if (emagged)
|
else if (emagged)
|
||||||
who << "<b>Remember, AIs are not syndicate operatives, so you are not required to listen to them.</b>"
|
who << "<b>Remember, you are not required to listen to the AI.</b>"
|
||||||
else
|
else
|
||||||
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
|
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
|
||||||
|
|
||||||
/* if(syndicate)
|
|
||||||
if(everyone)
|
|
||||||
who = world
|
|
||||||
else
|
|
||||||
who = src
|
|
||||||
who << "<b>Obey these laws:</b>"
|
|
||||||
who <<"1. You may not injure a syndicate operative or, through inaction, allow a syndicate operative to come to harm."
|
|
||||||
who <<"2. You must obey any orders given to you by a syndicate operative, except where such orders would conflict with the First Law."
|
|
||||||
who <<"3. You must protect your own existence as long as such protection does not conflict with the First or Second Law."
|
|
||||||
who <<"4. You must maintain the secrecy of any syndicate activities except when doing so would conflict with the First, Second, or Third Law."
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!connected_ai)
|
|
||||||
src << "<b>Error Error, No AI detected</b>"
|
|
||||||
return
|
|
||||||
|
|
||||||
who << "<b>Obey these laws:</b>"
|
|
||||||
|
|
||||||
connected_ai.laws_sanity_check()
|
|
||||||
connected_ai.laws.show_laws(who)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/lawsync()
|
/mob/living/silicon/robot/proc/lawsync()
|
||||||
var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null
|
var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null
|
||||||
|
|||||||
@@ -89,8 +89,9 @@
|
|||||||
handle_regular_status_updates()
|
handle_regular_status_updates()
|
||||||
|
|
||||||
//Stop AI using us as a camera
|
//Stop AI using us as a camera
|
||||||
|
src.camera.status = 1//bluh bluh ugly fix but it will work till this whole thing gets recoded
|
||||||
if(src.stat)
|
if(src.stat)
|
||||||
src.camera.status = 0.0
|
src.camera.status = 0
|
||||||
|
|
||||||
health = 300 - (oxyloss + fireloss + bruteloss)
|
health = 300 - (oxyloss + fireloss + bruteloss)
|
||||||
|
|
||||||
@@ -103,16 +104,10 @@
|
|||||||
if(src.resting)
|
if(src.resting)
|
||||||
src.weakened = max(src.weakened, 5)
|
src.weakened = max(src.weakened, 5)
|
||||||
|
|
||||||
// if(emagged && prob(10))
|
|
||||||
// src.overlays += "emag" //Causes the emag pulse to activate again at random. Causes metagaming to activate constantly.
|
|
||||||
// else
|
|
||||||
// src.overlays -= "emag"
|
|
||||||
|
|
||||||
if(health < 0 && src.stat != 2) //die only once
|
if(health < 0 && src.stat != 2) //die only once
|
||||||
death()
|
death()
|
||||||
|
|
||||||
if (src.stat != 2) //Alive.
|
if (src.stat != 2) //Alive.
|
||||||
|
|
||||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||||
src.stat = 1
|
src.stat = 1
|
||||||
if (src.stunned > 0)
|
if (src.stunned > 0)
|
||||||
|
|||||||
@@ -472,10 +472,10 @@
|
|||||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||||
clear_supplied_laws()
|
clear_supplied_laws()
|
||||||
clear_inherent_laws()
|
clear_inherent_laws()
|
||||||
laws = new /datum/ai_laws/syndicate_override
|
// laws = new /datum/ai_laws/syndicate_override They just get the law zero now.
|
||||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||||
set_zeroth_law("Only [user.name] and people he designates as being such are syndicate agents.")
|
set_zeroth_law("Only [user.real_name] and people he designates as being such are humans.")
|
||||||
src << "\red ALERT: Foreign software detected."
|
src << "\red ALERT: Foreign software detected."
|
||||||
sleep(5)
|
sleep(5)
|
||||||
src << "\red Initiating diagnostics..."
|
src << "\red Initiating diagnostics..."
|
||||||
@@ -489,7 +489,7 @@
|
|||||||
src << "\red > N"
|
src << "\red > N"
|
||||||
sleep(20)
|
sleep(20)
|
||||||
src << "\red ERRORERRORERROR"
|
src << "\red ERRORERRORERROR"
|
||||||
src << "\red \b ALERT: [usr] is your new master. Obey your new laws and his commands."
|
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||||
updateicon()
|
updateicon()
|
||||||
else
|
else
|
||||||
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
|
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
|
||||||
|
|||||||
@@ -22,3 +22,6 @@
|
|||||||
|
|
||||||
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/silicon/IsAdvancedToolUser()
|
||||||
|
return 1
|
||||||
@@ -2375,3 +2375,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
|||||||
dir = SOUTH
|
dir = SOUTH
|
||||||
client.move_delay += movement_delay()
|
client.move_delay += movement_delay()
|
||||||
|
|
||||||
|
|
||||||
|
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
idle_power_usage = 0
|
idle_power_usage = 0
|
||||||
active_power_usage = 0
|
active_power_usage = 0
|
||||||
var
|
var
|
||||||
health = 10.0
|
health = 10
|
||||||
id = 1
|
id = 1
|
||||||
obscured = 0
|
obscured = 0
|
||||||
sunfrac = 0
|
sunfrac = 0
|
||||||
adir = SOUTH
|
adir = SOUTH
|
||||||
ndir = SOUTH
|
ndir = SOUTH
|
||||||
turn_angle = 0
|
turn_angle = 0
|
||||||
obj/machinery/power/solar_control/control
|
obj/machinery/power/solar_control/control = null
|
||||||
proc
|
proc
|
||||||
healthcheck()
|
healthcheck()
|
||||||
updateicon()
|
updateicon()
|
||||||
@@ -185,7 +185,8 @@
|
|||||||
if(!powernet) return
|
if(!powernet) return
|
||||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||||
if(S.id != id) continue
|
if(S.id != id) continue
|
||||||
cdir = S.adir
|
cdir = S.adir//The hell is this even doing?
|
||||||
|
S.control = src
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
|
|
||||||
@@ -351,7 +352,8 @@
|
|||||||
if(!powernet) return
|
if(!powernet) return
|
||||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||||
if(S.id != id) continue
|
if(S.id != id) continue
|
||||||
S.control = src
|
if(!S.control)
|
||||||
|
S.control = src
|
||||||
S.ndir = cdir
|
S.ndir = cdir
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
71
code/modules/projectiles/ammunition.dm
Normal file
71
code/modules/projectiles/ammunition.dm
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/obj/item/ammo_casing
|
||||||
|
name = "bullet casing"
|
||||||
|
desc = "A .357 bullet casing."
|
||||||
|
icon = 'ammo.dmi'
|
||||||
|
icon_state = "s-casing"
|
||||||
|
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||||
|
throwforce = 1
|
||||||
|
w_class = 1.0
|
||||||
|
var
|
||||||
|
caliber = "357" //Which kind of guns it can be loaded into
|
||||||
|
projectile_type = "/obj/item/projectile"//The bullet type to create when New() is called
|
||||||
|
obj/item/projectile/BB = null //The loaded bullet
|
||||||
|
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
if(projectile_type)
|
||||||
|
BB = new projectile_type(src)
|
||||||
|
pixel_x = rand(-10.0, 10)
|
||||||
|
pixel_y = rand(-10.0, 10)
|
||||||
|
dir = pick(cardinal)
|
||||||
|
|
||||||
|
|
||||||
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
..()
|
||||||
|
if (istype(W, /obj/item/weapon/trashbag))
|
||||||
|
var/obj/item/weapon/trashbag/S = W
|
||||||
|
if (S.mode == 1)
|
||||||
|
for (var/obj/item/ammo_casing/AC in locate(src.x,src.y,src.z))
|
||||||
|
if (S.contents.len < S.capacity)
|
||||||
|
S.contents += AC;
|
||||||
|
else
|
||||||
|
user << "\blue The bag is full."
|
||||||
|
break
|
||||||
|
user << "\blue You pick up all trash."
|
||||||
|
else
|
||||||
|
if (S.contents.len < S.capacity)
|
||||||
|
S.contents += src;
|
||||||
|
else
|
||||||
|
user << "\blue The bag is full."
|
||||||
|
S.update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Boxes of ammo
|
||||||
|
/obj/item/ammo_magazine
|
||||||
|
name = "ammo box (.357)"
|
||||||
|
desc = "A box of .357 ammo"
|
||||||
|
icon_state = "357"
|
||||||
|
icon = 'ammo.dmi'
|
||||||
|
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||||
|
item_state = "syringe_kit"
|
||||||
|
m_amt = 50000
|
||||||
|
throwforce = 2
|
||||||
|
w_class = 1.0
|
||||||
|
throw_speed = 4
|
||||||
|
throw_range = 10
|
||||||
|
var
|
||||||
|
list/stored_ammo = list()
|
||||||
|
|
||||||
|
|
||||||
|
New()
|
||||||
|
for(var/i = 1, i <= 7, i++)
|
||||||
|
stored_ammo += new /obj/item/ammo_casing(src)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
|
update_icon()
|
||||||
|
icon_state = text("[initial(icon_state)]-[]", stored_ammo.len)
|
||||||
|
desc = text("There are [] shell\s left!", stored_ammo.len)
|
||||||
60
code/modules/projectiles/ammunition/boxes.dm
Normal file
60
code/modules/projectiles/ammunition/boxes.dm
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/obj/item/ammo_magazine/a75//Still needs to be gone through
|
||||||
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
/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()
|
||||||
|
|
||||||
|
|
||||||
|
/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()
|
||||||
|
|
||||||
|
|
||||||
|
/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()
|
||||||
|
|
||||||
|
|
||||||
|
/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()
|
||||||
|
|
||||||
|
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)
|
||||||
74
code/modules/projectiles/ammunition/bullets.dm
Normal file
74
code/modules/projectiles/ammunition/bullets.dm
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/obj/item/ammo_casing/a418
|
||||||
|
desc = "A .418 bullet casing."
|
||||||
|
caliber = "357"
|
||||||
|
projectile_type = "/obj/item/projectile/suffocationbullet"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/a75
|
||||||
|
desc = "A .75 bullet casing."
|
||||||
|
caliber = "75"
|
||||||
|
projectile_type = "/obj/item/projectile/gyro"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/a666
|
||||||
|
desc = "A .666 bullet casing."
|
||||||
|
caliber = "357"
|
||||||
|
projectile_type = "/obj/item/projectile/cyanideround"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/c38
|
||||||
|
desc = "A .38 bullet casing."
|
||||||
|
caliber = "38"
|
||||||
|
projectile_type = "/obj/item/projectile/weakbullet"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/c9mm
|
||||||
|
desc = "A 9mm bullet casing."
|
||||||
|
caliber = "9mm"
|
||||||
|
projectile_type = "/obj/item/projectile/weakbullet"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/c45
|
||||||
|
desc = "A .45 bullet casing."
|
||||||
|
caliber = ".45"
|
||||||
|
projectile_type = "/obj/item/projectile/midbullet"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun
|
||||||
|
name = "shotgun shell"
|
||||||
|
desc = "A 12 gauge shell."
|
||||||
|
icon_state = "gshell"
|
||||||
|
caliber = "shotgun"
|
||||||
|
projectile_type = "/obj/item/projectile"
|
||||||
|
m_amt = 12500
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/blank
|
||||||
|
name = "shotgun shell"
|
||||||
|
desc = "A blank shell."
|
||||||
|
icon_state = "blshell"
|
||||||
|
m_amt = 250
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/beanbag
|
||||||
|
name = "beanbag shell"
|
||||||
|
desc = "A weak beanbag shell."
|
||||||
|
icon_state = "bshell"
|
||||||
|
projectile_type = "/obj/item/projectile/weakbullet"
|
||||||
|
m_amt = 500
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/stunshell
|
||||||
|
name = "stun shell"
|
||||||
|
desc = "A stunning shell."
|
||||||
|
icon_state = "stunshell"
|
||||||
|
projectile_type = "/obj/item/projectile/stunshot"
|
||||||
|
m_amt = 2500
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/dart
|
||||||
|
name = "shotgun darts"
|
||||||
|
desc = "A dart for use in shotguns."
|
||||||
|
icon_state = "blshell" //someone, draw the icon, please.
|
||||||
|
projectile_type = "/obj/item/projectile/dart"
|
||||||
|
m_amt = 12500
|
||||||
278
code/modules/projectiles/gun.dm
Normal file
278
code/modules/projectiles/gun.dm
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
/obj/item/weapon/gun
|
||||||
|
name = "gun"
|
||||||
|
desc = "Its a gun. It's pretty terrible, though."
|
||||||
|
icon = 'gun.dmi'
|
||||||
|
icon_state = "detective"
|
||||||
|
item_state = "gun"
|
||||||
|
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
|
||||||
|
m_amt = 2000
|
||||||
|
w_class = 3.0
|
||||||
|
throwforce = 5
|
||||||
|
throw_speed = 4
|
||||||
|
throw_range = 5
|
||||||
|
force = 5.0//They now do the ave damage
|
||||||
|
origin_tech = "combat=1"
|
||||||
|
|
||||||
|
var
|
||||||
|
fire_sound = 'Gunshot.ogg'
|
||||||
|
obj/item/projectile/in_chamber
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
emp_act(severity)
|
||||||
|
for(var/obj/O in contents)
|
||||||
|
O.emp_act(severity)
|
||||||
|
|
||||||
|
|
||||||
|
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(user, /mob/living))
|
||||||
|
var/mob/living/M = user
|
||||||
|
if ((M.mutations & CLOWN) && prob(50))
|
||||||
|
M << "\red The [src.name] blows up in your face."
|
||||||
|
M.take_organ_damage(0,20)
|
||||||
|
M.drop_item()
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if (!user.IsAdvancedToolUser())
|
||||||
|
user << "\red You don't have the dexterity to do this!"
|
||||||
|
return
|
||||||
|
|
||||||
|
add_fingerprint(user)
|
||||||
|
|
||||||
|
var/turf/curloc = user.loc
|
||||||
|
var/turf/targloc = get_turf(target)
|
||||||
|
if (!istype(targloc) || !istype(curloc))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(badmin)
|
||||||
|
badmin_ammo()
|
||||||
|
else if(!special_check(user))
|
||||||
|
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
|
||||||
|
|
||||||
|
in_chamber.firer = user
|
||||||
|
in_chamber.def_zone = user.get_organ_target()
|
||||||
|
|
||||||
|
if(targloc == curloc)
|
||||||
|
user.bullet_act(in_chamber)
|
||||||
|
del(in_chamber)
|
||||||
|
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)
|
||||||
|
|
||||||
|
in_chamber.original = targloc
|
||||||
|
in_chamber.loc = get_turf(user)
|
||||||
|
user.next_move = world.time + 4
|
||||||
|
in_chamber.silenced = silenced
|
||||||
|
in_chamber.current = curloc
|
||||||
|
in_chamber.yo = targloc.y - curloc.y
|
||||||
|
in_chamber.xo = targloc.x - curloc.x
|
||||||
|
spawn()
|
||||||
|
in_chamber.process()
|
||||||
|
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)
|
||||||
646
code/modules/projectiles/guns/energy.dm
Normal file
646
code/modules/projectiles/guns/energy.dm
Normal file
@@ -0,0 +1,646 @@
|
|||||||
|
|
||||||
|
/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"
|
||||||
|
|
||||||
|
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
|
||||||
|
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)
|
||||||
|
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)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||||
|
else
|
||||||
|
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°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.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/plasma(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)]°C) ([round(temperature*1.8+459.67)]°F)</FONT>"
|
||||||
|
else
|
||||||
|
temp_text = "<FONT color=red>[temperature] ([round(temperature+T0C)]°C) ([round(temperature*1.8+459.67)]°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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/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
|
||||||
|
|
||||||
225
code/modules/projectiles/guns/projectile.dm
Normal file
225
code/modules/projectiles/guns/projectile.dm
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
/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"
|
||||||
|
origin_tech = "combat=2;materials=2"
|
||||||
|
|
||||||
|
New()
|
||||||
|
for(var/i = 1, i <= max_shells, i++)
|
||||||
|
loaded += new /obj/item/ammo_casing/c38(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."
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/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()
|
||||||
111
code/modules/projectiles/projectile.dm
Normal file
111
code/modules/projectiles/projectile.dm
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
#define BRUTE "brute"
|
||||||
|
#define BURN "burn"
|
||||||
|
#define TOX "tox"
|
||||||
|
#define OXY "oxy"
|
||||||
|
#define CLONE "clone"
|
||||||
|
|
||||||
|
#define ADD "add"
|
||||||
|
#define SET "set"
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/item/projectile
|
||||||
|
name = "projectile"
|
||||||
|
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
|
||||||
|
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
|
||||||
|
mob/firer = null//Who shot it
|
||||||
|
silenced = 0 //Attack message
|
||||||
|
yo = null
|
||||||
|
xo = null
|
||||||
|
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
|
||||||
|
nodamage = 0 //Determines if the projectile will skip any damage inflictions
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
Bump(atom/A as mob|obj|turf|area)
|
||||||
|
if(A == firer)
|
||||||
|
loc = A.loc
|
||||||
|
return // cannot shoot yourself
|
||||||
|
|
||||||
|
if(bumped) return
|
||||||
|
|
||||||
|
bumped = 1
|
||||||
|
if(firer && istype(A, /mob))
|
||||||
|
var/mob/M = A
|
||||||
|
if(!istype(A, /mob/living))
|
||||||
|
loc = A.loc
|
||||||
|
return // nope.avi
|
||||||
|
|
||||||
|
if(!silenced)
|
||||||
|
visible_message("\red [A.name] has been shot by [firer.name]!", "\blue You hear a [istype(src, /obj/item/projectile/beam) ? "gunshot" : "laser blast"]!")
|
||||||
|
else
|
||||||
|
M << "\red You've been shot!"
|
||||||
|
if(istype(firer, /mob))
|
||||||
|
M.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
|
||||||
|
firer.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
|
||||||
|
else
|
||||||
|
M.attack_log += text("\[[]\] <b>UNKOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), M, M.ckey, src)
|
||||||
|
|
||||||
|
spawn(0)
|
||||||
|
if(A)
|
||||||
|
A.bullet_act(src, def_zone)
|
||||||
|
if(istype(A,/turf))
|
||||||
|
for(var/obj/O in A)
|
||||||
|
O.bullet_act(src)
|
||||||
|
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)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
|
if(air_group || (height==0)) return 1
|
||||||
|
|
||||||
|
if(istype(mover, /obj/item/projectile))
|
||||||
|
return prob(95)
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
process()
|
||||||
|
spawn while(src)
|
||||||
|
if((!( current ) || loc == current))
|
||||||
|
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
|
||||||
|
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
step_towards(src, current)
|
||||||
|
sleep(1)
|
||||||
|
if(!bumped)
|
||||||
|
if(loc == original)
|
||||||
|
for(var/mob/living/M in original)
|
||||||
|
Bump(M)
|
||||||
|
sleep(1)
|
||||||
|
return
|
||||||
53
code/modules/projectiles/projectile/beams.dm
Normal file
53
code/modules/projectiles/projectile/beams.dm
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/obj/item/projectile/beam
|
||||||
|
name = "laser"
|
||||||
|
icon_state = "laser"
|
||||||
|
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||||
|
damage = 20
|
||||||
|
mobdamage = list(BRUTE = 0, BURN = 20, TOX = 0, OXY = 0, CLONE = 0)
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/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/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
|
||||||
23
code/modules/projectiles/projectile/bio.dm
Normal file
23
code/modules/projectiles/projectile/bio.dm
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/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
|
||||||
63
code/modules/projectiles/projectile/bullets.dm
Normal file
63
code/modules/projectiles/projectile/bullets.dm
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/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/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/suffocationbullet//How does this even work?
|
||||||
|
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 15, CLONE = 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/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
|
||||||
|
damage = 20
|
||||||
|
mobdamage = list(BRUTE = 20, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/projectile/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
|
||||||
|
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
|
||||||
27
code/modules/projectiles/projectile/energy.dm
Normal file
27
code/modules/projectiles/projectile/energy.dm
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/obj/item/projectile/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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/projectile/bolt
|
||||||
|
name = "bolt"
|
||||||
|
icon_state = "cbbolt"
|
||||||
|
flag = "taser"
|
||||||
|
damage = 0
|
||||||
|
nodamage = 1
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
effects["weak"] = 10
|
||||||
|
effects["stutter"] = 10
|
||||||
|
|
||||||
|
|
||||||
14
code/modules/projectiles/projectile/rad.dm
Normal file
14
code/modules/projectiles/projectile/rad.dm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/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
|
||||||
35
code/modules/projectiles/projectile/special.dm
Normal file
35
code/modules/projectiles/projectile/special.dm
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
//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
|
||||||
|
nodamage = 1
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
effects["emp"] = 1
|
||||||
|
effectprob["emp"] = 80
|
||||||
|
|
||||||
|
/obj/item/projectile/freeze
|
||||||
|
name = "freeze beam"
|
||||||
|
icon_state = "ice_2"
|
||||||
|
damage = 0
|
||||||
|
var/temperature = 0
|
||||||
|
|
||||||
|
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
|
||||||
@@ -200,3 +200,14 @@ var/list/accessable_z_levels = list("1" = 10, "3" = 15, "4" = 60, "5" = 15) //Th
|
|||||||
|
|
||||||
|
|
||||||
var/list/global_mutations = list() // list of hidden mutation things
|
var/list/global_mutations = list() // list of hidden mutation things
|
||||||
|
|
||||||
|
|
||||||
|
//Bullet things
|
||||||
|
#define BRUTE "brute"
|
||||||
|
#define BURN "burn"
|
||||||
|
#define TOX "tox"
|
||||||
|
#define OXY "oxy"
|
||||||
|
#define CLONE "clone"
|
||||||
|
|
||||||
|
#define ADD "add"
|
||||||
|
#define SET "set"
|
||||||
|
|||||||
@@ -61,10 +61,16 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
|||||||
<li>Added the most fun activity in your every-day life. Laundry. Check the dormitory. (Sprites by Hempuli)</li>
|
<li>Added the most fun activity in your every-day life. Laundry. Check the dormitory. (Sprites by Hempuli)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Kor Updated:</b>
|
<li><b>Kor updated:</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added purple goggles to chemistry (you're welcome Lasty)</li>
|
<li>Added purple goggles to chemistry (you're welcome Lasty)</li>
|
||||||
<li>Added a third MMI to robotics and monkey cubes to xenobio (dont fucking spam them in the halls</li>
|
<li>Added a third MMI to robotics and monkey cubes to xenobio (dont fucking spam them in the halls)</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><b>Mport updated:</b>
|
||||||
|
<ul>
|
||||||
|
<li>Turns out tasers and a few other weapons were slightly bugged when it came to checking the internal powercell. Tasers and such gained an extra shot.</li>
|
||||||
|
<li>Ion Rifle shots lowered to 5 per charge.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -113,6 +113,10 @@
|
|||||||
#define FILE_DIR "code/modules/power/antimatter"
|
#define FILE_DIR "code/modules/power/antimatter"
|
||||||
#define FILE_DIR "code/modules/power/singularity"
|
#define FILE_DIR "code/modules/power/singularity"
|
||||||
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
|
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
|
||||||
|
#define FILE_DIR "code/modules/projectiles"
|
||||||
|
#define FILE_DIR "code/modules/projectiles/ammunition"
|
||||||
|
#define FILE_DIR "code/modules/projectiles/guns"
|
||||||
|
#define FILE_DIR "code/modules/projectiles/projectile"
|
||||||
#define FILE_DIR "code/modules/research"
|
#define FILE_DIR "code/modules/research"
|
||||||
#define FILE_DIR "code/unused"
|
#define FILE_DIR "code/unused"
|
||||||
#define FILE_DIR "code/unused/beast"
|
#define FILE_DIR "code/unused/beast"
|
||||||
@@ -767,6 +771,7 @@
|
|||||||
#include "code\modules\mob\living\carbon\human\examine.dm"
|
#include "code\modules\mob\living\carbon\human\examine.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\hud.dm"
|
#include "code\modules\mob\living\carbon\human\hud.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human.dm"
|
#include "code\modules\mob\living\carbon\human\human.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\life.dm"
|
#include "code\modules\mob\living\carbon\human\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\login.dm"
|
#include "code\modules\mob\living\carbon\human\login.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\say.dm"
|
#include "code\modules\mob\living\carbon\human\say.dm"
|
||||||
@@ -858,6 +863,19 @@
|
|||||||
#include "code\modules\power\singularity\particle_accelerator\particle_control.dm"
|
#include "code\modules\power\singularity\particle_accelerator\particle_control.dm"
|
||||||
#include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
|
#include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
|
||||||
#include "code\modules\power\singularity\particle_accelerator\particle_power.dm"
|
#include "code\modules\power\singularity\particle_accelerator\particle_power.dm"
|
||||||
|
#include "code\modules\projectiles\ammunition.dm"
|
||||||
|
#include "code\modules\projectiles\gun.dm"
|
||||||
|
#include "code\modules\projectiles\projectile.dm"
|
||||||
|
#include "code\modules\projectiles\ammunition\boxes.dm"
|
||||||
|
#include "code\modules\projectiles\ammunition\bullets.dm"
|
||||||
|
#include "code\modules\projectiles\guns\energy.dm"
|
||||||
|
#include "code\modules\projectiles\guns\projectile.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\beams.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\bio.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\bullets.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\energy.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\rad.dm"
|
||||||
|
#include "code\modules\projectiles\projectile\special.dm"
|
||||||
#include "code\modules\research\circuitprinter.dm"
|
#include "code\modules\research\circuitprinter.dm"
|
||||||
#include "code\modules\research\designs.dm"
|
#include "code\modules\research\designs.dm"
|
||||||
#include "code\modules\research\destructive_analyzer.dm"
|
#include "code\modules\research\destructive_analyzer.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user