Polaris sync

This commit is contained in:
killer653
2017-08-06 19:07:17 -04:00
652 changed files with 44410 additions and 18080 deletions

View File

@@ -6,12 +6,12 @@
fire_sound = 'sound/weapons/Taser.ogg'
fire_delay = 10 // Handguns should be inferior to two-handed weapons.
projectile_type = /obj/item/projectile/beam/stun
projectile_type = /obj/item/projectile/beam/stun/med
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
modifystate = "energystun"
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/med, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480),
)
@@ -50,6 +50,7 @@
name = "advanced energy gun"
desc = "An energy gun with an experimental miniaturized reactor."
icon_state = "nucgunstun"
projectile_type = /obj/item/projectile/beam/stun
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3)
slot_flags = SLOT_BELT
force = 8 //looks heavier than a pistol

View File

@@ -16,7 +16,7 @@
//Override this to avoid a runtime with suicide handling.
/obj/item/weapon/gun/launcher/handle_suicide(mob/living/user)
user << "\red Shooting yourself with \a [src] is pretty tricky. You can't seem to manage it."
user << "<font color='red'>Shooting yourself with \a [src] is pretty tricky. You can't seem to manage it.</font>"
return
/obj/item/weapon/gun/launcher/proc/update_release_force(obj/item/projectile)

View File

@@ -167,6 +167,7 @@
var/obj/item/C = cell
C.loc = get_turf(user)
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
playsound(src, W.usesound, 50, 1)
cell = null
else
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
@@ -231,7 +232,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You weld the rods into place.</span>"
buildstate++
update_icon()
@@ -267,6 +268,7 @@
else if(istype(W,/obj/item/weapon/screwdriver))
if(buildstate == 5)
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
qdel(src)
return

View File

@@ -191,7 +191,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the pipe into place.</span>"
buildstate++
update_icon()
@@ -199,7 +199,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the metal chassis together.</span>"
buildstate++
update_icon()
@@ -207,7 +207,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the valve into place.</span>"
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
qdel(src)

View File

@@ -20,7 +20,7 @@
/obj/item/weapon/gun/launcher/rocket/examine(mob/user)
if(!..(user, 2))
return
user << "\blue [rockets.len] / [max_rockets] rockets."
user << "<font color='blue'>[rockets.len] / [max_rockets] rockets.</font>"
/obj/item/weapon/gun/launcher/rocket/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/ammo_casing/rocket))
@@ -28,10 +28,10 @@
user.drop_item()
I.loc = src
rockets += I
user << "\blue You put the rocket in [src]."
user << "\blue [rockets.len] / [max_rockets] rockets."
user << "<font color='blue'>You put the rocket in [src].</font>"
user << "<font color='blue'>[rockets.len] / [max_rockets] rockets.</font>"
else
usr << "\red [src] cannot hold more rockets."
usr << "<font color='red'>[src] cannot hold more rockets.</font>"
/obj/item/weapon/gun/launcher/rocket/consume_next_projectile()
if(rockets.len)

View File

@@ -32,13 +32,14 @@
//var/list/icon_keys = list() //keys
//var/list/ammo_states = list() //values
/obj/item/weapon/gun/projectile/New()
/obj/item/weapon/gun/projectile/New(loc, var/starts_loaded = 1)
..()
if(ispath(ammo_type) && (load_method & (SINGLE_CASING|SPEEDLOADER)))
for(var/i in 1 to max_shells)
loaded += new ammo_type(src)
if(ispath(magazine_type) && (load_method & MAGAZINE))
ammo_magazine = new magazine_type(src)
if(starts_loaded)
if(ispath(ammo_type) && (load_method & (SINGLE_CASING|SPEEDLOADER)))
for(var/i in 1 to max_shells)
loaded += new ammo_type(src)
if(ispath(magazine_type) && (load_method & MAGAZINE))
ammo_magazine = new magazine_type(src)
update_icon()
/obj/item/weapon/gun/projectile/consume_next_projectile()

View File

