Merge branch 'master' into upstream-merge-37597

This commit is contained in:
LetterJay
2018-05-22 07:21:53 -05:00
committed by GitHub
661 changed files with 12019 additions and 10559 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
@@ -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)
@@ -4,11 +4,11 @@
desc = "A box of ammo."
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
@@ -20,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)
@@ -108,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
+1 -1
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
+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
@@ -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()
@@ -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>")
@@ -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
@@ -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.
@@ -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
@@ -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"
@@ -39,7 +39,7 @@
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"
@@ -54,7 +54,7 @@
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"
@@ -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
+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'
flags_2 = NO_MAT_REDEMPTION_2
@@ -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
@@ -436,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
@@ -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)
@@ -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