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

Deletes gun greyscale configs and icons. Optimizes some random stuff a bit. #595

Open
wants to merge 3 commits into
base: master
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
6 changes: 0 additions & 6 deletions code/__DEFINES/greyscale_guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
#define AMMO_BAND_COLOR_EXPLOSIVE "#3f1111"
#define AMMO_BAND_COLOR_SABOT "#663618"

#define GUN_ICONSTATE_LOADED "loaded"
#define GUN_ICONSTATE_UNLOADED "unloaded"
#define GUN_ICONSTATE_UNRACKED "unracked"
#define GUN_ICONSTATE_OPEN "open"
#define GUN_ICONSTATE_PUMP "pump"

#define GUN_PALETTE_TAN "#3F382E#61574A#807360#978872"
#define GUN_PALETTE_RED "#421010#601e1e#762525#9b3a28"
#define GUN_PALETTE_DARK_RED "#301a1d#422628#5d3839#815150"
Expand Down
21 changes: 7 additions & 14 deletions code/_onclick/hud/screen_objects/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,7 @@
///The tag used by this hand, used for activate_hand()
var/hand_tag = ""

/atom/movable/screen/inventory/hand/left
name = "l_hand"
icon_state = "hand_l"
screen_loc = ui_lhand
hand_tag = "l"

/atom/movable/screen/inventory/hand/left/update_overlays()
/atom/movable/screen/inventory/hand/right/update_overlays()
. = ..()
if(!hud?.mymob?.hand)
return
Expand All @@ -117,25 +111,24 @@
var/mob/living/carbon/C = usr
C.activate_hand(hand_tag)

/atom/movable/screen/inventory/hand/left
name = "l_hand"
icon_state = "hand_l"
screen_loc = ui_lhand
hand_tag = "l"

/atom/movable/screen/inventory/hand/right
name = "r_hand"
icon_state = "hand_r"
screen_loc = ui_rhand
hand_tag = "r"

/atom/movable/screen/inventory/hand/right/update_overlays()
. = ..()
if(!hud?.mymob || hud.mymob.hand)
return
. += "hand_active"

/atom/movable/screen/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
icon_state = "backpack_close"


/atom/movable/screen/close/Click()
if(istype(master, /obj/item/storage))
var/obj/item/storage/S = master
Expand Down
24 changes: 13 additions & 11 deletions code/controllers/subsystem/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,22 @@ SUBSYSTEM_DEF(atoms)
count = length(atoms)
for(var/I in 1 to count)
var/atom/A = atoms[I]
if(!(A.flags_atom & INITIALIZED))
CHECK_TICK
PROFILE_INIT_ATOM_BEGIN()
InitAtom(A, TRUE, mapload_arg)
PROFILE_INIT_ATOM_END(A)
if(A.flags_atom & INITIALIZED)
continue
CHECK_TICK
PROFILE_INIT_ATOM_BEGIN()
InitAtom(A, TRUE, mapload_arg)
PROFILE_INIT_ATOM_END(A)
else
count = 0
for(var/atom/A in world)
if(!(A.flags_atom & INITIALIZED))
PROFILE_INIT_ATOM_BEGIN()
InitAtom(A, FALSE, mapload_arg)
PROFILE_INIT_ATOM_END(A)
++count
CHECK_TICK
if(A.flags_atom & INITIALIZED)
continue
PROFILE_INIT_ATOM_BEGIN()
InitAtom(A, FALSE, mapload_arg)
PROFILE_INIT_ATOM_END(A)
++count
CHECK_TICK

testing("Initialized [count] atoms")
pass(count)
Expand Down
29 changes: 16 additions & 13 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ SUBSYSTEM_DEF(mapping)

//dlete dis once #39770 is resolved
/datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig()
if(!configs)
configs = load_map_configs(ALL_MAPTYPES, error_if_missing = FALSE)
for(var/i in GLOB.clients)
var/client/C = i
winset(C, null, "mainwindow.title='[CONFIG_GET(string/title)] - [SSmapping.configs[SHIP_MAP].map_name]'")
if(configs)
return
configs = load_map_configs(ALL_MAPTYPES, error_if_missing = FALSE)
for(var/i in GLOB.clients)
var/client/C = i
winset(C, null, "mainwindow.title='[CONFIG_GET(string/title)] - [SSmapping.configs[SHIP_MAP].map_name]'")

/datum/controller/subsystem/mapping/Initialize()
HACK_LoadMapConfig()
Expand All @@ -54,17 +55,19 @@ SUBSYSTEM_DEF(mapping)

for(var/i in ALL_MAPTYPES)
var/datum/map_config/MC = configs[i]
if(MC.defaulted)
var/old_config = configs[i]
configs[i] = global.config.defaultmaps[i]
if(!configs || configs[i].defaulted)
to_chat(world, span_boldannounce("Unable to load next or default map config, defaulting."))
configs[i] = old_config
if(!MC.defaulted)
continue
var/old_config = configs[i]
configs[i] = global.config.defaultmaps[i]
if(!configs || configs[i].defaulted)
to_chat(world, span_boldannounce("Unable to load next or default map config, defaulting."))
configs[i] = old_config

if(configs[GROUND_MAP])
for(var/datum/game_mode/M AS in config.votable_modes)
if(!(M.config_tag in configs[GROUND_MAP].gamemodes))
config.votable_modes -= M // remove invalid modes
if(M.config_tag in configs[GROUND_MAP].gamemodes)
continue
config.votable_modes -= M // remove invalid modes

loadWorld()
repopulate_sorted_areas()
Expand Down
54 changes: 0 additions & 54 deletions code/datums/greyscale/json_configs/attachments.json

This file was deleted.

46 changes: 0 additions & 46 deletions code/datums/greyscale/json_configs/attachments_64.json

This file was deleted.

79 changes: 0 additions & 79 deletions code/datums/greyscale/json_configs/gun.json

This file was deleted.

35 changes: 0 additions & 35 deletions code/datums/greyscale/json_configs/gun_fire.json

This file was deleted.

24 changes: 0 additions & 24 deletions code/datums/greyscale/json_configs/gun_hands.json

This file was deleted.

13 changes: 0 additions & 13 deletions code/datums/greyscale/json_configs/gun_mob.json

This file was deleted.

Loading
Loading