Merge branch 'master' into upstream-merge-37582

This commit is contained in:
LetterJay
2018-05-21 08:35:21 -05:00
committed by GitHub
413 changed files with 10010 additions and 7528 deletions
@@ -7,6 +7,7 @@
slot_flags = 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)
@@ -8,7 +8,7 @@
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
@@ -40,7 +40,6 @@
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>")
@@ -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