@@ -51,17 +51,17 @@
/obj/item/weapon/gun/projectile/automatic/sts35
name = "assault rifle"
desc = "The rugged STS-35 is a durable automatic weapon of a make popular on the frontier worlds. Uses 5.56mm rounds. This one is unmarked."
desc = "The rugged STS-35 is a durable automatic weapon of a make popular on the frontier worlds. Uses 5.45mm rounds. This one is unmarked."
icon_state = "arifle"
item_state = null
w_class = ITEMSIZE_LARGE
force = 10
caliber = "5.56mm"
caliber = "5.45mm"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4)
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/m556
allowed_magazines = list(/obj/item/ammo_magazine/m556)
magazine_type = /obj/item/ammo_magazine/m545
allowed_magazines = list(/obj/item/ammo_magazine/m545)
one_handed_penalty = 4
@@ -73,7 +73,7 @@
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon(var/ignore_inhands)
..()
if(istype(ammo_magazine,/obj/item/ammo_magazine/m556/small))
if(istype(ammo_magazine,/obj/item/ammo_magazine/m545/small))
icon_state = "arifle-small" // If using the small magazines, use the small magazine sprite.
else
icon_state = (ammo_magazine)? "arifle" : "arifle-empty"
@@ -111,7 +111,6 @@
force = 10
caliber = "7.62mm"
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 3)
ammo_type = "/obj/item/ammo_casing/a556" // Is this really needed anymore?
fire_sound = 'sound/weapons/Gunshot.ogg'
slot_flags = SLOT_BACK
load_method = MAGAZINE
@@ -181,14 +180,13 @@
force = 10
slot_flags = 0
max_shells = 50
caliber = "5.56mm"
caliber = "5.45mm"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 2)
slot_flags = SLOT_BACK
ammo_type = "/obj/item/ammo_casing/a556" // Is this really needed anymore?
fire_sound = 'sound/weapons/machinegun.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/m556saw
allowed_magazines = list(/obj/item/ammo_magazine/m556saw, /obj/item/ammo_magazine/m556)
magazine_type = /obj/item/ammo_magazine/m545saw
allowed_magazines = list(/obj/item/ammo_magazine/m545saw, /obj/item/ammo_magazine/m545)
one_handed_penalty = 6
@@ -345,7 +343,7 @@
/obj/item/weapon/gun/projectile/automatic/carbine // Admin abuse assault rifle. ToDo: Make this less shit. Maybe remove its autofire, and make it spawn with only 10 rounds at start.
name = "assault carbine"
desc = "The bullpup configured GP3000 is a lightweight, compact, military-grade assault rifle produced by Gurov Projectile Weapons LLC. It is sold almost exclusively to standing armies. The serial number on this one has been scratched off. Uses 5.56mm rounds."
desc = "The bullpup configured GP3000 is a lightweight, compact, military-grade assault rifle produced by Gurov Projectile Weapons LLC. It is sold almost exclusively to standing armies. The serial number on this one has been scratched off. Uses 5.45mm rounds."
icon_state = "bullpup"
item_state = "bullpup"
w_class = ITEMSIZE_LARGE

View File

@@ -19,7 +19,7 @@
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial
name = "ceremonial bolt-action rifle"
desc = "A bolt-action rifle with a heavy, high-quality wood stock that has a beautiful finish. Clearly not intended to be used in combat. Uses 5.56mm rounds."
desc = "A bolt-action rifle with a heavy, high-quality wood stock that has a beautiful finish. Clearly not intended to be used in combat. Uses 7.62mm rounds."
ammo_type = /obj/item/ammo_casing/a762/blank
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin

View File

@@ -0,0 +1,42 @@
/obj/item/weapon/gun/projectile/contender
name = "Thompson Contender"
desc = "A perfect, pristine replica of an ancient one-shot hand-cannon. For when you really want to make a hole. This one has been modified to work almost like a bolt-action. Uses .357 rounds."
icon_state = "pockrifle"
var/icon_retracted = "pockrifle-empty"
item_state = "revolver"
caliber = ".357"
handle_casings = HOLD_CASINGS
max_shells = 1
ammo_type = /obj/item/ammo_casing/a357
var/retracted_bolt = 0
load_method = SINGLE_CASING
/obj/item/weapon/gun/projectile/contender/attack_self(mob/user as mob)
if(chambered)
chambered.loc = get_turf(src)
chambered = null
var/obj/item/ammo_casing/C = loaded[1]
loaded -= C
if(!retracted_bolt)
to_chat(user, "<span class='notice'>You cycle back the bolt on [src], ejecting the casing and allowing you to reload.</span>")
icon_state = icon_retracted
retracted_bolt = 1
return 1
else if(retracted_bolt && loaded.len)
to_chat(user, "<span class='notice'>You cycle the loaded round into the chamber, allowing you to fire.</span>")
else
to_chat(user, "<span class='notice'>You cycle the boly back into position, leaving the gun empty.</span>")
icon_state = initial(icon_state)
retracted_bolt = 0
/obj/item/weapon/gun/projectile/contender/load_ammo(var/obj/item/A, mob/user)
if(!retracted_bolt)
to_chat(user, "<span class='notice'>You can't load [src] without cycling the bolt.</span>")
return
..()
/obj/item/weapon/gun/projectile/contender/tacticool
desc = "A modified replica of an ancient one-shot hand-cannon, reinvented with a tactical look. For when you really want to make a hole. This one has been modified to work almost like a bolt-action. Uses .357 rounds."
icon_state = "pockrifle_b"
icon_retracted = "pockrifle_b-empty"

