Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Split 9mm 45acp pistols #39

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/workshop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Upload to Workshop"

on:
- push

jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: AnarkisGaming/workshop@v1
with:
appID: 108600
publishedFileID: 3093101879
path: "src/"
changelog: ${{ github.event.head_commit.message }}
env:
STEAM_ACCOUNT_NAME: ${{ secrets.accountname }}
STEAM_PASSWORD: ${{ secrets.password }}
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,32 @@ this.parts.AK47_Bolt = {}
this.parts.AK47_Bolt.InsertsInto = 'AK47_BoltCarrier'
this.parts.AK47_Bolt.ConditionLowerChance = 3
this.parts.AK47_Bolt.ConditionMax = 20
this.parts.PistolReceiver_45 = {}
this.parts.PistolReceiver_45.CombinesWith = 'PistolSlide_45'
this.parts.PistolReceiver_45.ConditionLowerChance = 1 -- 100%
this.parts.PistolReceiver_45.ConditionMax = 20
this.parts.PistolSlide_45 = {}
this.parts.PistolSlide_45.CombinesWith = 'PistolReceiver_45'
this.parts.PistolSlide_45.Holds = { 'PistolBarrel_45' }
this.parts.PistolSlide_45.ConditionLowerChance = 2 -- 1/2
this.parts.PistolSlide_45.ConditionMax = 20
this.parts.PistolBarrel_45 = {}
this.parts.PistolBarrel_45.InsertsInto = 'PistolSlide_45'
this.parts.PistolBarrel_45.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_45.ConditionMax = 20
this.parts.PistolReceiver_9 = {}
this.parts.PistolReceiver_9.CombinesWith = 'PistolSlide_9'
this.parts.PistolReceiver_9.ConditionLowerChance = 1 -- 100%
this.parts.PistolReceiver_9.ConditionMax = 20
this.parts.PistolSlide_9 = {}
this.parts.PistolSlide_9.CombinesWith = 'PistolReceiver_9'
this.parts.PistolSlide_9.Holds = { 'PistolBarrel_9' }
this.parts.PistolSlide_9.ConditionLowerChance = 2 -- 1/2
this.parts.PistolSlide_9.ConditionMax = 20
this.parts.PistolBarrel_9 = {}
this.parts.PistolBarrel_9.InsertsInto = 'PistolSlide_9'
this.parts.PistolBarrel_9.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_9.ConditionMax = 20

