Skip to content

Commit

Permalink
Flags atom
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Sep 12, 2023
1 parent 6ac3631 commit 60ef3f8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define ITEM_UNCATCHABLE (1<<9)
/// Used for nonstandard marine clothing to ignore 'specialty' var.
#define NO_NAME_OVERRIDE (1<<10)
/// Used for armors or uniforms that don't have a snow icon state.
/// Used for armors or uniforms that don't have a snow/desert/etc icon state set via select_gamemode_skin (not all item types currently perform this test though).
#define NO_SNOW_TYPE (1<<11)

#define INVULNERABLE (1<<12)
Expand Down
42 changes: 21 additions & 21 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,28 +229,28 @@ item, and will change the skin to whatever you specify here. You can also
manually override the icon with a unique skin if wanted, for the outlier
cases. Override_icon_state should be a list.*/
/obj/item/proc/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
if(type == expected_type && !findtext("[type]", "fluff"))
var/new_icon_state
var/new_protection
var/new_item_state
if(override_icon_state && override_icon_state.len)
new_icon_state = override_icon_state[SSmapping.configs[GROUND_MAP].map_name]
if(override_protection && override_protection.len)
new_protection = override_protection[SSmapping.configs[GROUND_MAP].map_name]
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
icon_state = new_icon_state ? new_icon_state : "s_" + icon_state
item_state = new_item_state ? new_item_state : "s_" + item_state
if("desert")
icon_state = new_icon_state ? new_icon_state : "d_" + icon_state
item_state = new_item_state ? new_item_state : "d_" + item_state
if("classic")
icon_state = new_icon_state ? new_icon_state : "c_" + icon_state
item_state = new_item_state ? new_item_state : "c_" + item_state
if(new_protection)
min_cold_protection_temperature = new_protection
else return
if(type != expected_type)
return

var/new_icon_state
var/new_protection
var/new_item_state
if(override_icon_state && override_icon_state.len)
new_icon_state = override_icon_state[SSmapping.configs[GROUND_MAP].map_name]
if(override_protection && override_protection.len)
new_protection = override_protection[SSmapping.configs[GROUND_MAP].map_name]
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
icon_state = new_icon_state ? new_icon_state : "s_" + icon_state
item_state = new_item_state ? new_item_state : "s_" + item_state
if("desert")
icon_state = new_icon_state ? new_icon_state : "d_" + icon_state
item_state = new_item_state ? new_item_state : "d_" + item_state
if("classic")
icon_state = new_icon_state ? new_icon_state : "c_" + icon_state
item_state = new_item_state ? new_item_state : "c_" + item_state
if(new_protection)
min_cold_protection_temperature = new_protection

/obj/item/get_examine_text(mob/user)
. = list()
Expand Down
8 changes: 4 additions & 4 deletions code/modules/cm_marines/Donator_Items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
icon_override = 'icons/mob/humans/onmob/head_0.dmi'
flags_inventory = BLOCKSHARPOBJ
flags_inv_hide = HIDEEARS
flags_atom = NO_NAME_OVERRIDE
flags_atom = FPRINT|CONDUCT|NO_NAME_OVERRIDE|NO_SNOW_TYPE
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
flags_marine_helmet = NO_FLAGS

Expand Down Expand Up @@ -67,7 +67,7 @@
desc = "ITEM DESCRIPTION. DONOR ITEM" //Add UNIQUE if Unique
icon_state = null
item_state = null
flags_atom = NO_NAME_OVERRIDE
flags_atom = FPRINT|CONDUCT|NO_NAME_OVERRIDE|NO_SNOW_TYPE
//DON'T GRAB STUFF BETWEEN THIS LINE
icon = 'icons/obj/items/clothing/suits.dmi'
icon_override = 'icons/mob/humans/onmob/suit_0.dmi' //Don't fuck with this in the future please.
Expand All @@ -80,7 +80,7 @@
desc = "ITEM DESCRIPTION. DONOR ITEM" //Add UNIQUE if Unique
icon_state = null
item_state = null
flags_atom = NO_NAME_OVERRIDE
flags_atom = FPRINT|CONDUCT|NO_NAME_OVERRIDE|NO_SNOW_TYPE
//DON'T GRAB STUFF BETWEEN THIS LINE
icon = 'icons/obj/items/clothing/suits.dmi'
icon_override = 'icons/mob/humans/onmob/suit_0.dmi' //Don't fuck with this in the future please.
Expand Down Expand Up @@ -971,7 +971,7 @@
/obj/item/clothing/under/marine/fluff
name = "ITEM NAME"
desc = "ITEM DESCRIPTION. DONOR ITEM" //Add UNIQUE if Unique
flags_atom = NO_NAME_OVERRIDE
flags_atom = FPRINT|NO_NAME_OVERRIDE|NO_SNOW_TYPE
icon_state = null
item_state = null
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
Expand Down

0 comments on commit 60ef3f8

Please sign in to comment.