mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
@@ -36,7 +36,7 @@
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 3, "14.5mm", "SA")
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 4, "14.5mm", "SA")
|
||||
),
|
||||
"Highly Visible and Dangerous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/weapon/storage/box/ids( src )
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/projectile/colt/flash(src)
|
||||
new /obj/item/weapon/gun/projectile/sec/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -67,22 +67,29 @@
|
||||
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.damage
|
||||
var/passthrough
|
||||
if(damage > 30)
|
||||
passthrough = 1
|
||||
if(prob(20))
|
||||
Proj.damage *= 0.5 //weaken the projectile
|
||||
else
|
||||
//weaker bullets are affected to a greater extent
|
||||
if(prob(20))
|
||||
passthrough = 0
|
||||
else
|
||||
Proj.damage *= 0.5 //weaken the projectile
|
||||
passthrough = 1
|
||||
var/passthrough = 0
|
||||
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
//bullets
|
||||
if(Proj.original == src || prob(20))
|
||||
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
||||
if(prob(max((damage-10)/25, 0))*100)
|
||||
passthrough = 1
|
||||
else
|
||||
Proj.damage *= between(0, Proj.damage/60, 1)
|
||||
passthrough = 1
|
||||
if(BURN)
|
||||
//beams and other projectiles are either blocked completely by grilles or stop half the damage.
|
||||
if(!(Proj.original == src || prob(20)))
|
||||
Proj.damage *= 0.5
|
||||
passthrough = 1
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
damage *= 0.1 //if the bullet passes through then the grille avoids most of the damage
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
user.drop_from_inventory(holstered)
|
||||
holstered.loc = src
|
||||
holstered.add_fingerprint(user)
|
||||
w_class = max(w_class, holstered.w_class)
|
||||
user.visible_message("<span class='notice'>[user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
|
||||
|
||||
/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob)
|
||||
@@ -41,6 +42,7 @@
|
||||
user.put_in_hands(holstered)
|
||||
holstered.add_fingerprint(user)
|
||||
holstered = null
|
||||
w_class = initial(w_class)
|
||||
|
||||
/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob)
|
||||
if (has_suit) //if we are part of a suit
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(istype(w_uniform,/obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
if(U.accessories.len)
|
||||
tie_msg += " with [lowertext(english_list(U.accessories))]"
|
||||
tie_msg += ". Attached to it is [lowertext(english_list(U.accessories))]"
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != "#030303") ? "blood" : "oil"]-stained [w_uniform.name][tie_msg]!</span>\n"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
initial_ammo = 0
|
||||
|
||||
/obj/item/ammo_magazine/a556
|
||||
name = "magazine (5.56)"
|
||||
name = "magazine (5.56mm)"
|
||||
icon_state = "5.56"
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
slot_flags = SLOT_BELT|SLOT_BACK
|
||||
w_class = 3
|
||||
force = 10 //it has a stock, might as well give some kind of perk over the egun
|
||||
force = 10
|
||||
matter = list("metal" = 2000)
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
projectile_type = /obj/item/projectile/beam
|
||||
charge_cost = 75
|
||||
fire_delay = 1
|
||||
fire_delay = 1 //rapid fire
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/mounted
|
||||
self_recharge = 1
|
||||
@@ -34,6 +33,7 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
force = 5
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = null
|
||||
charge_cost = 200 //to compensate a bit for self-recharging
|
||||
self_recharge = 1
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/weapon/gun/launcher/grenade
|
||||
name = "grenade launcher"
|
||||
desc = "A bulky pump-action grenade launcher. Holds up to 5 grenades in a revolving magazine."
|
||||
desc = "A bulky pump-action grenade launcher. Holds up to 6 grenades in a revolving magazine."
|
||||
icon_state = "riotgun"
|
||||
item_state = "riotgun"
|
||||
w_class = 4
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
var/obj/item/weapon/grenade/chambered
|
||||
var/list/grenades = new/list()
|
||||
var/max_grenades = 4 //holds this + one in the chamber
|
||||
var/max_grenades = 5 //holds this + one in the chamber
|
||||
matter = list("metal" = 2000)
|
||||
|
||||
//revolves the magazine, allowing players to choose between multiple grenade types
|
||||
@@ -42,30 +42,36 @@
|
||||
if(chambered)
|
||||
user << "\A [chambered] is chambered."
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/proc/load(obj/item/weapon/grenade/G, mob/user)
|
||||
if(grenades.len >= max_grenades)
|
||||
user << "<span class='warning'>[src] is full.</span>"
|
||||
return
|
||||
user.remove_from_mob(G)
|
||||
G.loc = src
|
||||
grenades.Insert(1, G) //add to the head of the list, so that it is loaded on the next pump
|
||||
user.visible_message("[user] inserts \a [G] into [src].", "<span class='notice'>You insert \a [G] into [src].</span>")
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/proc/unload(mob/user)
|
||||
if(grenades.len)
|
||||
var/obj/item/weapon/grenade/G = grenades[grenades.len]
|
||||
grenades.len--
|
||||
user.put_in_hands(G)
|
||||
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>[src] is empty.</span>"
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/attack_self(mob/user)
|
||||
pump(user)
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/attackby(obj/item/I, mob/user)
|
||||
if((istype(I, /obj/item/weapon/grenade)))
|
||||
if(grenades.len >= max_grenades)
|
||||
user << "<span class='warning'>[src] is full.</span>"
|
||||
return
|
||||
user.remove_from_mob(I)
|
||||
I.loc = src
|
||||
grenades.Insert(1, I) //add to the head of the list, so that it is loaded on the next pump
|
||||
user.visible_message("[user] inserts \a [I] into [src].", "<span class='notice'>You insert \a [I] into [src].</span>")
|
||||
load(I, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/attack_hand(mob/user)
|
||||
if(user.get_inactive_hand() == src)
|
||||
if(grenades.len)
|
||||
var/obj/item/weapon/grenade/G = grenades[grenades.len]
|
||||
grenades.len--
|
||||
user.put_in_hands(G)
|
||||
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>[src] is empty.</span>"
|
||||
unload(user)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -79,3 +85,32 @@
|
||||
message_admins("[key_name_admin(user)] fired a grenade ([chambered.name]) from a grenade launcher ([src.name]).")
|
||||
log_game("[key_name_admin(user)] used a grenade ([chambered.name]).")
|
||||
chambered = null
|
||||
|
||||
//Underslung grenade launcher to be used with the Z8
|
||||
/obj/item/weapon/gun/launcher/grenade/underslung
|
||||
name = "underslung grenade launcher"
|
||||
desc = "Not much more than a tube and a firing mechanism, this grenade launcher is designed to be fitted to a rifle."
|
||||
w_class = 3
|
||||
force = 5
|
||||
max_grenades = 0
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/underslung/attack_self()
|
||||
return
|
||||
|
||||
//load and unload directly into chambered
|
||||
/obj/item/weapon/gun/launcher/grenade/underslung/load(obj/item/weapon/grenade/G, mob/user)
|
||||
if(chambered)
|
||||
user << "<span class='warning'>[src] is already loaded.</span>"
|
||||
return
|
||||
user.remove_from_mob(G)
|
||||
G.loc = src
|
||||
chambered = G
|
||||
user.visible_message("[user] load \a [G] into [src].", "<span class='notice'>You load \a [G] into [src].</span>")
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/underslung/unload(mob/user)
|
||||
if(chambered)
|
||||
user.put_in_hands(chambered)
|
||||
user.visible_message("[user] removes \a [chambered] from [src].", "<span class='notice'>You remove \a [chambered] from [src].</span>")
|
||||
chambered = null
|
||||
else
|
||||
user << "<span class='warning'>[src] is empty.</span>"
|
||||
@@ -47,6 +47,23 @@
|
||||
icon_state = "c20r"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sts35
|
||||
name = "\improper STS-35 automatic rifle"
|
||||
desc = "A durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 7.62mm rounds. It is unmarked."
|
||||
icon_state = "arifle"
|
||||
item_state = "shotgun"
|
||||
w_class = 4
|
||||
force = 10
|
||||
caliber = "a762"
|
||||
origin_tech = "combat=6;materials=1;syndicate=4"
|
||||
slot_flags = SLOT_BACK
|
||||
load_method = MAGAZINE
|
||||
magazine_type = /obj/item/ammo_magazine/c762
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon()
|
||||
..()
|
||||
icon_state = (ammo_magazine)? "arifle-0" : "arifle"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/wt550
|
||||
name = "\improper W-T 550 Saber"
|
||||
desc = "A cheap, mass produced Ward-Takahashi PDW. Uses 9mm rounds."
|
||||
@@ -70,7 +87,7 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8
|
||||
name = "\improper Z8 Bulldog"
|
||||
desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it."
|
||||
desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds and has an underslung grenade launcher. Makes you feel like a space marine when you hold it."
|
||||
icon_state = "carbine"
|
||||
item_state = "shotgun"
|
||||
w_class = 4
|
||||
@@ -82,6 +99,37 @@
|
||||
slot_flags = SLOT_BACK
|
||||
load_method = MAGAZINE
|
||||
magazine_type = /obj/item/ammo_magazine/a556
|
||||
auto_eject = 1
|
||||
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
|
||||
|
||||
var/use_launcher = 0
|
||||
var/obj/item/weapon/gun/launcher/grenade/underslung/launcher
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/New()
|
||||
..()
|
||||
launcher = new(src)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/attack_self(mob/user)
|
||||
use_launcher = !use_launcher
|
||||
user << "<span class='notice'>You switch to [use_launcher? "\the [launcher]" : "firing normally"].</span>"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/attackby(obj/item/I, mob/user)
|
||||
if((istype(I, /obj/item/weapon/grenade)))
|
||||
launcher.load(I, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/attack_hand(mob/user)
|
||||
if(user.get_inactive_hand() == src && use_launcher)
|
||||
launcher.unload(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/Fire(atom/target, mob/living/user, params, pointblank=0, reflex=0)
|
||||
if(use_launcher)
|
||||
launcher.Fire(target, user, params, pointblank, reflex)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/update_icon()
|
||||
..()
|
||||
@@ -91,22 +139,12 @@
|
||||
icon_state = "carbine"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sts35
|
||||
name = "\improper STS-35 automatic rifle"
|
||||
desc = "A durable, rugged looking automatic weapon of a make popular on the frontier. Uses 7.62mm rounds. It is unmarked."
|
||||
icon_state = "assltrifle"
|
||||
item_state = "shotgun"
|
||||
w_class = 4
|
||||
force = 10
|
||||
caliber = "a762"
|
||||
origin_tech = "combat=6;materials=1;syndicate=4"
|
||||
slot_flags = SLOT_BACK
|
||||
load_method = MAGAZINE
|
||||
magazine_type = /obj/item/ammo_magazine/c762
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon()
|
||||
/obj/item/weapon/gun/projectile/automatic/z8/examine(mob/user)
|
||||
..()
|
||||
icon_state = (ammo_magazine)? "assltrifle" : "assltrifle-noclip"
|
||||
if(launcher.chambered)
|
||||
user << "\The [launcher] has \a [launcher.chambered] loaded."
|
||||
else
|
||||
user << "\The [launcher] is empty."
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw
|
||||
name = "\improper L6 SAW"
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
origin_tech = "combat=2;materials=2"
|
||||
load_method = MAGAZINE
|
||||
|
||||
/obj/item/weapon/gun/projectile/colt/flash
|
||||
name = "\improper Colt M1911 signal pistol"
|
||||
desc = "A cheap Martian knock-off of a Colt M1911. Uses .45 signal flash rounds."
|
||||
magazine_type = /obj/item/ammo_magazine/c45m/flash
|
||||
|
||||
/obj/item/weapon/gun/projectile/colt/detective
|
||||
desc = "A cheap Martian knock-off of a Colt M1911. Uses less-than-lethal .45 rounds."
|
||||
magazine_type = /obj/item/ammo_magazine/c45m/rubber
|
||||
@@ -35,14 +30,18 @@
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/sec
|
||||
desc = "A Nanotrasen designed sidearm, found pretty much everywhere humans are. Uses less-than-lethal .45 rounds."
|
||||
desc = "A NanoTrasen designed sidearm, found pretty much everywhere humans are. Uses less-than-lethal .45 rounds."
|
||||
name = "\improper NT Mk58"
|
||||
icon_state = "secguncomp"
|
||||
magazine_type = /obj/item/ammo_magazine/c45m/rubber
|
||||
caliber = ".45"
|
||||
origin_tech = "combat=3;materials=2"
|
||||
origin_tech = "combat=2;materials=2"
|
||||
load_method = MAGAZINE
|
||||
|
||||
/obj/item/weapon/gun/projectile/sec/flash
|
||||
name = "\improper NT Mk58 signal pistol"
|
||||
desc = "A NanoTrasen designed sidearm, found pretty much everywhere humans are. Uses .45 signal flash rounds."
|
||||
magazine_type = /obj/item/ammo_magazine/c45m/flash
|
||||
|
||||
/obj/item/weapon/gun/projectile/sec/wood
|
||||
desc = "A Nanotrasen designed sidearm, this one has a sweet wooden grip. Uses less-than-lethal .45 rounds."
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
name = "combat shotgun"
|
||||
icon_state = "cshotgun"
|
||||
origin_tech = "combat=5;materials=2"
|
||||
max_shells = 8
|
||||
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
|
||||
ammo_type = /obj/item/ammo_casing/shotgun
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
mob_passthrough_check = 1
|
||||
else
|
||||
mob_passthrough_check = 0
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/can_embed()
|
||||
//prevent embedding if the projectile is passing through the mob
|
||||
@@ -43,10 +43,10 @@
|
||||
var/chance = 0
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = A
|
||||
chance = round(damage/W.damage_cap*250)
|
||||
chance = round(damage/W.damage_cap*180)
|
||||
else if(istype(A, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = A
|
||||
chance = round(damage/D.maxhealth*150)
|
||||
chance = round(damage/D.maxhealth*180)
|
||||
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
|
||||
chance = 100
|
||||
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
|
||||
@@ -141,7 +141,7 @@
|
||||
penetrating = 1
|
||||
|
||||
/obj/item/projectile/bullet/rifle/a145
|
||||
damage = 60
|
||||
damage = 80
|
||||
stun = 3
|
||||
weaken = 3
|
||||
penetrating = 5
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Reference in New Issue
Block a user