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

[MIRROR] Fixes compile problem with ammo design file. #292

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/material/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
name = "fabricated machete"
desc = "A long, machine-stamped blade with a somewhat ungainly handle. Found in military surplus stores, malls, and horror movies since before interstellar travel."
base_parry_chance = 40
material = /decl/material/solid/metal/steel
matter = list(/decl/material/solid/plastic = MATTER_AMOUNT_REINFORCEMENT)

/obj/item/hatchet/machete/Initialize()
Expand Down
11 changes: 7 additions & 4 deletions code/modules/economy/worth_guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
. = ..()
if(self_recharge)
. += 100
var/projectile_value = atom_info_repository.get_combined_worth_for(projectile_type)
var/projectile_value = 1
if(projectile_type)
projectile_value = atom_info_repository.get_combined_worth_for(projectile_type)
for(var/datum/firemode/F in firemodes)
if(F.settings["projectile_type"])
projectile_value = max(projectile_value, atom_info_repository.get_combined_worth_for(F.settings["projectile_type"]))
Expand All @@ -34,11 +36,12 @@
/obj/item/gun/projectile/get_base_value()
. = ..()
if(load_method & (SINGLE_CASING|SPEEDLOADER))
var/projectile_value = atom_info_repository.get_combined_worth_for(ammo_type)
var/projectile_value = ammo_type ? atom_info_repository.get_combined_worth_for(ammo_type) : 1
. += 0.5 * projectile_value * max_shells
else if(load_method & MAGAZINE)
if(auto_eject)
. += 20
var/obj/item/ammo_magazine/mag = magazine_type
var/projectile_value = atom_info_repository.get_combined_worth_for(initial(mag.ammo_type))
. += 0.5 * projectile_value * initial(mag.max_ammo)
var/mag_type = initial(mag.ammo_type)
var/projectile_value = mag_type ? atom_info_repository.get_combined_worth_for(mag_type) : 1
. += 0.5 * projectile_value * initial(mag.max_ammo)
4 changes: 2 additions & 2 deletions code/modules/fabrication/designs/general/designs_arms_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/datum/fabricator_recipe/arms_ammo/flaregun
name = "flare gun"
path = /obj/item/weapon/gun/projectile/flare
path = /obj/item/gun/projectile/flare

/datum/fabricator_recipe/arms_ammo/hidden
path = /obj/item/hatchet/machete/steel
Expand Down Expand Up @@ -73,4 +73,4 @@

/datum/fabricator_recipe/arms_ammo/hidden/speedloader_laser
name = "ammunition (speedloader, laserbulb)"
path = /obj/item/ammo_magazine/laser_revolver
path = /obj/item/ammo_magazine/speedloader/laser_revolver
1 change: 1 addition & 0 deletions nebula.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,7 @@
#include "code\modules\fabrication\fabricator_topic.dm"
#include "code\modules\fabrication\fabricator_ui.dm"
#include "code\modules\fabrication\designs\_design.dm"
#include "code\modules\fabrication\designs\general\designs_arms_ammo.dm"
#include "code\modules\fabrication\designs\general\designs_devices_components.dm"
#include "code\modules\fabrication\designs\general\designs_engineering.dm"
#include "code\modules\fabrication\designs\general\designs_general.dm"
Expand Down