View File

@@ -96,25 +96,25 @@
// return
..()
if (beakers.len)
user << "\blue [src] contains:"
user << "<font color='blue'>[src] contains:</font>"
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
if(B.reagents && B.reagents.reagent_list.len)
for(var/datum/reagent/R in B.reagents.reagent_list)
user << "\blue [R.volume] units of [R.name]"
user << "<font color='blue'>[R.volume] units of [R.name]</font>"
/obj/item/weapon/gun/projectile/dartgun/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
if(!istype(I, container_type))
user << "\blue [I] doesn't seem to fit into [src]."
user << "<font color='blue'>[I] doesn't seem to fit into [src].</font>"
return
if(beakers.len >= max_beakers)
user << "\blue [src] already has [max_beakers] beakers in it - another one isn't going to fit!"
user << "<font color='blue'>[src] already has [max_beakers] beakers in it - another one isn't going to fit!</font>"
return
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
user.drop_item()
B.loc = src
beakers += B
user << "\blue You slot [B] into [src]."
user << "<font color='blue'>You slot [B] into [src].</font>"
src.updateUsrDialog()
return 1
..()

View File

@@ -268,7 +268,7 @@
/obj/item/ammo_casing/a12g/stunshell = "12g",
/obj/item/ammo_casing/a12g/flash = "12g",
/obj/item/ammo_casing/a762 = "7.62mm",
/obj/item/ammo_casing/a556 = "5.56mm"
/obj/item/ammo_casing/a545 = "5.45mm"
)
/obj/item/weapon/gun/projectile/pirate/New()

View File

@@ -45,7 +45,7 @@
icon_state = "detective"
caliber = ".38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
fire_sound = 'sound/weapons/semiauto.ogg'
ammo_type = /obj/item/ammo_casing/a38
/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun()
@@ -73,7 +73,7 @@
icon_state = "deckard-empty"
caliber = ".38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
fire_sound = 'sound/weapons/semiauto.ogg'
ammo_type = /obj/item/ammo_casing/a38
/obj/item/weapon/gun/projectile/revolver/deckard/emp
@@ -124,6 +124,7 @@
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
handle_casings = CYCLE_CASINGS
max_shells = 9
fire_sound = 'sound/weapons/semiauto.ogg'
caliber = ".38"
ammo_type = /obj/item/ammo_casing/a38
var/secondary_max_shells = 1
@@ -155,6 +156,7 @@
if(caliber && secondary_caliber)
caliber = secondary_caliber
fire_sound = 'sound/weapons/shotgun.ogg'
if(ammo_type && secondary_ammo_type)
ammo_type = secondary_ammo_type
@@ -171,6 +173,7 @@
if(caliber && secondary_caliber)
caliber = initial(caliber)
fire_sound = initial(fire_sound)
if(ammo_type && secondary_ammo_type)
ammo_type = initial(ammo_type)

View File

@@ -10,7 +10,7 @@
slot_flags = SLOT_BACK
caliber = "12g"
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2)
load_method = SINGLE_CASING
load_method = SINGLE_CASING|SPEEDLOADER
ammo_type = /obj/item/ammo_casing/a12g/beanbag
handle_casings = HOLD_CASINGS
fire_sound = 'sound/weapons/shotgun.ogg'
@@ -49,6 +49,7 @@
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
ammo_type = /obj/item/ammo_casing/a12g
load_method = SINGLE_CASING|SPEEDLOADER
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
name = "double-barreled shotgun"

View File

