mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
Adds a random gun option to the uplink, Replaces the renegade's weapon with this kit (#8282)
This commit is contained in:
@@ -127,4 +127,9 @@
|
||||
/datum/uplink_item/item/visible_weapons/custom_ka
|
||||
name = "Kinetic Laser Assembly"
|
||||
item_cost = 12
|
||||
path = /obj/item/gun/custom_ka/frame01/illegal
|
||||
path = /obj/item/gun/custom_ka/frame01/illegal
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/random_weapon
|
||||
name = "Random Gun"
|
||||
item_cost = 13
|
||||
path = /obj/item/storage/box/syndie_kit/random_weapon
|
||||
|
||||
@@ -16,25 +16,6 @@ var/datum/antagonist/renegade/renegades
|
||||
|
||||
bantype = "renegade"
|
||||
|
||||
var/list/spawn_guns = list(
|
||||
/obj/item/gun/energy/gun,
|
||||
/obj/item/gun/energy/retro,
|
||||
/obj/item/gun/energy/xray,
|
||||
/obj/item/gun/projectile/revolver,
|
||||
/obj/item/gun/projectile/revolver/deckard,
|
||||
/obj/item/gun/projectile/revolver/adhomian,
|
||||
/obj/item/gun/projectile/automatic/c20r,
|
||||
/obj/item/gun/projectile/deagle,
|
||||
/obj/item/gun/projectile/pistol,
|
||||
/obj/item/gun/projectile/shotgun/doublebarrel/sawn,
|
||||
/obj/item/gun/projectile/shotgun/pump/rifle/obrez,
|
||||
/obj/item/gun/projectile/automatic,
|
||||
/obj/item/gun/projectile/automatic/c20r,
|
||||
/obj/item/gun/projectile/automatic/tommygun,
|
||||
/obj/item/gun/projectile/automatic/mini_uzi,
|
||||
/obj/item/gun/projectile/tanto
|
||||
)
|
||||
|
||||
/datum/antagonist/renegade/New()
|
||||
..()
|
||||
renegades = src
|
||||
@@ -53,10 +34,9 @@ var/datum/antagonist/renegade/renegades
|
||||
if(!..())
|
||||
return
|
||||
|
||||
var/gun_type = pick(spawn_guns)
|
||||
if(!player.back)
|
||||
player.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(player), slot_back) // if they have no backpack, spawn one
|
||||
player.equip_to_slot_or_del(new gun_type(player), slot_in_backpack)
|
||||
player.equip_to_slot_or_del(new /obj/item/storage/box/syndie_kit/random_weapon/concealable(player), slot_in_backpack)
|
||||
|
||||
/proc/rightandwrong()
|
||||
to_chat(usr, "<B>You summoned guns!</B>")
|
||||
|
||||
@@ -226,3 +226,14 @@
|
||||
/obj/item/reagent_containers/personal_inhaler_cartridge/large/norepinephrine = 1,
|
||||
/obj/item/reagent_containers/personal_inhaler_cartridge/large = 1,
|
||||
)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/random_weapon
|
||||
desc = "An untraceable gun of varying quality. Acquired from unknown sources. Includes ammunition if applicable."
|
||||
starts_with = list(/obj/random/weapon_and_ammo = 1)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/random_weapon/concealable
|
||||
starts_with = list(/obj/random/weapon_and_ammo/concealable = 1)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/random_weapon/Initialize()
|
||||
.=..()
|
||||
desc = "A sleek, sturdy box"
|
||||
@@ -1399,4 +1399,153 @@
|
||||
/obj/item/xmasgift/small = 0.5,
|
||||
/obj/item/xmasgift/medium = 0.3,
|
||||
/obj/item/xmasgift/large = 0.2
|
||||
)
|
||||
)
|
||||
|
||||
/obj/random/weapon_and_ammo
|
||||
name = "random weapon and ammo"
|
||||
desc = "Summons a random weapon, with ammo if applicable"
|
||||
icon = 'icons/obj/guns/xenoblaster.dmi'
|
||||
icon_state = "xenoblaster"
|
||||
var/chosen_rarity //Can be set to force certain rarity
|
||||
var/concealable = FALSE //If the gun should fit in a backpack
|
||||
has_postspawn = TRUE
|
||||
|
||||
var/list/Shoddy = list(
|
||||
/obj/item/gun/energy/blaster = 1,
|
||||
/obj/item/gun/energy/retro = 0.5,
|
||||
/obj/item/gun/energy/toxgun = 0.5,
|
||||
/obj/item/gun/projectile/automatic/improvised = 1,
|
||||
/obj/item/gun/projectile/contender = 1,
|
||||
/obj/item/gun/projectile/leyon = 1,
|
||||
/obj/item/gun/projectile/revolver/derringer = 1,
|
||||
/obj/item/gun/projectile/shotgun/pump/rifle/obrez = 1,
|
||||
/obj/item/gun/projectile/shotgun/pump/rifle/vintage = 1,
|
||||
/obj/item/gun/launcher/harpoon = 0.5
|
||||
)
|
||||
|
||||
var/list/Common = list(
|
||||
/obj/item/gun/energy/blaster/carbine = 1,
|
||||
/obj/item/gun/energy/crossbow/largecrossbow = 1,
|
||||
/obj/item/gun/energy/laser = 0.5,
|
||||
/obj/item/gun/energy/pistol = 1,
|
||||
/obj/item/gun/energy/rifle = 1,
|
||||
/obj/item/gun/projectile/automatic/c20r = 1,
|
||||
/obj/item/gun/projectile/automatic/mini_uzi = 1,
|
||||
/obj/item/gun/projectile/automatic/wt550/lethal = 0.5,
|
||||
/obj/item/gun/projectile/colt = 0.5,
|
||||
/obj/item/gun/projectile/pistol/sol = 1,
|
||||
/obj/item/gun/projectile/pistol/adhomai = 1,
|
||||
/obj/item/gun/projectile/revolver/detective = 0.5,
|
||||
/obj/item/gun/projectile/revolver/adhomian = 1,
|
||||
/obj/item/gun/projectile/revolver/lemat = 1,
|
||||
/obj/item/gun/projectile/sec/lethal= 0.5,
|
||||
/obj/item/gun/projectile/shotgun/doublebarrel/pellet = 1,
|
||||
/obj/item/gun/projectile/shotgun/pump/rifle = 1,
|
||||
/obj/item/gun/projectile/tanto = 1,
|
||||
/obj/item/gun/projectile/gauss = 1
|
||||
)
|
||||
|
||||
var/list/Rare = list(
|
||||
/obj/item/gun/energy/blaster/revolver = 1,
|
||||
/obj/item/gun/energy/blaster/rifle = 1,
|
||||
/obj/item/gun/energy/pistol/hegemony = 1,
|
||||
/obj/item/gun/energy/rifle/laser = 1,
|
||||
/obj/item/gun/energy/rifle/ionrifle = 0.5,
|
||||
/obj/item/gun/energy/vaurca/blaster = 1,
|
||||
/obj/item/gun/energy/xray = 1,
|
||||
/obj/item/gun/energy/lasercannon = 1,
|
||||
/obj/item/gun/projectile/automatic/rifle/sts35 = 1,
|
||||
/obj/item/gun/projectile/automatic/x9 = 1,
|
||||
/obj/item/gun/projectile/deagle = 1,
|
||||
/obj/item/gun/projectile/deagle/adhomai = 1,
|
||||
/obj/item/gun/projectile/silenced = 1,
|
||||
/obj/item/gun/projectile/dragunov = 1,
|
||||
/obj/item/gun/projectile/plasma/bolter = 1,
|
||||
/obj/item/gun/projectile/shotgun/doublebarrel/sawn = 1,
|
||||
/obj/item/gun/projectile/shotgun/foldable = 1,
|
||||
/obj/item/gun/projectile/shotgun/pump/combat = 1,
|
||||
/obj/item/gun/projectile/shotgun/pump/combat/sol = 1
|
||||
)
|
||||
|
||||
var/list/Epic = list(
|
||||
/obj/item/gun/energy/pulse/pistol = 1,
|
||||
/obj/item/gun/energy/decloner = 0.5,
|
||||
/obj/item/gun/energy/rifle/laser/xray = 1,
|
||||
/obj/item/gun/energy/rifle/laser/tachyon = 1,
|
||||
/obj/item/gun/energy/sniperrifle = 1,
|
||||
/obj/item/gun/energy/tesla = 1,
|
||||
/obj/item/gun/energy/laser/shotgun = 1,
|
||||
/obj/item/gun/energy/vaurca/gatlinglaser = 1,
|
||||
/obj/item/gun/projectile/automatic/rifle/shotgun = 0.5,
|
||||
/obj/item/gun/projectile/automatic/rifle/sol = 1,
|
||||
/obj/item/gun/projectile/automatic/rifle/w556 = 1,
|
||||
/obj/item/gun/projectile/automatic/rifle/z8 = 1,
|
||||
/obj/item/gun/projectile/cannon = 1,
|
||||
/obj/item/gun/projectile/gyropistol = 0.5,
|
||||
/obj/item/gun/projectile/plasma = 1
|
||||
)
|
||||
|
||||
var/list/Legendary = list(
|
||||
/obj/item/gun/energy/lawgiver = 1,
|
||||
/obj/item/gun/energy/pulse = 1,
|
||||
/obj/item/gun/energy/rifle/pulse = 1,
|
||||
/obj/item/gun/projectile/automatic/railgun = 1,
|
||||
/obj/item/gun/projectile/automatic/rifle/l6_saw = 1,
|
||||
/obj/item/gun/projectile/automatic/terminator = 1,
|
||||
/obj/item/gun/projectile/nuke = 1,
|
||||
/obj/item/gun/projectile/revolver/mateba = 1
|
||||
)
|
||||
|
||||
/obj/random/weapon_and_ammo/concealable
|
||||
concealable = TRUE
|
||||
|
||||
/obj/random/weapon_and_ammo/post_spawn(var/obj/item/gun/projectile/spawned)
|
||||
if(!istype(spawned, /obj/item/gun/projectile))
|
||||
return
|
||||
if(spawned.magazine_type)
|
||||
var/obj/item/ammo_magazine/am = spawned.magazine_type
|
||||
new am(spawned.loc)
|
||||
new am(spawned.loc)
|
||||
else if(istype(spawned, /obj/item/gun/projectile/shotgun) && spawned.caliber == "shotgun")
|
||||
if(istype(spawned.loc, /obj/item/storage/box))
|
||||
spawned.loc.icon_state = "largebox"
|
||||
var/obj/item/storage/box/b = new /obj/item/storage/box(spawned.loc)
|
||||
for(var/i = 0; i < 8; i++)
|
||||
new spawned.ammo_type(b)
|
||||
else if(spawned.ammo_type)
|
||||
for(var/i = 0; i < (spawned.max_shells * 2); i++)
|
||||
new spawned.ammo_type(spawned.loc)
|
||||
|
||||
/obj/random/weapon_and_ammo/spawn_item()
|
||||
var/obj/item/W = pick_gun()
|
||||
. = new W(loc)
|
||||
|
||||
/obj/random/weapon_and_ammo/proc/pick_gun()
|
||||
var/list/possible_rarities = list(
|
||||
"Shoddy" = 25,
|
||||
"Common" = 35,
|
||||
"Rare" = 25,
|
||||
"Epic" = 14,
|
||||
"Legendary" = 1
|
||||
)
|
||||
if(!chosen_rarity)
|
||||
chosen_rarity = pickweight(possible_rarities)
|
||||
var/obj/item/W
|
||||
switch(chosen_rarity)
|
||||
if("Shoddy")
|
||||
W = pickweight(Shoddy)
|
||||
if("Common")
|
||||
W = pickweight(Common)
|
||||
if("Rare")
|
||||
W = pickweight(Rare)
|
||||
if("Epic")
|
||||
W = pickweight(Epic)
|
||||
if("Legendary")
|
||||
W = pickweight(Legendary)
|
||||
if(concealable)
|
||||
var/weapon_w_class = initial(W.w_class)
|
||||
if(weapon_w_class > 3)
|
||||
chosen_rarity = null
|
||||
return pick_gun()
|
||||
|
||||
return W
|
||||
@@ -85,6 +85,9 @@
|
||||
magazine_type = /obj/item/ammo_magazine/mc9mmt/rubber
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mc9mmt)
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550/lethal
|
||||
magazine_type = /obj/item/ammo_magazine/mc9mmt
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550/update_icon()
|
||||
..()
|
||||
if(ammo_magazine)
|
||||
|
||||
@@ -344,6 +344,7 @@
|
||||
caliber = "10mm"
|
||||
w_class = 2
|
||||
ammo_type = /obj/item/ammo_casing/c10mm
|
||||
magazine_type = /obj/item/ammo_magazine/mc10mm/leyon
|
||||
max_shells = 5
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_pistol.ogg'
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
handle_casings = CYCLE_CASINGS
|
||||
max_shells = 8
|
||||
ammo_type = /obj/item/ammo_casing/a357
|
||||
magazine_type = /obj/item/ammo_magazine/a357
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_revolver.ogg'
|
||||
var/chamber_offset = 0 //how many empty chambers in the cylinder until you hit a round
|
||||
|
||||
@@ -47,6 +48,7 @@
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_mateba.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/a454
|
||||
magazine_type = /obj/item/ammo_magazine/a454
|
||||
|
||||
/obj/item/gun/projectile/revolver/detective
|
||||
name = "revolver"
|
||||
@@ -60,6 +62,7 @@
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_strong.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
magazine_type = /obj/item/ammo_magazine/c38
|
||||
|
||||
/obj/item/gun/projectile/revolver/detective/verb/rename_gun()
|
||||
set name = "Name Gun"
|
||||
@@ -90,6 +93,7 @@
|
||||
item_state = "deckard"
|
||||
caliber = "38"
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
magazine_type = null
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_strong.ogg'
|
||||
|
||||
/obj/item/gun/projectile/revolver/deckard/update_icon()
|
||||
@@ -120,6 +124,7 @@
|
||||
load_method = SINGLE_CASING
|
||||
max_shells = 2
|
||||
ammo_type = /obj/item/ammo_casing/a357
|
||||
magazine_type = null
|
||||
|
||||
/obj/item/gun/projectile/revolver/capgun
|
||||
name = "cap gun"
|
||||
@@ -157,6 +162,7 @@
|
||||
caliber = "38"
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_strong.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
magazine_type = /obj/item/ammo_magazine/c38
|
||||
var/secondary_max_shells = 1
|
||||
var/secondary_caliber = "shotgun"
|
||||
var/secondary_ammo_type = /obj/item/ammo_casing/shotgun/pellet
|
||||
@@ -249,6 +255,7 @@
|
||||
load_method = SINGLE_CASING
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_strong.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
magazine_type = null
|
||||
|
||||
description_fluff = "A simple and reliable double action revolver, favored by the nobility, officers and law enforcement. The design is known for having an outdated reloading \
|
||||
mechanism, with the need to manually eject each of the used cartridges, and reload one cartridge at a time through a loading gate. However, their cheap manufacturing cost has \
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_rifle.ogg'
|
||||
caliber = "a762"
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
magazine_type = /obj/item/ammo_magazine/boltaction
|
||||
max_shells = 5
|
||||
|
||||
pump_fail_msg = "<span class='warning'>You cannot work the rifle's bolt without gripping it with both hands!</span>"
|
||||
@@ -62,6 +63,7 @@
|
||||
handle_casings = HOLD_CASINGS
|
||||
max_shells = 1
|
||||
ammo_type = /obj/item/ammo_casing/a556
|
||||
magazine_type = /obj/item/ammo_magazine/a556
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
load_method = SINGLE_CASING
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot3.ogg'
|
||||
@@ -130,6 +132,7 @@
|
||||
handle_casings = HOLD_CASINGS
|
||||
caliber = "vintage"
|
||||
ammo_type = /obj/item/ammo_casing/vintage
|
||||
magazine_type = /obj/item/ammo_magazine/boltaction/vintage
|
||||
can_bayonet = TRUE
|
||||
var/open_bolt = 0
|
||||
var/obj/item/ammo_magazine/boltaction/vintage/has_clip
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
author: Ferner
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Added an uplink option to purchase a random projectile weapon from a wide selection. Expect varying quality."
|
||||
Reference in New Issue
Block a user