Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental UNSC weapon supply drop #3417

Merged
merged 5 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,7 @@
#include "code\modules\halo\unsc\supply\onispecial.dm"
#include "code\modules\halo\unsc\supply\regammo.dm"
#include "code\modules\halo\unsc\supply\specammo.dm"
#include "code\modules\halo\unsc\supply\specweapons.dm"
#include "code\modules\halo\unsc\supply\weapons.dm"
#include "code\modules\halo\vehicles\__defs.dm"
#include "code\modules\halo\vehicles\fuel.dm"
Expand Down Expand Up @@ -2228,6 +2229,7 @@
#include "code\modules\halo\weapons\ammo_9-5mm.dm"
#include "code\modules\halo\weapons\ammo_boxes.dm"
#include "code\modules\halo\weapons\ammo_g40mm.dm"
#include "code\modules\halo\weapons\ammo_railslug.dm"
#include "code\modules\halo\weapons\ammo_shotshell.dm"
#include "code\modules\halo\weapons\automated_AA.dm"
#include "code\modules\halo\weapons\autoturret.dm"
Expand Down
10 changes: 6 additions & 4 deletions code/modules/halo/Forerunner/sentinel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
name = "sentinel beam"
icon_state = "beam_blue"

damage = 9
damage = 11
shield_damage = 30
damage_type = BURN
check_armour = "laser"
armor_penetration = 15
check_armour = "energy"
armor_penetration = 30
tracer_delay_time = 2.5

muzzle_type = /obj/effect/projectile/laser_gold/muzzle
Expand All @@ -37,7 +38,7 @@
recharge_time = 0
max_shots = 500
fire_delay = 20
burst_delay = 2.5
burst_delay = 1.5
burst = 8
charge_meter = 0

Expand All @@ -53,6 +54,7 @@
//Found as random loot in forerunner areas (Utilise loot distributor system)//
/obj/item/weapon/gun/energy/laser/sentinel_beam/detached
burst = 10
fire_delay = 10
recharge_time = 1
max_shots = 150

Expand Down
2 changes: 1 addition & 1 deletion code/modules/halo/research/designs/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/datum/research_design/railgun
name = "Asymmetric Recoilless Carbine-920"
product_type = /obj/item/weapon/gun/energy/railrifle
product_type = /obj/item/weapon/gun/projectile/railrifle
build_type = PROTOLATHE
required_materials = list("osmium-carbide plasteel" = 40)
required_reagents = list(/datum/reagent/mercury = 40, /datum/reagent/radium = 40)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added code/modules/halo/sounds/railgun_charge.ogg
Binary file not shown.
Binary file added code/modules/halo/sounds/railgun_fire.ogg
Binary file not shown.
28 changes: 28 additions & 0 deletions code/modules/halo/unsc/supply/specweapons.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/decl/hierarchy/supply_pack/unsc_weapons_special
name = "UNSC Experimental Weapons"
faction_lock = "UNSC"
containertype = /obj/structure/closet/crate/secure/weapon

/decl/hierarchy/supply_pack/unsc_weapons_special/railgun
name = "ARC-920 Experimental Railgun"
cost = 1000
contains = list(/obj/item/weapon/gun/projectile/railrifle = 1,/obj/item/ammo_box/railrifle = 6)
containername = "\improper ARC-920 crate"

/decl/hierarchy/supply_pack/unsc_weapons_special/railgun_ammo
name = "ARC-920 HE Slugs"
cost = 50
contains = list(/obj/item/ammo_box/railrifle = 6)
containername = "\improper ARC-920 HE ammo crate"

/decl/hierarchy/supply_pack/unsc_weapons_special/railgun_ammo_ap
name = "ARC-920 AP Slugs"
cost = 150
contains = list(/obj/item/ammo_box/railrifle/AP = 3)
containername = "\improper ARC-920 AP ammo crate"

