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

Pack of minor fixes #1085

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
2 changes: 1 addition & 1 deletion code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items?
#define DANGEROUS_POSSESSION (1<<3) //Admin possession yes/no
#define UNIQUE_RENAME (1<<4) // can you customize the description/name of the thing?
#define USES_TGUI (1<<5) //put on things that use tgui on ui_interact instead of custom/old UI.
#define SECRET_EXAMINE (1<<5) //Will never generate visible examine messages. Used for stuff like playing card hands.
#define BLOCK_Z_OUT_DOWN (1<<6) // Should this object block z falling from loc?
#define BLOCK_Z_OUT_UP (1<<7) // Should this object block z uprise from loc?
#define BLOCK_Z_IN_DOWN (1<<8) // Should this object block z falling from above?
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ DEFINE_BITFIELD(obj_flags, list(
"IN_USE" = IN_USE,
"NO_BUILD" = NO_BUILD,
"UNIQUE_RENAME" = UNIQUE_RENAME,
"USES_TGUI" = USES_TGUI,
"SECRET_EXAMINE" = SECRET_EXAMINE,
))

DEFINE_BITFIELD(pass_flags, list(
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
custom_materials = list(/datum/material/iron=75, /datum/material/glass=25)
obj_flags = USES_TGUI

///if FALSE, broadcasting and listening dont matter and this radio shouldnt do anything
VAR_PRIVATE/on = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
return null

/obj/proc/updateUsrDialog()
if((obj_flags & IN_USE) && !(obj_flags & USES_TGUI))
if((obj_flags & IN_USE))
var/is_in_use = FALSE
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/structures/mirror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
max_integrity = 200
integrity_failure = 0.5

/// If true, skip base mirror behaviour.
var/magic_mirror = FALSE

MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)

/obj/structure/mirror/Initialize(mapload)
Expand All @@ -25,6 +28,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)

if(!ishuman(user))
return TRUE

if(magic_mirror)
return FALSE //Pass control to child proc.

var/mob/living/carbon/human/hairdresser = user

//handle facial hair (if necessary)
Expand Down Expand Up @@ -125,6 +132,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
desc = "Turn and face the strange... face."
icon_state = "magic_mirror"

magic_mirror = TRUE

///Flags this race must have to be selectable with this type of mirror.
var/race_flags = MIRROR_MAGIC
///List of all Races that can be chosen, decided by its Initialize.
Expand Down
1 change: 1 addition & 0 deletions code/modules/cards/cardhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
icon_state = "none"
w_class = WEIGHT_CLASS_TINY
worn_icon_state = "card"
obj_flags = parent_type::obj_flags | SECRET_EXAMINE

/obj/item/toy/cards/cardhand/Initialize(mapload, list/cards_to_combine = list())
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/cards/singlecard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
throw_range = 7
attack_verb_continuous = list("attacks")
attack_verb_simple = list("attack")
obj_flags = parent_type::obj_flags | SECRET_EXAMINE
/// Artistic style of the deck
var/deckstyle = "nanotrasen"
/// If the cards in the deck have different icon states (blank and CAS decks do not)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences/loadout/loadout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
return TRUE

if("color")
if(loadout_item.customization_flags & CUSTOMIZE_COLOR)
if(!(loadout_item.customization_flags & CUSTOMIZE_COLOR))
return

var/current_color_display = entry.custom_color ? entry.custom_color : "#FFFFFF"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
/datum/loadout_item/gloves/diamondring
path = /obj/item/clothing/gloves/ring/diamond
cost = 4

/datum/loadout_item/gloves/white
path = /obj/item/clothing/gloves/color/white
customization_flags = CUSTOMIZE_NAME_DESC_COLOR
5 changes: 5 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,11 @@
if(examined == src)
return

if(isobj(examined))
var/obj/examined_obj = examined
if(examined_obj.obj_flags & SECRET_EXAMINE)
return

// If TRUE, the usr's view() for the examined object too
var/examining_worn_item = FALSE
var/loc_str = "at something off in the distance."
Expand Down
1 change: 0 additions & 1 deletion code/modules/power/generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
icon_state = "teg"
density = TRUE
use_power = NO_POWER_USE
obj_flags = USES_TGUI
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT
zmm_flags = ZMM_MANGLE_PLANES

Expand Down
1 change: 0 additions & 1 deletion code/modules/recycling/disposal/bin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
max_integrity = 200
resistance_flags = FIRE_PROOF
interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON
obj_flags = CAN_BE_HIT | USES_TGUI

var/datum/gas_mixture/air_contents // internal reservoir
var/full_pressure = FALSE
Expand Down
Loading