Skip to content

Commit

Permalink
Merge branch 'master' into corgis-act-like-jojo-stands
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun-Soaked authored Jan 20, 2025
2 parents c06f45f + c9da768 commit 256b853
Show file tree
Hide file tree
Showing 46 changed files with 297 additions and 62 deletions.
6 changes: 5 additions & 1 deletion code/__DEFINES/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@
/// Used for debug messages to the server
#define debug2_world_log(msg) if (GLOB.Debug2) log_world("DEBUG: [msg]")
/// Adds a generic box around whatever message you're sending in chat. Really makes things stand out.
#define examine_block(str) ("<div class='examine_block'>" + str + "</div>")
#define boxed_message(str) ("<div class='boxed_message'>" + str + "</div>")
/// Adds a box around whatever message you're sending in chat. Can apply color and/or additional classes. Available colors: red, green, blue, purple. Use it like red_box
#define custom_boxed_message(classes, str) ("<div class='boxed_message " + classes + "'>" + str + "</div>")
/// Makes a fieldset with a neaty styled name. Can apply additional classes.
#define fieldset_block(title, content, classes) ("<fieldset class='fieldset " + classes + "'><legend class='fieldset_legend'>" + title + "</legend>" + content + "</fieldset>")
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ SUBSYSTEM_DEF(ticker)
m = pick(memetips)

if(m)
to_chat(world, span_purple(examine_block("<span class='oocplain'><b>Tip of the round: </b>[html_encode(m)]</span>")))
to_chat(world, span_purple(boxed_message("<span class='oocplain'><b>Tip of the round: </b>[html_encode(m)]</span>")))

/datum/controller/subsystem/ticker/proc/check_queue()
if(!queued_players.len)
Expand Down
7 changes: 4 additions & 3 deletions code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(vote)

var/log_string = replacetext(to_display, "\n", "\\n") // 'keep' the newlines, but dont actually print them as newlines
log_vote(log_string)
to_chat(world, span_infoplain(vote_font("\n[to_display]")))
to_chat(world, span_infoplain(vote_font("[to_display]")))

// Finally, doing any effects on vote completion
if (final_winner) // if no one voted, or the vote cannot be won, final_winner will be null
Expand Down Expand Up @@ -209,9 +209,9 @@ SUBSYSTEM_DEF(vote)
var/to_display = current_vote.initiate_vote(vote_initiator_name, duration)

