Merge remote-tracking branch 'citadel/master' into small_guncode_refactor
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] blows [user.p_their()] brain[user.p_s()] out with [src]!</span>")
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
var/turf/target = get_ranged_target_turf(user, turn(user.dir, 180), BRAINS_BLOWN_THROW_RANGE)
|
||||
B.Remove(user)
|
||||
B.Remove()
|
||||
B.forceMove(T)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/obj/item/gun/ballistic/automatic/magrifle
|
||||
name = "\improper Magnetic Rifle"
|
||||
desc = "A simple upscalling of the technologies used in the magpistol, the magrifle is capable of firing slightly larger slugs in bursts. Compatible with the magpistol's slugs."
|
||||
icon_state = "magrifle"
|
||||
item_state = "arg"
|
||||
force = 10
|
||||
slot_flags = NONE
|
||||
mag_type = /obj/item/ammo_box/magazine/mmag
|
||||
fire_sound = 'sound/weapons/magrifle.ogg'
|
||||
can_suppress = FALSE
|
||||
burst_size = 1
|
||||
actions_types = null
|
||||
fire_delay = 3
|
||||
spread = 0
|
||||
recoil = 0.1
|
||||
casing_ejector = FALSE
|
||||
inaccuracy_modifier = 0.5
|
||||
dualwield_spread_mult = 1.4
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/cell_type = /obj/item/stock_parts/cell/magnetic
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
else
|
||||
cell = new(src)
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/examine(mob/user)
|
||||
. = ..()
|
||||
if(cell)
|
||||
. += "<span class='notice'>[src]'s cell is [round(cell.charge / cell.maxcharge, 0.1) * 100]% full.</span>"
|
||||
else
|
||||
. += "<span class='notice'>[src] doesn't seem to have a cell!</span>"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/can_shoot()
|
||||
if(QDELETED(cell))
|
||||
return 0
|
||||
|
||||
var/obj/item/ammo_casing/caseless/magnetic/shot = chambered
|
||||
if(!shot)
|
||||
return 0
|
||||
if(cell.charge < shot.energy_cost * burst_size)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/shoot_live_shot()
|
||||
var/obj/item/ammo_casing/caseless/magnetic/shot = chambered
|
||||
cell.use(shot.energy_cost)
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_CONTENTS))
|
||||
cell.use(round(cell.charge / severity))
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/get_cell()
|
||||
return cell
|
||||
|
||||
/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"
|
||||
desc = "An extremely beefed up version of a stolen Nanotrasen weapon prototype, this 'rifle' is more like a cannon, with an extremely large bore barrel capable of generating several smaller magnetic 'barrels' to simultaneously launch multiple projectiles at once."
|
||||
icon_state = "hyperburst"
|
||||
item_state = "arg"
|
||||
mag_type = /obj/item/ammo_box/magazine/mhyper
|
||||
fire_sound = 'sound/weapons/magburst.ogg'
|
||||
fire_delay = 40
|
||||
recoil = 2
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/hyperburst/update_icon()
|
||||
..()
|
||||
icon_state = "hyperburst[magazine ? "-[get_ammo()]" : ""][chambered ? "" : "-e"]"
|
||||
|
||||
///magpistol///
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/pistol
|
||||
name = "magpistol"
|
||||
desc = "A handgun utilizing maglev technologies to propel a ferromagnetic slug to extreme velocities."
|
||||
icon_state = "magpistol"
|
||||
fire_sound = 'sound/weapons/magpistol.ogg'
|
||||
mag_type = /obj/item/ammo_box/magazine/mmag/small
|
||||
fire_delay = 2
|
||||
inaccuracy_modifier = 0.25
|
||||
cell_type = /obj/item/stock_parts/cell/magnetic/pistol
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(magazine)
|
||||
add_overlay("magpistol-magazine")
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
|
||||
pin = null
|
||||
spawnwithmagazine = FALSE
|
||||
cell_type = /obj/item/stock_parts/cell/magnetic/pistol/empty
|
||||
@@ -109,3 +109,36 @@
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/m762/riot
|
||||
|
||||
/obj/item/gun/ballistic/automatic/toy/magrifle
|
||||
name = "foamag rifle"
|
||||
desc = "A foam launching magnetic rifle. Ages 8 and up."
|
||||
icon_state = "foamagrifle"
|
||||
obj_flags = NONE
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/foamag
|
||||
fire_sound = 'sound/weapons/magrifle.ogg'
|
||||
burst_size = 1
|
||||
actions_types = null
|
||||
fire_delay = 3
|
||||
spread = 60
|
||||
recoil = 0.1
|
||||
can_suppress = FALSE
|
||||
inaccuracy_modifier = 0.5
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
dualwield_spread_mult = 1.4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/toy/mag
|
||||
name = "foam force magpistol"
|
||||
desc = "A fancy toy sold alongside light-up foam force darts. Ages 8 and up."
|
||||
icon_state = "toymag"
|
||||
item_state = "gun"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/mag
|
||||
fire_sound = 'sound/weapons/magpistol.ogg'
|
||||
fire_delay = 2
|
||||
recoil = 0.1
|
||||
inaccuracy_modifier = 0.25
|
||||
dualwield_spread_mult = 1.4
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
QDEL_LIST(ammo_type)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
var/list/fired = list()
|
||||
var/countdown_length = 10
|
||||
var/countdown_step = 0
|
||||
var/static/next_id = 1
|
||||
var/id
|
||||
|
||||
/datum/duel/New()
|
||||
id = next_id++
|
||||
|
||||
/datum/duel/proc/try_begin()
|
||||
//Check if both guns are held and if so begin.
|
||||
@@ -157,6 +162,13 @@
|
||||
setting_overlay = mutable_appearance(icon,setting_iconstate())
|
||||
add_overlay(setting_overlay)
|
||||
|
||||
/obj/item/gun/energy/dueling/examine(mob/user)
|
||||
. = ..()
|
||||
if(duel)
|
||||
. += "Its linking number is [duel.id]."
|
||||
else
|
||||
. += "ERROR: No linking number on gun."
|
||||
|
||||
/obj/item/gun/energy/dueling/proc/setting_iconstate()
|
||||
switch(setting)
|
||||
if(DUEL_SETTING_A)
|
||||
@@ -316,7 +328,7 @@
|
||||
if(DUEL_HUGBOX_NONE)
|
||||
var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD)
|
||||
B.dismember()
|
||||
qdel(B)
|
||||
QDEL_IN(B, 1)
|
||||
if(DUEL_HUGBOX_LETHAL)
|
||||
L.adjustBruteLoss(180)
|
||||
L.death() //Die, powergamers.
|
||||
@@ -370,6 +382,8 @@
|
||||
|
||||
/obj/item/storage/lockbox/dueling/hugbox
|
||||
gun_type = /obj/item/gun/energy/dueling/hugbox
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
|
||||
/obj/item/storage/lockbox/dueling/hugbox/stamina
|
||||
gun_type = /obj/item/gun/energy/dueling/hugbox/stamina
|
||||
req_access = null
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = TRUE
|
||||
if(src in KA.modkits) // Sanity check to prevent installing the same modkit twice thanks to occasional click/lag delays.
|
||||
return
|
||||
return FALSE
|
||||
if(minebot_upgrade)
|
||||
if(minebot_exclusive && !istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is only rated for minebot use.</span>")
|
||||
@@ -317,7 +317,7 @@
|
||||
if(KA.get_remaining_mod_capacity() >= cost)
|
||||
if(.)
|
||||
if(!user.transferItemToLoc(src, KA))
|
||||
return
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You install the modkit.</span>")
|
||||
playsound(loc, 'sound/items/screwdriver.ogg', 100, 1)
|
||||
KA.modkits += src
|
||||
@@ -382,7 +382,7 @@
|
||||
var/old = KA.overheat_time
|
||||
KA.overheat_time = max(0, KA.overheat_time - modifier)
|
||||
decreased = old - KA.overheat_time
|
||||
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
KA.overheat_time += decreased
|
||||
|
||||
@@ -16,6 +16,19 @@
|
||||
clumsy_check = 0
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/gun/energy/laser/practice/hyperburst
|
||||
name = "toy hyper-burst launcher"
|
||||
desc = "A toy laser with a unique beam shaping lens that projects harmless bolts capable of going through objects. Compatible with existing laser tag systems."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/magtag)
|
||||
icon_state = "toyburst"
|
||||
obj_flags = NONE
|
||||
fire_delay = 40
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
charge_delay = 2
|
||||
recoil = 2
|
||||
cell_type = /obj/item/stock_parts/cell/toymagburst
|
||||
|
||||
/obj/item/gun/energy/laser/retro
|
||||
name ="retro laser gun"
|
||||
icon_state = "retro"
|
||||
|
||||
@@ -105,13 +105,15 @@
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
|
||||
name = "energy crossbow"
|
||||
desc = "A reverse engineered weapon using syndicate technology."
|
||||
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_NORMAL
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_METAL=4000)
|
||||
suppressed = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
pin = null
|
||||
unique_frequency = FALSE
|
||||
|
||||
/obj/item/gun/energy/plasmacutter
|
||||
name = "plasma cutter"
|
||||
|
||||
Reference in New Issue
Block a user