Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #74 from definitelynotspaghetti/sg-62
Browse files Browse the repository at this point in the history
[MODULAR]SG-62 changes
  • Loading branch information
Blundir authored Nov 5, 2023
2 parents 8f40d40 + f1aec3d commit 2074d4d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
56 changes: 56 additions & 0 deletions modular_RUtgmc/code/modules/projectiles/guns/rifles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,59 @@
accuracy_mult = 1.2
scatter = -5
scatter_unwielded = 60

//SG Target Rifle, has underbarreled spotting rifle that applies effects.

/obj/item/weapon/gun/rifle/standard_smarttargetrifle
fire_delay = 0.4 SECONDS

/obj/item/weapon/gun/rifle/standard_spottingrifle
accuracy_mult = 1.5
scatter = -5

/datum/ammo/bullet/spottingrifle
accurate_range = 10
max_range = 12

/datum/ammo/bullet/spottingrifle/highimpact/on_hit_mob(mob/M,obj/projectile/P)
staggerstun(M, P, stagger = 3 SECONDS, slowdown = 1, max_range = 12)

/datum/ammo/bullet/spottingrifle/heavyrubber/on_hit_mob(mob/M,obj/projectile/P)
staggerstun(M, P, slowdown = 3, max_range = 12)

/datum/ammo/bullet/spottingrifle/plasmaloss
var/datum/effect_system/smoke_spread/smoke_system

/datum/ammo/bullet/spottingrifle/plasmaloss/on_hit_mob(mob/living/victim, obj/projectile/proj)
if(isxeno(victim))
var/mob/living/carbon/xenomorph/X = victim
X.use_plasma(20 + 0.2 * X.xeno_caste.plasma_max * X.xeno_caste.plasma_regen_limit) // This is draining 20%+20 flat per hit.
var/datum/effect_system/smoke_spread/plasmaloss/S = new
S.set_up(0, victim, 3)
S.start()

/datum/ammo/bullet/spottingrifle/plasmaloss/on_hit_obj(obj/O, obj/projectile/P)
var/turf/T = get_turf(O)
drop_tg_smoke(T.density ? P.loc : T)

/datum/ammo/bullet/spottingrifle/plasmaloss/on_hit_turf(turf/T, obj/projectile/P)
drop_tg_smoke(T.density ? P.loc : T)

/datum/ammo/bullet/spottingrifle/plasmaloss/do_at_max_range(turf/T, obj/projectile/P)
drop_tg_smoke(T.density ? P.loc : T)

/datum/ammo/bullet/spottingrifle/plasmaloss/set_smoke()
smoke_system = new /datum/effect_system/smoke_spread/plasmaloss()

/datum/ammo/bullet/spottingrifle/plasmaloss/proc/drop_tg_smoke(turf/T)
if(T.density)
return

set_smoke()
smoke_system.set_up(0, T, 3)
smoke_system.start()
smoke_system = null

/datum/ammo/bullet/spottingrifle/tungsten/on_hit_mob(mob/M,obj/projectile/P)
staggerstun(M, P, weaken = 2 SECONDS, stagger = 2 SECONDS, knockback = 1, max_range = 12)

10 changes: 10 additions & 0 deletions modular_RUtgmc/code/modules/projectiles/magazines/magazines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,13 @@
desc = "A packet containing 125 rounds of 10x20mm caseless."
icon_state = "box_10x20mm_ap"
default_ammo = /datum/ammo/bullet/smg/ap

/obj/item/ammo_magazine/packet/sg62_rifle
name = "box of 10x27mm"
desc = "A box containing 200 rounds of 10x27mm caseless."
icon = 'modular_RUtgmc/icons/obj/items/ammo.dmi'
icon_state = "box_sg62"
default_ammo = /datum/ammo/bullet/smarttargetrifle
caliber = CALIBER_10x27_CASELESS
current_rounds = 200
max_rounds = 200
8 changes: 8 additions & 0 deletions modular_RUtgmc/code/modules/reqs/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,11 @@
name = "SG-85 Minigun Powerpack"
contains = list(/obj/item/ammo_magazine/minigun_powerpack/smartgun)
cost = 150

/datum/supply_packs/weapons/smarttarget_rifle_ammo
cost = 25

/datum/supply_packs/weapons/box_10x27mm
name = "SG-62 smart target rifle ammo box"
contains = list(/obj/item/ammo_magazine/packet/sg62_rifle)
cost = 50
Binary file modified modular_RUtgmc/icons/obj/items/ammo.dmi
Binary file not shown.

0 comments on commit 2074d4d

Please sign in to comment.