forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 8
Modular firearms - MFCS #186
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
Open
BlueNexus
wants to merge
108
commits into
sshado:A-Dev
Choose a base branch
from
BlueNexus:ModularFirearms
base: A-Dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
41b4900
Added the framework files for components
BlueNexus d30ca17
Added the different chambers
BlueNexus 02a92fb
WIP Modular firearm code
BlueNexus 89fb5a8
Changed allowed_projectiles to use caliber
BlueNexus beff2c1
Removed a stray piece of text
BlueNexus e758421
Moved projectile type into chamber/
BlueNexus 3736e6e
Placeholder code for drivers
BlueNexus 88e27ea
Placeholder drivers to work with
BlueNexus 030e0e9
Assembly driver code.
BlueNexus 5ffda2b
Adds a debug check
BlueNexus c9cb2c9
Duplicate definition fix
BlueNexus a82602c
Reworked driver firemodes
BlueNexus 6f4dcd8
Reworked driver firemodes
BlueNexus 18b5525
Added loaders
BlueNexus 78258d9
Moved the C.shell under shell
BlueNexus 7d7c46d
Added loaders, and commenting
BlueNexus 53a221b
Quick patch
BlueNexus 0433753
Will test travis
BlueNexus 1d7bfe4
Revert
BlueNexus c72ac08
Create energy.dm
BlueNexus 93cc95c
Create automatic
BlueNexus aa43d17
Create shotgun.dm
BlueNexus 2a6ac61
Rename automatic to automatic.dm
BlueNexus 4453824
Create sniper.dm
BlueNexus 9874a98
Create pistol.dm
BlueNexus 4029a0d
Delete energy.dm
BlueNexus b704897
Create beam.dm
BlueNexus 8829218
Create special.dm
BlueNexus be91923
Create nuclear.dm
BlueNexus a9eba36
Create dart.dm
BlueNexus 6223b8c
Added energy loaders
BlueNexus 17b8dac
Var refactor
BlueNexus 8c03525
Removed obsolete code
BlueNexus 09a27fb
Wiped core.dm, different purpose
BlueNexus 44b88b5
Continue fix
BlueNexus 63dff89
Var fix
BlueNexus b34ca80
Major component refactor
BlueNexus 1c50499
Further refactor
BlueNexus 7e05091
Removed unnecessary vars
BlueNexus 66a44c2
Cleaning up code
BlueNexus 6fd2b09
Moved procs into core
BlueNexus d95fb53
Moved procs into core
BlueNexus c486d7a
Added testing SRC's
BlueNexus a3aa64d
Added barrels
BlueNexus c81005f
Added some +fun barrels
BlueNexus a3079e2
Added barrel handling to core
BlueNexus 4ab2c73
Added stocks
BlueNexus 21bc19c
Comments
BlueNexus a7ffae9
Fixed a compile error
BlueNexus cb4e064
Small fix
BlueNexus bbdf5a0
Small fix
BlueNexus 14e94b2
Fixed assemblies eating parts
BlueNexus dbb1928
Added assembly handling for sights and stocks
BlueNexus 8ba16d8
Added a var for error handling
BlueNexus b54d692
Refactored failure messages
BlueNexus b76bff1
Refactored failure messages and a minor fix
BlueNexus b7354c7
Glorious refactoring
BlueNexus 1c3728a
Even more refactoring
BlueNexus c3abd3a
Fixed the refactor
BlueNexus 0439f1e
Fixed errors not returning
BlueNexus 0c18091
Cleaned up code, framework for decon
BlueNexus 8ce8a7b
Removed unnecessary vars
BlueNexus f0e7197
Added a list
BlueNexus 65a84cc
Added a part removal proc
BlueNexus 9e2497a
Part removal update
BlueNexus 49e0eb0
Hopeful compile fix
BlueNexus 77c267f
Added attachment handling to disassembly
BlueNexus eb51a8d
Added charge costs
BlueNexus ac914ef
Create base.dm
BlueNexus 98940d8
Base projectile file
BlueNexus 3135235
Work-in-progress compile proc
BlueNexus b9742e7
Added casing handling to compile
BlueNexus d8744ff
Added heat level handling
BlueNexus 810071e
Added a heat limit var for later use
BlueNexus e395c88
Work-in-progress overheat handling
BlueNexus 43546a6
More heat handling
BlueNexus fbeaab8
Cooldown handling
BlueNexus 6a87a0c
Further handling
BlueNexus 9ff3805
Create energy.dm
BlueNexus a05665d
Extra quotation fix
BlueNexus f30f7ad
Merge branch 'master' into ModularFirearms
BlueNexus c834f2e
Comments and punctuation
BlueNexus bae4775
Changed if's to else if's
BlueNexus cbe3287
Used a var instead of rechecking istype.
BlueNexus 3042717
More handling and a refactor
BlueNexus cebdd5f
Added some else if's
BlueNexus cb258b6
Switched to using span classes
BlueNexus b65bc80
Modifying the P again.
BlueNexus 9d41e0e
Added barrel compiling
BlueNexus 4aa29a3
Added stock compiling
BlueNexus a4096e9
Added new power supplies
BlueNexus 6771d5b
Update power_cells.dm
BlueNexus dac207e
Start of the replacement
BlueNexus a871763
Added a heavy assembly
BlueNexus 4b46e3c
Added mastertype and compiled vars
BlueNexus 750a5d5
Added the framework for recompiling
BlueNexus 1876c00
Small fix
BlueNexus a3d7873
Update loader.dm
BlueNexus 225d7ff
Rearrangement
BlueNexus 4a594b6
Set the base parts for projectile weaponry
BlueNexus 4d87117
Update projectile.dm
BlueNexus da5c66b
Added the Z8 driver
BlueNexus 125e8d2
Moved automatic weapons over to the MFCS system.
BlueNexus 6c565d2
Moved pistols over to the MFCS system
BlueNexus c8168c4
Update core.dm
BlueNexus e686188
Compilesprites into gun.dm
BlueNexus 14dc23b
Removed redundant code
BlueNexus 079ed5e
WIP readme
BlueNexus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| //Frames are the starting blocks of the weapon. The type of frame decides how large a weapon you can build. | ||
| //In general, weight affects the size and weight (slow to use, bulky, etc) of the weapon | ||
|
|
||
|
|
||
| obj/item/weapon/modular_firearms/assembly | ||
| name = "standard assembly" | ||
| desc = "The outer framework for a firearm of some kind. This one looks rather basic." | ||
| icon = 'icons/placeholder.dmi' | ||
| var/mastertype = null | ||
| var/compiled = null | ||
| var/msg = null | ||
| var/modChassis = null | ||
| var/modChamber = null | ||
| var/modDriver = null | ||
| var/modLoader = null | ||
| var/modBarrel = null | ||
| var/modStock = null | ||
| var/modSight = null | ||
| var/modMisc = list() | ||
| w_class = 3 | ||
| var/isEnergy = null | ||
| var/isKinetic = null | ||
| var/list/components = list() | ||
| var/list/removable = list() | ||
|
|
||
| /obj/item/weapon/modular_firearms/assembly/attackby(obj/item/I as obj, mob/user as mob) | ||
| if(istype(I, /obj/item/weapon/modular_firearms)) | ||
| var/part = null | ||
| var/prereq = null | ||
| if(istype(I, /obj/item/weapon/modular_firearms/chassis)) | ||
| part = modChassis | ||
| prereq = null | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/chamber)) | ||
| part = modChamber | ||
| prereq = modChassis | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/driver)) | ||
| part = modDriver | ||
| prereq = modChamber | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/loader)) | ||
| part = modLoader | ||
| prereq = modChamber | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/barrel)) | ||
| part = modBarrel | ||
| prereq = modChamber | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/stock)) | ||
| part = modStock | ||
| prereq = modChassis | ||
|
|
||
| else if(istype(I, /obj/item/weapon/modular_firearms/sight)) | ||
| part = modSight | ||
| prereq = modChassis | ||
|
|
||
| add_part(I, user, part, prereq) | ||
|
|
||
| obj/item/weapon/modular_firearms/assembly/heavy | ||
| name = "heavy assembly" | ||
| desc = "The outer framework for a firearm. You could probably make something over the top with this." | ||
| w_class = 4 | ||
96 changes: 96 additions & 0 deletions
96
code/modules/projectiles/guns/modular/components/barrel.dm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| //Barrels define the range of the weapon, as well as affecting their accuracy. | ||
| //For energy weapons, this refers to focusing chambers. | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel | ||
| name = "barrel" | ||
| icon = 'icons/placeholder.dmi' | ||
| var/accuracy_mod = null | ||
| var/weight = null | ||
| var/burst_mod = null | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/sniper | ||
| name = "marksman barrel" | ||
| accuracy_mod = 1 | ||
| weight = 4 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/rifle | ||
| name = "long barrel" | ||
| accuracy_mod = 0.5 | ||
| weight = 3 | ||
|
|
||
|
|
||
| obj/item/weapon/modular_firearms/barrel/standard | ||
| name = "standard barrel" | ||
| accuracy_mod = 0 | ||
| weight = 2 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/short | ||
| name = "short barrel" | ||
| accuracy_mod = -0.5 | ||
| weight = 1 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/snub | ||
| name = "snub barrel" | ||
| accuracy_mod = -1 | ||
| weight = 0 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/rotating //boom goes your accuracy. Good luck getting one though | ||
| name = "rotating barrel" | ||
| accuracy_mod = -3 | ||
| weight = 5 | ||
| burst_mod = 5 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/double | ||
| name = "double barrel" | ||
| accuracy_mod = -1 | ||
| weight = 2 | ||
| burst_mod = 2 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/triple | ||
| name = "triple barrel" | ||
| accuracy_mod = -2 | ||
| weight = 3 | ||
| burst_mod = 3 | ||
|
|
||
| /* //Not quite sure about energy barrels yet. | ||
| obj/item/weapon/modular_firearms/barrel/energy | ||
| var/power_mod = null | ||
|
|
||
|
|
||
| obj/item/weapon/modular_firearms/barrel/energy/long | ||
| name = "high-refraction focusing chamber" | ||
| accuracy_mod = 2 | ||
| weight = 3 | ||
| power_mod = 4 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/energy/high | ||
| name = "dense focusing chamber" | ||
| accuracy_mod = 1 | ||
| weight = 2 | ||
| power_mod = 3 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/energy/heavy | ||
| name = "heavy focusing chamber" | ||
| accuracy_mod = 0 | ||
| weight = 4 | ||
| power_mod = 5 | ||
| var/heavyfocus = 1 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/energy/standard | ||
| name = "regulated focusing chamber" | ||
| accuracy_mod = 0 | ||
| weight = 1 | ||
| power_mod = 2 | ||
|
|
||
| obj/item/weapon/modular_firearms/barrel/energy/standard | ||
| name = "simple focusing chamber" | ||
| accuracy_mod = 0 | ||
| weight = 0.5 | ||
| power_mod = 1 | ||
|
|
||
| */ | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either return after setting part/prereq or make these elseif, you're checking type repeatedly even if it evaluates true in the first block.