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

Модульные инструменты с эриса #278

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
25 changes: 25 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "code\__defines\integrated_circuits.dm"
#include "code\__defines\inventory_sizes.dm"
#include "code\__defines\is_helpers.dm"
#include "code\__defines\items.dm"
#include "code\__defines\items_clothing.dm"
#include "code\__defines\jobs.dm"
#include "code\__defines\languages.dm"
Expand Down Expand Up @@ -79,6 +80,7 @@
#include "code\__defines\subsystems.dm"
#include "code\__defines\targeting.dm"
#include "code\__defines\temperature.dm"
#include "code\__defines\tools_and_qualities.dm"
#include "code\__defines\topic.dm"
#include "code\__defines\turfs.dm"
#include "code\__defines\webhooks.dm"
Expand Down Expand Up @@ -1099,11 +1101,34 @@
#include "code\game\objects\items\weapons\tanks\jetpack.dm"
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
#include "code\game\objects\items\weapons\tools\_tools.dm"
#include "code\game\objects\items\weapons\tools\bonesetters.dm"
#include "code\game\objects\items\weapons\tools\cauterys.dm"
#include "code\game\objects\items\weapons\tools\crowbar.dm"
#include "code\game\objects\items\weapons\tools\crowbars.dm"
#include "code\game\objects\items\weapons\tools\hammer.dm"
#include "code\game\objects\items\weapons\tools\hemostats.dm"
#include "code\game\objects\items\weapons\tools\knives.dm"
#include "code\game\objects\items\weapons\tools\misc.dm"
#include "code\game\objects\items\weapons\tools\multitool.dm"
#include "code\game\objects\items\weapons\tools\pickaxe.dm"
#include "code\game\objects\items\weapons\tools\retractors.dm"
#include "code\game\objects\items\weapons\tools\saws.dm"
#include "code\game\objects\items\weapons\tools\scalpels.dm"
#include "code\game\objects\items\weapons\tools\screwdriver.dm"
#include "code\game\objects\items\weapons\tools\screwdrivers.dm"
#include "code\game\objects\items\weapons\tools\shovel.dm"
#include "code\game\objects\items\weapons\tools\simple_weapons.dm"
#include "code\game\objects\items\weapons\tools\surgicaldrills.dm"
#include "code\game\objects\items\weapons\tools\tape.dm"
#include "code\game\objects\items\weapons\tools\weldingtool.dm"
#include "code\game\objects\items\weapons\tools\weldingtools.dm"
#include "code\game\objects\items\weapons\tools\wirecutter.dm"
#include "code\game\objects\items\weapons\tools\wirecutters.dm"
#include "code\game\objects\items\weapons\tools\wrench.dm"
#include "code\game\objects\items\weapons\tools\wrenches.dm"
#include "code\game\objects\items\weapons\tools\mods\_upgrades.dm"
#include "code\game\objects\items\weapons\tools\mods\mod_types.dm"
#include "code\game\objects\random\date_based.dm"
#include "code\game\objects\random\random.dm"
#include "code\game\objects\structures\ai_decoy.dm"
Expand Down
136 changes: 136 additions & 0 deletions code/__defines/items.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#define REQ_FUEL 1
#define REQ_CELL 2
#define REQ_FUEL_OR_CELL 4

//Aspect defines
#define UPGRADE_PRECISION "precision"
#define UPGRADE_WORKSPEED "workspeed"
#define UPGRADE_DEGRADATION_MULT "degradation_mult"
#define UPGRADE_FORCE_MULT "force_mult"
#define UPGRADE_FORCE_MOD "force_mod"
#define UPGRADE_FUELCOST_MULT "fuelcost_mult"
#define UPGRADE_POWERCOST_MULT "powercost_mult"

#define UPGRADE_BULK "bulk_mod"

#define UPGRADE_HEALTH_THRESHOLD "health_threshold_modifier"

#define UPGRADE_MAXFUEL "max_fuel"

#define UPGRADE_MAXUPGRADES "max_upgrades"

#define UPGRADE_SANCTIFY "sanctify"

#define UPGRADE_COLOR "color"

//boolean
#define UPGRADE_SHARP "sharp"

#define UPGRADE_CELLPLUS "cell_hold_upgrade"

//flags
#define UPGRADE_ITEMFLAGPLUS "item_flag_add"

// Weapon minimum fire_delay
#define GUN_MINIMUM_FIRETIME 1.1 // 110 MS , ~9 shots per second.

//Weapon upgrade defines

