Skip to content

Commit cb7cc0c

Browse files
committed
Merge branch 'master' of github.com:DaedalusDock/daedalusdock into airlocktweaks
2 parents 35a043a + d632b3d commit cb7cc0c

File tree

118 files changed

+627
-462
lines changed

Some content is hidden

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

118 files changed

+627
-462
lines changed

_maps/RandomRuins/SpaceRuins/hilbertresearchfacility.dmm

+1-3
Original file line numberDiff line numberDiff line change
@@ -1178,9 +1178,7 @@
11781178
dir = 1
11791179
},
11801180
/obj/structure/table/reinforced/plastitaniumglass,
1181-
/obj/item/crowbar/large{
1182-
pixel_y = 4
1183-
},
1181+
/obj/item/crowbar,
11841182
/turf/open/floor/mineral/plastitanium,
11851183
/area/ruin/space/has_grav/powered/hilbertresearchfacility)
11861184
"AI" = (

_maps/RandomRuins/SpaceRuins/shuttlerelic.dmm

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
/obj/structure/chair/old{
6464
dir = 1
6565
},
66-
/obj/item/crowbar/large/heavy,
66+
/obj/item/crowbar/heavy,
6767
/turf/open/floor/oldshuttle,
6868
/area/ruin/powered)
6969
"o" = (

_maps/shuttles/emergency_russiafightpit.dmm

+1-3
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@
379379
/obj/item/melee/baseball_bat{
380380
pixel_x = -5
381381
},
382-
/obj/item/crowbar/large{
383-
pixel_x = 6
384-
},
382+
/obj/item/crowbar,
385383
/turf/open/floor/mineral/plastitanium,
386384
/area/shuttle/escape)
387385
"bp" = (

_maps/shuttles/hunter_russian.dmm

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@
383383
/obj/item/reagent_containers/food/drinks/bottle/vodka,
384384
/obj/item/reagent_containers/food/drinks/bottle/vodka,
385385
/obj/item/reagent_containers/food/drinks/bottle/vodka,
386-
/obj/item/crowbar/large/old,
386+
/obj/item/crowbar/old,
387387
/obj/item/lighter/greyscale,
388388
/turf/open/floor/pod/dark,
389389
/area/shuttle/hunter/russian)

code/__DEFINES/dcs/signals/signals_atom/signals_atom_mouse.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
///from base of atom/MouseDrop(): (/atom/over, /mob/user)
2323
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto"
2424
#define COMPONENT_NO_MOUSEDROP (1<<0)
25-
///from base of atom/MouseDrop_T: (/atom/from, /mob/user)
25+
///from base of atom/MouseDroppedOn: (/atom/from, /mob/user)
2626
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
2727
///from base of mob/MouseWheelOn(): (/atom, delta_x, delta_y, params)
2828
#define COMSIG_MOUSE_SCROLL_ON "mousescroll_on"

code/__HELPERS/cmp.dm

+4
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,7 @@ GLOBAL_VAR_INIT(cmp_field, "name")
202202
/// Orders lists by the size of lists in their contents
203203
/proc/cmp_list_length(list/A, list/B)
204204
return length(A) - length(B)
205+
206+
/// Orders codex entries by name alphabetically
207+
/proc/cmp_codex_name(datum/codex_entry/a, datum/codex_entry/b)
208+
return sorttext(b.name, a.name)

code/_onclick/drag_drop.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
if(!Adjacent(usr) || !over.Adjacent(usr) && !istype(over, /atom/movable/screen))
2323
return // should stop you from dragging through windows
2424

25-
over.MouseDrop_T(src,usr, params)
25+
over.MouseDroppedOn(src, usr, params2list(params))
2626
return TRUE
2727

2828
/// Handles treating drags as clicks if they're within some conditions
@@ -84,7 +84,7 @@
8484
return TRUE
8585