@@ -0,0 +1,176 @@
////////////// PTR-7 Anti-Materiel Rifle //////////////
/obj/item/weapon/gun/projectile/heavysniper/collapsible
/obj/item/weapon/gun/projectile/heavysniper/collapsible/verb/take_down()
set category = "Object"
set name = "Disassemble Rifle"
var/mob/living/carbon/human/user = usr
if(user.stat)
return
if(chambered)
to_chat(user, "<span class='warning'>You need to empty the rifle to break it down.</span>")
else
collapse_rifle(user)
/obj/item/weapon/gun/projectile/heavysniper/proc/collapse_rifle(mob/user)
to_chat(user, "<span class='warning'>You begin removing \the [src]'s barrel.</span>")
if(do_after(user, 40))
if(user.unEquip(src, force=1))
to_chat(user, "<span class='warning'>You remove \the [src]'s barrel.</span>")
qdel(src)
var/obj/item/barrel = new /obj/item/sniper_rifle_part/barrel(user)
var/obj/item/sniper_rifle_part/assembly = new /obj/item/sniper_rifle_part/trigger_group(user)
var/obj/item/sniper_rifle_part/stock/stock = new(assembly)
assembly.stock = stock
assembly.part_count = 2
assembly.update_build()
user.put_in_any_hand_if_possible(assembly) || assembly.dropInto(user.loc)
user.put_in_any_hand_if_possible(barrel) || barrel.dropInto(user.loc)
/obj/item/sniper_rifle_part
name = "AM rifle part"
desc = "A part of an antimateriel rifle."
w_class = ITEMSIZE_NORMAL
icon = 'icons/obj/gun.dmi'
var/obj/item/sniper_rifle_part/barrel = null
var/obj/item/sniper_rifle_part/stock = null
var/obj/item/sniper_rifle_part/trigger_group = null
var/part_count = 1
/obj/item/sniper_rifle_part/barrel
name = "AM rifle barrel"
icon_state = "heavysniper-barrel"
/obj/item/sniper_rifle_part/barrel/New()
..()
barrel = src
/obj/item/sniper_rifle_part/stock
name = "AM rifle stock"
icon_state = "heavysniper-stock"
/obj/item/sniper_rifle_part/stock/New()
..()
stock = src
/obj/item/sniper_rifle_part/trigger_group
name = "AM rifle trigger assembly"
icon_state = "heavysniper-trig"
/obj/item/sniper_rifle_part/trigger_group/New()
..()
trigger_group = src
/obj/item/sniper_rifle_part/attack_self(mob/user as mob)
if(part_count == 1)
to_chat(user, "<span class='warning'>You can't disassemble this further!</span>")
return
to_chat(user, "<span class='notice'>You start disassembling \the [src].</span>")
if(!do_after(user, 40))
return
to_chat(user, "<span class='notice'>You disassemble \the [src].</span>")
for(var/obj/item/sniper_rifle_part/P in list(barrel, stock, trigger_group))
if(P.barrel != P)
P.barrel = null
if(P.stock != P)
P.stock = null
if(P.trigger_group != P)
P.trigger_group = null
if(P != src)
user.put_in_any_hand_if_possible(P) || P.dropInto(loc)
P.part_count = 1
update_build()
/obj/item/sniper_rifle_part/attackby(var/obj/item/sniper_rifle_part/A as obj, mob/user as mob)
to_chat(user, "<span class='notice'>You begin adding \the [A] to \the [src].</span>")
if(!do_after(user, 30))
return
if(istype(A, /obj/item/sniper_rifle_part/trigger_group))
if(A.part_count > 1 && src.part_count > 1)
to_chat(user, "<span class='warning'>Disassemble one of these parts first!</span>")
return
if(!trigger_group)
if(user.unEquip(A, force=1))
trigger_group = A
else
to_chat(user, "<span class='warning'>There's already a trigger group!</span>")
return
else if(istype(A, /obj/item/sniper_rifle_part/barrel))
if(!barrel)
if(user.unEquip(A, force=1))
barrel = A
else
to_chat(user, "<span class='warning'>There's already a barrel!</span>")
return
else if(istype(A, /obj/item/sniper_rifle_part/stock))
if(!stock)
if(user.unEquip(A, force=1))
stock = A
else
to_chat(user, "<span class='warning'>There's already a stock!</span>")
return
A.forceMove(src)
to_chat(user, "<span class='notice'>You install \the [A].</span>")
if(A.barrel && !src.barrel)
src.barrel = A.barrel
if(A.stock && !src.stock)
src.stock = A.stock
if(A.trigger_group && !src.trigger_group)
src.trigger_group = A.trigger_group
part_count = A.part_count + src.part_count
update_build(user)
/obj/item/sniper_rifle_part/proc/update_build()
switch(part_count)
if(1)
name = initial(name)
w_class = ITEMSIZE_NORMAL
icon_state = initial(icon_state)
if(2)
if(barrel && trigger_group)
name = "AM rifle barrel-trigger assembly"
icon_state = "heavysniper-trigbar"
else if(stock && trigger_group)
name = "AM rifle stock-trigger assembly"
icon_state = "heavysniper-trigstock"
else if(stock && barrel)
name = "AM rifle stock-barrel assembly"
icon_state = "heavysniper-barstock"
w_class = ITEMSIZE_LARGE
if(3)
var/obj/item/weapon/gun/projectile/heavysniper/collapsible/gun = new (get_turf(src), 0)
if(usr && istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/user = usr
user.unEquip(src, force=1)
user.put_in_any_hand_if_possible(gun) || gun.dropInto(loc)
qdel(src)
/obj/item/weapon/gun/projectile/heavysniper/update_icon()
if(bolt_open)
icon_state = "heavysniper-open"
else
icon_state = "heavysniper"