//Int multiplier
#define GUN_UPGRADE_DAMAGE_MULT "damage_mult"
#define GUN_UPGRADE_PEN_MULT "penetration_mult"
#define GUN_UPGRADE_PIERC_MULT "pierce_mult"
#define GUN_UPGRADE_RICO_MULT "ricochet_mult"
#define GUN_UPGRADE_FIRE_DELAY_MULT "fire_delay_mult"
#define GUN_UPGRADE_MOVE_DELAY_MULT "move_delay_mult"
#define GUN_UPGRADE_RECOIL "recoil_mult"
#define GUN_UPGRADE_MUZZLEFLASH "muzzleflash_mult"
#define GUN_UPGRADE_STEPDELAY_MULT "stepdelay_mult"
#define GUN_UPGRADE_CHARGECOST "chargecost_mult"
#define GUN_UPGRADE_OVERCHARGE_MAX "overcharge_max_mult"
#define GUN_UPGRADE_OVERCHARGE_RATE "overcharge_rate_mult"
#define GUN_UPGRADE_ONEHANDPENALTY "onehandpenalty_mult"

//Int additive
#define GUN_UPGRADE_DAMAGEMOD_PLUS "damage_plus"
#define GUN_UPGRADE_MAGUP "magazine_addition"

#define GUN_UPGRADE_DAMAGE_BRUTE "brute_damage"
#define GUN_UPGRADE_DAMAGE_BURN "burn_damage"
#define GUN_UPGRADE_DAMAGE_TOX "toxin_damage"
#define GUN_UPGRADE_DAMAGE_OXY "oxygen_damage"
#define GUN_UPGRADE_DAMAGE_CLONE "clone_damage"
#define GUN_UPGRADE_DAMAGE_HALLOSS "hallucination_damage"
#define GUN_UPGRADE_DAMAGE_RADIATION "radiation_damage"
#define GUN_UPGRADE_DAMAGE_PSY "psy_damage"
#define GUN_UPGRADE_MELEEDAMAGE "melee_damage"
#define GUN_UPGRADE_MELEEPENETRATION "melee_penetration"

#define GUN_UPGRADE_OFFSET "offset" //Constant offset, in degrees
#define GUN_UPGRADE_ZOOM "zoom"



//boolean
#define GUN_UPGRADE_SILENCER "silencable"
#define GUN_UPGRADE_FORCESAFETY "safety force"
#define GUN_UPGRADE_HONK "why"
#define GUN_UPGRADE_FULLAUTO "full auto"
#define GUN_UPGRADE_EXPLODE "self destruct"
#define GUN_UPGRADE_RIGGED "rigged"
#define GUN_UPGRADE_THERMAL "thermal scope"
#define GUN_UPGRADE_BAYONET "bayonet"
#define GUN_UPGRADE_GILDED "gilded"
#define GUN_UPGRADE_DNALOCK "biocoded"
#define GUN_UPGRADE_FOREGRIP "foregrip"
#define GUN_UPGRADE_BIPOD "bipod"

//Location Tag defines

#define GUN_UNDERBARREL "underbarrel slot"
#define GUN_BARREL "barrel slot"
#define GUN_TRIGGER "trigger slot"
#define GUN_MUZZLE "muzzle slot"
#define GUN_SCOPE "scope slot"
#define GUN_MECHANISM "misc slot"
#define GUN_GRIP "grip slot"
#define GUN_COSMETIC "cosmetic slot"

//Whitelist Tag defines
#define GUN_SILENCABLE "silencable"
#define GUN_PROJECTILE "projectile firing"
#define GUN_ENERGY "energy firing"
#define GUN_LASER "laser firing"
#define GUN_REVOLVER "revolver"
#define GUN_INTERNAL_MAG "internal mag"
#define GUN_GILDABLE "gildable"
#define GUN_FA_MODDABLE "full auto moddable"

#define GUN_CALIBRE_35 "caliber .35"

#define GUN_AMR "Is a SA AMR \"Hristov\""

// // A rare, random item
// #define RANDOM_RARE_ITEM list(\

Check warning on line 114 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/oddities = 8,\

Check warning on line 115 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/material/resources/rare = 3,\

Check warning on line 116 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/tool/advanced = 5,\

Check warning on line 117 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/gun/normal = 3,\

Check warning on line 118 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/lathe_disk/advanced = 2,\

Check warning on line 119 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/item/cell/small/moebius/nuclear = 1,\

Check warning on line 120 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/item/cell/medium/moebius/hyper = 1,\

Check warning on line 121 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/rig = 1.5,\

Check warning on line 122 in code/__defines/items.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

backslash in line comment may be commenting out the following line
// /obj/spawner/rig/damaged = 1.5,\
// /obj/spawner/voidsuit = 4,\
// /obj/spawner/pouch = 2,\
// /obj/spawner/tool_upgrade/rare = 4,\
// /obj/spawner/rig_module/rare = 4,\
// /obj/spawner/credits/c1000 = 3,\
// /obj/spawner/exosuit_equipment = 3,\
// /obj/spawner/cloth/holster = 4,\
// /obj/item/stash_spawner = 4,\
// /obj/item/storage/deferred/crate/german_uniform = 4)