8686
// receive a mousedrop
87-
/atom/proc/MouseDrop_T(atom/dropping, mob/user, params)
87+
/atom/proc/MouseDroppedOn(atom/dropping, mob/user, params)
8888
SEND_SIGNAL(src, COMSIG_MOUSEDROPPED_ONTO, dropping, user, params)
8989

9090

code/_onclick/hud/screen_objects.dm

+3-3
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
usr.update_held_items()
188188
return TRUE
189189

190-
/atom/movable/screen/inventory/MouseDrop_T(atom/dropped, mob/user, params)
190+
/atom/movable/screen/inventory/MouseDroppedOn(atom/dropped, mob/user, params)
191191
if(user != hud?.mymob || !slot_id)
192192
return TRUE
193193
if(!isitem(dropped))
@@ -298,7 +298,7 @@
298298
user.swap_hand(held_index)
299299
return TRUE
300300

301-
/atom/movable/screen/inventory/hand/MouseDrop_T(atom/dropping, mob/user, params)
301+
/atom/movable/screen/inventory/hand/MouseDroppedOn(atom/dropping, mob/user, params)
302302
if(!isitem(dropping))
303303
return TRUE
304304

@@ -543,7 +543,7 @@
543543

544544
return TRUE
545545

546-
/atom/movable/screen/storage/MouseDrop_T(atom/dropping, mob/user, params)
546+
/atom/movable/screen/storage/MouseDroppedOn(atom/dropping, mob/user, params)
547547
var/datum/storage/storage_master = master_ref?.resolve()
548548

549549
if(!istype(storage_master))

code/controllers/subsystem/codex.dm

+61-19
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@ SUBSYSTEM_DEF(codex)
5959
string = replacetextEx(string, linkRegex.match, replacement)
6060
return string
6161

62+
/// Returns a codex entry for the given query. May return a list if multiple are found, or null if none.
6263
/datum/controller/subsystem/codex/proc/get_codex_entry(entry)
6364
if(isatom(entry))
6465
var/atom/entity = entry
6566
. = entity.get_specific_codex_entry()
6667
if(.)
6768
return
6869
return entries_by_path[entity.type] || get_entry_by_string(entity.name)
70+
71+
if(isdatum(entry))
72+
entry = entry:type
6973
if(ispath(entry))
7074
return entries_by_path[entry]
7175
if(istext(entry))
@@ -74,13 +78,40 @@ SUBSYSTEM_DEF(codex)
7478
/datum/controller/subsystem/codex/proc/get_entry_by_string(string)
7579
return entries_by_string[codex_sanitize(string)]
7680

81+
/// Presents a codex entry to a mob. If it receives a list of entries, it will prompt them to choose one.
7782
/datum/controller/subsystem/codex/proc/present_codex_entry(mob/presenting_to, datum/codex_entry/entry)
78-
if(entry && istype(presenting_to) && presenting_to.client)
79-
var/datum/browser/popup = new(presenting_to, "codex", "Codex", nheight=425) //"codex\ref[entry]"
80-
var/entry_data = entry.get_codex_body(presenting_to)
81-
popup.set_content(parse_links(jointext(entry_data, null), presenting_to))
82-
popup.open()
83-
83+
if(!entry || !istype(presenting_to) || !presenting_to.client)
84+
return
85+
86+
if(islist(entry))
87+
present_codex_search(presenting_to, entry)
88+
return
89+
90+
var/datum/browser/popup = new(presenting_to, "codex", "Codex", nheight=425) //"codex\ref[entry]"
91+
var/entry_data = entry.get_codex_body(presenting_to)
92+
popup.set_content(parse_links(jointext(entry_data, null), presenting_to))
93+
popup.open()
94+
95+
#define CODEX_ENTRY_LIMIT 10
96+
/// Presents a list of codex entries to a mob.
97+
/datum/controller/subsystem/codex/proc/present_codex_search(mob/presenting_to, list/entries, search_query)
98+
var/list/codex_data = list()
99+
codex_data += "<h3><b>[entries.len] matches</b>[search_query ? " for '[search_query]'" : ""]:</h3>"
100+
101+
if(LAZYLEN(entries) > CODEX_ENTRY_LIMIT)
102+
codex_data += "Showing first <b>[CODEX_ENTRY_LIMIT]</b> entries. <b>[entries.len - 5] result\s</b> omitted.</br>"
103+
codex_data += "<table width = 100%>"
104+
105+
for(var/i = 1 to min(entries.len, CODEX_ENTRY_LIMIT))
106+
var/datum/codex_entry/entry = entries[i]
107+
codex_data += "<tr><td>[entry.name]</td><td><a href='?src=\ref[SScodex];show_examined_info=\ref[entry];show_to=\ref[presenting_to]'>View</a></td></tr>"
108+
codex_data += "</table>"
109+
110+
var/datum/browser/popup = new(presenting_to, "codex-search", "Codex Search") //"codex-search"
111+
popup.set_content(codex_data.Join())
112+
popup.open()
113+
114+
#undef CODEX_ENTRY_LIMIT
84115
/datum/controller/subsystem/codex/proc/get_guide(category)
85116
var/datum/codex_category/cat = codex_categories[category]
86117
. = cat?.guide_html
@@ -91,25 +122,36 @@ SUBSYSTEM_DEF(codex)
91122
return list()
92123