/decl/hierarchy/supply_pack/unsc_weapons_special/spartanlaser
name = "M6 Grindell/Galilean Nonlinear Rifle"
cost = 1500
contains = list(/obj/item/weapon/gun/energy/spartanlaser = 1)
containername = "\improper M6 G/GNR crate"
10 changes: 10 additions & 0 deletions code/modules/halo/weapons/ammo_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,13 @@
desc = "A box of sniper rounds to assist in holding rounds for bolt-action sniper rifles"
capacity = 14
ammo_spawnwith = list(/obj/item/ammo_casing/m233)

/obj/item/ammo_box/railrifle
name = "Railgun HE Slugs"
desc = "A box of railgun rounds, to assist in loading the ARC-920."
capacity = 8
ammo_spawnwith = list(/obj/item/ammo_casing/railslug)

/obj/item/ammo_box/railrifle/AP
name = "Railgun AP Slugs"
ammo_spawnwith = list(/obj/item/ammo_casing/railslug/AP)
44 changes: 44 additions & 0 deletions code/modules/halo/weapons/ammo_railslug.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

/obj/effect/projectile/rail_trail
icon = 'code/modules/halo/weapons/icons/Weapon Sprites.dmi'
icon_state = "rail_trail"
alpha = 160

/obj/item/ammo_casing/railslug
name = "\improper ferromagmentic slug casing"
icon = 'code/modules/halo/weapons/icons/Weapon Sprites.dmi'
icon_state = "railslug-casing"
desc = "Casing for a ferromagnetic slug."
caliber = "railslug"
projectile_type = /obj/item/projectile/bullet/railslug/HE

/obj/item/ammo_casing/railslug/AP
name = "\improper AP ferromagmentic slug casing"
projectile_type = /obj/item/projectile/bullet/railslug

//Standard slug is impact-HE
//Balanced to be somewhat like a magnum round, but with less AP and an accompanying small explosion.
//Lore has two warzone variants: AP and prox HE fuse
/obj/item/projectile/bullet/railslug
name = "hypervelocity slug"
icon = 'code/modules/halo/weapons/icons/Weapon Sprites.dmi'
icon_state = "bullet_railslug"
damage = 50
armor_penetration = 115
shield_damage = 210
kill_count = 125
penetrating = 1

tracer_type = /obj/effect/projectile/rail_trail
tracer_delay_time = 0.75 SECONDS
steps_between_delays = 6

/obj/item/projectile/bullet/railslug/HE
damage = 65
armor_penetration = 50
shield_damage = 175
penetrating = 0

/obj/item/projectile/bullet/railslug/HE/on_impact(var/atom/target)
explosion(get_turf(target), 0, 1, 2, 4,guaranteed_damage = 35,guaranteed_damage_range = 1)
..()
Binary file modified code/modules/halo/weapons/icons/Weapon Sprites.dmi
Binary file not shown.
42 changes: 25 additions & 17 deletions code/modules/halo/weapons/railrifle.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
/obj/item/weapon/gun/energy/railrifle
name = "Asymmetric Recoilless Carbine-920"
desc = "An Hesphaistos Industries G40E carbine, designed to kill with concentrated energy blasts."

/obj/item/weapon/gun/projectile/railrifle
name = "Asymmetric Recoilles Carbine-920"
desc = "An Acheron Security experimental railgun, capable of firing ferromagnetic slugs at incredibly high speeds. Heavy, but powerful."
icon = 'code/modules/halo/weapons/icons/Weapon Sprites.dmi'
icon_state = "railgun"
item_state = "ionrifle-wielded"
fire_sound = 'sound/weapons/railgun.ogg'
fire_sound = 'code/modules/halo/sounds/railgun_fire.ogg'
load_method = SINGLE_CASING
handle_casings = CASELESS
max_shells = 1
auto_eject = 1
is_charged_weapon = TRUE
arm_time = 20
charge_sound = 'code/modules/halo/sounds/railgun_charge.ogg'
fire_delay = 10
one_hand_penalty = -1
hud_bullet_row_num = 1
hud_bullet_reffile = 'code/modules/halo/icons/hud_display/hud_bullet_32x16.dmi'
hud_bullet_iconstate = "sniper"
accuracy = 0
scoped_accuracy = 1
scope_zoom_amount = 3
is_scope_variable = 1
caliber = "railslug"
screen_shake = 1.5
slot_flags = SLOT_BACK
w_class = ITEM_SIZE_LARGE
charge_meter = FALSE
max_shots = 4
matter = list(DEFAULT_WALL_MATERIAL = 2000)
projectile_type = /obj/item/projectile/beam/railrifle

