Skip to content

Commit ac858f0

Browse files
authored
Post round hyperfixation fixes: Mostly examine related stuff (#798)
1 parent 707c1aa commit ac858f0

123 files changed

Lines changed: 599 additions & 249 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

code/__DEFINES/_flags.dm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,14 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
202202
#define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN
203203
#define ZAP_SUPERMATTER_FLAGS ZAP_GENERATES_POWER
204204

205-
///EMP will protect itself.
205+
///Object will protect itself.
206206
#define EMP_PROTECT_SELF (1<<0)
207-
///EMP will protect the contents from also being EMPed.
207+
///Object will protect its contents from being EMPed.
208208
#define EMP_PROTECT_CONTENTS (1<<1)
209-
///EMP will protect the wires.
209+
///Object will protect its wiring from being EMPed.
210210
#define EMP_PROTECT_WIRES (1<<2)
211+
///Don't indicate EMP protection in object examine text.
212+
#define EMP_NO_EXAMINE (1<<3)
211213

212214
///Protects against all EMP types.
213215
#define EMP_PROTECT_ALL (EMP_PROTECT_SELF | EMP_PROTECT_CONTENTS | EMP_PROTECT_WIRES)

code/__DEFINES/atmospherics/atmos_machinery.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@
8989
#define CAN_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE * 25)
9090
///Min allowed pressure for canisters to release air per tick
9191
#define CAN_MIN_RELEASE_PRESSURE (ONE_ATMOSPHERE * 0.1)
92+
93+
#define FIRELOCK_FAULT_NAME(tag) "Firelock [tag]"
94+
#define FIREALARM_FAULT_NAME(tag) "Fire Alarm [tag]"

code/__DEFINES/rotation.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#define ROTATION_NO_FLIPPING (1<<3)
99
/// If an object needs to have an empty spot available in target direction (used for windoors and railings)
1010
#define ROTATION_NEEDS_ROOM (1<<4)
11+
/// The turf the object is on needs to be unblocked for the rotation to occur
12+
#define ROTATION_NEEDS_UNBLOCKED (1<<5)
1113

1214
/// Rotate an object clockwise
1315
#define ROTATION_CLOCKWISE -90

code/__DEFINES/time.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,6 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using
172172

173173
/// Anywhere on Earth
174174
#define TIMEZONE_ANYWHERE_ON_EARTH -12
175+
176+
/// in the grim darkness of the thirteenth space station there is no timezones, since they break IC game times. Use this for all IC/round time values
177+
#define NO_TIMEZONE 0

code/_onclick/hud/new_player.dm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,8 @@
606606
if(SStitle.stats_faded || !hud?.mymob?.client?.prefs?.read_preference(/datum/preference/toggle/show_init_stats))
607607
alpha = 0 // we still need to init it incase they turn it back on
608608

609+
INITIALIZE_IMMEDIATE(/atom/movable/screen/lobby_music)
610+
609611
/atom/movable/screen/lobby_music
610612
icon = 'maplestation_modules/icons/hud/lobby_spinner.dmi'
611613
icon_state = "spinner"
@@ -635,9 +637,10 @@
635637
start_time = world.time
636638
end_time = start_time + SSticker.login_length
637639
START_PROCESSING(SSlobby_music_player, src)
640+
update_maptext()
638641

639642
/atom/movable/screen/lobby_music/process(seconds_per_tick)
640-
maptext = "[SStitle.music_maptext]<br>[MAPTEXT("\u25B6 [time2text(min(world.time - start_time, SSticker.login_length), "mm:ss", 0)] / [time2text(SSticker.login_length, "mm:ss", 0)]s")]"
643+
update_maptext()
641644
if(world.time >= end_time)
642645
animate(src, alpha = 0, time = 5 SECONDS)
643646
return PROCESS_KILL
@@ -646,6 +649,9 @@
646649
STOP_PROCESSING(SSlobby_music_player, src)
647650
animate(src, alpha = 0, time = 1 SECONDS)
648651

652+
/atom/movable/screen/lobby_music/proc/update_maptext()
653+
maptext = "[SStitle.music_maptext]<br>[MAPTEXT("\u25B6 [time2text(max(10, min(world.time - start_time, SSticker.login_length)), "mm:ss", NO_TIMEZONE)] / [time2text(max(100, SSticker.login_length), "mm:ss", 0)]s")]"
654+
649655
/atom/movable/screen/lobby_music/Destroy()
650656
STOP_PROCESSING(SSlobby_music_player, src)
651657
return ..()

code/controllers/subsystem/ticker.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ SUBSYSTEM_DEF(ticker)
786786
return
787787

788788
login_music = new_music
789-
login_length = rustg_sound_length(new_music)
789+
login_length = rustg_sound_length(new_music) || 1500 // default to 2.5 minutes if we can't get the length
790790
var/list/music_file_components = splittext(new_music, "/")
791791
var/music_file_name = length(music_file_components) && music_file_components[length(music_file_components)] || new_music
792792
var/list/music_name_components = splittext(music_file_name, "+")

code/datums/components/food/edible.dm

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Behavior that's still missing from this component that original food items had t
7575

7676
/datum/component/edible/RegisterWithParent()
7777
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(examine))
78+
RegisterSignal(parent, COMSIG_ATOM_EXAMINE_TAGS, PROC_REF(examine_tags))
7879
RegisterSignal(parent, COMSIG_ATOM_ATTACK_ANIMAL, PROC_REF(UseByAnimal))
7980
RegisterSignal(parent, COMSIG_ATOM_CHECKPARTS, PROC_REF(OnCraft))
8081
RegisterSignal(parent, COMSIG_OOZE_EAT_ATOM, PROC_REF(on_ooze_eat))
@@ -110,6 +111,7 @@ Behavior that's still missing from this component that original food items had t
110111
COMSIG_ITEM_USED_AS_INGREDIENT,
111112
COMSIG_OOZE_EAT_ATOM,
112113
COMSIG_ATOM_EXAMINE,
114+
COMSIG_ATOM_EXAMINE_TAGS,
113115
))
114116