93124
searching = codex_sanitize(searching)
125+
94126
if(!searching)
95127
return list()
96-
if(!search_cache[searching])
97-
var/list/results
98-
if(entries_by_string[searching])
99-
results = list(entries_by_string[searching])
100-
else
101-
results = list()
102-
for(var/entry_title in entries_by_string)
103-
var/datum/codex_entry/entry = entries_by_string[entry_title]
104-
if(findtext(entry.name, searching) || findtext(entry.lore_text, searching) || findtext(entry.mechanics_text, searching) || findtext(entry.antag_text, searching))
105-
results |= entry
106-
search_cache[searching] = sortTim(results, GLOBAL_PROC_REF(cmp_name_asc))
107-
return search_cache[searching]
128+
129+
. = search_cache[searching]
130+
if(.)
131+
return .
132+
133+
var/list/results = list()
134+
var/list/priority_results = list()
135+
if(entries_by_string[searching])
136+
results = entries_by_string[searching]
137+
else
138+
for(var/datum/codex_entry/entry as anything in all_entries)
139+
if(findtext(entry.name, searching))
140+
priority_results += entry
141+
142+
else if(findtext(entry.lore_text, searching) || findtext(entry.mechanics_text, searching) || findtext(entry.antag_text, searching))
143+
results += entry
144+
145+
sortTim(priority_results, GLOBAL_PROC_REF(cmp_name_asc))
146+
sortTim(results, GLOBAL_PROC_REF(cmp_name_asc))
147+
priority_results += results
148+
search_cache[searching] = priority_results
149+
. = search_cache[searching]
108150

109151
/datum/controller/subsystem/codex/Topic(href, href_list)
110152
. = ..()
111153
if(!. && href_list["show_examined_info"] && href_list["show_to"])
112-
var/mob/showing_mob = locate(href_list["show_to"])
154+
var/mob/showing_mob = locate(href_list["show_to"])
113155
if(!istype(showing_mob))
114156
return
115157
var/atom/showing_atom = locate(href_list["show_examined_info"])

code/datums/components/food/edible.dm

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ Behavior that's still missing from this component that original food items had t
161161
if (0)
162162
return
163163
if(1)
164-
examine_list += "[parent] was bitten by someone!"
164+
examine_list += span_alert("Something has taken a bite out of it.")
165165
if(2,3)
166-
examine_list += "[parent] was bitten [bitecount] times!"
166+
examine_list += span_alert("Something has taken a couple of bites out of it.")
167167
else
168-
examine_list += "[parent] was bitten multiple times!"
168+
examine_list += span_alert("Something has taken a several of bites out of it.")
169169

