Merge remote-tracking branch 'upstream/master' into abductor-update
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
icon_state = "46x30mmt-20"
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mm
|
||||
caliber = "4.6x30mm"
|
||||
max_ammo = 20
|
||||
max_ammo = 32
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmt-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmt-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap
|
||||
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtA-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmtA-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic
|
||||
name = "wt550 magazine (Incendiary 4.6x30mm)"
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtI-[round(ammo_count(),4)]"
|
||||
icon_state = "46x30mmtI-[round(20*(ammo_count()/max_ammo),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/uzim9mm
|
||||
name = "uzi magazine (9mm)"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
var/semicd = 0 //cooldown handler
|
||||
var/weapon_weight = WEAPON_LIGHT //currently only used for inaccuracy
|
||||
var/spread = 0 //Spread induced by the gun itself.
|
||||
var/burst_spread = 0 //Spread induced by the gun itself during burst fire per iteration. Only checked if spread is 0.
|
||||
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
|
||||
var/inaccuracy_modifier = 1
|
||||
|
||||
@@ -62,16 +63,18 @@
|
||||
var/zoomed = FALSE //Zoom toggle
|
||||
var/zoom_amt = 3 //Distance in TURFs to move the user's screen forward (the "zoom" effect)
|
||||
var/zoom_out_amt = 0
|
||||
var/datum/action/toggle_scope_zoom/azoom
|
||||
var/datum/action/item_action/toggle_scope_zoom/azoom
|
||||
|
||||
var/dualwield_spread_mult = 1 //dualwield spread multiplier
|
||||
|
||||
/obj/item/gun/Initialize()
|
||||
. = ..()
|
||||
if(pin)
|
||||
pin = new pin(src)
|
||||
if(gun_light)
|
||||
alight = new /datum/action/item_action/toggle_gunlight(src)
|
||||
build_zooming()
|
||||
|
||||
alight = new (src)
|
||||
if(zoomable)
|
||||
azoom = new (src)
|
||||
|
||||
/obj/item/gun/CheckParts(list/parts_list)
|
||||
..()
|
||||
@@ -185,7 +188,7 @@
|
||||
if(G == src || G.weapon_weight >= WEAPON_MEDIUM)
|
||||
continue
|
||||
else if(G.can_trigger_gun(user))
|
||||
bonus_spread += 24 * G.weapon_weight
|
||||
bonus_spread += 24 * G.weapon_weight * G.dualwield_spread_mult
|
||||
loop_counter++
|
||||
addtimer(CALLBACK(G, /obj/item/gun.proc/process_fire, target, user, TRUE, params, null, bonus_spread), loop_counter)
|
||||
|
||||
@@ -226,9 +229,9 @@
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
return
|
||||
if(randomspread)
|
||||
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread))
|
||||
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
else //Smart spread
|
||||
sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread))
|
||||
sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
|
||||
if(!chambered.fire_casing(target, user, params, ,suppressed, zone_override, sprd))
|
||||
shoot_with_empty_chamber(user)
|
||||
@@ -259,7 +262,9 @@
|
||||
var/randomized_gun_spread = 0
|
||||
var/rand_spr = rand()
|
||||
if(spread)
|
||||
randomized_gun_spread = rand(0,spread)
|
||||
randomized_gun_spread = rand(0, spread)
|
||||
else if(burst_size > 1 && burst_spread)
|
||||
randomized_gun_spread = rand(0, burst_spread)
|
||||
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
|
||||
bonus_spread += 25
|
||||
var/randomized_bonus_spread = rand(0, bonus_spread)
|
||||
@@ -372,6 +377,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_scope_zoom))
|
||||
zoom(user)
|
||||
else if(istype(action, alight))
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/gun/proc/toggle_gunlight()
|
||||
if(!gun_light)
|
||||
return
|
||||
@@ -407,21 +418,10 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/gun/pickup(mob/user)
|
||||
..()
|
||||
if(azoom)
|
||||
azoom.Grant(user)
|
||||
if(alight)
|
||||
alight.Grant(user)
|
||||
|
||||
/obj/item/gun/dropped(mob/user)
|
||||
..()
|
||||
if(zoomed)
|
||||
zoom(user,FALSE)
|
||||
if(azoom)
|
||||
azoom.Remove(user)
|
||||
if(alight)
|
||||
alight.Remove(user)
|
||||
/obj/item/gun/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/toggle_scope_zoom) && slot != SLOT_HANDS)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
@@ -468,41 +468,32 @@
|
||||
// ZOOMING //
|
||||
/////////////
|
||||
|
||||
/datum/action/toggle_scope_zoom
|
||||
/datum/action/item_action/toggle_scope_zoom
|
||||
name = "Toggle Scope"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "sniper_zoom"
|
||||
var/obj/item/gun/gun = null
|
||||
|
||||
/datum/action/toggle_scope_zoom/Trigger()
|
||||
gun.zoom(owner)
|
||||
|
||||
/datum/action/toggle_scope_zoom/IsAvailable()
|
||||
/datum/action/item_action/toggle_scope_zoom/IsAvailable()
|
||||
. = ..()
|
||||
if(!gun)
|
||||
return FALSE
|
||||
if(!.)
|
||||
gun.zoom(owner, FALSE)
|
||||
if(!owner.get_held_index_of_item(gun))
|
||||
return FALSE
|
||||
|
||||
/datum/action/toggle_scope_zoom/Remove(mob/living/L)
|
||||
gun.zoom(L, FALSE)
|
||||
..()
|
||||
var/obj/item/gun/G = target
|
||||
G.zoom(owner, FALSE)
|
||||
|
||||
/datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L)
|
||||
var/obj/item/gun/G = target
|
||||
G.zoom(L, FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/proc/zoom(mob/living/user, forced_zoom)
|
||||
if(!user || !user.client)
|
||||
if(!(user?.client))
|
||||
return
|
||||
|
||||
switch(forced_zoom)
|
||||
if(FALSE)
|
||||
zoomed = FALSE
|
||||
if(TRUE)
|
||||
zoomed = TRUE
|
||||
else
|
||||
zoomed = !zoomed
|
||||
if(!isnull(forced_zoom))
|
||||
if(zoomed == forced_zoom)
|
||||
return
|
||||
zoomed = forced_zoom
|
||||
else
|
||||
zoomed = !zoomed
|
||||
|
||||
if(zoomed)
|
||||
var/_x = 0
|
||||
@@ -524,16 +515,6 @@
|
||||
user.client.change_view(CONFIG_GET(string/default_view))
|
||||
user.client.pixel_x = 0
|
||||
user.client.pixel_y = 0
|
||||
return zoomed
|
||||
|
||||
//Proc, so that gun accessories/scopes/etc. can easily add zooming.
|
||||
/obj/item/gun/proc/build_zooming()
|
||||
if(azoom)
|
||||
return
|
||||
|
||||
if(zoomable)
|
||||
azoom = new()
|
||||
azoom.gun = src
|
||||
|
||||
/obj/item/gun/handle_atom_del(atom/A)
|
||||
if(A == chambered)
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/process_chamber(empty_chamber = 1)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(istype(AC)) //there's a chambered round
|
||||
@@ -170,7 +169,7 @@
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
user_dna = C.dna
|
||||
B.add_blood_DNA(user_dna)
|
||||
B.add_blood_DNA(user_dna, C.diseases)
|
||||
var/datum/callback/gibspawner = CALLBACK(GLOBAL_PROC, /proc/spawn_atom_to_turf, /obj/effect/gibspawner/generic, B, 1, FALSE, list(user_dna))
|
||||
B.throw_at(target, BRAINS_BLOWN_THROW_RANGE, BRAINS_BLOWN_THROW_SPEED, callback=gibspawner)
|
||||
return(BRUTELOSS)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/alarmed = 0
|
||||
var/select = 1
|
||||
var/automatic_burst_overlay = TRUE
|
||||
can_suppress = TRUE
|
||||
burst_size = 3
|
||||
fire_delay = 2
|
||||
@@ -19,10 +20,11 @@
|
||||
|
||||
/obj/item/gun/ballistic/automatic/update_icon()
|
||||
..()
|
||||
if(!select)
|
||||
add_overlay("[initial(icon_state)]semi")
|
||||
if(select == 1)
|
||||
add_overlay("[initial(icon_state)]burst")
|
||||
if(automatic_burst_overlay)
|
||||
if(!select)
|
||||
add_overlay("[initial(icon_state)]semi")
|
||||
if(select == 1)
|
||||
add_overlay("[initial(icon_state)]burst")
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
|
||||
@@ -51,19 +53,20 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
|
||||
|
||||
/obj/item/gun/ballistic/automatic/ui_action_click()
|
||||
burst_select()
|
||||
/obj/item/gun/ballistic/automatic/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_firemode))
|
||||
burst_select()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
disable_burst()
|
||||
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
enable_burst()
|
||||
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
@@ -72,6 +75,14 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/enable_burst()
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/disable_burst()
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
|
||||
/obj/item/gun/ballistic/automatic/can_shoot()
|
||||
return get_ammo()
|
||||
|
||||
@@ -106,7 +117,6 @@
|
||||
/obj/item/gun/ballistic/automatic/c20r/afterattack()
|
||||
. = ..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/automatic/c20r/update_icon()
|
||||
..()
|
||||
@@ -118,17 +128,25 @@
|
||||
icon_state = "wt550"
|
||||
item_state = "arg"
|
||||
mag_type = /obj/item/ammo_box/magazine/wt550m9
|
||||
fire_delay = 2
|
||||
can_suppress = FALSE
|
||||
burst_size = 0
|
||||
actions_types = list()
|
||||
burst_size = 2
|
||||
fire_delay = 1
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 25
|
||||
knife_y_offset = 12
|
||||
automatic_burst_overlay = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/enable_burst()
|
||||
. = ..()
|
||||
spread = 15
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/disable_burst()
|
||||
. = ..()
|
||||
spread = 0
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/update_icon()
|
||||
..()
|
||||
icon_state = "wt550[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
|
||||
icon_state = "wt550[magazine ? "-[CEILING(( (get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
|
||||
|
||||
/obj/item/gun/ballistic/automatic/mini_uzi
|
||||
name = "\improper Type U3 Uzi"
|
||||
|
||||
@@ -174,9 +174,6 @@
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/gun/energy/suicide_act(mob/living/user)
|
||||
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
@@ -78,6 +78,12 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/Exited(atom/movable/AM)
|
||||
. = ..()
|
||||
if((AM in modkits) && istype(AM, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/M = AM
|
||||
M.uninstall(src, FALSE)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/MK = I
|
||||
@@ -261,7 +267,7 @@
|
||||
icon_state = "modkit"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
require_module = 1
|
||||
module_type = /obj/item/robot_module/miner
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
var/denied_type = null
|
||||
var/maximum_of_type = 1
|
||||
var/cost = 30
|
||||
@@ -287,6 +293,8 @@
|
||||
|
||||
/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
|
||||
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>")
|
||||
@@ -322,12 +330,11 @@
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.module.modules)
|
||||
uninstall(KA)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
forceMove(get_turf(KA))
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA, forcemove = TRUE)
|
||||
if(forcemove)
|
||||
forceMove(get_turf(KA))
|
||||
KA.modkits -= src
|
||||
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
|
||||
//use this one for effects you want to trigger before any damage is done at all and before damage is decreased by pressure
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE)
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/checks_antimagic = FALSE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
@@ -31,6 +32,9 @@
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
|
||||
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
|
||||
@@ -87,14 +87,17 @@
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
..()
|
||||
charges--
|
||||
if(user.anti_magic_check())
|
||||
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
|
||||
return
|
||||
user.revive(full_heal = 1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.regenerate_limbs()
|
||||
C.regenerate_organs()
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
charges--
|
||||
..()
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/debug //for testing
|
||||
name = "debug wand of healing"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/aiming_lastangle = 0
|
||||
var/mob/current_user = null
|
||||
var/list/obj/effect/projectile/tracer/current_tracers
|
||||
|
||||
|
||||
var/structure_piercing = 1
|
||||
var/structure_bleed_coeff = 0.7
|
||||
var/wall_pierce_amount = 0
|
||||
@@ -76,7 +76,7 @@
|
||||
var/static/image/drained_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_empty")
|
||||
|
||||
var/datum/action/item_action/zoom_lock_action/zoom_lock_action
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/debug
|
||||
delay = 0
|
||||
@@ -111,7 +111,9 @@
|
||||
to_chat(owner, "<span class='boldnotice'>You switch [src]'s zooming processor to center mode.</span>")
|
||||
if(ZOOM_LOCK_OFF)
|
||||
to_chat(owner, "<span class='boldnotice'>You disable [src]'s zooming system.</span>")
|
||||
reset_zooming()
|
||||
reset_zooming()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/proc/set_autozoom_pixel_offsets_immediate(current_angle)
|
||||
if(zoom_lock == ZOOM_LOCK_CENTER_VIEW || zoom_lock == ZOOM_LOCK_OFF)
|
||||
@@ -172,7 +174,7 @@
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
set_user(null)
|
||||
QDEL_LIST(current_tracers)
|
||||
QDEL_NULL(mobhook)
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/emp_act(severity)
|
||||
@@ -259,14 +261,17 @@
|
||||
if(user == current_user)
|
||||
return
|
||||
stop_aiming(current_user)
|
||||
QDEL_NULL(mobhook)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
if(istype(current_user))
|
||||
LAZYREMOVE(current_user.mousemove_intercept_objects, src)
|
||||
current_user = null
|
||||
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)))
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
if(aiming)
|
||||
|
||||
@@ -163,15 +163,26 @@
|
||||
var/splatter_dir = dir
|
||||
if(starting)
|
||||
splatter_dir = get_dir(starting, target_loca)
|
||||
if(isalien(L))
|
||||
var/obj/item/bodypart/B = L.get_bodypart(def_zone)
|
||||
if(B && B.status == BODYPART_ROBOTIC) // So if you hit a robotic, it sparks instead of bloodspatters
|
||||
do_sparks(2, FALSE, target.loc)
|
||||
if(prob(25))
|
||||
new /obj/effect/decal/cleanable/oil(target_loca)
|
||||
else if(isalien(L))
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target_loca, splatter_dir)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color(H.dna.blood_type))
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color())
|
||||
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
C.bleed(damage)
|
||||
else
|
||||
L.add_splatter_floor(target_loca)
|
||||
|
||||
else if(impact_effect_type && !hitscan)
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
|
||||
|
||||
@@ -1,60 +1,69 @@
|
||||
// .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
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(target)
|
||||
|
||||
//section shamelessly copypasta'd from the clean component
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/I = A
|
||||
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
if(ismob(I.loc))
|
||||
var/mob/M = I.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
if(cleaned_human.wear_suit)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
else if(cleaned_human.w_uniform)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
if(cleaned_human.shoes)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
|
||||
// 4.6x30mm (Autorifles)
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm
|
||||
name = "4.6x30mm bullet"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm_ap
|
||||
name = "4.6x30mm armor-piercing bullet"
|
||||
damage = 15
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
name = "4.6x30mm incendiary bullet"
|
||||
damage = 10
|
||||
fire_stacks = 1
|
||||
// .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
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(target)
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(isitem(A))
|
||||
var/obj/item/cleaned_item = A
|
||||
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_item.clean_blood()
|
||||
if(ismob(cleaned_item.loc))
|
||||
var/mob/M = cleaned_item.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes()
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
|
||||
// 4.6x30mm (Autorifles)
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm
|
||||
name = "4.6x30mm bullet"
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm_ap
|
||||
name = "4.6x30mm armor-piercing bullet"
|
||||
damage = 12.5
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
name = "4.6x30mm incendiary bullet"
|
||||
damage = 7.5
|
||||
fire_stacks = 1
|
||||
|
||||
Reference in New Issue
Block a user