This commit is contained in:
Seris02
2020-02-22 19:54:10 +08:00
701 changed files with 12663 additions and 5550 deletions
@@ -7,7 +7,7 @@
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 500)
custom_materials = list(/datum/material/iron = 500)
var/fire_sound = null //What sound should play when this ammo is fired
var/caliber = list() //Which kind of guns it can be loaded into
var/projectile_type = null //The bullet type to create when New() is called
@@ -6,14 +6,14 @@
icon_state = "blshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun_slug
materials = list(MAT_METAL=4000)
custom_materials = list(/datum/material/iron=4000)
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/shotgun_beanbag
materials = list(MAT_METAL=250)
custom_materials = list(/datum/material/iron=250)
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary slug"
@@ -34,7 +34,7 @@
desc = "A stunning taser slug."
icon_state = "stunshell"
projectile_type = /obj/item/projectile/bullet/shotgun_stunslug
materials = list(MAT_METAL=250)
custom_materials = list(/datum/material/iron=250)
/obj/item/ammo_casing/shotgun/meteorslug
name = "meteorslug shell"
@@ -71,14 +71,14 @@
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_rubbershot
pellets = 6
variance = 25
materials = list(MAT_METAL=4000)
custom_materials = list(/datum/material/iron=4000)
/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_improvised
materials = list(MAT_METAL=250)
custom_materials = list(/datum/material/iron=250)
pellets = 10
variance = 25
@@ -5,4 +5,22 @@
caliber = "arrow"
icon_state = "arrow"
throwforce = 3 //good luck hitting someone with the pointy end of the arrow
throw_speed = 3
throw_speed = 3
/obj/item/ammo_casing/caseless/arrow/ashen
name = "ashen arrow"
desc = "Fire harderned wooden arrow."
icon_state = "asharrow"
projectile_type = /obj/item/projectile/bullet/reusable/arrow/ashen
/obj/item/ammo_casing/caseless/arrow/bone
name = "bone arrow"
desc = "Arrow made of bone and sinew. The tip is sharp enough to pierce into a goliath plate."
icon_state = "bonearrow"
projectile_type = /obj/item/projectile/bullet/reusable/arrow/bone
/obj/item/ammo_casing/caseless/arrow/bronze
name = "bronze arrow"
desc = "Bronze tipped arrow."
icon_state = "bronzearrow"
projectile_type = /obj/item/projectile/bullet/reusable/arrow/bronze
@@ -5,7 +5,7 @@
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
materials = list(MAT_METAL = 11.25)
custom_materials = list(/datum/material/iron = 11.25)
harmful = FALSE
var/modified = FALSE
@@ -62,7 +62,7 @@
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)
custom_materials = list(/datum/material/iron = 1125)
/obj/item/ammo_casing/caseless/foam_dart/mag
name = "magfoam dart"
@@ -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)
custom_materials = list(/datum/material/iron = 30000)
throwforce = 2
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -26,8 +26,8 @@
/obj/item/ammo_box/Initialize()
. = ..()
if (!bullet_cost)
for (var/material in materials)
var/material_amount = materials[material]
for (var/material in custom_materials)
var/material_amount = custom_materials[material]
LAZYSET(base_cost, material, (material_amount * 0.10))
material_amount *= 0.90 // 10% for the container
@@ -121,7 +121,8 @@
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
custom_materials[material] = material_amount
set_custom_materials(custom_materials)//make sure we setup the correct properties again
//Behavior for magazines
/obj/item/ammo_box/magazine/proc/ammo_count()
@@ -19,7 +19,7 @@
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
multiple_sprites = 1
materials = list(MAT_METAL = 20000)
custom_materials = list(/datum/material/iron = 20000)
/obj/item/ammo_box/c38/lethal
name = "speed loader (.38)"
@@ -85,7 +85,7 @@
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 40
materials = list(MAT_METAL = 500)
custom_materials = list(/datum/material/iron = 500)
/obj/item/ammo_box/foambox/mag
name = "ammo box (Magnetic Foam Darts)"
@@ -97,4 +97,4 @@
/obj/item/ammo_box/foambox/riot
icon_state = "foambox_riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
materials = list(MAT_METAL = 50000)
custom_materials = list(/datum/material/iron = 50000)
+1 -1
View File
@@ -64,4 +64,4 @@
max_ammo = 24
multiple_sprites = 2
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/mag
materials = list(MAT_METAL = 200)
custom_materials = list(/datum/material/iron = 200)
+5 -2
View File
@@ -9,13 +9,13 @@
item_state = "gun"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
w_class = WEIGHT_CLASS_NORMAL
throwforce = 5
throw_speed = 3
throw_range = 5
force = 5
item_flags = NEEDS_PERMIT
item_flags = NEEDS_PERMIT | NO_ATTACK_CHAIN_SOFT_STAMCRIT
attack_verb = list("struck", "hit", "bashed")
var/fire_sound = "gunshot"
@@ -168,6 +168,9 @@
return
if(firing)
return
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) //respect stamina softcrit
to_chat(user, "<span class='warning'>You are too exhausted to fire [src]!</span>")
return
if(flag) //It's adjacent, is the user, or is on the user's person
if(target in user.contents) //can't shoot stuff inside us.
return
+16 -1
View File
@@ -50,4 +50,19 @@
icon_state = "bow_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
/obj/item/gun/ballistic/bow/can_shoot()
return chambered
return chambered
/obj/item/gun/ballistic/bow/ashen
name = "bone bow"
desc = "Some sort of primitive projectile weapon made of bone and sinew. Used to fire arrows."
icon_state = "ashenbow"
item_state = "ashenbow"
force = 8
/obj/item/gun/ballistic/bow/pipe
name = "pipe bow"
desc = "Some sort of pipe made projectile weapon made of a silk string and lots of bending. Used to fire arrows."
icon_state = "pipebow"
item_state = "pipebow"
inaccuracy_modifier = 1.1 //Made of pipe and in a rush
force = 0
@@ -102,7 +102,7 @@
slowdown = 1
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
materials = list()
custom_materials = null
burst_size = 3
automatic = 0
fire_delay = 1
@@ -61,7 +61,6 @@
/obj/item/gun/ballistic/automatic/magrifle/nopin
pin = null
spawnwithmagazine = FALSE
cell_type = /obj/item/stock_parts/cell/magnetic/empty
/obj/item/gun/ballistic/automatic/magrifle/hyperburst
name = "\improper Hyper-Burst Rifle"
@@ -100,4 +99,3 @@
/obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
pin = null
spawnwithmagazine = FALSE
cell_type = /obj/item/stock_parts/cell/magnetic/pistol/empty
+2 -1
View File
@@ -67,7 +67,8 @@
/obj/item/gun/energy/Destroy()
if(flags_1 & INITIALIZED_1)
QDEL_NULL(cell)
QDEL_LIST(ammo_type)
if(!(flags_1 & HOLOGRAM_1)) //holodeck stuff.
QDEL_LIST(ammo_type)
STOP_PROCESSING(SSobj, src)
return ..()
@@ -320,10 +320,10 @@
if(C.setting == counter_setting)
return BULLET_ACT_BLOCK
var/mob/living/L = target
if(!istype(target))
if(!isliving(target))
return BULLET_ACT_BLOCK
var/mob/living/L = target
switch(hugbox)
if(DUEL_HUGBOX_NONE)
var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD)
@@ -4,13 +4,14 @@
icon_state = "laser"
item_state = "laser"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
shaded_charge = 1
/obj/item/gun/energy/laser/practice
name = "practice laser gun"
icon_state = "laser-p"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
clumsy_check = 0
@@ -85,7 +85,7 @@
icon_state = "crossbow"
item_state = "crossbow"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
suppressed = TRUE
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
weapon_weight = WEAPON_LIGHT
@@ -108,7 +108,7 @@
desc = "A reverse engineered weapon using syndicate technology. This thing seems incredibly unwieldly, and seems to be using similar internals to the Proto-Kinetic Accelerator. It might not play nice when brought near weapons similar to it."
icon_state = "crossbowlarge"
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_METAL=4000)
custom_materials = list(/datum/material/iron=4000)
suppressed = null
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
weapon_weight = WEAPON_HEAVY
@@ -19,7 +19,7 @@
fire_sound = 'sound/weapons/beam_sniper.ogg'
slot_flags = ITEM_SLOT_BACK
force = 15
materials = list()
custom_materials = null
recoil = 4
ammo_x_offset = 3
ammo_y_offset = 3
@@ -9,7 +9,7 @@
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
var/time_per_syringe = 250
@@ -10,7 +10,7 @@
force = 5
var/list/grenades = new/list()
var/max_grenades = 3
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
/obj/item/gun/grenadelauncher/examine(mob/user)
. = ..()
@@ -7,7 +7,7 @@
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
clumsy_check = 0
fire_sound = 'sound/items/syringeproj.ogg'
var/list/syringes = list()
@@ -108,7 +108,7 @@
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
icon_state = "dartgun"
item_state = "dartgun"
materials = list(MAT_METAL=2000, MAT_GLASS=500)
custom_materials = list(/datum/material/iron=2000, /datum/material/glass=500)
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE
+5 -6
View File
@@ -52,7 +52,6 @@
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
var/list/beam_segments //assoc list of datum/point or datum/point/vector, start = end. Used for hitscan effect generation.
var/datum/point/beam_index
var/turf/hitscan_last //last turf touched during hitscanning.
var/tracer_type
var/muzzle_type
var/impact_type
@@ -492,8 +491,6 @@
process_homing()
var/forcemoved = FALSE
for(var/i in 1 to SSprojectiles.global_iterations_per_move)
if(QDELETED(src))
return
trajectory.increment(trajectory_multiplier)
var/turf/T = trajectory.return_turf()
if(!istype(T))
@@ -506,14 +503,16 @@
forceMove(T)
trajectory_ignore_forcemove = FALSE
after_z_change(old, loc)
forcemoved = TRUE
if(QDELETED(src))
return
if(!hitscanning)
pixel_x = trajectory.return_px()
pixel_y = trajectory.return_py()
forcemoved = TRUE
hitscan_last = loc
else if(T != loc)
step_towards(src, T)
hitscan_last = loc
if(QDELETED(src))
return
if(!hitscanning && !forcemoved)
pixel_x = trajectory.return_px() - trajectory.mpx * trajectory_multiplier * SSprojectiles.global_iterations_per_move
pixel_y = trajectory.return_py() - trajectory.mpy * trajectory_multiplier * SSprojectiles.global_iterations_per_move
@@ -6,7 +6,7 @@
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
create_reagents(50, NO_REACT)
create_reagents(50, NO_REACT, NO_REAGENTS_VALUE)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
if(iscarbon(target))
@@ -7,10 +7,11 @@
var/zap_range = 3
var/power = 10000
/obj/item/projectile/energy/tesla/fire(setAngle)
if(firer)
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
..()
/obj/item/projectile/energy/tesla/fire(setAngle, atom/direct_target)
var/atom/source = fired_from || firer
if(source)
chain = source.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
return ..()
/obj/item/projectile/energy/tesla/on_hit(atom/target)
. = ..()
@@ -3,4 +3,23 @@
desc = "Woosh!"
damage = 15
icon_state = "arrow"
ammo_type = /obj/item/ammo_casing/caseless/arrow
ammo_type = /obj/item/ammo_casing/caseless/arrow
/obj/item/projectile/bullet/reusable/arrow/ashen
name = "ashen arrow"
desc = "Fire harderned arrow."
damage = 25
ammo_type = /obj/item/ammo_casing/caseless/arrow/ashen
/obj/item/projectile/bullet/reusable/arrow/bone //AP for ashwalkers
name = "bone arrow"
desc = "Arrow made of bone and sinew."
damage = 35
armour_penetration = 40
ammo_type = /obj/item/ammo_casing/caseless/arrow/bone
/obj/item/projectile/bullet/reusable/arrow/bronze //Just some AP shots
name = "bronze arrow"
desc = "Bronze tipped arrow."
armour_penetration = 10
ammo_type = /obj/item/ammo_casing/caseless/arrow/bronze
@@ -43,4 +43,34 @@
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
return BULLET_ACT_HIT
return BULLET_ACT_HIT
/obj/item/projectile/bullet/a84mm_br
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
damage = 30
ricochets_max = 0 //it's a MISSILE
var/sturdy = list(
/turf/closed,
/obj/mecha,
/obj/machinery/door/,
/obj/machinery/door/poddoor/shutters
)
/obj/item/broken_missile
name = "\improper broken missile"
desc = "A missile that did not detonate. The tail has snapped and it is in no way fit to be used again."
icon = 'icons/obj/projectiles.dmi'
icon_state = "missile_broken"
w_class = WEIGHT_CLASS_TINY
/obj/item/projectile/bullet/a84mm_br/on_hit(atom/target, blocked=0)
..()
for(var/i in sturdy)
if(istype(target, i))
explosion(target, 0, 1, 1, 2)
return BULLET_ACT_HIT
//if(istype(target, /turf/closed) || ismecha(target))
new /obj/item/broken_missile(get_turf(src), 1)