Merge remote-tracking branch 'refs/remotes/origin/master' into syntheticbloods

This commit is contained in:
Poojawa
2019-07-31 19:24:39 -05:00
1257 changed files with 31159 additions and 17321 deletions
@@ -111,23 +111,23 @@
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
var/reagent_amount = 30
var/reagent_react = TRUE
/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/shotgun/dart/noreact
name = "cryostasis shotgun dart"
desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical."
icon_state = "cnrshell"
reagent_amount = 10
reagent_react = FALSE
/obj/item/ammo_casing/shotgun/dart/Initialize()
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
container_type |= OPENCONTAINER
create_reagents(reagent_amount)
reagents.set_reacting(reagent_react)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
@@ -6,9 +6,10 @@
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread)
if (..()) //successfully firing
moveToNullspace()
return 1
QDEL_NULL(src)
return TRUE
else
return 0
return FALSE
/obj/item/ammo_casing/caseless/update_icon()
..()
@@ -1,7 +1,15 @@
/obj/item/ammo_casing/caseless/a84mm
desc = "An 84mm anti-armour rocket."
/obj/item/ammo_casing/caseless/rocket
name = "\improper PM-9HE"
desc = "An 84mm High Explosive rocket. Fire at people and pray."
caliber = "84mm"
icon_state = "s-casing-live"
icon_state = "srm-8"
projectile_type = /obj/item/projectile/bullet/a84mm_he
/obj/item/ammo_casing/caseless/rocket/hedp
name = "\improper PM-9HEDP"
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
caliber = "84mm"
icon_state = "84mm-hedp"
projectile_type = /obj/item/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/a75
@@ -21,6 +21,7 @@
/obj/item/ammo_casing/energy/disabler
projectile_type = /obj/item/projectile/beam/disabler
select_name = "disable"
e_cost = 50
e_cost = 40
fire_sound = 'sound/weapons/taser2.ogg'
harmful = FALSE
click_cooldown_override = 3.5
@@ -59,3 +59,20 @@
S.forceMove(D)
D.injector = S
..()
/obj/item/ammo_casing/syringegun/dart
name = "used air canister"
desc = "A small canister of compressed gas."
projectile_type = /obj/item/projectile/bullet/dart/syringe/dart
firing_effect_type = null
harmful = FALSE
/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
..()
var/obj/item/gun/syringe/SG = loc
if(!SG.syringes.len)
return
var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1]
if(S.emptrig == TRUE)
var/obj/item/projectile/bullet/dart/syringe/dart/D = BB
D.emptrig = TRUE
@@ -11,7 +11,7 @@
max_ammo = 1
/obj/item/ammo_box/magazine/internal/rocketlauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/a84mm
name = "rocket launcher internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/rocket
caliber = "84mm"
max_ammo = 1
@@ -6,10 +6,12 @@
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/boltaction/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo = 1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
+19 -8
View File
@@ -32,9 +32,10 @@
var/fire_delay = 0 //rate of fire for burst firing and semi auto
var/firing_burst = 0 //Prevent the weapon from firing again while already firing
var/semicd = 0 //cooldown handler
var/weapon_weight = WEAPON_LIGHT
var/weapon_weight = WEAPON_LIGHT //currently only used for inaccuracy
var/spread = 0 //Spread induced by the gun itself.
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
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
@@ -162,7 +163,7 @@
//Exclude lasertag guns from the TRAIT_CLUMSY check.
if(clumsy_check)
if(istype(user))
if (user.has_trait(TRAIT_CLUMSY) && prob(40))
if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
to_chat(user, "<span class='userdanger'>You shoot yourself in the foot with [src]!</span>")
var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
process_fire(user, user, FALSE, params, shot_leg)
@@ -170,7 +171,7 @@
return
if(weapon_weight == WEAPON_HEAVY && user.get_inactive_held_item())
to_chat(user, "<span class='userdanger'>You need both hands free to fire [src]!</span>")
to_chat(user, "<span class='userdanger'>You need both hands free to fire \the [src]!</span>")
return
//DUAL (or more!) WIELDING
@@ -220,7 +221,7 @@
firing_burst = FALSE
return FALSE
if(chambered && chambered.BB)
if(user.has_trait(TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
if(chambered.harmful) // Is the bullet chambered harmful?
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
return
@@ -259,7 +260,7 @@
var/rand_spr = rand()
if(spread)
randomized_gun_spread = rand(0,spread)
if(user.has_trait(TRAIT_POOR_AIM)) //nice shootin' tex
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
bonus_spread += 25
var/randomized_bonus_spread = rand(0, bonus_spread)
@@ -269,7 +270,7 @@
addtimer(CALLBACK(src, .proc/process_burst, user, target, message, params, zone_override, sprd, randomized_gun_spread, randomized_bonus_spread, rand_spr, i), fire_delay * (i - 1))
else
if(chambered)
if(user.has_trait(TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
if(chambered.harmful) // Is the bullet chambered harmful?
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
return
@@ -422,7 +423,7 @@
if(alight)
alight.Remove(user)
/obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params)
/obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
if(!ishuman(user) || !ishuman(target))
return
@@ -438,7 +439,7 @@
semicd = TRUE
if(!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH)
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
if(user)
if(user == target)
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
@@ -538,3 +539,13 @@
if(A == chambered)
chambered = null
update_icon()
/obj/item/gun/proc/getinaccuracy(mob/living/user)
if(!iscarbon(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)
else
return ((weapon_weight * 25) * inaccuracy_modifier)
+5 -6
View File
@@ -7,6 +7,7 @@
var/mag_type = /obj/item/ammo_box/magazine/m10mm //Removes the need for max_ammo and caliber info
var/obj/item/ammo_box/magazine/magazine
var/casing_ejector = TRUE //whether the gun ejects the chambered casing
var/magazine_wording = "magazine"
/obj/item/gun/ballistic/Initialize()
. = ..()
@@ -57,7 +58,7 @@
if (!magazine && istype(AM, mag_type))
if(user.transferItemToLoc(AM, src))
magazine = AM
to_chat(user, "<span class='notice'>You load a new magazine into \the [src].</span>")
to_chat(user, "<span class='notice'>You load a new [magazine_wording] into \the [src].</span>")
if(magazine.ammo_count())
playsound(src, "gun_insert_full_magazine", 70, 1)
if(!chambered)
@@ -72,7 +73,7 @@
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
return
else if (magazine)
to_chat(user, "<span class='notice'>There's already a magazine in \the [src].</span>")
to_chat(user, "<span class='notice'>There's already a [magazine_wording] in \the [src].</span>")
if(istype(A, /obj/item/suppressor))
var/obj/item/suppressor/S = A
if(!can_suppress)
@@ -222,7 +223,7 @@
/obj/item/suppressor
name = "suppressor"
desc = "A universal syndicate small-arms suppressor for maximum espionage."
desc = "A syndicate small-arms suppressor for maximum espionage."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"
w_class = WEIGHT_CLASS_TINY
@@ -231,6 +232,4 @@
/obj/item/suppressor/specialoffer
name = "cheap suppressor"
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits all weapons."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits some weapons."
@@ -268,8 +268,6 @@
empty_alarm()
return
// L6 SAW //
/obj/item/gun/ballistic/automatic/l6_saw
@@ -292,13 +290,11 @@
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user)
..()
if(cover_open && magazine)
to_chat(user, "<span class='notice'>It seems like you could use an <b>empty hand</b> to remove the magazine.</span>")
/obj/item/gun/ballistic/automatic/l6_saw/attack_self(mob/user)
cover_open = !cover_open
to_chat(user, "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>")
@@ -308,12 +304,10 @@
playsound(user, 'sound/weapons/sawclose.ogg', 60, 1)
update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
/obj/item/gun/ballistic/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
if(cover_open)
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
@@ -344,8 +338,6 @@
return
..()
// SNIPER //
/obj/item/gun/ballistic/automatic/sniper_rifle
@@ -367,14 +359,12 @@
slot_flags = ITEM_SLOT_BACK
actions_types = list()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon()
if(magazine)
icon_state = "sniper-mag"
else
icon_state = "sniper"
/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "An illegally modified .50 cal sniper rifle with suppression compatibility. Quickscoping still doesn't work."
@@ -403,7 +393,6 @@
else
icon_state = "surplus-e"
// Laser rifle (rechargeable magazine) //
/obj/item/gun/ballistic/automatic/laser
@@ -74,25 +74,92 @@
update_icon()
chamber_round()
/obj/item/gun/ballistic/automatic/atlauncher
desc = "A pre-loaded, single shot anti-armour launcher."
name = "anti-armour grenade launcher"
/obj/item/gun/ballistic/rocketlauncher
name = "\improper PML-9"
desc = "A reusable rocket propelled grenade launcher. The words \"NT this way\" and an arrow have been written near the barrel."
icon_state = "rocketlauncher"
item_state = "rocketlauncher"
mag_type = /obj/item/ammo_box/magazine/internal/rocketlauncher
fire_sound = 'sound/weapons/rocketlaunch.ogg'
w_class = WEIGHT_CLASS_BULKY
can_suppress = FALSE
pin = /obj/item/firing_pin/implant/pindicate
burst_size = 1
fire_delay = 0
select = 0
actions_types = list()
inaccuracy_modifier = 0.7
casing_ejector = FALSE
weapon_weight = WEAPON_HEAVY
magazine_wording = "rocket"
/obj/item/gun/ballistic/automatic/atlauncher/attack_self()
return
/obj/item/gun/ballistic/rocketlauncher/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/atlauncher/update_icon()
..()
icon_state = "rocketlauncher[magazine ? "-[get_ammo(1)]" : ""]"
/obj/item/gun/ballistic/rocketlauncher/handle_atom_del(atom/A)
if(A == chambered)
chambered = null
if(!QDELETED(magazine))
QDEL_NULL(magazine)
if(A == magazine)
magazine = null
if(!QDELETED(chambered))
QDEL_NULL(chambered)
update_icon()
return ..()
/obj/item/gun/ballistic/rocketlauncher/can_shoot()
return chambered?.BB
/obj/item/gun/ballistic/rocketlauncher/attack_self_tk(mob/user)
return //too difficult to remove the rocket with TK
/obj/item/gun/ballistic/rocketlauncher/attack_self(mob/living/user)
if(magazine)
var/obj/item/ammo_casing/AC = chambered
if(AC)
if(!user.put_in_hands(AC))
AC.bounce_away(FALSE, NONE)
to_chat(user, "<span class='notice'>You remove \the [AC] from \the [src]!</span>")
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, TRUE)
chambered = null
else
to_chat(user, "<span class='notice'>There's no [magazine_wording] in [src].</span>")
update_icon()
/obj/item/gun/ballistic/rocketlauncher/attackby(obj/item/A, mob/user, params)
if(magazine && istype(A, /obj/item/ammo_casing))
if(user.temporarilyRemoveItemFromInventory(A))
if(!chambered)
to_chat(user, "<span class='notice'>You load a new [A] into \the [src].</span>")
playsound(src, "gun_insert_full_magazine", 70, 1)
chamber_round()
update_icon()
return TRUE
else
to_chat(user, "<span class='warning'>You cannot seem to get \the [A] out of your hands!</span>")
/obj/item/gun/ballistic/rocketlauncher/update_icon()
icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]"
/obj/item/gun/ballistic/rocketlauncher/suicide_act(mob/living/user)
user.visible_message("<span class='warning'>[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!</span>", \
"<span class='userdanger'>You aim [src] at the ground to perform a bisnasty rocket jump...</span>")
if(can_shoot())
user.notransform = TRUE
playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, 1, 5)
animate(user, pixel_z = 300, time = 30, easing = LINEAR_EASING)
sleep(70)
animate(user, pixel_z = 0, time = 5, easing = LINEAR_EASING)
sleep(5)
user.notransform = FALSE
process_fire(user, user, TRUE)
if(!QDELETED(user)) //if they weren't gibbed by the explosion, take care of them for good.
user.gib()
return MANUAL_SUICIDE
else
sleep(5)
shoot_with_empty_chamber(user)
sleep(20)
user.visible_message("<span class='warning'>[user] looks about the room realizing [user.p_theyre()] still there. [user.p_they(TRUE)] proceed to shove [src] down their throat and choke [user.p_them()]self with it!</span>", \
"<span class='userdanger'>You look around after realizing you're still here, then proceed to choke yourself to death with [src]!</span>")
sleep(20)
return OXYLOSS
@@ -351,7 +351,7 @@
clumsy_check = 0
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
if((user.has_trait(TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
return ..()
if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD))
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>")
@@ -71,7 +71,6 @@
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
chambered = AC
/obj/item/gun/ballistic/shotgun/examine(mob/user)
..()
if (chambered)
@@ -117,6 +116,14 @@
knife_x_offset = 27
knife_y_offset = 13
/obj/item/gun/ballistic/shotgun/boltaction/improvised
name = "Makeshift 7.62mm Rifle"
icon_state = "ishotgun"
item_state = "shotgun"
desc = "A large zip gun more or less that takes a single 7.62mm bullet"
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/improvised
can_bayonet = FALSE
/obj/item/gun/ballistic/shotgun/boltaction/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
if(bolt_open)
@@ -137,7 +144,6 @@
..()
to_chat(user, "The bolt is [bolt_open ? "open" : "closed"].")
/obj/item/gun/ballistic/shotgun/boltaction/enchanted
name = "enchanted bolt action rifle"
desc = "Careful not to lose your head."
@@ -153,10 +159,8 @@
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
can_bayonet = FALSE
item_flags = NEEDS_PERMIT | DROPDEL
flags_1 = NONE
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/Initialize()
@@ -207,7 +211,6 @@
"Slick" = "cshotgun_slick"
)
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
name = "compact combat shotgun"
desc = "A compact version of the semi automatic combat shotgun. For close encounters."
@@ -218,7 +221,6 @@
"Slick" = "cshotgunc_slick"
)
//Dual Feed Shotgun
/obj/item/gun/ballistic/shotgun/automatic/dual_tube
@@ -261,5 +263,4 @@
return
pump()
// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm
@@ -424,7 +424,7 @@
M.gets_drilled(K.firer)
if(modifier)
for(var/mob/living/L in range(1, target_turf) - K.firer - target)
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
var/armor = L.run_armor_check(K.def_zone, K.flag, null, null, K.armour_penetration)
L.apply_damage(K.damage*modifier, K.damage_type, K.def_zone, armor)
to_chat(L, "<span class='userdanger'>You're struck by a [K.name]!</span>")
@@ -530,7 +530,7 @@
var/kill_modifier = 1
if(K.pressure_decrease_active)
kill_modifier *= K.pressure_decrease
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
var/armor = L.run_armor_check(K.def_zone, K.flag, null, null, K.armour_penetration)
L.apply_damage(bounties_reaped[L.type]*kill_modifier, K.damage_type, K.def_zone, armor)
/obj/item/borg/upgrade/modkit/bounty/proc/get_kill(mob/living/L)
@@ -243,7 +243,7 @@
/obj/item/gun/energy/printer
name = "cyborg lmg"
desc = "A machinegun that fires 3d-printed flechettes slowly regenerated using a cyborg's internal power source."
desc = "A LMG that fires 3D-printed flechettes. They are slowly resupplied using the cyborg's internal power source."
icon_state = "l6closed0"
icon = 'icons/obj/guns/projectile.dmi'
cell_type = "/obj/item/stock_parts/cell/secborg"
@@ -12,7 +12,6 @@
materials = list(MAT_METAL=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
container_type = OPENCONTAINER
var/time_per_syringe = 250
var/syringes_left = 4
var/max_syringes = 4
@@ -22,7 +21,7 @@
. = ..()
chambered = new /obj/item/ammo_casing/chemgun(src)
START_PROCESSING(SSobj, src)
create_reagents(100)
create_reagents(100, OPENCONTAINER)
/obj/item/gun/chem/Destroy()
. = ..()
@@ -116,7 +116,7 @@
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
target.adjustBruteLoss(-4)
target.adjustFireLoss(-4)
target.adjustToxLoss(-1)
target.adjustToxLoss(-1, forced = TRUE)
target.adjustOxyLoss(-1)
return
@@ -102,3 +102,23 @@
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
/obj/item/gun/syringe/dart
name = "dart gun"
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
icon_state = "dartgun"
item_state = "dartgun"
materials = list(MAT_METAL=2000, MAT_GLASS=500)
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE
/obj/item/gun/syringe/dart/Initialize()
..()
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe/dart))
..()
else
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
return FALSE
+1 -1
View File
@@ -133,7 +133,7 @@
// A gun with ultra-honk pin is useful for clown and useless for everyone else.
/obj/item/firing_pin/clown/ultra/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
if(user && (!(user.has_trait(TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")))
if(user && (!(HAS_TRAIT(user, TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")))
return FALSE
return TRUE
@@ -74,6 +74,7 @@
flag = "energy"
hitsound = 'sound/weapons/tap.ogg'
eyeblur = 0
speed = 0.7
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/disabler
@@ -6,15 +6,16 @@
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
create_reagents(50)
reagents.set_reacting(FALSE)
create_reagents(50, NO_REACT)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100) // not completely blocked
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
if(skip == TRUE)
return
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
@@ -24,7 +25,7 @@
"<span class='userdanger'>You were protected against \the [src]!</span>")
..(target, blocked)
reagents.set_reacting(TRUE)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
return TRUE
@@ -37,3 +38,44 @@
/obj/item/projectile/bullet/dart/syringe
name = "syringe"
icon_state = "syringeproj"
//I am in a mess of my own making
/obj/item/projectile/bullet/dart/syringe/dart
name = "Smartdart"
icon_state = "dartproj"
damage = 0
var/emptrig = FALSE
/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..(target, blocked, TRUE)
for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time!
if(istype(R, /datum/reagent/medicine)) //Is this a medicine?
if(M.reagents.has_reagent(R.id))
if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD?
M.reagents.add_reagent(R.id, R.volume)
else
var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.id)) -1)
M.reagents.add_reagent(R.id, transVol)
else
if(!R.overdose_threshold == 0)
var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
M.reagents.add_reagent(R.id, transVol)
else
M.reagents.add_reagent(R.id, R.volume)
target.visible_message("<span class='notice'>\The [src] beeps!</span>")
to_chat("<span class='notice'><i>You feel a tiny prick as a smartdart embeds itself in you with a beep.</i></span>")
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You see a [src] bounce off you, booping sadly!</span>")
target.visible_message("<span class='danger'>\The [src] fails to land on target!</span>")
return TRUE
@@ -18,6 +18,7 @@
/obj/item/projectile/bullet/shotgun_stunslug
name = "stunslug"
damage = 5
stamina = 20
knockdown = 100
stutter = 5
jitter = 20
@@ -31,7 +31,7 @@
var/mob/living/carbon/C = target
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE))
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
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
@@ -22,7 +22,7 @@
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE))
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
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
@@ -170,7 +170,7 @@
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")
else if((hal_target.status_flags & CANKNOCKDOWN) && !hal_target.has_trait(TRAIT_STUNIMMUNE))
else if((hal_target.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(hal_target, TRAIT_STUNIMMUNE))
addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5)
/obj/item/projectile/hallucination/disabler
@@ -9,13 +9,14 @@
return TRUE
/obj/item/projectile/bullet/a84mm
name ="anti-armour rocket"
name ="\improper HEDP rocket"
desc = "USE A WEEL GUN"
icon_state= "atrocket"
icon_state= "84mm-hedp"
damage = 80
var/anti_armour_damage = 200
armour_penetration = 100
dismemberment = 100
ricochets_max = 0
/obj/item/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE)
..()
@@ -29,17 +30,17 @@
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
return TRUE
/obj/item/projectile/bullet/srmrocket
name ="SRM-8 Rocket"
/obj/item/projectile/bullet/a84mm_he
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
damage = 30
ricochets_max = 0 //it's a MISSILE
/obj/item/projectile/bullet/srmrocket/on_hit(atom/target, blocked=0)
/obj/item/projectile/bullet/a84mm_he/on_hit(atom/target, blocked=0)
..()
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
return TRUE
return TRUE