170170
/datum/component/edible/proc/UseFromHand(obj/item/source, mob/living/M, mob/living/user)
171171
SIGNAL_HANDLER

code/datums/components/rotation.dm

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585

8686
/datum/component/simple_rotation/proc/ExamineMessage(datum/source, mob/user, list/examine_list)
8787
SIGNAL_HANDLER
88-
examine_list += span_notice("Alt + Right-click to rotate it clockwise. Alt + Left-click to rotate it counterclockwise.")
89-
if(rotation_flags & ROTATION_REQUIRE_WRENCH)
90-
examine_list += span_notice("This requires a wrench to be rotated.")
88+
89+
var/examine_text = "It looks like you can <b>rotate</b> it[rotation_flags & ROTATION_REQUIRE_WRENCH ? " by <b>loosening the bolts</b>" : ""]."
90+
examine_list += span_notice(examine_text)
9191

9292
/datum/component/simple_rotation/proc/RotateRight(datum/source, mob/user)
9393
SIGNAL_HANDLER

code/game/atoms.dm

+30-21
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@
666666
if(article)
667667
. = "[article] [src]"
668668
override[EXAMINE_POSITION_ARTICLE] = article
669+
669670
if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
670671
. = override.Join("")
671672

@@ -696,51 +697,59 @@
696697
* Produces a signal [COMSIG_PARENT_EXAMINE]
697698
*/
698699
/atom/proc/examine(mob/user)
699-
. = list("[get_examine_string(user, TRUE)].<hr>") //PARIAH EDIT CHANGE
700+
. = list("[get_examine_string(user, TRUE)].") //PARIAH EDIT CHANGE
701+
. += get_name_chaser(user)
702+
703+
if(desc)
704+
. += desc
705+
706+
. += "<hr>"
707+
708+
var/place_linebreak = FALSE
700709
if(SScodex.get_codex_entry(get_codex_value(user)))
701-
. += "<span class='notice'>The codex has <b><a href='?src=\ref[SScodex];show_examined_info=\ref[src];show_to=\ref[user]'>relevant information</a></b> available.</span><br>"
710+
. += "<span class='obviousnotice'>The codex has <b><a href='?src=\ref[SScodex];show_examined_info=\ref[src];show_to=\ref[user]'>relevant information</a></b> available.</span>"
711+
place_linebreak = TRUE
702712

703713
if(isitem(src) && length(slapcraft_examine_hints_for_type(type)))
704-
. += "<span class='notice'><b><a href='?src=\ref[user.client];show_slapcraft_hints=[type];'>You could craft [(length(slapcraft_examine_hints_for_type(type)) > 1) ? "several things" : "something"] with it.</a><b></span>"
714+
. += "<span class='obviousnotice'><b><a href='?src=\ref[user.client];show_slapcraft_hints=[type];'>You could craft [(length(slapcraft_examine_hints_for_type(type)) > 1) ? "several things" : "something"] with it.</a><b></span>"
715+
place_linebreak = TRUE
705716

706-
. += get_name_chaser(user)
707-
if(desc)
708-
. += desc
717+
if(place_linebreak)
718+
. += ""
709719

710720
if(z && user.z && user.z != z)
711721
var/diff = abs(user.z - z)
712722
. += span_notice("<b>[p_theyre(TRUE)] [diff] level\s below you.</b>")
713723

714724
if(custom_materials)
715-
. += "<hr>" //PARIAH EDIT ADDITION
716725
var/list/materials_list = list()
717726
for(var/datum/material/current_material as anything in custom_materials)
718727
materials_list += "[current_material.name]"
719-
. += "It is made out of [english_list(materials_list)]."
728+
. += span_notice("It is made out of [english_list(materials_list)].")
720729

