mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge remote-tracking branch 'upstream/dev' into NarsiePort
Conflicts: code/modules/mob/living/carbon/human/say.dm
This commit is contained in:
@@ -31,9 +31,9 @@
|
||||
if(!BB)
|
||||
user << "\blue There is no bullet in the casing to inscribe anything into."
|
||||
return
|
||||
|
||||
|
||||
var/tmp_label = ""
|
||||
var/label_text = sanitize(copytext(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), 1, MAX_NAME_LEN))
|
||||
var/label_text = sanitizeSafe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN)
|
||||
if(length(label_text) > 20)
|
||||
user << "\red The inscription can be at most 20 characters long."
|
||||
else if(!label_text)
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
//Gun loading types
|
||||
#define SINGLE_CASING 1 //The gun only accepts ammo_casings. ammo_magazines should never have this as their mag_type.
|
||||
#define SPEEDLOADER 2 //Transfers casings from the mag to the gun when used.
|
||||
#define SPEEDLOADER 2 //Transfers casings from the mag to the gun when used.
|
||||
#define MAGAZINE 4 //The magazine item itself goes inside the gun
|
||||
|
||||
//An item that holds casings and can be used to put them inside guns
|
||||
@@ -71,15 +71,15 @@
|
||||
w_class = 2
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
|
||||
|
||||
var/list/stored_ammo = list()
|
||||
var/mag_type = SPEEDLOADER //ammo_magazines can only be used with compatible guns. This is not a bitflag, the load_method var on guns is.
|
||||
var/caliber = "357"
|
||||
var/max_ammo = 7
|
||||
|
||||
|
||||
var/ammo_type = /obj/item/ammo_casing //ammo type that is initially loaded
|
||||
var/initial_ammo = null
|
||||
|
||||
|
||||
var/multiple_sprites = 0
|
||||
//because BYOND doesn't support numbers as keys in associative lists
|
||||
var/list/icon_keys = list() //keys
|
||||
@@ -145,10 +145,10 @@
|
||||
var/typestr = "[M.type]"
|
||||
if(!(typestr in magazine_icondata_keys) || !(typestr in magazine_icondata_states))
|
||||
magazine_icondata_cache_add(M)
|
||||
|
||||
|
||||
M.icon_keys = magazine_icondata_keys[typestr]
|
||||
M.ammo_states = magazine_icondata_states[typestr]
|
||||
|
||||
|
||||
/proc/magazine_icondata_cache_add(var/obj/item/ammo_magazine/M)
|
||||
var/list/icon_keys = list()
|
||||
var/list/ammo_states = list()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "T38"
|
||||
caliber = "357"
|
||||
ammo_type = /obj/item/ammo_casing/a357
|
||||
matter = list("metal" = 1260)
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
|
||||
@@ -13,6 +14,7 @@
|
||||
name = "speed loader (.38)"
|
||||
icon_state = "38"
|
||||
caliber = "38"
|
||||
matter = list("metal" = 360)
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
max_ammo = 6
|
||||
multiple_sprites = 1
|
||||
@@ -26,6 +28,7 @@
|
||||
icon_state = "45"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
matter = list("metal" = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal
|
||||
caliber = ".45"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
@@ -46,6 +49,7 @@
|
||||
icon_state = "9x19p"
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
matter = list("metal" = 600)
|
||||
caliber = "9mm"
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
max_ammo = 10
|
||||
@@ -61,6 +65,7 @@
|
||||
name = "ammunition Box (9mm)"
|
||||
icon_state = "9mm"
|
||||
origin_tech = "combat=2"
|
||||
matter = list("metal" = 1800)
|
||||
caliber = "9mm"
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
max_ammo = 30
|
||||
@@ -73,6 +78,7 @@
|
||||
icon_state = "9mmt"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
matter = list("metal" = 1200)
|
||||
caliber = "9mm"
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
@@ -89,6 +95,7 @@
|
||||
icon_state = "9mm"
|
||||
origin_tech = "combat=2"
|
||||
caliber = ".45"
|
||||
matter = list("metal" = 2250)
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
max_ammo = 30
|
||||
|
||||
@@ -101,6 +108,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "12mm"
|
||||
matter = list("metal" = 1500)
|
||||
ammo_type = "/obj/item/ammo_casing/a12mm"
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
@@ -114,6 +122,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a556"
|
||||
matter = list("metal" = 1800)
|
||||
ammo_type = /obj/item/ammo_casing/a556
|
||||
max_ammo = 10
|
||||
multiple_sprites = 1
|
||||
@@ -127,6 +136,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = ".50"
|
||||
matter = list("metal" = 1260)
|
||||
ammo_type = /obj/item/ammo_casing/a50
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
@@ -152,6 +162,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a762"
|
||||
matter = list("metal" = 4500)
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
max_ammo = 50
|
||||
multiple_sprites = 1
|
||||
@@ -164,6 +175,7 @@
|
||||
icon_state = "c762"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a762"
|
||||
matter = list("metal" = 1800)
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
|
||||
@@ -66,28 +66,28 @@
|
||||
icon_state = "slshell"
|
||||
caliber = "shotgun"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun
|
||||
matter = list("metal" = 12500)
|
||||
matter = list("metal" = 360)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/pellet
|
||||
name = "shotgun shell"
|
||||
desc = "A 12 gauge shell."
|
||||
icon_state = "gshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
|
||||
matter = list("metal" = 12500)
|
||||
matter = list("metal" = 360)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/blank
|
||||
name = "shotgun shell"
|
||||
desc = "A blank shell."
|
||||
icon_state = "blshell"
|
||||
projectile_type = /obj/item/projectile/bullet/blank
|
||||
matter = list("metal" = 250)
|
||||
matter = list("metal" = 90)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/beanbag
|
||||
name = "beanbag shell"
|
||||
desc = "A beanbag shell."
|
||||
icon_state = "bshell"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
matter = list("metal" = 500)
|
||||
matter = list("metal" = 180)
|
||||
|
||||
//Can stun in one hit if aimed at the head, but
|
||||
//is blocked by clothing that stops tasers and is vulnerable to EMP
|
||||
@@ -97,7 +97,7 @@
|
||||
icon_state = "stunshell"
|
||||
spent_icon = "stunshell-spent"
|
||||
projectile_type = /obj/item/projectile/energy/electrode/stunshot
|
||||
matter = list("metal" = 1250, "glass" = 1250)
|
||||
matter = list("metal" = 360, "glass" = 720)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/stunshell/emp_act(severity)
|
||||
if(prob(100/severity)) BB = null
|
||||
@@ -109,7 +109,7 @@
|
||||
desc = "A chemical shell used to signal distress or provide illumination."
|
||||
icon_state = "fshell"
|
||||
projectile_type = /obj/item/projectile/energy/flash/flare
|
||||
matter = list("metal" = 250, "glass" = 250)
|
||||
matter = list("metal" = 90, "glass" = 90)
|
||||
|
||||
/obj/item/ammo_casing/a762
|
||||
desc = "A 7.62mm bullet casing."
|
||||
@@ -123,6 +123,7 @@
|
||||
spent_icon = "lcasing-spent"
|
||||
caliber = "14.5mm"
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
matter = list("metal" = 1250)
|
||||
|
||||
/obj/item/ammo_casing/a556
|
||||
desc = "A 5.56mm bullet casing."
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
M << "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>"
|
||||
return 0
|
||||
|
||||
var/input = stripped_input(usr,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
|
||||
|
||||
if(src && input && !M.stat && in_range(M,src))
|
||||
name = input
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
M << "<span class='notice'>You don't feel cool enough to name this gun, chump.</span>"
|
||||
return 0
|
||||
|
||||
var/input = stripped_input(usr,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
|
||||
|
||||
if(src && input && !M.stat && in_range(M,src))
|
||||
name = input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/weapon/gun/projectile/heavysniper
|
||||
name = "\improper PTRS-7 rifle"
|
||||
name = "\improper PTR-7 rifle"
|
||||
desc = "A portable anti-armour rifle fitted with a scope. Originally designed to used against armoured exosuits, it is capable of punching through windows and non-reinforced walls with ease. Fires armor piercing 14.5mm shells."
|
||||
icon_state = "heavysniper"
|
||||
item_state = "l6closednomag" //placeholder
|
||||
|
||||
Reference in New Issue
Block a user