Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit601
This commit is contained in:
@@ -39,8 +39,7 @@
|
||||
QDEL_NULL(BB)
|
||||
return ..()
|
||||
|
||||
/obj/item/ammo_casing/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
||||
desc = "[initial(desc)][BB ? "" : " This one is spent."]"
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
caliber = ".45"
|
||||
projectile_type = /obj/item/projectile/bullet/c45
|
||||
|
||||
/obj/item/ammo_casing/c45/nostamina
|
||||
projectile_type = /obj/item/projectile/bullet/c45_nostamina
|
||||
|
||||
/obj/item/ammo_casing/c45/kitchengun
|
||||
desc = "A .45 bullet casing. It has a small sponge attached to it."
|
||||
projectile_type = /obj/item/projectile/bullet/c45_cleaning
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/ammo_casing/caseless/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/caseless/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
/obj/item/ammo_casing/caseless/arrow
|
||||
name = "wooden arrow"
|
||||
desc = "An arrow made of wood, typically fired from a bow."
|
||||
name = "arrow of questionable material"
|
||||
desc = "You shouldn't be seeing this arrow."
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/arrow
|
||||
caliber = "arrow"
|
||||
icon_state = "arrow"
|
||||
throwforce = 3 //good luck hitting someone with the pointy end of the arrow
|
||||
throw_speed = 3
|
||||
|
||||
/obj/item/ammo_casing/caseless/arrow/ashen
|
||||
/obj/item/ammo_casing/caseless/arrow/wood
|
||||
name = "wooden arrow"
|
||||
desc = "An arrow made of wood, typically fired from a bow."
|
||||
|
||||
/obj/item/ammo_casing/caseless/arrow/ash
|
||||
name = "ashen arrow"
|
||||
desc = "An arrow made of wood, hardened by fire."
|
||||
icon_state = "ashenarrow"
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/arrow/ashen
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/arrow/ash
|
||||
|
||||
/obj/item/ammo_casing/caseless/arrow/bone
|
||||
name = "bone arrow"
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
harmful = FALSE
|
||||
var/modified = FALSE
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/caseless/foam_dart/update_icon_state()
|
||||
if (modified)
|
||||
icon_state = "foamdart_empty"
|
||||
desc = "It's nerf or nothing! ... Although, this one doesn't look too safe."
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/item/ammo_box/magazine/smgm45
|
||||
name = "SMG magazine (.45)"
|
||||
icon_state = "c20r45-24"
|
||||
ammo_type = /obj/item/ammo_casing/c45/nostamina
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
caliber = ".45"
|
||||
max_ammo = 24
|
||||
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
name = "double-barrel shotgun internal magazine"
|
||||
max_ammo = 2
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/dual/heck
|
||||
name = "heckgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
name = "improvised shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/improvised
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
return
|
||||
if(firing)
|
||||
return
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) //respect stamina softcrit
|
||||
if(IS_STAMCRIT(user)) //respect stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You are too exhausted to fire [src]!</span>")
|
||||
return
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
@@ -562,11 +562,11 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/proc/getinaccuracy(mob/living/user)
|
||||
if(!iscarbon(user))
|
||||
if(!isliving(user))
|
||||
return FALSE
|
||||
else
|
||||
var/mob/living/carbon/holdingdude = user
|
||||
if(istype(holdingdude) && holdingdude.combatmode)
|
||||
return (max((holdingdude.lastdirchange + weapon_weight * 25) - world.time,0) * inaccuracy_modifier)
|
||||
var/mob/living/holdingdude = user
|
||||
if(istype(holdingdude) && (holdingdude.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
|
||||
return 0
|
||||
else
|
||||
return ((weapon_weight * 25) * inaccuracy_modifier)
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
chamber_round()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/update_icon()
|
||||
..()
|
||||
/obj/item/gun/ballistic/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
else
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
magazine = AM
|
||||
if(oldmag)
|
||||
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>")
|
||||
oldmag.dropped()
|
||||
oldmag.forceMove(get_turf(src.loc))
|
||||
oldmag.update_icon()
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
to_chat(user, "<span class='notice'>You notch the arrow.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/bow/update_icon()
|
||||
/obj/item/gun/ballistic/bow/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
|
||||
|
||||
/obj/item/gun/ballistic/bow/can_shoot()
|
||||
@@ -63,4 +63,4 @@
|
||||
icon_state = "pipebow"
|
||||
item_state = "pipebow"
|
||||
inaccuracy_modifier = 1.1 //Made of pipe and in a rush
|
||||
force = 0
|
||||
force = 0
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
|
||||
/obj/item/minigunpack/update_icon()
|
||||
/obj/item/minigunpack/update_icon_state()
|
||||
if(armed)
|
||||
icon_state = "notholstered"
|
||||
else
|
||||
|
||||
@@ -363,4 +363,4 @@
|
||||
user.visible_message("<span class='warning'>[user] somehow manages to shoot [user.p_them()]self in the face!</span>", "<span class='userdanger'>You somehow shoot yourself in the face! How the hell?!</span>")
|
||||
user.emote("scream")
|
||||
user.drop_all_held_items()
|
||||
user.Knockdown(80)
|
||||
user.DefaultCombatKnockdown(80)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/item/gun/ballistic/shotgun/attack_self(mob/living/user)
|
||||
if(recentpump > world.time)
|
||||
return
|
||||
if(istype(user) && user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit
|
||||
if(IS_STAMCRIT(user))//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
|
||||
return//CIT CHANGE - ditto
|
||||
pump(user, TRUE)
|
||||
@@ -171,7 +171,7 @@
|
||||
pump()
|
||||
gun_type = type
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/dropped()
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/dropped(mob/user)
|
||||
..()
|
||||
guns_left = 0
|
||||
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
/obj/item/gun/energy/Destroy()
|
||||
if(flags_1 & INITIALIZED_1)
|
||||
QDEL_NULL(cell)
|
||||
if(!(flags_1 & HOLOGRAM_1)) //holodeck stuff.
|
||||
QDEL_LIST(ammo_type)
|
||||
QDEL_LIST(ammo_type)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -28,6 +28,16 @@
|
||||
/datum/duel/New()
|
||||
id = next_id++
|
||||
|
||||
/datum/duel/Destroy()
|
||||
if(gun_A)
|
||||
gun_A.duel = null
|
||||
gun_A = null
|
||||
if(gun_B)
|
||||
gun_B.duel = null
|
||||
gun_B = null
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/datum/duel/proc/try_begin()
|
||||
//Check if both guns are held and if so begin.
|
||||
var/mob/living/A = get_duelist(gun_A)
|
||||
@@ -45,13 +55,13 @@
|
||||
|
||||
message_duelists("<span class='notice'>Set your gun setting and move [required_distance] steps away from your opponent.</span>")
|
||||
|
||||
START_PROCESSING(SSobj,src)
|
||||
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/get_duelist(obj/item/gun/energy/dueling/G)
|
||||
var/mob/living/L = G.loc
|
||||
if(!istype(L) || !L.is_holding(G))
|
||||
return
|
||||
return L
|
||||
|
||||
/datum/duel/proc/message_duelists(message)
|
||||
var/mob/living/LA = get_duelist(gun_A)
|
||||
@@ -66,7 +76,7 @@
|
||||
|
||||
/datum/duel/proc/end()
|
||||
message_duelists("<span class='notice'>Duel finished. Re-engaging safety.</span>")
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
state = DUEL_IDLE
|
||||
|
||||
/datum/duel/process()
|
||||
@@ -129,10 +139,11 @@
|
||||
return FALSE
|
||||
if(!isturf(A.loc) || !isturf(B.loc))
|
||||
return FALSE
|
||||
if(get_dist(A,B) != required_distance)
|
||||
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))
|
||||
for(var/i in getline(A.loc, B.loc))
|
||||
var/turf/T = i
|
||||
if(is_blocked_turf(T, TRUE))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -180,7 +191,6 @@
|
||||
return "duel_red"
|
||||
|
||||
/obj/item/gun/energy/dueling/attack_self(mob/living/user)
|
||||
. = ..()
|
||||
if(duel.state == DUEL_IDLE)
|
||||
duel.try_begin()
|
||||
else
|
||||
@@ -205,12 +215,9 @@
|
||||
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
|
||||
if(duel)
|
||||
qdel(duel)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/dueling/can_trigger_gun(mob/living/user)
|
||||
. = ..()
|
||||
@@ -234,10 +241,8 @@
|
||||
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
|
||||
. = ..()
|
||||
@@ -334,7 +339,7 @@
|
||||
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.
|
||||
L.Paralyze(100) //For good measure.
|
||||
|
||||
//Storage case.
|
||||
/obj/item/storage/lockbox/dueling
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/kinetic/premium)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/premiumka/dropped()
|
||||
/obj/item/gun/energy/kinetic_accelerator/premiumka/dropped(mob/user)
|
||||
. = ..()
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
@@ -137,7 +137,7 @@
|
||||
if(!can_shoot())
|
||||
attempt_reload()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/dropped()
|
||||
/obj/item/gun/energy/kinetic_accelerator/dropped(mob/user)
|
||||
. = ..()
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
|
||||
@@ -73,9 +73,6 @@
|
||||
recharge_newshot()
|
||||
return 1
|
||||
|
||||
/obj/item/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. = ..()
|
||||
. += "Has [charges] charge\s remaining."
|
||||
|
||||
/obj/item/gun/magic/wand/update_icon()
|
||||
/obj/item/gun/magic/wand/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
@@ -181,3 +181,21 @@
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF ARCANE MISSILE
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/arcane
|
||||
name = "wand of arcane missile"
|
||||
desc = "This wand fires off small bolts of concentrated magic energy, searing any victim."
|
||||
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
|
||||
fire_sound = 'sound/weapons/mmlbuster.ogg'
|
||||
icon_state = "arcanewand"
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
|
||||
/obj/item/gun/magic/wand/arcane/zap_self(mob/living/user)
|
||||
..()
|
||||
charges--
|
||||
user.take_overall_damage(0,30)
|
||||
to_chat(user, "<span class='warning'>You zap yourself. Why?</span>")
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/mob/current_user = null
|
||||
var/list/obj/effect/projectile/tracer/current_tracers
|
||||
|
||||
var/structure_piercing = 1
|
||||
var/structure_piercing = 0
|
||||
var/structure_bleed_coeff = 0.7
|
||||
var/wall_pierce_amount = 0
|
||||
var/wall_devastate = 0
|
||||
@@ -60,7 +60,7 @@
|
||||
var/impact_structure_damage = 75
|
||||
var/projectile_damage = 40
|
||||
var/projectile_stun = 0
|
||||
var/projectile_setting_pierce = TRUE
|
||||
var/projectile_setting_pierce = FALSE
|
||||
var/delay = 30
|
||||
var/lastfire = 0
|
||||
|
||||
@@ -160,6 +160,9 @@
|
||||
add_overlay(drained_overlay)
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/attack_self(mob/user)
|
||||
if(!structure_piercing)
|
||||
projectile_setting_pierce = FALSE
|
||||
return
|
||||
projectile_setting_pierce = !projectile_setting_pierce
|
||||
to_chat(user, "<span class='boldnotice'>You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode.</span>")
|
||||
aiming_beam()
|
||||
@@ -178,13 +181,6 @@
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
chambered = null
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/proc/aiming_beam(force_update = FALSE)
|
||||
var/diff = abs(aiming_lastangle - lastangle)
|
||||
if(!check_user())
|
||||
@@ -299,7 +295,7 @@
|
||||
if(istype(object, /obj/screen) && !istype(object, /obj/screen/click_catcher))
|
||||
return
|
||||
process_aim()
|
||||
if(aiming_time_left <= aiming_time_fire_threshold && check_user() && ((lastfire + delay) <= world.time))
|
||||
if(fire_check())
|
||||
sync_ammo()
|
||||
do_fire(M.client.mouseObject, M, FALSE, M.client.mouseParams, M.zone_selected)
|
||||
stop_aiming()
|
||||
@@ -307,11 +303,16 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/do_fire(atom/target, mob/living/user, message = TRUE, params, zone_override = "", bonus_spread = 0)
|
||||
if(!fire_check())
|
||||
return
|
||||
. = ..()
|
||||
if(.)
|
||||
lastfire = world.time
|
||||
stop_aiming()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/proc/fire_check()
|
||||
return (aiming_time_left <= aiming_time_fire_threshold) && check_user() && ((lastfire + delay) <= world.time)
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/proc/sync_ammo()
|
||||
for(var/obj/item/ammo_casing/energy/beam_rifle/AC in contents)
|
||||
AC.sync_stats()
|
||||
@@ -402,7 +403,7 @@
|
||||
/obj/item/ammo_casing/energy/beam_rifle/hitscan
|
||||
projectile_type = /obj/item/projectile/beam/beam_rifle/hitscan
|
||||
select_name = "beam"
|
||||
e_cost = 5000
|
||||
e_cost = 10000
|
||||
fire_sound = 'sound/weapons/beam_sniper.ogg'
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle
|
||||
@@ -528,21 +529,15 @@
|
||||
tracer_type = /obj/effect/projectile/tracer/tracer/beam_rifle
|
||||
var/constant_tracer = FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/generate_hitscan_tracers(cleanup = TRUE, duration = 5, impacting = TRUE, highlander)
|
||||
set waitfor = FALSE
|
||||
if(isnull(highlander))
|
||||
highlander = constant_tracer
|
||||
if(highlander && istype(gun))
|
||||
QDEL_LIST(gun.current_tracers)
|
||||
for(var/datum/point/p in beam_segments)
|
||||
gun.current_tracers += generate_tracer_between_points(p, beam_segments[p], tracer_type, color, 0, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity)
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/generate_hitscan_tracers(cleanup = TRUE, duration = 5, impacting = TRUE, generation, highlander = constant_tracer)
|
||||
if(!highlander)
|
||||
return ..()
|
||||
else
|
||||
for(var/datum/point/p in beam_segments)
|
||||
generate_tracer_between_points(p, beam_segments[p], tracer_type, color, duration, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity)
|
||||
if(cleanup)
|
||||
QDEL_LIST(beam_segments)
|
||||
beam_segments = null
|
||||
QDEL_NULL(beam_index)
|
||||
duration = 0
|
||||
. = ..()
|
||||
if(!generation) //first one
|
||||
QDEL_LIST(gun.current_tracers)
|
||||
gun.current_tracers += .
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam
|
||||
tracer_type = /obj/effect/projectile/tracer/tracer/aiming
|
||||
@@ -559,7 +554,3 @@
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/prehit(atom/target)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit()
|
||||
qdel(src)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
// this is all shitcode never ever add it to the game it's for debugging only.
|
||||
|
||||
/datum/action/item_action/chameleon/change/gun/update_look(mob/user, obj/item/picked_item)
|
||||
. = ..()
|
||||
var/obj/item/gun/energy/laser/chameleon/CG = target
|
||||
CG.get_chameleon_projectile(picked_item)
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/chameleon)
|
||||
clumsy_check = 0
|
||||
item_flags = NONE
|
||||
pin = /obj/item/firing_pin
|
||||
cell_type = /obj/item/stock_parts/cell/bluespace
|
||||
|
||||
var/datum/action/item_action/chameleon/change/gun/chameleon_action
|
||||
var/list/chameleon_projectile_vars
|
||||
var/list/chameleon_ammo_vars
|
||||
var/list/chameleon_gun_vars
|
||||
var/list/projectile_copy_vars
|
||||
var/list/ammo_copy_vars
|
||||
var/list/gun_copy_vars
|
||||
var/badmin_mode = FALSE
|
||||
var/can_hitscan = FALSE
|
||||
var/hitscan_mode = FALSE
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/Initialize()
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/gun
|
||||
chameleon_action.chameleon_name = "Gun"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/gun/magic, ignore_root_path = FALSE)
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
projectile_copy_vars = list("name", "icon", "icon_state", "item_state", "speed", "color", "hitsound", "forcedodge", "impact_effect_type", "range", "suppressed", "hitsound_wall", "impact_effect_type", "pass_flags", "tracer_type", "muzzle_type", "impact_type")
|
||||
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser")
|
||||
gun_copy_vars = list("fire_sound", "burst_size", "fire_delay")
|
||||
chameleon_gun_vars = list()
|
||||
ammo_copy_vars = list("firing_effect_type")
|
||||
chameleon_ammo_vars = list()
|
||||
recharge_newshot()
|
||||
get_chameleon_projectile(/obj/item/gun/energy/laser)
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/reset_chameleon_vars()
|
||||
chameleon_ammo_vars = list()
|
||||
chameleon_gun_vars = list()
|
||||
chameleon_projectile_vars = list()
|
||||
var/static/list/blacklisted_vars = list("locs", "loc", "contents", "x", "y", "z", "parent_type", "type", "vars")
|
||||
if(chambered)
|
||||
for(var/v in ammo_copy_vars)
|
||||
if(v in blacklisted_vars) //Just in case admins go crazy.
|
||||
continue
|
||||
chambered.vv_edit_var(v, initial(chambered.vars[v]))
|
||||
for(var/v in gun_copy_vars)
|
||||
if(v in blacklisted_vars)
|
||||
continue
|
||||
vv_edit_var(v, initial(vars[v]))
|
||||
vars[v] = initial(vars[v])
|
||||
QDEL_NULL(chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_ammo(obj/item/ammo_casing/AC, passthrough = TRUE, reset = FALSE)
|
||||
if(!istype(AC))
|
||||
CRASH("[AC] is not /obj/item/ammo_casing!")
|
||||
return FALSE
|
||||
for(var/V in ammo_copy_vars)
|
||||
if(AC.vars.Find(V))
|
||||
chameleon_ammo_vars[V] = AC.vars[V]
|
||||
chambered?.vv_edit_var(V, AC.vars[V])
|
||||
if(passthrough)
|
||||
var/obj/item/projectile/P = AC.BB
|
||||
set_chameleon_projectile(P)
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_projectile(obj/item/projectile/P)
|
||||
if(!istype(P))
|
||||
CRASH("[P] is not /obj/item/projectile!")
|
||||
return FALSE
|
||||
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser", "nodamage" = TRUE)
|
||||
for(var/V in projectile_copy_vars)
|
||||
if(P.vars.Find(V))
|
||||
chameleon_projectile_vars[V] = P.vars[V]
|
||||
if(istype(chambered, /obj/item/ammo_casing/energy/chameleon))
|
||||
var/obj/item/ammo_casing/energy/chameleon/AC = chambered
|
||||
AC.projectile_vars = chameleon_projectile_vars.Copy()
|
||||
if(!P.tracer_type)
|
||||
can_hitscan = FALSE
|
||||
set_hitscan(FALSE)
|
||||
else
|
||||
can_hitscan = TRUE
|
||||
if(badmin_mode)
|
||||
qdel(chambered.BB)
|
||||
chambered.projectile_type = P.type
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_gun(obj/item/gun/G , passthrough = TRUE)
|
||||
if(!istype(G))
|
||||
CRASH("[G] is not /obj/item/gun!")
|
||||
return FALSE
|
||||
for(var/V in gun_copy_vars)
|
||||
if(vars.Find(V) && G.vars.Find(V))
|
||||
chameleon_gun_vars[V] = G.vars[V]
|
||||
vv_edit_var(V, G.vars[V])
|
||||
if(passthrough)
|
||||
if(istype(G, /obj/item/gun/ballistic))
|
||||
var/obj/item/gun/ballistic/BG = G
|
||||
var/obj/item/ammo_box/AB = new BG.mag_type(G)
|
||||
qdel(BG)
|
||||
if(!istype(AB)||!AB.ammo_type)
|
||||
qdel(AB)
|
||||
return FALSE
|
||||
var/obj/item/ammo_casing/AC = new AB.ammo_type(G)
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/gun/magic))
|
||||
var/obj/item/gun/magic/MG = G
|
||||
var/obj/item/ammo_casing/AC = new MG.ammo_type(G)
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/EG = G
|
||||
if(islist(EG.ammo_type) && EG.ammo_type.len)
|
||||
var/obj/item/ammo_casing/AC = EG.ammo_type[1]
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/gun/syringe))
|
||||
var/obj/item/ammo_casing/AC = new /obj/item/ammo_casing/syringegun(src)
|
||||
set_chameleon_ammo(AC)
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(!can_hitscan)
|
||||
to_chat(user, "<span class='warning'>[src]'s current disguised gun does not allow it to enable high velocity mode!</span>")
|
||||
return
|
||||
if(!chambered)
|
||||
to_chat(user, "<span class='warning'>Unknown error in energy lens: Please reset chameleon disguise and try again.</span>")
|
||||
return
|
||||
set_hitscan(!hitscan_mode)
|
||||
to_chat(user, "<span class='notice'>You toggle [src]'s high velocity beam mode to [hitscan_mode? "on" : "off"].</span>")
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/set_hitscan(hitscan)
|
||||
var/obj/item/ammo_casing/energy/chameleon/AC = chambered
|
||||
AC.hitscan_mode = hitscan
|
||||
hitscan_mode = hitscan
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/proc/get_chameleon_projectile(guntype)
|
||||
reset_chameleon_vars()
|
||||
var/obj/item/gun/G = new guntype(src)
|
||||
set_chameleon_gun(G)
|
||||
qdel(G)
|
||||
|
||||
/obj/item/ammo_casing/energy/chameleon
|
||||
projectile_type = /obj/item/projectile/energy/chameleon
|
||||
e_cost = 0
|
||||
var/hitscan_mode = FALSE
|
||||
var/list/projectile_vars = list()
|
||||
|
||||
/obj/item/ammo_casing/energy/chameleon/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
. = ..()
|
||||
if(!BB)
|
||||
newshot()
|
||||
for(var/V in projectile_vars)
|
||||
if(BB.vars.Find(V))
|
||||
BB.vv_edit_var(V, projectile_vars[V])
|
||||
if(hitscan_mode)
|
||||
BB.hitscan = TRUE
|
||||
|
||||
/obj/item/projectile/energy/chameleon
|
||||
nodamage = TRUE
|
||||
@@ -52,6 +52,8 @@
|
||||
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
|
||||
var/list/beam_segments //assoc list of datum/point or datum/point/vector, start = end. Used for hitscan effect generation.
|
||||
var/datum/point/beam_index
|
||||
/// Used in generate_hitscan_tracers to determine which "cycle" we're on.
|
||||
var/hitscan_effect_generation = 0
|
||||
var/tracer_type
|
||||
var/muzzle_type
|
||||
var/impact_type
|
||||
@@ -89,10 +91,10 @@
|
||||
var/decayedRange //stores original range
|
||||
var/reflect_range_decrease = 5 //amount of original range that falls off when reflecting, so it doesn't go forever
|
||||
var/is_reflectable = FALSE // Can it be reflected or not?
|
||||
|
||||
|
||||
/// factor to multiply by for zone accuracy percent.
|
||||
var/zone_accuracy_factor = 1
|
||||
|
||||
|
||||
//Effects
|
||||
var/stun = 0
|
||||
var/knockdown = 0
|
||||
@@ -656,18 +658,20 @@
|
||||
if(trajectory && beam_index)
|
||||
var/datum/point/pcache = trajectory.copy_to()
|
||||
beam_segments[beam_index] = pcache
|
||||
generate_hitscan_tracers(null, null, impacting)
|
||||
generate_hitscan_tracers(null, null, impacting, hitscan_effect_generation++)
|
||||
|
||||
/obj/item/projectile/proc/generate_hitscan_tracers(cleanup = TRUE, duration = 3, impacting = TRUE)
|
||||
/obj/item/projectile/proc/generate_hitscan_tracers(cleanup = TRUE, duration = 3, impacting = TRUE, generation)
|
||||
if(!length(beam_segments))
|
||||
return
|
||||
. = list()
|
||||
if(tracer_type)
|
||||
var/tempref = REF(src)
|
||||
var/list/turfs = list()
|
||||
for(var/datum/point/p in beam_segments)
|
||||
generate_tracer_between_points(p, beam_segments[p], tracer_type, color, duration, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity, tempref)
|
||||
. += generate_tracer_between_points(p, beam_segments[p], tracer_type, color, duration, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity, turfs)
|
||||
if(muzzle_type && duration > 0)
|
||||
var/datum/point/p = beam_segments[1]
|
||||
var/atom/movable/thing = new muzzle_type
|
||||
. += thing
|
||||
p.move_atom_to_src(thing)
|
||||
var/matrix/M = new
|
||||
M.Turn(original_angle)
|
||||
@@ -678,6 +682,7 @@
|
||||
if(impacting && impact_type && duration > 0)
|
||||
var/datum/point/p = beam_segments[beam_segments[beam_segments.len]]
|
||||
var/atom/movable/thing = new impact_type
|
||||
. += thing
|
||||
p.move_atom_to_src(thing)
|
||||
var/matrix/M = new
|
||||
M.Turn(Angle)
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
// .45 (M1911 & C20r)
|
||||
|
||||
/obj/item/projectile/bullet/c45
|
||||
name = ".45 bullet"
|
||||
damage = 20
|
||||
stamina = 65
|
||||
|
||||
/obj/item/projectile/bullet/c45_nostamina
|
||||
name = ".45 bullet"
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning
|
||||
name = ".45 bullet"
|
||||
damage = 24
|
||||
stamina = 10
|
||||
damage = 40 //BANG BANG BANG
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
stutter = 10
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 7
|
||||
range = 14
|
||||
speed = 0.6
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
impact_type = /obj/effect/projectile/impact/stun
|
||||
@@ -27,7 +28,7 @@
|
||||
C.IgniteMob()
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
|
||||
else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
|
||||
else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE) && !HAS_TRAIT(C, TRAIT_TASED_RESISTANCE))
|
||||
C.apply_status_effect(strong_tase? STATUS_EFFECT_TASED : STATUS_EFFECT_TASED_WEAK, tase_duration)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
|
||||
|
||||
@@ -42,9 +43,9 @@
|
||||
knockdown_stamoverride = 0
|
||||
knockdown_stam_max = 0
|
||||
strong_tase = FALSE
|
||||
range = 12
|
||||
|
||||
/obj/item/projectile/energy/electrode/security/hos
|
||||
knockdown = 100
|
||||
knockdown_stamoverride = 30
|
||||
knockdown_stam_max = null
|
||||
tase_duration = 10
|
||||
|
||||
@@ -124,8 +124,8 @@
|
||||
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
|
||||
return
|
||||
|
||||
M.notransform = 1
|
||||
M.canmove = 0
|
||||
M.notransform = TRUE
|
||||
M.Paralyze(INFINITY)
|
||||
M.icon = null
|
||||
M.cut_overlays()
|
||||
M.invisibility = INVISIBILITY_ABSTRACT
|
||||
@@ -529,7 +529,7 @@
|
||||
else
|
||||
used = 1
|
||||
victim.take_overall_damage(30,30)
|
||||
victim.Knockdown(60)
|
||||
victim.DefaultCombatKnockdown(60)
|
||||
explosion(src, -1, -1, -1, -1, FALSE, FALSE, 5)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
desc = "Woosh!"
|
||||
damage = 15
|
||||
icon_state = "arrow"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow/wood
|
||||
|
||||
/obj/item/projectile/bullet/reusable/arrow/ashen
|
||||
/obj/item/projectile/bullet/reusable/arrow/ash
|
||||
name = "ashen arrow"
|
||||
desc = "Fire harderned arrow."
|
||||
damage = 25
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow/ashen
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow/ash
|
||||
|
||||
/obj/item/projectile/bullet/reusable/arrow/bone //AP for ashwalkers
|
||||
name = "bone arrow"
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
hal_impact_effect_wall = null
|
||||
|
||||
/obj/item/projectile/hallucination/taser/hal_apply_effect()
|
||||
hal_target.Knockdown(100)
|
||||
hal_target.DefaultCombatKnockdown(100)
|
||||
hal_target.stuttering += 20
|
||||
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
|
||||
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
|
||||
@@ -199,7 +199,7 @@
|
||||
hal_impact_effect_wall = null
|
||||
|
||||
/obj/item/projectile/hallucination/ebow/hal_apply_effect()
|
||||
hal_target.Knockdown(100)
|
||||
hal_target.DefaultCombatKnockdown(100)
|
||||
hal_target.stuttering += 5
|
||||
hal_target.adjustStaminaLoss(8)
|
||||
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
nodamage = TRUE
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/L = target
|
||||
L.Knockdown(100, TRUE, FALSE, 30, 25)
|
||||
L.DefaultCombatKnockdown(100, TRUE, FALSE, 30, 25)
|
||||
return ..()
|
||||
|
||||
@@ -16,3 +16,8 @@
|
||||
/obj/item/projectile/temp/hot
|
||||
name = "heat beam"
|
||||
temperature = 400
|
||||
|
||||
/obj/item/projectile/temp/cryo
|
||||
name = "cryo beam"
|
||||
range = 3
|
||||
temperature = -240 // Single slow shot reduces temp greatly
|
||||
Reference in New Issue
Block a user