Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit220
This commit is contained in:
@@ -71,9 +71,3 @@
|
||||
projectile_type = /obj/item/projectile/beam/mindflayer
|
||||
select_name = "MINDFUCK"
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/weak
|
||||
projectile_type = /obj/item/projectile/beam/weak/minigun
|
||||
e_cost = 10
|
||||
fire_sound = 'sound/weapons/gatling.ogg'
|
||||
click_cooldown_override = 1
|
||||
|
||||
@@ -25,3 +25,6 @@
|
||||
fire_sound = 'sound/weapons/taser2.ogg'
|
||||
harmful = FALSE
|
||||
click_cooldown_override = 3.5
|
||||
|
||||
/obj/item/ammo_casing/energy/disabler/secborg
|
||||
e_cost = 50
|
||||
@@ -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"
|
||||
|
||||
@@ -277,12 +277,12 @@
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/melee/transforming/energy))
|
||||
var/obj/item/melee/transforming/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/riot/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/melee/transforming/energy))
|
||||
var/obj/item/melee/transforming/energy/W = A
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
//The ammo/gun is stored in a back slot item
|
||||
/obj/item/minigunpack2
|
||||
name = " Laser Gatling Pack"
|
||||
desc = "A massive battery pack with an attached laser gatling gun!"
|
||||
icon = 'icons/obj/guns/minigun.dmi'
|
||||
icon_state = "holstered"
|
||||
item_state = "backpack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/obj/item/gun/energy/minigun/gun
|
||||
var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
|
||||
var/overheat = 0
|
||||
var/overheat_max = 60
|
||||
var/heat_diffusion = 5
|
||||
|
||||
/obj/item/minigunpack2/Initialize()
|
||||
. = ..()
|
||||
gun = new(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/minigunpack2/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/minigunpack2/process()
|
||||
overheat = max(0, overheat - heat_diffusion)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/minigunpack2/attack_hand(var/mob/living/carbon/user)
|
||||
if(src.loc == user)
|
||||
if(!armed)
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
armed = 1
|
||||
if(!user.put_in_hands(gun))
|
||||
armed = 0
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the gun!</span>")
|
||||
return
|
||||
update_icon()
|
||||
user.update_inv_back()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are already holding the gun!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/minigunpack2/attackby(obj/item/W, mob/user, params)
|
||||
if(W == gun) //Don't need armed check, because if you have the gun assume its armed.
|
||||
user.dropItemToGround(gun, TRUE)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/minigunpack2/dropped(mob/user)
|
||||
if(armed)
|
||||
user.dropItemToGround(gun, TRUE)
|
||||
|
||||
/obj/item/minigunpack2/MouseDrop(atom/over_object)
|
||||
. = ..()
|
||||
if(armed)
|
||||
return
|
||||
if(iscarbon(usr))
|
||||
var/mob/M = usr
|
||||
|
||||
if(!over_object)
|
||||
return
|
||||
|
||||
if(!M.incapacitated())
|
||||
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
|
||||
/obj/item/minigunpack2/update_icon()
|
||||
if(armed)
|
||||
icon_state = "notholstered"
|
||||
else
|
||||
icon_state = "holstered"
|
||||
|
||||
/obj/item/minigunpack2/proc/attach_gun(var/mob/user)
|
||||
if(!gun)
|
||||
gun = new(src)
|
||||
gun.forceMove(src)
|
||||
armed = 0
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You attach the [gun.name] to the [name].</span>")
|
||||
else
|
||||
src.visible_message("<span class='warning'>The [gun.name] snaps back onto the [name]!</span>")
|
||||
update_icon()
|
||||
user.update_inv_back()
|
||||
|
||||
|
||||
/obj/item/gun/energy/minigun
|
||||
name = "laser gatling gun"
|
||||
desc = "An advanced laser cannon with an incredible rate of fire. Requires a bulky backpack power source to use."
|
||||
icon = 'icons/obj/guns/minigun.dmi'
|
||||
icon_state = "minigun_spin"
|
||||
item_state = "minigun"
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
recoil = 2
|
||||
slowdown = 1
|
||||
slot_flags = null
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
materials = list()
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/weak)
|
||||
burst_size = 2
|
||||
automatic = 1
|
||||
can_charge = 0
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
charge_tick = 2
|
||||
charge_delay = 5
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
item_flags = NEEDS_PERMIT | SLOWS_WHILE_IN_HAND
|
||||
var/obj/item/minigunpack2/ammo_pack
|
||||
|
||||
/obj/item/gun/energy/minigun/Initialize()
|
||||
if(istype(loc, /obj/item/minigunpack2)) //We should spawn inside an ammo pack so let's use that one.
|
||||
ammo_pack = loc
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL //No pack, no gun
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/minigun/attack_self(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/minigun/dropped(mob/user)
|
||||
if(ammo_pack)
|
||||
ammo_pack.attach_gun(user)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gun/energy/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(ammo_pack)
|
||||
if(ammo_pack.overheat < ammo_pack.overheat_max)
|
||||
ammo_pack.overheat += burst_size
|
||||
..()
|
||||
else
|
||||
to_chat(user, "The gun's heat sensor locked the trigger to prevent lens damage.")
|
||||
|
||||
/obj/item/gun/energy/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/energy/minigun/dropped(mob/living/user)
|
||||
ammo_pack.attach_gun(user)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "hybrid taser"
|
||||
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/disabler)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg
|
||||
@@ -49,6 +49,7 @@
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_charge = FALSE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -122,3 +122,32 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart
|
||||
name = "Repeating dart gun"
|
||||
icon_state = "rapiddartgun"
|
||||
item_state = "rapiddartgun"
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list)
|
||||
var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list
|
||||
|
||||
if(istype(B, /obj/item/reagent_containers/glass/beaker/large))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 2
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/plastic))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 3
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/meta))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 4
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/bluespace))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 6
|
||||
return
|
||||
else
|
||||
max_syringes = 1
|
||||
desc = "[initial(desc)] It has a [B] strapped to it, but it doesn't seem to be doing anything."
|
||||
..()
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
//Effects
|
||||
var/stun = 0
|
||||
var/knockdown = 0
|
||||
var/knockdown_stamoverride
|
||||
var/knockdown_stam_max
|
||||
var/unconscious = 0
|
||||
var/irradiate = 0
|
||||
var/stutter = 0
|
||||
@@ -161,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)
|
||||
|
||||
@@ -202,7 +215,7 @@
|
||||
else
|
||||
L.log_message("has been shot by [firer] with [src]", LOG_ATTACK, color="orange")
|
||||
|
||||
return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
|
||||
return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter, knockdown_stamoverride, knockdown_stam_max)
|
||||
|
||||
/obj/item/projectile/proc/vol_by_damage()
|
||||
if(src.damage)
|
||||
|
||||
@@ -39,14 +39,6 @@
|
||||
/obj/item/projectile/beam/weak
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/beam/weak/minigun
|
||||
damage = 12.5
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/beam/weak/minigun/Initialize()
|
||||
.=..()
|
||||
speed = pick(0.7,0.75,0.8,0.85,0.9,0.95,1,1.05,1.1,1.15)
|
||||
|
||||
/obj/item/projectile/beam/weak/penetrator
|
||||
armour_penetration = 50
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
name = "nuclear particle"
|
||||
icon_state = "nuclear_particle"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 20
|
||||
damage_type = TOX
|
||||
irradiate = 2500 //enough to knockdown and induce vomiting
|
||||
speed = 0.4
|
||||
flag = "rad"
|
||||
irradiate = 5000
|
||||
speed = 0.4
|
||||
hitsound = 'sound/weapons/emitter2.ogg'
|
||||
impact_type = /obj/effect/projectile/impact/xray
|
||||
var/static/list/particle_colors = list(
|
||||
@@ -25,22 +24,6 @@
|
||||
add_atom_colour(particle_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
set_light(4, 3, particle_colors[our_color]) //Range of 4, brightness of 3 - Same range as a flashlight
|
||||
|
||||
/atom/proc/fire_nuclear_particles(power_ratio) //used by fusion to fire random # of nuclear particles - power ratio determines about how many are fired
|
||||
var/random_particles = rand(3,6)
|
||||
var/particles_to_fire
|
||||
var/particles_fired
|
||||
switch(power_ratio) //multiply random_particles * factor for whatever tier
|
||||
if(0 to FUSION_MID_TIER_THRESHOLD)
|
||||
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_LOW
|
||||
if(FUSION_MID_TIER_THRESHOLD to FUSION_HIGH_TIER_THRESHOLD)
|
||||
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_MID
|
||||
if(FUSION_HIGH_TIER_THRESHOLD to FUSION_SUPER_TIER_THRESHOLD)
|
||||
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_HIGH
|
||||
if(FUSION_SUPER_TIER_THRESHOLD to INFINITY)
|
||||
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_SUPER
|
||||
while(particles_to_fire)
|
||||
particles_fired++
|
||||
var/angle = rand(0,360)
|
||||
var/obj/item/projectile/energy/nuclear_particle/P = new /obj/item/projectile/energy/nuclear_particle(src)
|
||||
addtimer(CALLBACK(P, /obj/item/projectile.proc/fire, angle), particles_fired) //multiply particles fired * delay so the particles end up stagnated (once every decisecond)
|
||||
particles_to_fire--
|
||||
/atom/proc/fire_nuclear_particle(angle = rand(0,360)) //used by fusion to fire random nuclear particles. Fires one particle in a random direction.
|
||||
var/obj/item/projectile/energy/nuclear_particle/P = new /obj/item/projectile/energy/nuclear_particle(src)
|
||||
P.fire(angle)
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
knockdown = 100
|
||||
knockdown = 60
|
||||
knockdown_stamoverride = 36
|
||||
knockdown_stam_max = 50
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
@@ -11,6 +13,7 @@
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
impact_type = /obj/effect/projectile/impact/stun
|
||||
var/tase_duration = 50
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
@@ -23,6 +26,7 @@
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
|
||||
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
|
||||
C.apply_status_effect(STATUS_EFFECT_TASED, tase_duration)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
. = ..()
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/M = target
|
||||
M.adjustBrainLoss(20)
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
|
||||
M.hallucination += 30
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(isalien(target))
|
||||
knockdown = 0
|
||||
nodamage = TRUE
|
||||
else if(isliving(target))
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/L = target
|
||||
L.Knockdown(100, TRUE, FALSE, 30, 25)
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user