Merge remote-tracking branch 'citadel/master' into mobility_flags
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
|
||||
@@ -96,15 +96,20 @@
|
||||
"Gold Trim" = "detective_gold",
|
||||
"The Peacemaker" = "detective_peacemaker"
|
||||
)
|
||||
var/list/safe_calibers
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective/Initialize()
|
||||
. = ..()
|
||||
safe_calibers = magazine.caliber
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(magazine.caliber != initial(magazine.caliber))
|
||||
if(chambered && !(chambered.caliber in safe_calibers))
|
||||
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
to_chat(user, "<span class='userdanger'>[src] blows up in your face!</span>")
|
||||
user.take_bodypart_damage(0,20)
|
||||
user.dropItemToGround(src)
|
||||
return 0
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective/screwdriver_act(mob/living/user, obj/item/I)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
QDEL_LIST(ammo_type)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
#define DUEL_IDLE 1
|
||||
#define DUEL_PREPARATION 2
|
||||
#define DUEL_READY 3
|
||||
#define DUEL_COUNTDOWN 4
|
||||
#define DUEL_FIRING 5
|
||||
|
||||
//paper rock scissors
|
||||
#define DUEL_SETTING_A "wide"
|
||||
#define DUEL_SETTING_B "cone"
|
||||
#define DUEL_SETTING_C "pinpoint"
|
||||
|
||||
#define DUEL_HUGBOX_NONE 0 //dismember head
|
||||
#define DUEL_HUGBOX_LETHAL 1 //200 damage to chest
|
||||
#define DUEL_HUGBOX_NONLETHAL 2 //stamcrit
|
||||
|
||||
/datum/duel
|
||||
var/obj/item/gun/energy/dueling/gun_A
|
||||
var/obj/item/gun/energy/dueling/gun_B
|
||||
var/state = DUEL_IDLE
|
||||
var/required_distance = 5
|
||||
var/list/confirmations = list()
|
||||
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.
|
||||
var/mob/living/A = get_duelist(gun_A)
|
||||
var/mob/living/B = get_duelist(gun_B)
|
||||
if(!A || !B)
|
||||
message_duelists("<span class='warning'>To begin the duel, both participants need to be holding paired dueling pistols.</span>")
|
||||
return
|
||||
begin()
|
||||
|
||||
/datum/duel/proc/begin()
|
||||
state = DUEL_PREPARATION
|
||||
confirmations.Cut()
|
||||
fired.Cut()
|
||||
countdown_step = countdown_length
|
||||
|
||||
message_duelists("<span class='notice'>Set your gun setting and move [required_distance] steps away from your opponent.</span>")
|
||||
|
||||
START_PROCESSING(SSobj,src)
|
||||
|
||||
/datum/duel/proc/get_duelist(obj/gun)
|
||||
var/mob/living/G = gun.loc
|
||||
if(!istype(G) || !G.is_holding(gun))
|
||||
return null
|
||||
return G
|
||||
|
||||
/datum/duel/proc/message_duelists(message)
|
||||
var/mob/living/LA = get_duelist(gun_A)
|
||||
if(LA)
|
||||
to_chat(LA,message)
|
||||
var/mob/living/LB = get_duelist(gun_B)
|
||||
if(LB)
|
||||
to_chat(LB,message)
|
||||
|
||||
/datum/duel/proc/other_gun(obj/item/gun/energy/dueling/G)
|
||||
return G == gun_A ? gun_B : gun_A
|
||||
|
||||
/datum/duel/proc/end()
|
||||
message_duelists("<span class='notice'>Duel finished. Re-engaging safety.</span>")
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
state = DUEL_IDLE
|
||||
|
||||
/datum/duel/process()
|
||||
switch(state)
|
||||
if(DUEL_PREPARATION)
|
||||
if(check_positioning())
|
||||
confirm_positioning()
|
||||
else if (!get_duelist(gun_A) && !get_duelist(gun_B))
|
||||
end()
|
||||
if(DUEL_READY)
|
||||
if(!check_positioning())
|
||||
back_to_prep()
|
||||
else if(confirmations.len == 2)
|
||||
confirm_ready()
|
||||
if(DUEL_COUNTDOWN)
|
||||
if(!check_positioning())
|
||||
back_to_prep()
|
||||
else
|
||||
countdown_step()
|
||||
if(DUEL_FIRING)
|
||||
if(check_fired())
|
||||
end()
|
||||
|
||||
/datum/duel/proc/back_to_prep()
|
||||
message_duelists("<span class='notice'>Positions invalid. Please move to valid positions [required_distance] steps aways from each other to continue.</span>")
|
||||
state = DUEL_PREPARATION
|
||||
confirmations.Cut()
|
||||
countdown_step = countdown_length
|
||||
|
||||
/datum/duel/proc/confirm_positioning()
|
||||
message_duelists("<span class='notice'>Position confirmed. Confirm readiness by pulling the trigger once.</span>")
|
||||
state = DUEL_READY
|
||||
|
||||
/datum/duel/proc/confirm_ready()
|
||||
message_duelists("<span class='notice'>Readiness confirmed. Starting countdown. Commence firing at zero mark.</span>")
|
||||
state = DUEL_COUNTDOWN
|
||||
|
||||
/datum/duel/proc/countdown_step()
|
||||
countdown_step--
|
||||
if(countdown_step == 0)
|
||||
state = DUEL_FIRING
|
||||
message_duelists("<span class='userdanger'>Fire!</span>")
|
||||
else
|
||||
message_duelists("<span class='userdanger'>[countdown_step]!</span>")
|
||||
|
||||
/datum/duel/proc/check_fired()
|
||||
if(fired.len == 2)
|
||||
return TRUE
|
||||
//Let's say if gun was dropped/stowed the user is finished
|
||||
if(!get_duelist(gun_A))
|
||||
return TRUE
|
||||
if(!get_duelist(gun_B))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/duel/proc/check_positioning()
|
||||
var/mob/living/A = get_duelist(gun_A)
|
||||
var/mob/living/B = get_duelist(gun_B)
|
||||
if(!A || !B)
|
||||
return FALSE
|
||||
if(!isturf(A.loc) || !isturf(B.loc))
|
||||
return FALSE
|
||||
if(get_dist(A,B) != required_distance)
|
||||
return FALSE
|
||||
for(var/turf/T in getline(get_turf(A),get_turf(B)))
|
||||
if(is_blocked_turf(T,TRUE))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/energy/dueling
|
||||
name = "dueling pistol"
|
||||
desc = "High-tech dueling pistol. Launches chaff and projectile according to preset settings."
|
||||
icon_state = "dueling_pistol"
|
||||
item_state = "gun"
|
||||
ammo_x_offset = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/duel)
|
||||
automatic_charge_overlays = FALSE
|
||||
var/unlocked = FALSE
|
||||
var/setting = DUEL_SETTING_A
|
||||
var/datum/duel/duel
|
||||
var/mutable_appearance/setting_overlay
|
||||
var/hugbox = DUEL_HUGBOX_NONE
|
||||
|
||||
/obj/item/gun/energy/dueling/hugbox
|
||||
hugbox = DUEL_HUGBOX_LETHAL
|
||||
|
||||
/obj/item/gun/energy/dueling/hugbox/stamina
|
||||
hugbox = DUEL_HUGBOX_NONLETHAL
|
||||
|
||||
/obj/item/gun/energy/dueling/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
return "duel_red"
|
||||
if(DUEL_SETTING_B)
|
||||
return "duel_green"
|
||||
if(DUEL_SETTING_C)
|
||||
return "duel_blue"
|
||||
return "duel_red"
|
||||
|
||||
/obj/item/gun/energy/dueling/attack_self(mob/living/user)
|
||||
. = ..()
|
||||
if(duel.state == DUEL_IDLE)
|
||||
duel.try_begin()
|
||||
else
|
||||
toggle_setting(user)
|
||||
|
||||
/obj/item/gun/energy/dueling/proc/toggle_setting(mob/living/user)
|
||||
switch(setting)
|
||||
if(DUEL_SETTING_A)
|
||||
setting = DUEL_SETTING_B
|
||||
if(DUEL_SETTING_B)
|
||||
setting = DUEL_SETTING_C
|
||||
if(DUEL_SETTING_C)
|
||||
setting = DUEL_SETTING_A
|
||||
to_chat(user,"<span class='notice'>You switch [src] setting to [setting] mode.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/dueling/update_icon(force_update)
|
||||
. = ..()
|
||||
if(setting_overlay)
|
||||
cut_overlay(setting_overlay)
|
||||
setting_overlay.icon_state = setting_iconstate()
|
||||
add_overlay(setting_overlay)
|
||||
|
||||
/obj/item/gun/energy/dueling/Destroy()
|
||||
. = ..()
|
||||
if(duel.gun_A == src)
|
||||
duel.gun_A = null
|
||||
if(duel.gun_B == src)
|
||||
duel.gun_B = null
|
||||
duel = null
|
||||
|
||||
/obj/item/gun/energy/dueling/can_trigger_gun(mob/living/user)
|
||||
. = ..()
|
||||
switch(duel.state)
|
||||
if(DUEL_FIRING)
|
||||
return . && !duel.fired[src]
|
||||
if(DUEL_READY)
|
||||
return .
|
||||
else
|
||||
to_chat(user,"<span class='warning'>[src] is locked. Wait for FIRE signal before shooting.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/dueling/proc/is_duelist(mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
if(!L.is_holding(duel.other_gun(src)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/energy/dueling/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
|
||||
if(duel.state == DUEL_READY)
|
||||
duel.confirmations[src] = TRUE
|
||||
to_chat(user,"<span class='notice'>You confirm your readiness.</span>")
|
||||
return
|
||||
else if(!is_duelist(target)) //I kinda want to leave this out just to see someone shoot a bystander or missing.
|
||||
to_chat(user,"<span class='warning'>[src] safety system prevents shooting anyone but your designated opponent.</span>")
|
||||
return
|
||||
else
|
||||
duel.fired[src] = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/energy/dueling/before_firing(target,user)
|
||||
var/obj/item/ammo_casing/energy/duel/D = chambered
|
||||
D.setting = setting
|
||||
D.hugbox = hugbox
|
||||
|
||||
/obj/effect/temp_visual/dueling_chaff
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shield-old"
|
||||
duration = 30
|
||||
var/setting
|
||||
|
||||
/obj/effect/temp_visual/dueling_chaff/update_icon()
|
||||
. = ..()
|
||||
switch(setting)
|
||||
if(DUEL_SETTING_A)
|
||||
color = "red"
|
||||
if(DUEL_SETTING_B)
|
||||
color = "green"
|
||||
if(DUEL_SETTING_C)
|
||||
color = "blue"
|
||||
|
||||
//Casing
|
||||
|
||||
/obj/item/ammo_casing/energy/duel
|
||||
e_cost = 0
|
||||
projectile_type = /obj/item/projectile/energy/duel
|
||||
var/setting
|
||||
var/hugbox = DUEL_HUGBOX_NONE
|
||||
|
||||
/obj/item/ammo_casing/energy/duel/ready_proj(atom/target, mob/living/user, quiet, zone_override)
|
||||
. = ..()
|
||||
var/obj/item/projectile/energy/duel/D = BB
|
||||
D.setting = setting
|
||||
D.hugbox = hugbox
|
||||
D.update_icon()
|
||||
|
||||
/obj/item/ammo_casing/energy/duel/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
|
||||
. = ..()
|
||||
var/obj/effect/temp_visual/dueling_chaff/C = new(get_turf(user))
|
||||
C.setting = setting
|
||||
C.update_icon()
|
||||
|
||||
//Projectile
|
||||
|
||||
/obj/item/projectile/energy/duel
|
||||
name = "dueling beam"
|
||||
icon_state = "declone"
|
||||
is_reflectable = FALSE
|
||||
homing = TRUE
|
||||
var/setting
|
||||
var/hugbox = DUEL_HUGBOX_NONE
|
||||
|
||||
/obj/item/projectile/energy/duel/update_icon()
|
||||
. = ..()
|
||||
switch(setting)
|
||||
if(DUEL_SETTING_A)
|
||||
color = "red"
|
||||
if(DUEL_SETTING_B)
|
||||
color = "green"
|
||||
if(DUEL_SETTING_C)
|
||||
color = "blue"
|
||||
|
||||
/obj/item/projectile/energy/duel/on_hit(atom/target, blocked)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/effect/temp_visual/dueling_chaff/C = locate() in T
|
||||
if(C)
|
||||
var/counter_setting
|
||||
switch(setting)
|
||||
if(DUEL_SETTING_A)
|
||||
counter_setting = DUEL_SETTING_B
|
||||
if(DUEL_SETTING_B)
|
||||
counter_setting = DUEL_SETTING_C
|
||||
if(DUEL_SETTING_C)
|
||||
counter_setting = DUEL_SETTING_A
|
||||
if(C.setting == counter_setting)
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
var/mob/living/L = target
|
||||
if(!istype(target))
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
switch(hugbox)
|
||||
if(DUEL_HUGBOX_NONE)
|
||||
var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD)
|
||||
B.dismember()
|
||||
QDEL_IN(B, 1)
|
||||
if(DUEL_HUGBOX_LETHAL)
|
||||
L.adjustBruteLoss(180)
|
||||
L.death() //Die, powergamers.
|
||||
if(DUEL_HUGBOX_NONLETHAL)
|
||||
L.adjustStaminaLoss(200, forced = TRUE) //Die, powergamers x 2
|
||||
L.Knockdown(100, override_hardstun = 100) //For good measure.
|
||||
|
||||
//Storage case.
|
||||
/obj/item/storage/lockbox/dueling
|
||||
name = "dueling pistol case"
|
||||
desc = "Let's solve this like gentlespacemen."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
var/gun_type = /obj/item/gun/energy/dueling
|
||||
|
||||
/obj/item/storage/lockbox/dueling/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_items = 2
|
||||
STR.can_hold = typecacheof(/obj/item/gun/energy/dueling)
|
||||
|
||||
/obj/item/storage/lockbox/dueling/update_icon()
|
||||
cut_overlays()
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
|
||||
/obj/item/storage/lockbox/dueling/PopulateContents()
|
||||
. = ..()
|
||||
var/obj/item/gun/energy/dueling/gun_A = new gun_type(src)
|
||||
var/obj/item/gun/energy/dueling/gun_B = new gun_type(src)
|
||||
var/datum/duel/D = new
|
||||
gun_A.duel = D
|
||||
gun_B.duel = D
|
||||
D.gun_A = gun_A
|
||||
D.gun_B = gun_B
|
||||
|
||||
/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