log_vote(to_display)
to_chat(world, span_infoplain(vote_font("\n[span_bold(to_display)]\n\
to_chat(world, custom_boxed_message("purple_box center", span_infoplain(vote_font("[span_bold(to_display)]<br>\
Type <b>vote</b> or click <a href='byond://winset?command=vote'>here</a> to place your votes.\n\
You have [DisplayTimeText(duration)] to vote.")))
You have [DisplayTimeText(duration)] to vote."))))

// And now that it's going, give everyone a voter action
for(var/client/new_voter as anything in GLOB.clients)
Expand Down Expand Up @@ -344,6 +344,7 @@ SUBSYSTEM_DEF(vote)
/datum/action/vote
name = "Vote!"
button_icon_state = "vote"
background_icon_state = "bg_blink"

/datum/action/vote/IsAvailable()
return TRUE // Democracy is always available to the free people
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
msg += "[event.description]\n" // now we dont have to put \n in every moodlet description
else
msg += "<span class='nicegreen'>I don't have much of a reaction to anything right now.</span>\n"
to_chat(user, examine_block(msg))
to_chat(user, boxed_message(msg))

///Called after moodevent/s have been added/removed.
/datum/component/mood/proc/update_mood()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
var/datum/skill/the_skill = i
msg += "[initial(the_skill.name)] - [get_skill_level_name(the_skill)]\n"
msg += "</span>"
to_chat(user, examine_block(msg))
to_chat(user, boxed_message(msg))

/datum/mind/proc/set_death_time()
SIGNAL_HANDLER
Expand Down
9 changes: 5 additions & 4 deletions code/datums/votes/_vote_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@
* Return a formatted string of text to be displayed to everyone.
*/
/datum/vote/proc/get_result_text(list/all_winners, real_winner, list/non_voters)
var/title_text = ""
var/returned_text = ""
if(override_question)
returned_text += span_bold(override_question)
title_text += span_bold(override_question)
else
returned_text += span_bold("[capitalize(name)] Vote")
title_text += span_bold("[capitalize(name)] Vote")

returned_text += "\nWinner Selection: "
returned_text += "Winner Selection: "
switch(winner_method)
if(VOTE_WINNER_METHOD_NONE)
returned_text += "None"
Expand Down Expand Up @@ -215,7 +216,7 @@
returned_text += "\n"
returned_text += get_winner_text(all_winners, real_winner, non_voters)

return returned_text
return fieldset_block(title_text, returned_text, "boxed_message purple_box")

/**
* Gets the text that displays the winning options within the result text.
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)
wakeupmessage += " A sickly feeling along with the pangs of hunger greet you upon your awakening."
sleepyhead.set_nutrition(100)
sleepyhead.apply_effect(rand(3,10), EFFECT_DROWSY)
to_chat(sleepyhead, span_danger(examine_block(wakeupmessage)))
to_chat(sleepyhead, span_danger(boxed_message(wakeupmessage)))

/obj/machinery/cryopod/syndicate
icon_state = "sleeper_s-open"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@
/obj/effect/projectile/impact/pgf/rifle
name = "beam impact"
icon_state = "impact_pgf_rifle"

/obj/effect/projectile/impact/gauss
name = "gauss impact"
icon_state = "hc_gauss"
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@

/obj/effect/projectile/muzzle/pgf/rifle
icon_state = "muzzle_pgf_rifle"

/obj/effect/projectile/muzzle/gauss
icon_state = "muzzle_gauss_rifle"
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@

/obj/effect/projectile/tracer/pgf/rifle
icon_state = "beam_pgf_rifle"

/obj/effect/projectile/tracer/gauss
icon_state = "hc_gauss"
6 changes: 3 additions & 3 deletions code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ GENE SCANNER
SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE)

// we handled the last <br> so we don't need handholding
to_chat(user, examine_block(jointext(render_list, "")), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
to_chat(user, boxed_message(jointext(render_list, "")), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)

/proc/chemscan(mob/living/user, mob/living/M)
if(istype(M) && M.reagents)
Expand All @@ -399,7 +399,7 @@ GENE SCANNER
else
render_list += "<span class='notice ml-1'>Subject is not addicted to any reagents.</span>\n"
// we handled the last <br> so we don't need handholding
to_chat(user, examine_block(jointext(render_list, "")), type = MESSAGE_TYPE_INFO)
to_chat(user, boxed_message(jointext(render_list, "")), type = MESSAGE_TYPE_INFO)

/obj/item/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"
Expand Down Expand Up @@ -612,7 +612,7 @@ GENE SCANNER
\n<span class='notice'>Instability of the last fusion reaction: [round(cached_scan_results["fusion"], 0.01)].</span>"

// we let the join apply newlines so we do need handholding
to_chat(user, examine_block(jointext(render_list, "\n")), type = MESSAGE_TYPE_INFO)
to_chat(user, boxed_message(jointext(render_list, "\n")), type = MESSAGE_TYPE_INFO)
return TRUE

/obj/item/nanite_scanner
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/datum/asset/fuckywucky = get_asset_datum(/datum/asset/simple/fuckywucky)
fuckywucky.send(m)
SEND_SOUND(m, 'sound/misc/fuckywucky.ogg')
to_chat(m, span_purple(examine_block("<img src='[SSassets.transport.get_asset_url("fuckywucky.png")]'>")))
to_chat(m, span_purple(boxed_message("<img src='[SSassets.transport.get_asset_url("fuckywucky.png")]'>")))

addtimer(CALLBACK(src, PROC_REF(restore_fucky_wucky)), 600)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/advanced.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// of the currently selected path

/datum/buildmode_mode/advanced/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Set object type")] -> Right Mouse Button on buildmode button\n\
[span_bold("Copy object type")] -> Left Mouse Button + Alt on turf/obj\n\
[span_bold("Place objects")] -> Left Mouse Button on turf/obj\n\
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/area_edit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
return ..()

/datum/buildmode_mode/area_edit/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select corner")] -> Left Mouse Button on obj/turf/mob\n\
[span_bold("Paint area")] -> Left Mouse Button + Alt on turf/obj/mob\n\
[span_bold("Select area to paint")] -> Right Mouse Button on obj/turf/mob\n\
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/basic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
key = "basic"

/datum/buildmode_mode/basic/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Construct / Upgrade")] -> Left Mouse Button\n\
[span_bold("Deconstruct / Delete / Downgrade")] -> Right Mouse Button\n\
[span_bold("R-Window")] -> Left Mouse Button + Ctrl\n\
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/boom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var/flames = -1

/datum/buildmode_mode/boom/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Set explosion destructiveness")] -> Right Mouse Button on buildmode button\n\
[span_bold("Kaboom")] -> Mouse Button on obj\n\n\
[span_warning("NOTE:")] Using the \"Config/Launch Supplypod\" verb allows you to do this in an IC way (i.e., making a cruise missile come down from the sky and explode wherever you click!)"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/copy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return ..()

/datum/buildmode_mode/copy/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Spawn a copy of selected target")] -> Left Mouse Button on obj/turf/mob\n\
[span_bold("Select target to copy")] -> Right Mouse Button on obj/mob"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/delete.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
key = "delete"

/datum/buildmode_mode/delete/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Delete an object")] -> Left Mouse Button on obj/turf/mob\n\
[span_bold("Delete all objects of a type")] -> Right Mouse Button on obj/turf/mob"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/fill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var/atom/objholder = null

/datum/buildmode_mode/fill/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select corner")] -> Left Mouse Button on turf/obj/mob\n\
[span_bold("Delete region")] -> Left Mouse Button + Alt on turf/obj/mob\n\
[span_bold("Select object type")] -> Right Mouse Button on buildmode button"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/lightmaker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var/light_color = COLOR_WHITE

/datum/buildmode_mode/lightmaker/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Left Click")] -> Create light\n\
[span_bold("Right Click")] -> Delete light\n\
[span_bold("Right Click on Build Mode Button")] -> Change light properties"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return ..()

/datum/buildmode_mode/outfit/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select outfit to equip")] -> Right Mouse Button on buildmode button\n\
[span_bold("Equip the selected outfit")] -> Left Mouse Button on mob/living/carbon/human\n\
[span_bold("Strip and delete current outfit")] -> Right Mouse Button on mob/living/carbon/human"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/proccall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var/list/proc_args = null

/datum/buildmode_mode/proccall/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Choose procedure and arguments")] -> Right Mouse Button on buildmode button\n\
[span_bold("Apply procedure on object")] -> Left Mouse Button on machinery"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/relocate_to.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return ..()

/datum/buildmode_mode/relocate_to/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select")] -> Left Mouse Button on obj/mob\n\
[span_bold("Relocate")] -> Right Mouse Button on turf/obj/mob"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return ..()

/datum/buildmode_mode/throwing/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select")] -> Left Mouse Button on turf/obj/mob\n\
[span_bold("Throw")] -> Right Mouse Button on turf/obj/mob"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/tweakcomps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var/rating = null

/datum/buildmode_mode/tweakcomps/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Choose the rating of the components")] -> Right Mouse Button on buildmode button\n\
[span_bold("Sets the chosen rating of the components on the machinery")] -> Left Mouse Button on machinery"))
)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/variable_edit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
return ..()

/datum/buildmode_mode/varedit/show_help(client/target_client)
to_chat(target_client, span_purple(examine_block(
to_chat(target_client, span_purple(boxed_message(
"[span_bold("Select var(type) & value")] -> Right Mouse Button on buildmode button\n\
[span_bold("Set var(type) & value")] -> Left Mouse Button on turf/obj/mob\n\
[span_bold("Reset var's value")] -> Right Mouse Button on turf/obj/mob"))
Expand Down
18 changes: 18 additions & 0 deletions code/modules/cargo/packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@
contains = list(/obj/item/storage/box/ammo/ferropellet)
cost = 250

/datum/supply_pack/ammo/hcpellets
name = "High Conductivity Pellet Box Crate"
desc = "Contains a 48-round high conductivity pellet ammo box for gauss guns such as the Claris."
contains = list(/obj/item/storage/box/ammo/ferropellet/hc)
cost = 500

/* ferroslugs */

/datum/supply_pack/ammo/ferroslugboxcrate
Expand All @@ -432,10 +438,22 @@
contains = list(/obj/item/storage/box/ammo/ferroslug)
cost = 250

/datum/supply_pack/ammo/hcslugs
name = "High Conductivity Slug Box Crate"
desc = "Contains a twenty-round high conductivity slug for gauss guns such as the Model-H."
contains = list(/obj/item/storage/box/ammo/ferroslug/hc)
cost = 500

/* ferro lances */

/datum/supply_pack/ammo/ferrolanceboxcrate
name = "Ferromagnetic Lance Box Crate"
desc = "Contains a 48-round box for high-powered gauss guns such as the GAR assault rifle."
contains = list(/obj/item/storage/box/ammo/ferrolance)
cost = 250

/datum/supply_pack/ammo/ferrolanceboxcrate
name = "High Conductivity Lance Box Crate"
desc = "Contains a 48-round box for high-powered gauss guns such as the GAR assault rifle."
contains = list(/obj/item/storage/box/ammo/ferrolance/hc)
cost = 500
2 changes: 1 addition & 1 deletion code/modules/hydroponics/grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

if(reag_txt)
msg += reag_txt
to_chat(user, examine_block(msg))
to_chat(user, boxed_message(msg))
else
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/growninedible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
var/msg = "This is \a <span class='name'>[src]</span>\n"
if(seed)
msg += seed.get_analyzer_text()
to_chat(usr, examine_block(msg))
to_chat(usr, boxed_message(msg))
return

/obj/item/grown/proc/add_juice()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
msg += "Toxicity level: [span_notice("[toxic] / [HYDRO_MAX_TOXIC]")]\n"
msg += "Water level: [span_notice("[waterlevel] / [maxwater]")]\n"
msg += "Nutrition level: [span_notice("[reagents.total_volume] / [maxnutri]")]\n"
to_chat(user, examine_block(msg))
to_chat(user, boxed_message(msg))
return

else if(istype(O, /obj/item/cultivator))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/seeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
for(var/datum/plant_gene/reagent/Gene in genes)
msg += "\n<span class='notice'>- [Gene.get_name()] -</span>"
msg += "\n*---------*"
to_chat(user, examine_block(msg))
to_chat(user, boxed_message(msg))

return

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@
if(roundstart_quirks.len)
combined_msg += "<span class='notice'>You have these quirks: [get_trait_string()].</span>"

to_chat(src, examine_block(combined_msg.Join("\n")))
to_chat(src, boxed_message(combined_msg.Join("\n")))

/mob/living/carbon/human/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
if(damage_type != BRUTE && damage_type != BURN)
Expand Down
22 changes: 10 additions & 12 deletions code/modules/mob/living/simple_animal/bot/cleanbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,18 @@
mode = BOT_IDLE
return

if(target && (!path || path.len == 0) && (get_dist(src,target) > 1))
if(!path || path.len == 0) //No path, need a new one
//Try to produce a path to the target, and ignore airlocks to which it has access.
path = get_path_to(src, target, 30, id=access_card)
mode = BOT_MOVING
if(!path.len) //try to get closer if you can't reach the target directly
path = get_path_to(src, target, 30, id=access_card)
if(!path.len) //Do not chase a target we cannot reach.
add_to_ignore(target)
target = null
path = list()

if(path.len > 0 && target)
if(!bot_move(path[path.len]))
if(!bot_move(target))
add_to_ignore(target)
target = null
mode = BOT_IDLE
path = list()
return
mode = BOT_MOVING
else if(!bot_move(target))
target = null
mode = BOT_IDLE
return

oldloc = loc
Expand Down
Loading

0 comments on commit 256b853

Please sign in to comment.