Skip to content

Commit 3b31c34

Browse files
authored
REOPEN: Pack of minor fixes (#1096)
* fixes #879 * fixes #967 Also fixes the fact that basic color customization in the loadout was busted. * Obsoletes obj_flags:USES_TGUI Fixes #1066
1 parent 3e7b639 commit 3b31c34

File tree

12 files changed

+24
-7
lines changed

12 files changed

+24
-7
lines changed

code/__DEFINES/obj_flags.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items?
77
#define DANGEROUS_POSSESSION (1<<3) //Admin possession yes/no
88
#define UNIQUE_RENAME (1<<4) // can you customize the description/name of the thing?
9-
#define USES_TGUI (1<<5) //put on things that use tgui on ui_interact instead of custom/old UI.
9+
#define SECRET_EXAMINE (1<<5) //Will never generate visible examine messages. Used for stuff like playing card hands.
1010
#define BLOCK_Z_OUT_DOWN (1<<6) // Should this object block z falling from loc?
1111
#define BLOCK_Z_OUT_UP (1<<7) // Should this object block z uprise from loc?
1212
#define BLOCK_Z_IN_DOWN (1<<8) // Should this object block z falling from above?

code/_globalvars/bitfields.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ DEFINE_BITFIELD(obj_flags, list(
271271
"IN_USE" = IN_USE,
272272
"NO_BUILD" = NO_BUILD,
273273
"UNIQUE_RENAME" = UNIQUE_RENAME,
274-
"USES_TGUI" = USES_TGUI,
274+
"SECRET_EXAMINE" = SECRET_EXAMINE,
275275
))
276276

277277
DEFINE_BITFIELD(pass_flags, list(

code/game/objects/items/devices/radio/radio.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
throw_range = 7
1515
w_class = WEIGHT_CLASS_SMALL
1616
custom_materials = list(/datum/material/iron=75, /datum/material/glass=25)
17-
obj_flags = USES_TGUI
1817

1918
///if FALSE, broadcasting and listening dont matter and this radio shouldnt do anything
2019
VAR_PRIVATE/on = TRUE

code/game/objects/objs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
return null
8686

8787
/obj/proc/updateUsrDialog()
88-
if((obj_flags & IN_USE) && !(obj_flags & USES_TGUI))
88+
if((obj_flags & IN_USE))
8989
var/is_in_use = FALSE
9090
var/list/nearby = viewers(1, src)
9191
for(var/mob/M in nearby)

code/game/objects/structures/mirror.dm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
max_integrity = 200
1010
integrity_failure = 0.5
1111

12+
/// If true, skip base mirror behaviour.
13+
var/magic_mirror = FALSE
14+
1215
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
1316

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

2629
if(!ishuman(user))
2730
return TRUE
31+
32+
if(magic_mirror)
33+
return FALSE //Pass control to child proc.
34+
2835
var/mob/living/carbon/human/hairdresser = user
2936

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

135+
magic_mirror = TRUE
136+
128137
///Flags this race must have to be selectable with this type of mirror.
129138
var/race_flags = MIRROR_MAGIC
130139
///List of all Races that can be chosen, decided by its Initialize.

code/modules/cards/cardhand.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
icon_state = "none"
66
w_class = WEIGHT_CLASS_TINY
77
worn_icon_state = "card"
8+
obj_flags = parent_type::obj_flags | SECRET_EXAMINE
89

910
/obj/item/toy/cards/cardhand/Initialize(mapload, list/cards_to_combine = list())
1011
. = ..()

code/modules/cards/singlecard.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
throw_range = 7
1717
attack_verb_continuous = list("attacks")
1818
attack_verb_simple = list("attack")
19+
obj_flags = parent_type::obj_flags | SECRET_EXAMINE
1920
/// Artistic style of the deck
2021
var/deckstyle = "nanotrasen"
2122
/// If the cards in the deck have different icon states (blank and CAS decks do not)

code/modules/client/preferences/loadout/loadout.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
return TRUE
9393

9494
if("color")
95-
if(loadout_item.customization_flags & CUSTOMIZE_COLOR)
95+
if(!(loadout_item.customization_flags & CUSTOMIZE_COLOR))
9696
return
9797

9898
var/current_color_display = entry.custom_color ? entry.custom_color : "#FFFFFF"

code/modules/client/preferences/loadout/loadout_item/gloves.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@
2020
/datum/loadout_item/gloves/diamondring
2121
path = /obj/item/clothing/gloves/ring/diamond
2222
cost = 4
23+
24+
/datum/loadout_item/gloves/white
25+
path = /obj/item/clothing/gloves/color/white
26+
customization_flags = CUSTOMIZE_NAME_DESC_COLOR

code/modules/mob/mob.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@
591591
if(examined == src)
592592
return
593593

594+
if(isobj(examined))
595+
var/obj/examined_obj = examined
596+
if(examined_obj.obj_flags & SECRET_EXAMINE)
597+
return
598+
594599
// If TRUE, the usr's view() for the examined object too
595600
var/examining_worn_item = FALSE
596601
var/loc_str = "at something off in the distance."

code/modules/power/generator.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
icon_state = "teg"
66
density = TRUE
77
use_power = NO_POWER_USE
8-
obj_flags = USES_TGUI
98
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT
109
zmm_flags = ZMM_MANGLE_PLANES
1110

code/modules/recycling/disposal/bin.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
max_integrity = 200
1010
resistance_flags = FIRE_PROOF
1111
interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON
12-
obj_flags = CAN_BE_HIT | USES_TGUI
1312

1413
var/datum/gas_mixture/air_contents // internal reservoir
1514
var/full_pressure = FALSE

0 commit comments

Comments
 (0)