From 0feedab1185759d2cbfc045ae2218cda4247518a Mon Sep 17 00:00:00 2001 From: Werner Date: Sat, 15 Sep 2018 23:46:52 +0200 Subject: [PATCH] Leyon Changes (#5200) The Leyon Pistol has been changed to be closer to the original vision of it. It is loaded via a special 10mm speedloader, however loading it takes some time. Each gun (when ordered via cargo) will ship with a speedloader. The speedloaders itself can not be ordered, but 10mm ammunition boxes can which can be used to restock the speedloaders or load the gun directly. Reduces the price for the gun at the merchants from 1500 to 500 credits And makes additional ammo boxes purchaseable Also changes the path name of the 10mm ammo/mags/... to be consistent with the standard pathing for ammo Adds additional messages if you can not load a gun with a single cartridge (currently it fails silently) --- code/datums/trading/weaponry.dm | 7 ++-- .../objects/items/weapons/storage/boxes.dm | 18 +++++---- code/modules/item_worth/worths_list.dm | 1 + code/modules/mining/abandonedcrates.dm | 6 +-- .../living/simple_animal/hostile/syndicate.dm | 2 +- code/modules/projectiles/ammunition/boxes.dm | 31 ++++++++-------- .../modules/projectiles/ammunition/bullets.dm | 18 ++++----- code/modules/projectiles/guns/projectile.dm | 14 ++++--- .../projectiles/guns/projectile/pistol.dm | 16 +++++--- html/changelogs/Arrow768.yml | 37 +++++++++++++++++++ 10 files changed, 101 insertions(+), 49 deletions(-) create mode 100644 html/changelogs/Arrow768.yml diff --git a/code/datums/trading/weaponry.dm b/code/datums/trading/weaponry.dm index d4fc9eec327..725aafeed79 100644 --- a/code/datums/trading/weaponry.dm +++ b/code/datums/trading/weaponry.dm @@ -30,10 +30,11 @@ /obj/item/weapon/gun/projectile/automatic/x9 = TRADER_THIS_TYPE, /obj/item/ammo_magazine/c45m = TRADER_ALL, /obj/item/ammo_magazine/c45m/empty = TRADER_BLACKLIST, - /obj/item/ammo_magazine/t40 = TRADER_ALL, - /obj/item/ammo_magazine/t40/empty = TRADER_BLACKLIST, + /obj/item/ammo_magazine/mc10mm = TRADER_ALL, + /obj/item/ammo_magazine/mc10mm/leyon = TRADER_BLACKLIST, + /obj/item/ammo_magazine/mc10mm/empty = TRADER_BLACKLIST, + /obj/item/weapon/storage/box/ammo10mm = TRADER_THIS_TYPE, /obj/item/ammo_magazine/c38 = TRADER_ALL, - /obj/item/ammo_magazine/leyon = TRADER_THIS_TYPE, /obj/item/ammo_magazine/c45x = TRADER_THIS_TYPE, /obj/item/weapon/storage/box/beanbags = TRADER_THIS_TYPE, /obj/item/weapon/storage/box/shotgunammo = TRADER_THIS_TYPE, diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 2ce3c5e907d..285e9caf167 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -318,13 +318,17 @@ /obj/item/weapon/storage/box/sniperammo/fill() ..() - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) + for(var/i in 1 to 7) + new /obj/item/ammo_casing/a145(src) + +/obj/item/weapon/storage/box/ammo10mm + name = "box of 10mm shells" + desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." + +/obj/item/weapon/storage/box/ammo10mm/fill() + ..() + for(var/i in 1 to 10) + new /obj/item/ammo_casing/c10mm(src) /obj/item/weapon/storage/box/flashbangs name = "box of flashbangs" diff --git a/code/modules/item_worth/worths_list.dm b/code/modules/item_worth/worths_list.dm index 0152daeb0f7..8cb2731a892 100644 --- a/code/modules/item_worth/worths_list.dm +++ b/code/modules/item_worth/worths_list.dm @@ -115,6 +115,7 @@ var/list/worths = list( /obj/item/weapon/gun/projectile/silenced = 1700, /obj/item/weapon/gun/projectile/dragunov = 4500, /obj/item/weapon/gun/projectile/contender = 1300, + /obj/item/weapon/gun/projectile/leyon = 500, /obj/item/weapon/gun/projectile = 1500, //GUN, /obj/item/weapon/gun/bang = 200, diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 7b0270346ad..cc1c9cf54eb 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -150,9 +150,9 @@ new/obj/item/clothing/mask/luchador(src) if(100) new/obj/item/weapon/gun/projectile/tanto(src) - new/obj/item/ammo_magazine/t40(src) - new/obj/item/ammo_magazine/t40(src) - new/obj/item/ammo_magazine/t40/rubber(src) + new/obj/item/ammo_magazine/mc10mm(src) + new/obj/item/ammo_magazine/mc10mm(src) + new/obj/item/ammo_magazine/mc10mm/rubber(src) new/obj/item/clothing/under/rank/dispatch(src) new/obj/item/clothing/accessory/badge/old(src) new/obj/item/clothing/head/helmet/formalcaptain(src) diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 3fab290b1a9..d08e62e2396 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -109,7 +109,7 @@ rapid = 1 icon_state = "syndicateranged" icon_living = "syndicateranged" - casingtype = /obj/item/ammo_casing/t40 + casingtype = /obj/item/ammo_casing/c10mm projectilesound = 'sound/weapons/Gunshot_light.ogg' projectiletype = /obj/item/projectile/bullet/pistol/medium diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index 3edf4c1097e..09bf6336f2c 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -82,22 +82,30 @@ name = "magazine (.45 flash)" ammo_type = /obj/item/ammo_casing/c45/flash -/obj/item/ammo_magazine/t40 +/obj/item/ammo_magazine/mc10mm name = "magazine (10mm)" icon_state = "5.56" mag_type = MAGAZINE - ammo_type = /obj/item/ammo_casing/t40 + ammo_type = /obj/item/ammo_casing/c10mm matter = list(DEFAULT_WALL_MATERIAL = 475) //metal costs are very roughly based around 1 .45 casing = 75 metal caliber = "10mm" max_ammo = 12 multiple_sprites = 1 -/obj/item/ammo_magazine/t40/empty +/obj/item/ammo_magazine/mc10mm/empty initial_ammo = 0 -/obj/item/ammo_magazine/t40/rubber +/obj/item/ammo_magazine/mc10mm/rubber name = "magazine (10mm rubber)" - ammo_type = /obj/item/ammo_casing/t40/rubber + ammo_type = /obj/item/ammo_casing/c10mm/rubber + +/obj/item/ammo_magazine/mc10mm/leyon + name = "ammo clip (10mm)" + icon_state = "10mmclip" + mag_type = SPEEDLOADER + matter = list(DEFAULT_WALL_MATERIAL = 1800) + max_ammo = 5 + multiple_sprites = 1 /obj/item/ammo_magazine/mc9mm name = "magazine (9mm)" @@ -168,7 +176,7 @@ mag_type = MAGAZINE caliber = "10mm" matter = list(DEFAULT_WALL_MATERIAL = 1500) - ammo_type = /obj/item/ammo_casing/t40 + ammo_type = /obj/item/ammo_casing/c10mm max_ammo = 20 multiple_sprites = 1 @@ -412,13 +420,4 @@ mag_type = MAGAZINE caliber = "a762" ammo_type = /obj/item/ammo_casing/a762 - max_ammo = 1000 - -/obj/item/ammo_magazine/leyon - name = "ammo clip (10mm)" - icon_state = "10mmclip" - ammo_type = /obj/item/ammo_casing/t40 - caliber = "10mm" - matter = list(DEFAULT_WALL_MATERIAL = 1800) - max_ammo = 5 - multiple_sprites = 1 \ No newline at end of file + max_ammo = 1000 \ No newline at end of file diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index 9b4140aac58..8764b05003b 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -61,6 +61,15 @@ desc = "A 9mm practice bullet casing." projectile_type = /obj/item/projectile/bullet/pistol/practice +/obj/item/ammo_casing/c10mm + desc = "A 10mm bullet casing." + caliber = "10mm" + projectile_type = /obj/item/projectile/bullet/pistol + +/obj/item/ammo_casing/c10mm/rubber + desc = "A 10mm rubber bullet casing." + projectile_type = /obj/item/projectile/bullet/pistol/rubber + /obj/item/ammo_casing/c45 desc = "A .45 bullet casing." caliber = ".45" @@ -80,15 +89,6 @@ desc = "A .45 flash shell casing." projectile_type = /obj/item/projectile/energy/flash -/obj/item/ammo_casing/t40 - desc = "A 10mm bullet casing." - caliber = "10mm" - projectile_type = /obj/item/projectile/bullet/pistol - -/obj/item/ammo_casing/t40/rubber - desc = "A 10mm rubber bullet casing." - projectile_type = /obj/item/projectile/bullet/pistol/rubber - /obj/item/ammo_casing/a12mm desc = "A 12mm bullet casing." caliber = "12mm" diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 96ce7011d90..903ae6a71c3 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -113,12 +113,12 @@ if(istype(A, /obj/item/ammo_magazine)) var/obj/item/ammo_magazine/AM = A if(!(load_method & AM.mag_type) || caliber != AM.caliber || (allowed_magazines && !is_type_in_list(A, allowed_magazines))) - user << "[AM] won't load into [src]!" + to_chat(user,"[AM] won't load into [src]!") return switch(AM.mag_type) if(MAGAZINE) if(ammo_magazine) - user << "[src] already has a magazine loaded." //already a magazine here + to_chat(user,"[src] already has a magazine loaded.") //already a magazine here return user.remove_from_mob(AM) AM.forceMove(src) @@ -127,7 +127,7 @@ playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1) if(SPEEDLOADER) if(loaded.len >= max_shells) - user << "[src] is full!" + to_chat(user,"[src] is full!") return var/count = 0 for(var/obj/item/ammo_casing/C in AM.stored_ammo) @@ -144,10 +144,14 @@ AM.update_icon() else if(istype(A, /obj/item/ammo_casing)) var/obj/item/ammo_casing/C = A - if(!(load_method & SINGLE_CASING) || caliber != C.caliber) + if(!(load_method & SINGLE_CASING)) + to_chat(user,"[src] can not be loaded with single casings.") + return //incompatible + if(caliber != C.caliber) + to_chat(user,"\The [C] does not fit.") return //incompatible if(loaded.len >= max_shells) - user << "[src] is full." + to_chat(user,"[src] is full.") return user.remove_from_mob(C) diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index e78496d65bd..7f1989d3847 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -93,10 +93,10 @@ /obj/item/weapon/gun/projectile/tanto desc = "A Necropolis Industries Tanto .40, designed to compete with the NT Mk58. Uses 10mm rounds." - name = "10mm pistol" + name = "10mm auto-pistol" icon_state = "c05r" - magazine_type = /obj/item/ammo_magazine/t40 - allowed_magazines = list(/obj/item/ammo_magazine/t40) + magazine_type = /obj/item/ammo_magazine/mc10mm + allowed_magazines = list(/obj/item/ammo_magazine/mc10mm) caliber = "10mm" origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2) fire_sound = 'sound/weapons/Gunshot_light.ogg' @@ -262,7 +262,7 @@ /obj/item/ammo_casing/shotgun/pellet = "12 gauge", /obj/item/ammo_casing/shotgun/pellet = "12 gauge", /obj/item/ammo_casing/shotgun/beanbag = "12 gauge", - /obj/item/ammo_casing/shotgun/emp = "12 gauge", + /obj/item/ammo_casing/shotgun/emp = "12 gauge", /obj/item/ammo_casing/a762 = "7.62mm", /obj/item/ammo_casing/a556 = "5.56mm" ) @@ -281,12 +281,18 @@ icon_state = "leyon" caliber = "10mm" w_class = 2 - ammo_type = /obj/item/ammo_casing/t40 + ammo_type = /obj/item/ammo_casing/c10mm max_shells = 5 origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1) fire_sound = 'sound/weapons/Gunshot_light.ogg' load_method = SINGLE_CASING|SPEEDLOADER +/obj/item/weapon/gun/projectile/leyon/load_ammo(var/obj/item/A, mob/user) + user.visible_message("[user] begins reloading \the [src].", "You begin reloading \the [src].") + if(!do_after(user, 20, act_target = src)) + return + return ..() + /obj/item/weapon/gun/projectile/leyon/update_icon() ..() if(loaded.len) diff --git a/html/changelogs/Arrow768.yml b/html/changelogs/Arrow768.yml new file mode 100644 index 00000000000..8906b975033 --- /dev/null +++ b/html/changelogs/Arrow768.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +################################# + +# Your name. +author: Arrow768 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "The Leyon Gunsmithing LLC has reworked the \"Everyman\" to be targeted more towards civilians and was able to reduce the market-price of it."