Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into parry
Browse files Browse the repository at this point in the history
  • Loading branch information
NPC1314 committed Dec 11, 2024
2 parents a323de6 + da89b55 commit 9ed479b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
4 changes: 2 additions & 2 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
if(H.gender == FEMALE && J.f_title)
used_title = J.f_title
if(!used_title)
used_title = "unknown"
used_title = "Unknown"
known_people[H.real_name]["FJOB"] = used_title
known_people[H.real_name]["FGENDER"] = H.gender
known_people[H.real_name]["FAGE"] = H.age
Expand All @@ -151,7 +151,7 @@
if(H.gender == FEMALE && J.f_title)
used_title = J.f_title
if(!used_title)
used_title = "unknown"
used_title = "Unknown"
M.known_people[H.real_name]["FJOB"] = used_title
M.known_people[H.real_name]["FGENDER"] = H.gender
M.known_people[H.real_name]["FAGE"] = H.age
Expand Down
7 changes: 4 additions & 3 deletions code/game/objects/items/rogueitems/coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
pixel_y = rand(-5, 5)
if(isturf(T) && quantity > 1)
for(var/i in 2 to quantity) // exclude the first coin
var/obj/item/roguecoin/new_coin = new type(T)
var/obj/item/roguecoin/new_coin = new type
new_coin.forceMove(T)
new_coin.set_quantity(1) // prevent exploits with coin piles
new_coin.pixel_x = rand(-8, 8)
new_coin.pixel_y = rand(-5, 5)
Expand Down Expand Up @@ -73,7 +74,7 @@
if(user)
if(user.get_inactive_held_item() != G && !isturf(G.loc))
return

var/amt_to_merge = min(G.quantity, MAX_COIN_STACK_SIZE - quantity)
if(amt_to_merge <= 0)
return
Expand Down Expand Up @@ -131,7 +132,7 @@
drop_sound = 'sound/foley/coins1.ogg'
else
drop_sound = 'sound/foley/coinphy (1).ogg'

if(quantity == 1)
name = initial(name)
desc = initial(desc)
Expand Down
4 changes: 2 additions & 2 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
if(!ignore_walls) //these sounds don't carry through walls
listeners = listeners & hearers(maxdistance,turf_source)

if(above_turf && istransparentturf(above_turf))
if(above_turf)
listeners += hearers(maxdistance,above_turf)

if(below_turf && istransparentturf(turf_source))
if(below_turf)
listeners += hearers(maxdistance,below_turf)

else
Expand Down
11 changes: 11 additions & 0 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -940,3 +940,14 @@
///Can the mob see reagents inside of containers?
/mob/proc/can_see_reagents()
return stat == DEAD || has_unlimited_silicon_privilege //Dead guys and silicons can always see reagents

/mob/proc/get_role_title()
var/used_title
if(job)
var/datum/job/J = SSjob.GetJob(job)
if(!J)
return "Unknown"
used_title = J.title
if((gender == FEMALE) && J.f_title)
used_title = J.f_title
return used_title
15 changes: 12 additions & 3 deletions code/modules/roguetown/roguemachine/money.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,18 @@ GLOBAL_VAR(moneymaster)
new /obj/item/roguecoin/copper(T, budget)
if(!type_to_put || zenars_to_put < 1)
return
var/obj/item/roguecoin/G = new type_to_put(T, floor(zenars_to_put))
if(user)
user.put_in_hands(G)

var/stacks = CEILING(zenars_to_put / 20, 1)
for(var/i in 1 to stacks)
var/zenar_value = min(floor(zenars_to_put), 20)
var/obj/item/roguecoin/G = new type_to_put(T, zenar_value)
zenars_to_put -= zenar_value
G.pixel_y = rand(-4, 4)
G.pixel_x = rand(-4, 4)

if(user)
user.put_in_hands(G)

playsound(T, 'sound/misc/coindispense.ogg', 100, FALSE, -1)
/*
/obj/structure/roguemachine/money/attack_right(mob/user)
Expand Down
10 changes: 5 additions & 5 deletions code/modules/roguetown/roguemachine/titan.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(laws_of_the_land, initialize_laws_of_the_land())
return
newtax = CLAMP(newtax, 1, 99)
SStreasury.tax_value = newtax / 100
priority_announce("The new tax in Rockhill shall be [newtax] percent.", "The Generous Lord Decrees", 'sound/misc/alert.ogg', "Captain")
priority_announce("The new tax in Rockhill shall be [newtax] percent.", "The Generous [user.get_role_title()] Decrees", 'sound/misc/alert.ogg', "Captain")

/obj/structure/roguemachine/titan/proc/give_job_popup(mob/living/carbon/human/user)
if(!Adjacent(user))
Expand All @@ -225,7 +225,7 @@ GLOBAL_LIST_INIT(laws_of_the_land, initialize_laws_of_the_land())
if(isnull(victim) || !Adjacent(user))
return

var/list/possible_positions = GLOB.court_positions + GLOB.garrison_positions + GLOB.church_positions + GLOB.towner_positions + GLOB.peasant_positions + GLOB.apprentices_positions + GLOB.allmig_positions - "King"
var/list/possible_positions = GLOB.court_positions + GLOB.garrison_positions + GLOB.church_positions + GLOB.towner_positions + GLOB.peasant_positions + GLOB.apprentices_positions + GLOB.allmig_positions
var/new_pos = input(user, "Select their new position", src, null) as anything in possible_positions

if(isnull(new_pos) || !Adjacent(user))
Expand All @@ -236,7 +236,7 @@ GLOBAL_LIST_INIT(laws_of_the_land, initialize_laws_of_the_land())
if(!SScommunications.can_announce(user))
return

priority_announce("Henceforth, the vassal known as [victim.real_name] shall have the title of [new_pos].", "The King Decrees", 'sound/misc/alert.ogg', "Captain")
priority_announce("Henceforth, the vassal known as [victim.real_name] shall have the title of [new_pos].", "The [user.get_role_title()] Decrees", 'sound/misc/alert.ogg', "Captain")

/obj/structure/roguemachine/titan/proc/make_announcement(mob/living/user, raw_message)
if(!SScommunications.can_announce(user))
Expand Down Expand Up @@ -290,7 +290,7 @@ GLOBAL_LIST_INIT(laws_of_the_land, initialize_laws_of_the_land())
return
if(raw_message in GLOB.outlawed_players)
GLOB.outlawed_players -= raw_message
priority_announce("[raw_message] is no longer an outlaw in Rockhill lands.", "The King Decrees", 'sound/misc/alert.ogg', "Captain")
priority_announce("[raw_message] is no longer an outlaw in Rockhill lands.", "The [user.get_role_title()] Decrees", 'sound/misc/alert.ogg', "Captain")
return FALSE
var/found = FALSE
for(var/mob/living/carbon/human/H in GLOB.player_list)
Expand All @@ -299,7 +299,7 @@ GLOBAL_LIST_INIT(laws_of_the_land, initialize_laws_of_the_land())
if(!found)
return FALSE
GLOB.outlawed_players += raw_message
priority_announce("[raw_message] has been declared an outlaw and must be captured or slain.", "The King Decrees", 'sound/misc/alert.ogg', "Captain")
priority_announce("[raw_message] has been declared an outlaw and must be captured or slain.", "The [user.get_role_title()] Decrees", 'sound/misc/alert.ogg', "Captain")

/obj/structure/roguemachine/titan/proc/make_law(mob/living/user, raw_message)
if(!SScommunications.can_announce(user))
Expand Down

0 comments on commit 9ed479b

Please sign in to comment.