GLOBAL_LIST_INIT(tool_aspects_blacklist, list(UPGRADE_COLOR, UPGRADE_ITEMFLAGPLUS, UPGRADE_CELLPLUS, UPGRADE_SHARP, UPGRADE_BULK))
GLOBAL_LIST_INIT(weapon_aspects_blacklist, list(GUN_UPGRADE_SILENCER, GUN_UPGRADE_FORCESAFETY, GUN_UPGRADE_HONK, GUN_UPGRADE_FULLAUTO,
GUN_UPGRADE_EXPLODE, GUN_UPGRADE_RIGGED, UPGRADE_SANCTIFY))
66 changes: 66 additions & 0 deletions code/__defines/tools_and_qualities.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#define ABORT_CHECK -1
#define TOOL_USE_FAIL -1
#define TOOL_USE_CANCEL 0
#define TOOL_USE_SUCCESS 1

#define QUALITY_BOLT_TURNING "bolt turning"
#define QUALITY_PULSING "pulsing"
#define QUALITY_PRYING "prying"
#define QUALITY_WELDING "welding"
#define QUALITY_SCREW_DRIVING "screw driving"
#define QUALITY_WIRE_CUTTING "wire cutting"
#define QUALITY_CLAMPING "clamping"
#define QUALITY_CAUTERIZING "cauterizing"
#define QUALITY_RETRACTING "retracting"
#define QUALITY_DRILLING "drilling"
#define QUALITY_HAMMERING "hammering"
#define QUALITY_SAWING "sawing"
#define QUALITY_BONE_SETTING "bone setting"
#define QUALITY_SHOVELING "shoveling"
#define QUALITY_DIGGING "digging"
#define QUALITY_EXCAVATION "excavation"
#define QUALITY_CUTTING "cutting"
#define QUALITY_LASER_CUTTING "laser cutting" //laser scalpels and e-swords - bloodless cutting
#define QUALITY_ADHESIVE "adhesive"
#define QUALITY_SEALING "sealing"

//Time for a work for tool system calculated in that way: basic time - tool level - stat check..
//It means that basic tools will give -30 on time, and people on right job should have -20 at least, or even more.
#define WORKTIME_INSTANT 0
#define WORKTIME_NEAR_INSTANT 30
#define WORKTIME_FAST 60
#define WORKTIME_NORMAL 90
#define WORKTIME_SLOW 120
#define WORKTIME_LONG 170
#define WORKTIME_EXTREMELY_LONG 250

//Fail chance for tool system calculated in that way: basic chance - tool level - stat check.
//Basic tools will give -30% on fail chance, and people on right job should have -20% at least.
#define FAILCHANCE_ZERO 0
#define FAILCHANCE_VERY_EASY 30
#define FAILCHANCE_EASY 50
#define FAILCHANCE_NORMAL 60
#define FAILCHANCE_HARD 80
#define FAILCHANCE_CHALLENGING 90
#define FAILCHANCE_VERY_HARD 120
#define FAILCHANCE_IMPOSSIBLE 150

//Sounds for working with tools
#define NO_WORKSOUND -1

#define WORKSOUND_CIRCULAR_SAW 'sound/weapons/circsawhit.ogg'
#define WORKSOUND_SIMPLE_SAW 'sound/items/saw.ogg'
#define WORKSOUND_WRENCHING 'sound/items/Ratchet.ogg'
#define WORKSOUND_WIRECUTTING 'sound/items/Wirecutter.ogg'
#define WORKSOUND_WELDING "weld"
#define WORKSOUND_PULSING 'sound/items/multitool_pulse.ogg'
#define WORKSOUND_SCREW_DRIVING 'sound/items/Screwdriver.ogg'
#define WORKSOUND_EASY_CROWBAR 'sound/items/Crowbar.ogg'
#define WORKSOUND_HAMMER 'sound/items/hammer.ogg'
#define WORKSOUND_REMOVING 'sound/items/Deconstruct.ogg'
#define WORKSOUND_DRIVER_TOOL 'sound/items/e_screwdriver.ogg'
#define WORKSOUND_PICKAXE 'sound/items/pickaxe.ogg'
#define WORKSOUND_HARD_SLASH 'sound/weapons/bladeslice.ogg'
#define WORKSOUND_CHAINSAW 'sound/items/chainsaw.ogg'
#define WORKSOUND_TAPE 'sound/items/duct_tape.ogg'
#define WORKSOUND_HONK 'sound/items/bikehorn.ogg'
Loading
Loading