/obj/item/projectile/beam/railrifle
name = "railgun beam"
damage = 50
shield_damage = 100
armor_penetration = 100

muzzle_type = /obj/effect/projectile/laser_omni/muzzle
tracer_type = /obj/effect/projectile/laser_omni/tracer
impact_type = /obj/effect/projectile/laser_omni/impact
ammo_type = /obj/item/ammo_casing/railslug
slowdown_general = 0.5
32 changes: 21 additions & 11 deletions code/modules/halo/weapons/spartan_laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,48 @@
)

one_hand_penalty = -1
self_recharge = 0
recharge_time = 20
self_recharge = 1
recharge_time = 150
max_shots = 8
is_charged_weapon = TRUE

arm_time = 7 //Deciseconds
arm_time = 25 //Deciseconds
charge_meter = 0
force = 10
screen_shake = 0.5
fire_delay = 10
fire_delay = 12
scope_zoom_amount = 3
overheat_capacity = 3
overheat_fullclear_delay = 30
is_scope_variable = 1
overheat_capacity = 4
overheat_fullclear_delay = 40

fire_sound = null

origin_tech = list(TECH_COMBAT = 10, TECH_POWER = 20)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
projectile_type = /obj/item/projectile/beam/spartan
projectile_type = /obj/item/projectile/spartanlaser

hud_bullet_usebar = 1

burst = 2
burst_delay = 2.5
burst_delay = 2.0

slowdown_general = 0.5

/obj/item/projectile/beam/spartan
/obj/item/projectile/spartanlaser
name = "spartan laser"
icon_state = "heavylaser"
damage = 100
shield_damage = 210 //No shields for you
pass_flags = PASSTABLE | PASSGRILLE
damage = 60
shield_damage = 150 //No shields for you
armor_penetration = 100
damage_type = BURN
sharp = 1 //concentrated burns
hitscan = 1
step_delay = 0
invisibility = 101 //beam projectiles are invisible as they are rendered by the effect engine

steps_between_delays = 5

fire_sound = 'code/modules/halo/sounds/Spartan_Laser_Beam_Shot_Sound_Effect.ogg'

Expand Down
6 changes: 4 additions & 2 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,17 @@
to_chat(user,"<span class = 'notice'>[src] is charging and cannot fire</span>")
return

stored_targ = target

if(is_charged_weapon==1)
if(charge_sound)
playsound(src.loc, charge_sound, 100, 1)
user.visible_message("<span class = 'notice'>[user] starts charging the [src]!</span>")

is_charging = 1
if (!do_after(user,arm_time,src))
if (!do_after(user,arm_time,src,same_loc = 0))
is_charging = 0
stored_targ = null
return
is_charging = 0

Expand All @@ -371,7 +374,6 @@

//actually attempt to shoot
var/turf/targloc = get_turf(target) //cache this in case target gets deleted during shooting, e.g. if it was a securitron that got destroyed.
stored_targ = target
var/atom/use_targ = stored_targ
. = 1
user.visible_message(
Expand Down
5 changes: 2 additions & 3 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,9 @@
if(steps_taken == 1)
muzzle_effect(effect_transform)
else if(!bumped)
spawn()
tracer_effect(effect_transform)
tracer_effect(effect_transform)

if(!hitscan || steps_taken % steps_between_delays == 0)
if(!hitscan || steps_between_delays == 1 || steps_taken % steps_between_delays == 0)
sleep(step_delay) //add delay between movement iterations if it's not a hitscan weapon

/obj/item/projectile/proc/before_move()
Expand Down
Loading