mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Explorer Expansion: New Horizons
This commit is contained in:
@@ -287,6 +287,14 @@
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1250)
|
||||
|
||||
/obj/item/ammo_casing/a145/highvel
|
||||
desc = "A 14.5mm sabot shell."
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
|
||||
/obj/item/ammo_casing/a145/spent/Initialize()
|
||||
..()
|
||||
expend()
|
||||
|
||||
/*
|
||||
* 5.45mm
|
||||
*/
|
||||
|
||||
134
code/modules/projectiles/broken.dm
Normal file
134
code/modules/projectiles/broken.dm
Normal file
@@ -0,0 +1,134 @@
|
||||
|
||||
/obj/item/weapon/broken_gun
|
||||
desc = "The remains of an unfortunate firearm."
|
||||
|
||||
var/obj/item/weapon/gun/my_guntype = null
|
||||
|
||||
// Materials needed for repair. Associative list, path - number of items
|
||||
var/list/material_needs
|
||||
|
||||
var/do_rotation = TRUE
|
||||
|
||||
/obj/item/weapon/broken_gun/New(var/newloc, var/path)
|
||||
..()
|
||||
if(path)
|
||||
if(!setup_gun(path))
|
||||
qdel(src)
|
||||
return
|
||||
setup_repair_needs()
|
||||
|
||||
/obj/item/weapon/broken_gun/Initialize()
|
||||
..()
|
||||
spawn(30 SECONDS)
|
||||
if(!my_guntype && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/broken_gun/examine(mob/user)
|
||||
..()
|
||||
if(get_dist(get_turf(user),get_turf(src)) <= 1)
|
||||
to_chat(user, "<span class='notice'>You begin inspecting \the [src].</span>")
|
||||
|
||||
if(do_after(user, 5 SECONDS))
|
||||
to_chat(user, "<span class='notice'>\The [src] can possibly be restored with:</span>")
|
||||
for(var/resource in material_needs)
|
||||
if(material_needs[resource] > 0)
|
||||
to_chat(user, "<span class='notice'>- \icon [resource] x [material_needs[resource]] [resource]</span>")
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/setup_gun(var/obj/item/weapon/gun/path)
|
||||
if(ispath(path))
|
||||
name = "[pick("busted", "broken", "shattered", "scrapped")] [initial(path.name)]"
|
||||
icon = initial(path.icon)
|
||||
icon_state = initial(path.icon_state)
|
||||
|
||||
my_guntype = path
|
||||
|
||||
w_class = initial(path.w_class)
|
||||
|
||||
if(do_rotation)
|
||||
adjust_rotation(rand() * pick(-1,1) * rand(0, 45))
|
||||
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/setup_repair_needs()
|
||||
if(!LAZYLEN(material_needs))
|
||||
material_needs = list()
|
||||
|
||||
if(prob(40))
|
||||
var/chosen_mat = pick(/obj/item/stack/material/plastic, /obj/item/stack/material/plasteel, /obj/item/stack/material/glass)
|
||||
material_needs[chosen_mat] = rand(1, 3)
|
||||
|
||||
if(prob(30))
|
||||
var/component_needed = pick(/obj/item/weapon/stock_parts/gear,/obj/item/weapon/stock_parts/spring,/obj/item/weapon/stock_parts/manipulator)
|
||||
material_needs[component_needed] = rand(1,3)
|
||||
|
||||
if(ispath(my_guntype, /obj/item/weapon/gun/energy) && prob(25))
|
||||
var/component_needed = pick(/obj/item/stack/cable_coil, /obj/item/weapon/stock_parts/scanning_module,/obj/item/weapon/stock_parts/capacitor)
|
||||
material_needs[component_needed] = rand(1,3)
|
||||
|
||||
if(ispath(my_guntype, /obj/item/weapon/gun/launcher) && prob(50))
|
||||
var/component_needed = pick(/obj/item/weapon/tape_roll, /obj/item/weapon/material/wirerod)
|
||||
material_needs[component_needed] = 1
|
||||
|
||||
if(ispath(my_guntype, /obj/item/weapon/gun/magnetic) && prob(70))
|
||||
var/component_needed = pick(/obj/item/weapon/smes_coil, /obj/item/device/assembly/prox_sensor, /obj/item/weapon/module/power_control)
|
||||
material_needs[component_needed] = 1
|
||||
|
||||
material_needs[/obj/item/stack/material/steel] = rand(1,5)
|
||||
|
||||
/obj/item/weapon/broken_gun/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(can_repair_with(W, user))
|
||||
if(do_after(user, (rand() * 10 SECONDS) + 5 SECONDS))
|
||||
repair_with(W, user)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/can_repair_with(obj/item/I, mob/user)
|
||||
for(var/path in material_needs)
|
||||
if(ispath(path) && istype(I, path))
|
||||
if(material_needs[path] > 0)
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/S = I
|
||||
if(S.can_use(material_needs[path]))
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You do not have enough [path] to continue repairs.</span>")
|
||||
else
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/repair_with(obj/item/I, mob/user)
|
||||
for(var/path in material_needs)
|
||||
if(ispath(path) && istype(I, path))
|
||||
if(material_needs[path] > 0)
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/S = I
|
||||
if(S.can_use(material_needs[path]))
|
||||
S.use(material_needs[path])
|
||||
material_needs[path] = 0
|
||||
to_chat(user, "<span class='notice'>You repair some damage on \the [src] with \the [S].</span>")
|
||||
else
|
||||
material_needs[path] = max(0, material_needs[path] - 1)
|
||||
user.drop_from_inventory(I)
|
||||
to_chat(user, "<span class='notice'>You repair some damage on \the [src] with \the [I].</span>")
|
||||
qdel(I)
|
||||
|
||||
check_complete_repair(user)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/check_complete_repair(mob/user)
|
||||
var/fully_repaired = TRUE
|
||||
for(var/resource in material_needs)
|
||||
if(material_needs[resource] > 0)
|
||||
fully_repaired = FALSE
|
||||
break
|
||||
|
||||
if(fully_repaired)
|
||||
my_guntype = new my_guntype(get_turf(src))
|
||||
my_guntype.name = "[pick("salvaged", "repaired", "old")] [initial(my_guntype.name)]"
|
||||
to_chat(user, "<span class='notice'>You finish your repairs on \the [my_guntype].</span>")
|
||||
qdel(src)
|
||||
9
code/modules/projectiles/brokenguns/energy.dm
Normal file
9
code/modules/projectiles/brokenguns/energy.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
/obj/item/weapon/broken_gun/laserrifle/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/energy/laser/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/laser_retro/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/energy/retro/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/ionrifle/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/energy/ionrifle/empty)
|
||||
3
code/modules/projectiles/brokenguns/launcher.dm
Normal file
3
code/modules/projectiles/brokenguns/launcher.dm
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
/obj/item/weapon/broken_gun/grenadelauncher/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/launcher/grenade)
|
||||
3
code/modules/projectiles/brokenguns/magnetic.dm
Normal file
3
code/modules/projectiles/brokenguns/magnetic.dm
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
/obj/item/weapon/broken_gun/flechette/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/magnetic/railgun/flechette)
|
||||
18
code/modules/projectiles/brokenguns/projectile.dm
Normal file
18
code/modules/projectiles/brokenguns/projectile.dm
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
/obj/item/weapon/broken_gun/c20r/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/automatic/c20r/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/silenced45/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/silenced/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/pumpshotgun/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/shotgun/pump/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/pumpshotgun_combat/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/shotgun/pump/combat/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/z8/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/automatic/z8/empty)
|
||||
|
||||
/obj/item/weapon/broken_gun/dartgun/New(var/newloc)
|
||||
..(newloc, /obj/item/weapon/gun/projectile/dartgun)
|
||||
@@ -19,6 +19,9 @@
|
||||
list(mode_name="suppressive", fire_delay=5, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60),
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/empty
|
||||
cell_type = null
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/mounted
|
||||
self_recharge = 1
|
||||
use_external_power = 1
|
||||
@@ -175,7 +178,7 @@
|
||||
force = 10
|
||||
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
|
||||
accuracy = -45 //shooting at the hip
|
||||
scoped_accuracy = 0
|
||||
scoped_accuracy = 50
|
||||
one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
|
||||
|
||||
/obj/item/weapon/gun/energy/sniperrifle/ui_action_click()
|
||||
@@ -192,7 +195,8 @@
|
||||
name = "antique mono-rifle"
|
||||
desc = "An old laser rifle. This one can only fire once before requiring recharging."
|
||||
description_fluff = "Modeled after ancient hunting rifles, this rifle was dubbed the 'Rainy Day Special' by some, due to its use as some barmens' fight-stopper of choice. One shot is all it takes, or so they say."
|
||||
icon_state = "eshotgun"
|
||||
icon = 'icons/obj/energygun.dmi'
|
||||
icon_state = "mono"
|
||||
item_state = "shotgun"
|
||||
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3)
|
||||
projectile_type = /obj/item/projectile/beam/sniper
|
||||
@@ -204,6 +208,7 @@
|
||||
w_class = ITEMSIZE_LARGE
|
||||
accuracy = 10
|
||||
scoped_accuracy = 15
|
||||
charge_meter = FALSE
|
||||
var/scope_multiplier = 1.5
|
||||
|
||||
/obj/item/weapon/gun/energy/monorifle/ui_action_click()
|
||||
@@ -220,7 +225,7 @@
|
||||
name = "combat mono-rifle"
|
||||
desc = "A modernized version of the mono-rifle. This one can fire twice before requiring recharging."
|
||||
description_fluff = "A modern design produced by a company once working from Saint Columbia, based on the antique mono-rifle 'Rainy Day Special' design."
|
||||
icon_state = "ecshotgun"
|
||||
icon_state = "cmono"
|
||||
item_state = "cshotgun"
|
||||
charge_cost = 1000
|
||||
force = 12
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
||||
..(max(severity, 4)) //so it doesn't EMP itself, I guess
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/empty
|
||||
cell_type = null
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/pistol
|
||||
name = "ion pistol"
|
||||
desc = "The NT Mk63 EW Pan is a man portable anti-armor weapon designed to disable mechanical threats, produced by NT. This model sacrifices capacity for portability."
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
|
||||
// one_handed_penalty = 15
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/empty
|
||||
magazine_type = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
|
||||
..()
|
||||
if(ammo_magazine)
|
||||
@@ -192,6 +195,9 @@
|
||||
else
|
||||
. += "\The [launcher] is empty."
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/empty
|
||||
magazine_type = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw
|
||||
name = "light machine gun"
|
||||
desc = "A rather traditionally made L6 SAW with a pleasantly lacquered wooden pistol grip. 'Aussec Armoury-2531' is engraved on the reciever. Uses 5.45mm rounds. It's also compatible with magazines from STS-35 assault rifles."
|
||||
|
||||
@@ -125,6 +125,9 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m45)
|
||||
projectile_type = /obj/item/projectile/bullet/pistol/medium
|
||||
|
||||
/obj/item/weapon/gun/projectile/silenced/empty
|
||||
magazine_type = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/deagle
|
||||
name = "desert eagle"
|
||||
desc = "The perfect handgun for shooters with a need to hit targets through a wall and behind a fridge in your neighbor's house. Uses .44 rounds."
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
else
|
||||
icon_state = "[icon_state]-empty"
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/empty
|
||||
ammo_type = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/slug
|
||||
ammo_type = /obj/item/ammo_casing/a12g
|
||||
|
||||
@@ -67,6 +70,9 @@
|
||||
ammo_type = /obj/item/ammo_casing/a12g
|
||||
load_method = SINGLE_CASING|SPEEDLOADER
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat/empty
|
||||
ammo_type = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
desc = "A truely classic weapon. No need to change what works. Uses 12g rounds."
|
||||
|
||||
@@ -216,6 +216,16 @@
|
||||
armor_penetration = 80
|
||||
hitscan = 1 //so the PTR isn't useless as a sniper weapon
|
||||
|
||||
icon_state = "bullet_alt"
|
||||
tracer_type = /obj/effect/projectile/tracer/cannon
|
||||
|
||||
/obj/item/projectile/bullet/rifle/a145/highvel
|
||||
damage = 50
|
||||
stun = 1
|
||||
weaken = 0
|
||||
penetrating = 15
|
||||
armor_penetration = 90
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
|
||||
|
||||
@@ -101,6 +101,19 @@
|
||||
|
||||
combustion = FALSE
|
||||
|
||||
/obj/item/projectile/energy/excavate
|
||||
name = "kinetic blast"
|
||||
icon_state = "kinetic_blast"
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
damage_type = BRUTE
|
||||
damage = 30
|
||||
armor_penetration = 60
|
||||
excavation_amount = 200
|
||||
check_armour = "melee"
|
||||
|
||||
vacuum_traversal = 0
|
||||
combustion = FALSE
|
||||
|
||||
/obj/item/projectile/energy/dart
|
||||
name = "dart"
|
||||
icon_state = "toxin"
|
||||
|
||||
@@ -277,9 +277,9 @@
|
||||
light_power = 3
|
||||
light_color = "#3300ff"
|
||||
|
||||
muzzle_type = /obj/effect/projectile/tungsten/muzzle
|
||||
tracer_type = /obj/effect/projectile/tungsten/tracer
|
||||
impact_type = /obj/effect/projectile/tungsten/impact
|
||||
muzzle_type = /obj/effect/projectile/muzzle/tungsten
|
||||
tracer_type = /obj/effect/projectile/tracer/tungsten
|
||||
impact_type = /obj/effect/projectile/impact/tungsten
|
||||
|
||||
/obj/item/projectile/beam/tungsten/on_hit(var/atom/target, var/blocked = 0)
|
||||
if(isliving(target))
|
||||
|
||||
Reference in New Issue
Block a user