Merge branch 'master' into upstream-merge-37529

This commit is contained in:
LetterJay
2018-05-22 08:02:46 -05:00
committed by GitHub
1106 changed files with 20660 additions and 18727 deletions
@@ -4,9 +4,10 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "s-casing"
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 500)
var/fire_sound = null //What sound should play when this ammo is fired
var/caliber = null //Which kind of guns it can be loaded into
var/projectile_type = null //The bullet type to create when New() is called
@@ -66,41 +67,11 @@
bounce_away(FALSE, NONE)
. = ..()
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, delay = 3)
SpinAnimation(10, 1)
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
update_icon()
SpinAnimation(10, 1)
var/turf/T = get_turf(src)
if(still_warm && T && (is_type_in_typecache(T, GLOB.bullet_bounce_away_sizzle)))
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), delay)
else if(T && (!is_type_in_typecache(T, GLOB.bullet_bounce_away_blacklist)))
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/bulletremove.ogg', 60, 1), delay)
GLOBAL_LIST_INIT(bullet_bounce_away_sizzle, typecacheof(list(
/turf/closed/indestructible/rock/snow,
/turf/closed/wall/ice,
/turf/closed/wall/mineral/snow,
/turf/open/floor/grass/snow,
/turf/open/floor/holofloor/snow,
/turf/open/floor/plating/asteroid/snow,
/turf/open/floor/plating/ice,
/turf/open/water)))
GLOBAL_LIST_INIT(bullet_bounce_away_blacklist, typecacheof(list(
/turf/closed/indestructible/rock/snow,
/turf/closed/indestructible/splashscreen,
/turf/closed/wall/mineral/snow,
/turf/open/chasm,
/turf/open/floor/carpet,
/turf/open/floor/grass,
/turf/open/floor/holofloor/beach,
/turf/open/floor/holofloor/carpet,
/turf/open/floor/holofloor/grass,
/turf/open/floor/holofloor/hyperspace,
/turf/open/floor/holofloor/snow,
/turf/open/floor/plating/asteroid/snow,
/turf/open/floor/plating/beach,
/turf/open/indestructible/reebe_void,
/turf/open/lava,
/turf/open/space,
/turf/open/water,
/turf/template_noop)))
if(still_warm && T && T.bullet_sizzle)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), bounce_delay) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
else if(T && T.bullet_bounce_sound)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, T.bullet_bounce_sound, 60, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
@@ -5,8 +5,9 @@
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
var/modified = 0
materials = list(MAT_METAL = 11.25)
harmful = FALSE
var/modified = FALSE
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
@@ -25,8 +26,8 @@
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
modified = 1
FD.modified = 1
modified = TRUE
FD.modified = TRUE
FD.damage_type = BRUTE
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
update_icon()
@@ -38,7 +39,7 @@
return
FD.pen = A
FD.damage = 5
FD.nodamage = 0
FD.nodamage = FALSE
to_chat(user, "<span class='notice'>You insert [A] into [src].</span>")
else
to_chat(user, "<span class='warning'>There's already something in [src].</span>")
@@ -61,3 +62,4 @@
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
materials = list(MAT_METAL = 1125)
@@ -2,14 +2,13 @@
/obj/item/ammo_box
name = "ammo box (null_reference_exception)"
desc = "A box of ammo."
icon_state = "357"
icon = 'icons/obj/ammo.dmi'
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
materials = list(MAT_METAL=30000)
materials = list(MAT_METAL = 30000)
throwforce = 2
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -21,9 +20,19 @@
var/caliber
var/multiload = 1
var/start_empty = 0
var/list/bullet_cost
var/list/base_cost// override this one as well if you override bullet_cost
/obj/item/ammo_box/Initialize()
. = ..()
if (!bullet_cost)
for (var/material in materials)
var/material_amount = materials[material]
LAZYSET(base_cost, material, (material_amount * 0.10))
material_amount *= 0.90 // 10% for the container
material_amount /= max_ammo
LAZYSET(bullet_cost, material, material_amount)
if(!start_empty)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
@@ -109,6 +118,10 @@
if(2)
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]"
desc = "[initial(desc)] There are [stored_ammo.len] shell\s left!"
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
materials[material] = material_amount
//Behavior for magazines
/obj/item/ammo_box/magazine/proc/ammo_count()
@@ -13,6 +13,7 @@
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
multiple_sprites = 1
materials = list(MAT_METAL = 20000)
/obj/item/ammo_box/c9mm
name = "ammo box (9mm)"
@@ -59,7 +60,9 @@
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 40
materials = list(MAT_METAL = 500)
/obj/item/ammo_box/foambox/riot
icon_state = "foambox_riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
materials = list(MAT_METAL = 50000)
@@ -1,8 +1,8 @@
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g taser slugs)"
name = "shotgun magazine (12g buckshot slugs)"
desc = "A drum magazine."
icon_state = "m12gs"
ammo_type = /obj/item/ammo_casing/shotgun/stunslug
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
caliber = "shotgun"
max_ammo = 8
@@ -10,14 +10,14 @@
..()
icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/8, 1)*8]"
/obj/item/ammo_box/magazine/m12g/buckshot
name = "shotgun magazine (12g buckshot slugs)"
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/m12g/stun
name = "shotgun magazine (12g taser slugs)"
icon_state = "m12gs"
ammo_type = /obj/item/ammo_casing/shotgun/stunslug
/obj/item/ammo_box/magazine/m12g/slug
name = "shotgun magazine (12g slugs)"
icon_state = "m12gb"
icon_state = "m12gb" //this may need an unique sprite
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/ammo_box/magazine/m12g/dragon
@@ -30,6 +30,7 @@
/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
icon_state = "c20r45-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20
@@ -39,10 +40,12 @@
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/toy/smgm45/riot
icon_state = "c20r45-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/m762
name = "donksoft box magazine"
icon_state = "a762-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 50
@@ -52,4 +55,5 @@
icon_state = "a762-[round(ammo_count(),10)]"
/obj/item/ammo_box/magazine/toy/m762/riot
icon_state = "a762-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
+7 -7
View File
@@ -8,7 +8,7 @@
icon_state = "detective"
item_state = "gun"
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
materials = list(MAT_METAL=2000)
w_class = WEIGHT_CLASS_NORMAL
throwforce = 5
@@ -39,9 +39,9 @@
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin //standard firing pin for most guns
var/obj/item/firing_pin/pin = /obj/item/firing_pin //standard firing pin for most guns
var/obj/item/device/flashlight/gun_light
var/obj/item/flashlight/gun_light
var/can_flashlight = 0
var/obj/item/kitchen/knife/bayonet
var/can_bayonet = FALSE
@@ -334,10 +334,10 @@
/obj/item/gun/attackby(obj/item/I, mob/user, params)
if(user.a_intent == INTENT_HARM)
return ..()
else if(istype(I, /obj/item/device/flashlight/seclite))
else if(istype(I, /obj/item/flashlight/seclite))
if(!can_flashlight)
return ..()
var/obj/item/device/flashlight/seclite/S = I
var/obj/item/flashlight/seclite/S = I
if(!gun_light)
if(!user.transferItemToLoc(I, src))
return
@@ -362,7 +362,7 @@
update_icon()
else if(istype(I, /obj/item/screwdriver))
if(gun_light)
var/obj/item/device/flashlight/seclite/S = gun_light
var/obj/item/flashlight/seclite/S = gun_light
to_chat(user, "<span class='notice'>You unscrew the seclite from \the [src].</span>")
gun_light = null
S.forceMove(get_turf(user))
@@ -457,7 +457,7 @@
/obj/item/gun/proc/unlock() //used in summon guns and as a convience for admins
if(pin)
qdel(pin)
pin = new /obj/item/device/firing_pin
pin = new /obj/item/firing_pin
/////////////
// ZOOMING //
+2 -2
View File
@@ -204,8 +204,8 @@
desc = sawn_desc
w_class = WEIGHT_CLASS_NORMAL
item_state = "gun"
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
sawn_off = TRUE
update_icon()
return 1
@@ -15,7 +15,7 @@
pin = null
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/update_icon()
..()
@@ -91,13 +91,13 @@
fire_sound = 'sound/weapons/gunshot_smg.ogg'
fire_delay = 2
burst_size = 2
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
can_bayonet = TRUE
knife_x_offset = 26
knife_y_offset = 12
/obj/item/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/c20r/Initialize()
. = ..()
@@ -148,7 +148,7 @@
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/automatic/m90/Initialize()
. = ..()
@@ -156,7 +156,7 @@
update_icon()
/obj/item/gun/ballistic/automatic/m90/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize()
. = ..()
@@ -247,11 +247,11 @@
can_suppress = FALSE
burst_size = 1
fire_delay = 0
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
actions_types = list()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/shotgun/bulldog/Initialize()
. = ..()
@@ -286,10 +286,10 @@
can_suppress = FALSE
burst_size = 3
fire_delay = 1
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user)
@@ -363,7 +363,7 @@
zoomable = TRUE
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
zoom_out_amt = 13
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
actions_types = list()
@@ -377,7 +377,7 @@
/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "An illegally modified .50 cal sniper rifle with suppression compatibility. Quickscoping still doesn't work."
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
// Old Semi-Auto Rifle //
@@ -393,7 +393,7 @@
can_unsuppress = TRUE
can_suppress = TRUE
w_class = WEIGHT_CLASS_HUGE
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
actions_types = list()
/obj/item/gun/ballistic/automatic/surplus/update_icon()
@@ -9,7 +9,7 @@
item_state = "backpack"
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
var/obj/item/gun/ballistic/minigun/gun
var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
@@ -33,14 +33,13 @@
/obj/item/minigunpack/attack_hand(var/mob/living/carbon/user)
if(src.loc == user)
if(!armed)
if(user.get_item_by_slot(slot_back) == src)
if(user.get_item_by_slot(SLOT_BACK) == src)
armed = 1
if(!user.put_in_hands(gun))
armed = 0
to_chat(user, "<span class='warning'>You need a free hand to hold the gun!</span>")
return
update_icon()
gun.forceMove(user)
user.update_inv_back()
else
to_chat(user, "<span class='warning'>You are already holding the gun!</span>")
@@ -9,10 +9,10 @@
mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher
fire_sound = 'sound/weapons/grenadelaunch.ogg'
w_class = WEIGHT_CLASS_NORMAL
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params)
..()
@@ -25,7 +25,7 @@
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_grenadelnchr"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenademulti
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/grenadelauncher/cyborg/attack_self()
return
@@ -148,7 +148,7 @@
icon_state = "goldrevolver"
fire_sound = 'sound/weapons/resonator_blast.ogg'
recoil = 8
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/nagant
name = "nagant revolver"
@@ -238,7 +238,7 @@
/obj/item/gun/ballistic/revolver/russian/soul/shoot_self(mob/living/user)
..()
var/obj/item/device/soulstone/anybody/SS = new /obj/item/device/soulstone/anybody(get_turf(src))
var/obj/item/soulstone/anybody/SS = new /obj/item/soulstone/anybody(get_turf(src))
if(!SS.transfer_soul("FORCE", user)) //Something went wrong
qdel(SS)
return
@@ -257,7 +257,7 @@
weapon_weight = WEAPON_MEDIUM
force = 10
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
sawn_desc = "Omar's coming!"
obj_flags = UNIQUE_RENAME
@@ -314,7 +314,7 @@
if(istype(A, /obj/item/stack/cable_coil) && !sawn_off)
var/obj/item/stack/cable_coil/C = A
if(C.use(10))
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
slung = TRUE
update_icon()
@@ -340,7 +340,7 @@
item_state = "gun"
w_class = WEIGHT_CLASS_NORMAL
sawn_off = TRUE
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
/obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
@@ -6,7 +6,7 @@
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
mag_type = /obj/item/ammo_box/magazine/internal/shot
casing_ejector = FALSE
var/recentpump = 0 // to prevent spammage
@@ -107,7 +107,7 @@
desc = "This piece of junk looks like something that could have been used 700 years ago. It feels slightly moist."
icon_state = "moistnugget"
item_state = "moistnugget"
slot_flags = 0 //no SLOT_BACK sprite, alas
slot_flags = 0 //no ITEM_SLOT_BACK sprite, alas
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
var/bolt_open = FALSE
can_bayonet = TRUE
@@ -146,7 +146,7 @@
name = "arcane barrage"
desc = "Pew Pew Pew."
fire_sound = 'sound/weapons/emitter.ogg'
pin = /obj/item/device/firing_pin/magic
pin = /obj/item/firing_pin/magic
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
can_bayonet = FALSE
@@ -15,7 +15,7 @@
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/toy/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/toy/pistol
name = "foam force pistol"
@@ -40,10 +40,10 @@
return ..()
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/toy/pistol/riot/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/shotgun/toy
name = "foam force shotgun"
@@ -63,7 +63,7 @@
qdel(chambered)
/obj/item/gun/ballistic/shotgun/toy/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/shotgun/toy/crossbow
name = "foam force crossbow"
@@ -73,7 +73,7 @@
item_state = "crossbow"
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow
fire_sound = 'sound/items/syringeproj.ogg'
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
/obj/item/gun/ballistic/automatic/c20r/toy //This is the syndicate variant with syndicate firing pin and riot darts.
@@ -87,7 +87,7 @@
clumsy_check = FALSE
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted //Use this for actual toys
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot
@@ -104,7 +104,7 @@
clumsy_check = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted //Use this for actual toys
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
mag_type = /obj/item/ammo_box/magazine/toy/m762
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot
@@ -22,7 +22,7 @@
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
/obj/item/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/device/flashlight/seclite(src)
gun_light = new /obj/item/flashlight/seclite(src)
return ..()
/obj/item/gun/energy/e_gun/mini/update_icon()
@@ -66,7 +66,7 @@
item_state = "shotgun"
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
shaded_charge = 0
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
///Laser Cannon
@@ -79,7 +79,7 @@
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
pin = null
ammo_x_offset = 3
@@ -118,7 +118,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/device/firing_pin/tag/blue
pin = /obj/item/firing_pin/tag/blue
ammo_x_offset = 2
selfcharge = TRUE
@@ -132,7 +132,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/device/firing_pin/tag/red
pin = /obj/item/firing_pin/tag/red
ammo_x_offset = 2
selfcharge = TRUE
@@ -7,7 +7,7 @@
force = 10
modifystate = TRUE
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
cell_type = "/obj/item/stock_parts/cell/pulse"
@@ -15,7 +15,7 @@
return
/obj/item/gun/energy/pulse/prize
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/pulse/prize/Initialize()
. = ..()
@@ -33,13 +33,13 @@
. = ..()
/obj/item/gun/energy/pulse/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine
name = "pulse carbine"
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
w_class = WEIGHT_CLASS_NORMAL
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_carbine"
item_state = null
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
@@ -48,19 +48,19 @@
flight_y_offset = 12
/obj/item/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/pistol
name = "pulse pistol"
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_pistol"
item_state = "gun"
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
/obj/item/gun/energy/pulse/pistol/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/destroyer
name = "pulse destroyer"
@@ -6,7 +6,7 @@
can_flashlight = 1
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
ammo_x_offset = 3
flight_x_offset = 17
@@ -20,7 +20,7 @@
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
icon_state = "ioncarbine"
w_class = WEIGHT_CLASS_NORMAL
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
pin = null
ammo_x_offset = 2
flight_x_offset = 18
@@ -267,7 +267,7 @@
/obj/item/gun/energy/temperature/security
name = "security temperature gun"
desc = "A weapon that can only be used to its full potential by the truly robust."
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/laser/instakill
name = "instakill rifle"
+1 -1
View File
@@ -18,7 +18,7 @@
var/no_den_usage
clumsy_check = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
pin = /obj/item/device/firing_pin/magic
pin = /obj/item/firing_pin/magic
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/item/gun/magic/staff
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
item_flags = NEEDS_PERMIT | NO_MAT_REDEMPTION
@@ -17,7 +17,7 @@
icon_state = "esniper"
item_state = "esniper"
fire_sound = 'sound/weapons/beam_sniper.ogg'
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
force = 15
materials = list()
recoil = 4
@@ -58,7 +58,7 @@
var/projectile_damage = 30
var/projectile_stun = 0
var/projectile_setting_pierce = TRUE
var/delay = 65
var/delay = 25
var/lastfire = 0
//ZOOMING
@@ -82,7 +82,7 @@
cell_type = /obj/item/stock_parts/cell/infinite
aiming_time = 0
recoil = 0
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/beam_rifle/equipped(mob/user)
set_user(user)
@@ -182,6 +182,7 @@
/obj/item/gun/energy/beam_rifle/Initialize()
. = ..()
fire_delay = delay
current_tracers = list()
START_PROCESSING(SSprojectiles, src)
zoom_lock_action = new(src)
@@ -435,7 +436,7 @@
/obj/item/projectile/beam/beam_rifle
name = "particle beam"
icon = ""
icon = null
hitsound = 'sound/effects/explosion3.ogg'
damage = 0 //Handled manually.
damage_type = BURN
@@ -11,7 +11,7 @@
clumsy_check = FALSE
randomspread = FALSE
var/obj/item/device/transfer_valve/bomb
var/obj/item/transfer_valve/bomb
/obj/item/gun/blastcannon/Initialize()
. = ..()
@@ -19,9 +19,7 @@
pin = new
/obj/item/gun/blastcannon/Destroy()
if(bomb)
qdel(bomb)
bomb = null
QDEL_NULL(bomb)
return ..()
/obj/item/gun/blastcannon/attack_self(mob/user)
@@ -44,22 +42,22 @@
desc = initial(desc)
/obj/item/gun/blastcannon/attackby(obj/O, mob/user)
if(istype(O, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/T = O
if(istype(O, /obj/item/transfer_valve))
var/obj/item/transfer_valve/T = O
if(!T.tank_one || !T.tank_two)
to_chat(user, "<span class='warning'>What good would an incomplete bomb do?</span>")
return FALSE
if(!user.transferItemToLoc(O, src))
to_chat(user, "<span class='warning'>[O] seems to be stuck to your hand!</span>")
if(!user.transferItemToLoc(T, src))
to_chat(user, "<span class='warning'>[T] seems to be stuck to your hand!</span>")
return FALSE
user.visible_message("<span class='warning'>[user] attaches [O] to [src]!</span>")
bomb = O
user.visible_message("<span class='warning'>[user] attaches [T] to [src]!</span>")
bomb = T
update_icon()
return TRUE
return ..()
/obj/item/gun/blastcannon/proc/calculate_bomb()
if(!istype(bomb)||!istype(bomb.tank_one)||!istype(bomb.tank_two))
if(!istype(bomb) || !istype(bomb.tank_one) || !istype(bomb.tank_two))
return 0
var/datum/gas_mixture/temp = new(60) //directional buff.
temp.merge(bomb.tank_one.air_contents.remove_ratio(1))
@@ -70,18 +68,18 @@
qdel(temp)
if(pressure < TANK_FRAGMENT_PRESSURE)
return 0
return (pressure/TANK_FRAGMENT_SCALE)
return (pressure / TANK_FRAGMENT_SCALE)
/obj/item/gun/blastcannon/afterattack(atom/target, mob/user, flag, params)
if((!bomb) || (!target) || (get_dist(get_turf(target), get_turf(user)) <= 2))
return ..()
var/power = calculate_bomb()
qdel(bomb)
QDEL_NULL(bomb)
update_icon()
var/heavy = power * 0.2
var/medium = power * 0.5
var/light = power
user.visible_message("<span class='danger'>[user] opens \the [bomb] on \his [name] and fires a blast wave at \the [target]!</span>","<span class='danger'>You open \the [bomb] on your [name] and fire a blast wave at \the [target]!</span>")
user.visible_message("<span class='danger'>[user] opens [bomb] on [user.p_their()] [name] and fires a blast wave at [target]!</span>","<span class='danger'>You open [bomb] on your [name] and fire a blast wave at [target]!</span>")
playsound(user, "explosion", 100, 1)
var/turf/starting = get_turf(user)
var/turf/targturf = get_turf(target)
@@ -111,17 +109,21 @@
/obj/item/projectile/blastwave/Range()
..()
var/amount_destruction = EXPLODE_NONE
if(heavyr)
loc.ex_act(EXPLODE_DEVASTATE)
amount_destruction = EXPLODE_DEVASTATE
else if(mediumr)
loc.ex_act(EXPLODE_HEAVY)
amount_destruction = EXPLODE_HEAVY
else if(lightr)
loc.ex_act(EXPLODE_LIGHT)
amount_destruction = EXPLODE_LIGHT
if(amount_destruction)
loc.ex_act(amount_destruction)
else
qdel(src)
heavyr--
mediumr--
lightr--
heavyr = max(heavyr - 1, 0)
mediumr = max(mediumr - 1, 0)
lightr = max(lightr - 1, 0)
/obj/item/projectile/blastwave/ex_act()
return
return
@@ -116,6 +116,8 @@
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
target.adjustBruteLoss(-4)
target.adjustFireLoss(-4)
target.adjustToxLoss(-1)
target.adjustOxyLoss(-1)
return
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
+53 -56
View File
@@ -1,4 +1,4 @@
/obj/item/device/firing_pin
/obj/item/firing_pin
name = "electronic firing pin"
desc = "A small authentication device, to be inserted into a firearm receiver to allow operation. NT safety regulations require all new designs to incorporate one."
icon = 'icons/obj/device.dmi'
@@ -13,13 +13,12 @@
var/pin_removeable = 0 // Can be replaced by any pin.
var/obj/item/gun/gun
/obj/item/device/firing_pin/New(newloc)
/obj/item/firing_pin/New(newloc)
..()
if(istype(newloc, /obj/item/gun))
gun = newloc
/obj/item/device/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
/obj/item/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
if(istype(target, /obj/item/gun))
var/obj/item/gun/G = target
@@ -36,27 +35,27 @@
else
to_chat(user, "<span class ='notice'>This firearm already has a firing pin installed.</span>")
/obj/item/device/firing_pin/emag_act(mob/user)
/obj/item/firing_pin/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
/obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
/obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
gun = G
forceMove(gun)
gun.pin = src
return
/obj/item/device/firing_pin/proc/gun_remove(mob/living/user)
/obj/item/firing_pin/proc/gun_remove(mob/living/user)
gun.pin = null
gun = null
return
/obj/item/device/firing_pin/proc/pin_auth(mob/living/user)
return 1
/obj/item/firing_pin/proc/pin_auth(mob/living/user)
return TRUE
/obj/item/device/firing_pin/proc/auth_fail(mob/living/user)
/obj/item/firing_pin/proc/auth_fail(mob/living/user)
user.show_message(fail_message, 1)
if(selfdestruct)
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", 1)
@@ -67,45 +66,45 @@
/obj/item/device/firing_pin/magic
/obj/item/firing_pin/magic
name = "magic crystal shard"
desc = "A small enchanted shard which allows magical weapons to fire."
// Test pin, works only near firing range.
/obj/item/device/firing_pin/test_range
/obj/item/firing_pin/test_range
name = "test-range firing pin"
desc = "This safety firing pin allows weapons to be fired within proximity to a firing range."
fail_message = "<span class='warning'>TEST RANGE CHECK FAILED.</span>"
pin_removeable = 1
pin_removeable = TRUE
/obj/item/device/firing_pin/test_range/pin_auth(mob/living/user)
/obj/item/firing_pin/test_range/pin_auth(mob/living/user)
for(var/obj/machinery/magnetic_controller/M in range(user, 3))
return 1
return 0
return TRUE
return FALSE
// Implant pin, checks for implant
/obj/item/device/firing_pin/implant
/obj/item/firing_pin/implant
name = "implant-keyed firing pin"
desc = "This is a security firing pin which only authorizes users who are implanted with a certain device."
fail_message = "<span class='warning'>IMPLANT CHECK FAILED.</span>"
var/obj/item/implant/req_implant = null
/obj/item/device/firing_pin/implant/pin_auth(mob/living/user)
if(istype(user))
/obj/item/firing_pin/implant/pin_auth(mob/living/user)
if(user)
for(var/obj/item/implant/I in user.implants)
if(req_implant && I.type == req_implant)
return 1
return 0
return TRUE
return FALSE
/obj/item/device/firing_pin/implant/mindshield
/obj/item/firing_pin/implant/mindshield
name = "mindshield firing pin"
desc = "This Security firing pin authorizes the weapon for only mindshield-implanted users."
icon_state = "firing_pin_loyalty"
req_implant = /obj/item/implant/mindshield
/obj/item/device/firing_pin/implant/pindicate
/obj/item/firing_pin/implant/pindicate
name = "syndicate firing pin"
icon_state = "firing_pin_pindi"
req_implant = /obj/item/implant/weapons_auth
@@ -114,49 +113,49 @@
// Honk pin, clown's joke item.
// Can replace other pins. Replace a pin in cap's laser for extra fun!
/obj/item/device/firing_pin/clown
/obj/item/firing_pin/clown
name = "hilarious firing pin"
desc = "Advanced clowntech that can convert any firearm into a far more useful object."
color = "#FFFF00"
fail_message = "<span class='warning'>HONK!</span>"
force_replace = 1
force_replace = TRUE
/obj/item/device/firing_pin/clown/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
return 0
/obj/item/firing_pin/clown/pin_auth(mob/living/user)
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
return FALSE
// Ultra-honk pin, clown's deadly joke item.
// A gun with ultra-honk pin is useful for clown and useless for everyone else.
/obj/item/device/firing_pin/clown/ultra/pin_auth(mob/living/user)
/obj/item/firing_pin/clown/ultra/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
if(!(user.has_trait(TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown"))
return 0
return 1
if(user && (!(user.has_trait(TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")))
return FALSE
return TRUE
/obj/item/device/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/gun/G)
/obj/item/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/gun/G)
..()
G.clumsy_check = 0
G.clumsy_check = FALSE
/obj/item/device/firing_pin/clown/ultra/gun_remove(mob/living/user)
/obj/item/firing_pin/clown/ultra/gun_remove(mob/living/user)
gun.clumsy_check = initial(gun.clumsy_check)
..()
// Now two times deadlier!
/obj/item/device/firing_pin/clown/ultra/selfdestruct
/obj/item/firing_pin/clown/ultra/selfdestruct
desc = "Advanced clowntech that can convert any firearm into a far more useful object. It has a small nitrobananium charge on it."
selfdestruct = 1
selfdestruct = TRUE
// DNA-keyed pin.
// When you want to keep your toys for youself.
/obj/item/device/firing_pin/dna
/obj/item/firing_pin/dna
name = "DNA-keyed firing pin"
desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link."
icon_state = "firing_pin_dna"
fail_message = "<span class='warning'>DNA CHECK FAILED.</span>"
var/unique_enzymes = null
/obj/item/device/firing_pin/dna/afterattack(atom/target, mob/user, proximity_flag)
/obj/item/firing_pin/dna/afterattack(atom/target, mob/user, proximity_flag)
..()
if(proximity_flag && iscarbon(target))
var/mob/living/carbon/M = target
@@ -164,55 +163,53 @@
unique_enzymes = M.dna.unique_enzymes
to_chat(user, "<span class='notice'>DNA-LOCK SET.</span>")
/obj/item/device/firing_pin/dna/pin_auth(mob/living/carbon/user)
if(istype(user) && user.dna && user.dna.unique_enzymes)
/obj/item/firing_pin/dna/pin_auth(mob/living/carbon/user)
if(user && user.dna && user.dna.unique_enzymes)
if(user.dna.unique_enzymes == unique_enzymes)
return 1
return TRUE
return FALSE
return 0
/obj/item/device/firing_pin/dna/auth_fail(mob/living/carbon/user)
/obj/item/firing_pin/dna/auth_fail(mob/living/carbon/user)
if(!unique_enzymes)
if(istype(user) && user.dna && user.dna.unique_enzymes)
if(user && user.dna && user.dna.unique_enzymes)
unique_enzymes = user.dna.unique_enzymes
to_chat(user, "<span class='notice'>DNA-LOCK SET.</span>")
else
..()
/obj/item/device/firing_pin/dna/dredd
/obj/item/firing_pin/dna/dredd
desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link. It has a small explosive charge on it."
selfdestruct = 1
selfdestruct = TRUE
// Laser tag pins
/obj/item/device/firing_pin/tag
/obj/item/firing_pin/tag
name = "laser tag firing pin"
desc = "A recreational firing pin, used in laser tag units to ensure users have their vests on."
fail_message = "<span class='warning'>SUIT CHECK FAILED.</span>"
var/obj/item/clothing/suit/suit_requirement = null
var/tagcolor = ""
/obj/item/device/firing_pin/tag/pin_auth(mob/living/user)
/obj/item/firing_pin/tag/pin_auth(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/M = user
if(istype(M.wear_suit, suit_requirement))
return 1
return TRUE
to_chat(user, "<span class='warning'>You need to be wearing [tagcolor] laser tag armor!</span>")
return 0
return FALSE
/obj/item/device/firing_pin/tag/red
/obj/item/firing_pin/tag/red
name = "red laser tag firing pin"
icon_state = "firing_pin_red"
suit_requirement = /obj/item/clothing/suit/redtag
tagcolor = "red"
/obj/item/device/firing_pin/tag/blue
/obj/item/firing_pin/tag/blue
name = "blue laser tag firing pin"
icon_state = "firing_pin_blue"
suit_requirement = /obj/item/clothing/suit/bluetag
tagcolor = "blue"
/obj/item/device/firing_pin/Destroy()
/obj/item/firing_pin/Destroy()
if(gun)
gun.pin = null
return ..()
@@ -71,7 +71,7 @@
/obj/effect/nettingportal/Initialize()
. = ..()
var/obj/item/device/radio/beacon/teletarget = null
var/obj/item/radio/beacon/teletarget = null
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
@@ -31,7 +31,7 @@
/obj/effect/nettingportal/Initialize()
. = ..()
var/obj/item/device/beacon/teletarget = null
var/obj/item/beacon/teletarget = null
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
@@ -3,12 +3,12 @@
desc = "I hope you're wearing eye protection."
damage = 0 // It's a damn toy.
damage_type = OXY
nodamage = 1
nodamage = TRUE
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart_proj"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
range = 10
var/modified = 0
var/modified = FALSE
var/obj/item/pen/pen = null
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
@@ -4,7 +4,7 @@
/obj/item/projectile/curse_hand
name = "curse hand"
icon_state = "cursehand"
icon_state = "cursehand0"
hitsound = 'sound/effects/curse4.ogg'
layer = LARGE_MOB_LAYER
damage_type = BURN
@@ -19,10 +19,7 @@
/obj/item/projectile/curse_hand/Initialize(mapload)
. = ..()
handedness = prob(50)
update_icon()
/obj/item/projectile/curse_hand/update_icon()
icon_state = "[icon_state][handedness]"
icon_state = "cursehand[handedness]"
/obj/item/projectile/curse_hand/fire(setAngle)
if(starting)
@@ -6,4 +6,4 @@
if(ishuman(target))
var/mob/living/carbon/human/M = target
M.adjustBrainLoss(20)
M.hallucination += 20
M.hallucination += 30