115117
qdel(GetComponent(/datum/component/connect_loc_behalf))
@@ -214,9 +216,6 @@ Behavior that's still missing from this component that original food items had t
214216
var/atom/owner = parent
215217
if(food_flags & FOOD_NO_EXAMINE)
216218
return
217-
if(foodtypes)
218-
var/list/types = bitfield_to_list(foodtypes, FOOD_FLAGS)
219-
examine_list += span_notice("It is [LOWER_TEXT(english_list(types))].")
220219

221220
var/quality = get_perceived_food_quality(user)
222221
if(quality > 0)
@@ -231,7 +230,7 @@ Behavior that's still missing from this component that original food items had t
231230
else
232231
examine_list += span_warning("You find this meal inedible.")
233232

234-
if(owner.reagents.total_volume > 0)
233+
if(owner.reagents.total_volume > 0 && HAS_TRAIT(owner, TRAIT_FOOD_CHEF_MADE))
235234
var/purity = owner.reagents.get_average_purity(/datum/reagent/consumable)
236235
switch(purity)
237236
if(0 to 0.2)
@@ -275,6 +274,14 @@ Behavior that's still missing from this component that original food items had t
275274
var/mob/living/living_user = user
276275
living_user.taste(owner.reagents)
277276

277+
/datum/component/edible/proc/examine_tags(datum/source, mob/user, list/examine_tags)
278+
SIGNAL_HANDLER
279+
280+
if(food_flags & FOOD_NO_EXAMINE)
281+
return
282+
for(var/foodtype in bitfield_to_list(foodtypes, FOOD_FLAGS))
283+
examine_tags[LOWER_TEXT(foodtype)] = "It's \a [LOWER_TEXT(foodtype)] food."
284+
278285
/datum/component/edible/proc/UseFromHand(obj/item/source, mob/living/M, mob/living/user)
279286
SIGNAL_HANDLER
280287

code/datums/components/jukebox.dm

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@
112112

113113
if(!length(config_songs))
114114
var/datum/track/default/default_track = new()
115-
config_songs[default_track.song_name] = default_track
115+
config_songs["[default_track.song_name] (Default)"] = default_track
116+
117+
for(var/datum/track/track_subtype in subtypesof(/datum/track/preset))
118+
var/datum/track/new_preset = new(track_subtype)
119+
config_songs["[new_preset.song_name] (Lag Free)"] = new_preset
116120

117121
// returns a copy so it can mutate if desired.
118122
return config_songs.Copy()
@@ -404,3 +408,27 @@
404408
song_name = "Tintin on the Moon"
405409
song_length = 3 MINUTES + 52 SECONDS
406410
song_beat = 1 SECONDS
411+
412+
/datum/track/preset/title_zero
413+
song_path = 'sound/ambience/title0.ogg'
414+
song_name = "Endless Space"
415+
song_length = 3 MINUTES + 33 SECONDS
416+
song_beat = 2 SECONDS
417+
418+
/datum/track/preset/title_one
419+
song_path = 'sound/ambience/title1.mod'
420+
song_name = "Flip Flap"
421+
song_length = 2 MINUTES + 31 SECONDS
422+
song_beat = 1 SECONDS
423+
424+
/datum/track/preset/title_two
425+
song_path = 'sound/ambience/title2.ogg'
426+
song_name = "Robocop"
427+
song_length = 1 MINUTES + 58 SECONDS
428+
song_beat = 4 SECONDS
429+
430+
/datum/track/preset/title_three
431+
song_path = 'sound/ambience/title3.ogg'
432+
song_name = "Tintin on the Moon"
433+
song_length = 3 MINUTES + 52 SECONDS
434+
song_beat = 1 SECONDS

code/datums/components/rotation.dm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@
115115
if(!silent)
116116
rotated_obj.balloon_alert(user, "can't rotate in that direction!")
117117
return FALSE
118+
119+
if(rotation_flags & ROTATION_NEEDS_UNBLOCKED)
120+
var/turf/rotate_turf = get_turf(rotated_obj)
121+
if(rotate_turf.is_blocked_turf(source_atom = rotated_obj))
122+
if(!silent)
123+
rotated_obj.balloon_alert(user, "rotation is blocked!")
124+
return FALSE
118125
return TRUE
119126

120127
/datum/component/simple_rotation/proc/default_post_rotation(mob/user, degrees)

code/datums/components/simple_bodycam.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
bodycam.name = camera_name
2424
bodycam.c_tag = c_tag
2525
if(emp_proof)
26-
bodycam.AddElement(/datum/element/empprotection, ALL)
26+
bodycam.AddElement(/datum/element/empprotection, EMP_PROTECT_ALL)
2727

2828
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(update_cam))
2929
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(rotate_cam))

0 commit comments

Comments
 (0)