module things, jfc
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
user.put_in_hands(magazine)
|
||||
magazine.update_icon()
|
||||
if(magazine.ammo_count())
|
||||
playsound(src, "sound/weapons/gun_magazine_remove_full.ogg", 70, 1)
|
||||
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, 1)
|
||||
else
|
||||
playsound(src, "gun_remove_empty_magazine", 70, 1)
|
||||
magazine = null
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/c20r/afterattack()
|
||||
..()
|
||||
. = ..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
if(select == 2)
|
||||
underbarrel.afterattack(target, user, flag, params)
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
return
|
||||
/obj/item/gun/ballistic/automatic/m90/attackby(obj/item/A, mob/user, params)
|
||||
if(istype(A, /obj/item/ammo_casing))
|
||||
@@ -264,7 +264,7 @@
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
|
||||
..()
|
||||
. = ..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
@@ -286,6 +286,7 @@
|
||||
can_suppress = FALSE
|
||||
burst_size = 3
|
||||
fire_delay = 1
|
||||
spread = 7
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
|
||||
@@ -317,7 +318,7 @@
|
||||
if(cover_open)
|
||||
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
/obj/item/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(!ammo_pack || ammo_pack.loc != user)
|
||||
to_chat(user, "You need the backpack power source to fire the gun!")
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
|
||||
ammo_pack.attach_gun(user)
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/no_mag
|
||||
spawnwithmagazine = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
@@ -26,6 +29,9 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m45
|
||||
can_suppress = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/m1911/no_mag
|
||||
spawnwithmagazine = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/m1911/kitchengun
|
||||
name = "\improper Kitchen Gun (TM)"
|
||||
desc = "Say goodbye to dirt with Kitchen Gun (TM)! Laser sight and night vision accessories sold separately."
|
||||
@@ -84,3 +90,4 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>..and falls into view. Whew, that was a close one.</span>")
|
||||
user.dropItemToGround(src)
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(magazine.caliber == "38")
|
||||
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
|
||||
if(magazine.ammo_count())
|
||||
@@ -191,6 +193,8 @@
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/afterattack(atom/target, mob/living/user, flag, params)
|
||||
. = ..(null, user, flag, params)
|
||||
|
||||
if(flag)
|
||||
if(!(target in user.contents) && ismob(target))
|
||||
if(user.a_intent == INTENT_HARM) // Flogging action
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/item/gun/energy/laser/retro/old
|
||||
name ="laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cyro."
|
||||
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
/obj/item/gun/energy/gravity_gun
|
||||
name = "one-point bluespace-gravitational manipulator"
|
||||
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/gravityrepulse, /obj/item/ammo_casing/energy/gravityattract, /obj/item/ammo_casing/energy/gravitychaos)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
|
||||
item_state = "gravity_gun"
|
||||
icon_state = "gravity_gun"
|
||||
var/power = 4
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
no_den_usage = 1
|
||||
var/allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection,
|
||||
/obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball,
|
||||
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage)
|
||||
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage, /obj/item/projectile/magic/locker)
|
||||
|
||||
/obj/item/gun/magic/staff/chaos/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
chambered.projectile_type = pick(allowed_projectile_types)
|
||||
@@ -94,3 +94,15 @@
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/magic/staff/locker
|
||||
name = "staff of the locker"
|
||||
desc = "An artefact that expells encapsulating bolts, for incapacitating thy enemy."
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/locker
|
||||
icon_state = "locker"
|
||||
item_state = "locker"
|
||||
max_charges = 6
|
||||
recharge_rate = 4
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
no_den_usage = 0
|
||||
zap_self(user)
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", INDIVIDUAL_ATTACK_LOG)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
. = ..()
|
||||
fire_delay = delay
|
||||
current_tracers = list()
|
||||
START_PROCESSING(SSprojectiles, src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
zoom_lock_action = new(src)
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/Destroy()
|
||||
@@ -247,17 +247,7 @@
|
||||
/obj/item/gun/energy/beam_rifle/proc/process_aim()
|
||||
if(istype(current_user) && current_user.client && current_user.client.mouseParams)
|
||||
var/angle = mouse_angle_from_client(current_user.client)
|
||||
switch(angle)
|
||||
if(316 to 360)
|
||||
current_user.setDir(NORTH)
|
||||
if(0 to 45)
|
||||
current_user.setDir(NORTH)
|
||||
if(46 to 135)
|
||||
current_user.setDir(EAST)
|
||||
if(136 to 225)
|
||||
current_user.setDir(SOUTH)
|
||||
if(226 to 315)
|
||||
current_user.setDir(WEST)
|
||||
current_user.setDir(angle2dir_cardinal(angle))
|
||||
var/difference = abs(closer_angle_difference(lastangle, angle))
|
||||
delay_penalty(difference * aiming_time_increase_angle_multiplier)
|
||||
lastangle = angle
|
||||
@@ -295,7 +285,7 @@
|
||||
if(istype(user))
|
||||
current_user = user
|
||||
LAZYOR(current_user.mousemove_intercept_objects, src)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED), CALLBACK(src, .proc/on_mob_move))
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move)))
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
if(aiming)
|
||||
@@ -535,7 +525,7 @@
|
||||
if(!QDELETED(target))
|
||||
handle_impact(target)
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/Collide(atom/target)
|
||||
/obj/item/projectile/beam/beam_rifle/Bump(atom/target)
|
||||
if(check_pierce(target))
|
||||
permutated += target
|
||||
trajectory_ignore_forcemove = TRUE
|
||||
|
||||
@@ -28,16 +28,10 @@
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
|
||||
|
||||
/obj/item/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
|
||||
if(target == user)
|
||||
return
|
||||
/obj/item/gun/grenadelauncher/can_shoot()
|
||||
return grenades.len
|
||||
|
||||
if(grenades.len)
|
||||
fire_grenade(target,user)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The grenade launcher is empty.</span>")
|
||||
|
||||
/obj/item/gun/grenadelauncher/proc/fire_grenade(atom/target, mob/user)
|
||||
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
|
||||
"<span class='danger'>You fire the grenade launcher!</span>")
|
||||
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
|
||||
|
||||
Reference in New Issue
Block a user