this.getPartModel = function(modelName)
return this.parts[modelName]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module coavinsfirearms {
imports {
Base
}

item PistolReceiver_45 {
DisplayName = Pistol Frame (.45),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolReceiver,
Weight = 0.4,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item PistolSlide_45 {
DisplayName = Pistol Slide (.45),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolSlide,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Paperclip,
}

item PistolBarrel_45 {
DisplayName = Pistol Barrel (.45),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolBarrel,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Razor_Ground,
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module coavinsfirearms {
imports {
Base
}

item PistolReceiver_9 {
DisplayName = Pistol Frame (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolReceiver,
Weight = 0.4,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item PistolSlide_9 {
DisplayName = Pistol Slide (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolSlide,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Paperclip,
}

item PistolBarrel_9 {
DisplayName = Pistol Barrel (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolBarrel,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Razor_Ground,
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ CoavinsFirearms.Include('Base.SW_327', 'GenericRevolver')
CoavinsFirearms.Include('Base.SW_327_357', 'GenericRevolver')

-- 1911.txt
CoavinsFirearms.Include('Base.AMT1911', 'GenericPistol')
CoavinsFirearms.Include('Base.AMT1911', 'Pistol_45')
CoavinsFirearms.Include('Base.AMT1911_Long', 'GenericPistol')
CoavinsFirearms.Include('Base.M1911_Carbine', 'GenericPistol')
CoavinsFirearms.Include('Base.Colt1911', 'GenericPistol')
Expand Down
144 changes: 4 additions & 140 deletions src/workshop.txt
Original file line number Diff line number Diff line change
@@ -1,142 +1,6 @@
id=2847408431
version=1
title=Coavins Firearm Repair
description=Disassemble firearms into parts that can be individually repaired (or replaced) and reassembled. Parts can also be looted from places where you normally find guns, and they can be removed from other guns and re-used. Replaces the default "Repair" action on supported guns.
description=
description=[img]https://i.imgur.com/nZG26QK.gif[/img]
description=
description=✔ Works in Multiplayer
description=✔ Tested on 41.73
description=✔ Compatible with most other firearm mods
description=
description=This is a WORK IN PROGRESS, expect things to change.
description=It should be safe to add this mod to an existing save file. Always back up your save.
description=Reassemble your guns before removing this mod or they will disappear forever.
description=
description=[h1]How it works[/h1]
description=[h2]Repairing a firearm[/h2]
description=You won't be able to directly repair firearms anymore. You will instead have to disassemble the gun and either repair or replace the broken parts.
description=
description=Individual components can be repaired using things like duct tape or metalworking. You should expect firearms to degrade at around the same rate as before, and it should take around the same level of effort to repair a gun the first few times that it breaks.
description=
description=Alternatively, just replace the broken part with one taken from a different gun.
description=
description=⚠ It will become increasingly more difficult to repair a firearm as more of its parts are broken.
description=
description=[h2]Components[/h2]
description=This mod adds many new items that are used in repair and reassembly. Spare components can be looted from most places where guns are normally found.
description=
description=[url=https://github.com/coavins/zomboid-coavins-firearms/wiki/Models]Check the wiki[/url] for a full list of the different models used to simulate firearm disassembly.
description=
description=ℹ Some parts can contain other parts, forming a tree structure - all components must be in full working condition before the firearm will operate. If any part is missing or broken, the firearm (if you reassemble it) will be "broken" and will not fire.
description=
description=ℹ Parts can be swapped between firearms of the same style.
description=
description=[h2]Condition[/h2]
description=This mod completely replaces the existing system that handles condition for firearms.
description=
description=[h3]Vanilla[/h3]
description=A firearm has a chance to lose condition every time you shoot. When this happens, the condition of the gun goes down. The gun can be repaired using another one of the same type of gun.
description=
description=[h3]With this mod[/h3]
description=Firearms retain their original chance to lose condition every time you shoot, but when this happens, we instead check to see if each part inside the gun should lose condition. Different parts lose condition at different rates. The gun itself will display the condition of its most damaged component.
description=
description=[h2]Compatibility with other mods[/h2]
description=This mod should be compatible with most other mods that introduce new firearms or change how they work.
description=
description=Support has to be added manually for every mod. This is a work in progress.
description=
description=[h3]Patches provided:[/h3]
description=✅ Firearms B41
description=✅ VANILLA FIREARMS EXPANSION (B41.65)
description=✅ Arsenal(26) GunFighter
description=✅ Brita's Weapon Pack
description=✅ Totally's Historical Firearms Pack
description=
description=This mod is designed to be extensible so that it can be used with custom firearms without much effort.
description=
description=If you are a player and you want to disassemble custom firearms, then either:
description=[list][*]use one of the included compatibility patches,
description=[*]ask the other author to include support for this mod,
description=[*]or submit a pull request to add a compatibility patch
description=[/list]
description=If you are a developer and you want to add support for this feature in your mod, refer to my example mod coavinssupport1 which shows how to add compatibility with custom firearms.
description=
description=⚠ By default, only vanilla firearms can be disassembled - if a mod is not explicitly supported, its custom firearms will use the normal repair feature and can not be disassembled.
description=
description=[h1]Included Mods[/h1]
description=These are the mods provided by this Steam workshop item.
description=
description=[h2]coavinsfirearms[/h2]
description=This is the main mod, and must be enabled. Supports all of the firearms present in the base game.
description=
description=[h2]coavinssupport1[/h2]
description=Compatibility patch for "Firearms B41"
description=https://steamcommunity.com/sharedfiles/filedetails/?id=2256623447
description=Supports most of the custom guns in this mod, except for a small handful (the M60, etc.)
description=The "Gun Toolkit" items are used to repair components instead of the guns themselves.
description=
description=[h2]coavinssupport2[/h2]
description=Compatibility patch for "Arsenal(26) GunFighter"
description=https://steamcommunity.com/sharedfiles/filedetails/?id=2297098490
description=Adds support for some of the custom guns in this mod. Should also work for "Brita's Weapons".
description=
description=[h2]coavinssupport3[/h2]
description=Compatibility patch for "VANILLA FIREARMS EXPANSION"
description=https://steamcommunity.com/sharedfiles/filedetails/?id=2667899942
description=Adds support for most of the custom guns in this mod, only missing a few (SKS, Tec9, W1866, etc.)
description=The "Gun Cleaning Kit" and "FireKlean" items are used to repair components instead of the guns themselves.
description=The "FireKlean" item is overridden to increase the number of uses to 4.
description=
description=[h2]coavinssupport4[/h2]
description=Compatibility patch for "Totally's Historical Firearms Pack" (mod id: TIHFP)
description=https://steamcommunity.com/sharedfiles/filedetails/?id=2297098490
description=Adds support for some custom guns in this mod: Makarov, LeeEnfieldMagLoad, Springfield, Thompson, BAR, M1Carbine, G3A3
description=
description=[h1]Sandbox Options[/h1]
description=
description=[list][*]Gun part spawn rate
description=[*]Condition loss rate for gun parts
description=[*]Re-roll part condition when new guns are found
description=[*]Min and max starting condition for gun parts
description=[/list]
description=
description=[h1]Roadmap[/h1]
description=Ideas for future development:
description=[list]
description=[*]Add support for more guns
description=[*]Improve realism by adding more parts and models
description=[*]Parts get dirty, affect chance to jam, have to be cleaned
description=[*]Add cleaning products like solvents and brushes
description=[*]Add alternative parts that can be swapped in to affect firearm stats
description=[/list]
description=
description=[h1]Translations[/h1]
description=
description=[list][*]English
description=[*]German
description=[*]Russian
description=[/list]
description=
description=[h1]Contribute[/h1]
description=
description=✔ Pull requests are encouraged! Please submit your translations, bug fixes, and new features.
description=
description=🌎 Code is available on Github: https://github.com/coavins/zomboid-coavins-firearms
description=
description=ℹ You are free to make changes to my code for your own use.
description=
description=⛔ Please don't reupload this mod to the Steam workshop, either on its own or as part of a public mod pack. This item is not authorized for posting on Steam, except under the Steam account named Akemi.
description=
description=[url=https://ko-fi.com/E1E3CLKZX][img]https://i.imgur.com/4qKjzrG.png[/img][/url]
description=
description=[url=https://liberapay.com/coavins/donate][img]https://liberapay.com/assets/widgets/donate.svg[/img][/url]
description=
description=Workshop ID: 2847408431
description=Mod ID: coavinsfirearms
description=Mod ID: coavinssupport1
description=Mod ID: coavinssupport2
description=Mod ID: coavinssupport3
description=Mod ID: coavinssupport4
id=3093101879
title=Coavins Firearm DEVELOPMENT
description=Coavins DEVELOPMENT VERSION - MACINSIGHTS FORK
tags=Build 41;Framework;Interface;Items;Military;Multiplayer;Realistic;Weapons
visibility=public
visibility=private
Loading