-
Notifications
You must be signed in to change notification settings - Fork 8
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
Modular firearms - MFCS #186
base: A-Dev
Are you sure you want to change the base?
Conversation
So much cleaner. Also gave some things a placeholder sprite
Heavily WIP and untested.
|
||
/obj/item/weapon/modular_firearms/assembly/proc/process_part(obj/item/I as obj, mob/user as mob) //this should handle processing new parts in the weapon, without relying on the weapon actually being attacked. | ||
if(istype(I, /obj/item/weapon/modular_firearms/chassis)) | ||
if(istype(I, /obj/item/weapon/modular_firearms/chassis/energy)) |
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.
Checking mutually exclusive types repeatedly again.
Cirra asked me for critique, ftr, this isn't me randomly deciding to talk shit on another codebase's PRs. A lot of the code here seems bloated or redundant, I feel like you could make good use of associative lists for all the various kinetic/ballistic/etc checks rather than having so much boilerplate for each individual var. |
/obj/item/weapon/modular_firearms/assembly/proc/compile(mob/user as mob) | ||
var/type = null | ||
if(src.isKinetic) | ||
var/new/obj/item/weapon/gun/MFCS/projectile/P as obj |
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.
'as obj' is deprecated.
Should stop it being checked again and again in the code. Thanks Zuhayr.
Credit to Zuhayr. Let's see if I did this correctly.
Credit for lines 119 to 124 to @zuhayr
Once again, credit to @zuhayr. I learned a little bit from this one, so this should help in the future.
Beginning the process of replacing all standard firearms with MFCS firearms.
Will handle larger weapons.
Sprite overrides are now handled, max_shells is no longer overriden for existing weapons, and "mastertypes" have been implemented.
Added compilesprite defining to new() and recompile()
//THIS IS HEAVILY WORK IN PROGRESS//
The MFCS allows players to construct and disassemble firearms using a wide variety of components, allowing the player to customise recoil, accuracy, projectile type, fire rate and mode, projectile speed, loading method and more. All firearms in the game will be replaced with these modular variants. MFCS Firearms may be constructed by R&D or anybody who gets a hold of the parts, however the final part will come in a lock box, to prevent them being made and used for grief. This will hopefully give research something interesting to do, and will add a lot of depth to the firearms in the game. Keep in mind, this project is massively work in progress. Feedback would be appreciated, however.
Current build - 215