721730
if(reagents)
722-
. += "<hr>" //PARIAH EDIT ADDITION
723731
if(reagents.flags & TRANSPARENT)
724-
. += "It contains:"
725-
if(length(reagents.reagent_list))
732+
if(!length(reagents.reagent_list))
733+
. += span_alert("It looks empty.")
734+
else
726735
if(user.can_see_reagents()) //Show each individual reagent
736+
. += span_notice("You see the following reagents:")
727737
for(var/datum/reagent/current_reagent as anything in reagents.reagent_list)
728-
. += "[round(current_reagent.volume, 0.01)] units of [current_reagent.name]"
738+
. += span_notice("* [round(current_reagent.volume, 0.01)] units of [current_reagent.name].")
739+
729740
if(reagents.is_reacting)
730-
. += span_warning("It is currently reacting!")
741+
. += span_alert("A chemical reaction is taking place.")
742+
731743
. += span_notice("The solution's temperature is [reagents.chem_temp]K.")
744+
732745
else //Otherwise, just show the total volume
733-
var/total_volume = 0
734-
for(var/datum/reagent/current_reagent as anything in reagents.reagent_list)
735-
total_volume += current_reagent.volume
736-
. += "[total_volume] units of various reagents"
737-
else
738-
. += "Nothing."
746+
. += span_notice("It looks about [reagents.total_volume / reagents.maximum_volume * 100]% full.")
747+
739748
else if(reagents.flags & AMOUNT_VISIBLE)
740749
if(reagents.total_volume)
741-
. += span_notice("It has [reagents.total_volume] unit\s left.")
750+
. += span_notice("It looks about [reagents.total_volume / reagents.maximum_volume * 100]% full.")
742751
else
743-
. += span_danger("It's empty.")
752+
. += span_alert("It looks empty.")
744753

745754
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
746755

code/game/machinery/Sleeper.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
open_machine()
9696

9797

98-
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
98+
/obj/machinery/sleeper/MouseDroppedOn(mob/target, mob/user)
9999
if(HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !ISADVANCEDTOOLUSER(user))
100100
return
101101

code/game/machinery/_machinery.dm

+7-5
Original file line numberDiff line numberDiff line change
@@ -982,18 +982,20 @@ GLOBAL_REAL_VAR(machinery_default_armor) = list()
982982
/obj/machinery/examine(mob/user)
983983
. = ..()
984984
if(machine_stat & BROKEN)
985-
. += span_notice("It looks broken and non-functional.")
985+
. += span_alert("It looks broken, it likely will not operate.")
986+
986987
if(!(resistance_flags & INDESTRUCTIBLE))
987988
if(resistance_flags & ON_FIRE)
988-
. += span_warning("It's on fire!")
989+
. += span_alert("FIRE!!")
990+
989991
var/healthpercent = (atom_integrity/max_integrity) * 100
990992
switch(healthpercent)
991993
if(50 to 99)
992-
. += "It looks slightly damaged."
994+
. += span_notice("It looks slightly damaged.")
993995
if(25 to 50)
994-
. += "It appears heavily damaged."
996+
. += span_alert("It appears heavily damaged.")
995997
if(0 to 25)
996-
. += span_warning("It's falling apart!")
998+
. += span_alert("It appears to be barely in one piece.")
997999

9981000
/obj/machinery/examine_more(mob/user)
9991001
. = ..()

code/game/machinery/autolathe.dm

+3-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@
312312
. += ..()
313313
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
314314
if(in_range(user, src) || isobserver(user))
315-
. += span_notice("The status display reads: Storing up to <b>[materials.max_amount]</b> material units.<br>Material consumption at <b>[creation_efficiency*100]%</b>.")
315+
. += span_notice("The status display reads:")
316+
. += span_notice("[FOURSPACES]Storing up to <b>[materials.max_amount]</b> material units.")
317+
. += span_notice("[FOURSPACES]Material consumption at <b>[creation_efficiency*100]%</b>.")
316318

317319
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
318320
if(length(D.make_reagents))

0 commit comments

Comments
 (0)