mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into multi-instance-support
This commit is contained in:
@@ -97,7 +97,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
var/config_file = "config/config.toml"
|
||||
if(!fexists(config_file))
|
||||
config_file = "config/example/config.toml" // Fallback to example if user hasnt setup config properly
|
||||
var/raw_json = rustg_toml2json(config_file)
|
||||
var/raw_json = rustg_read_toml_file(config_file)
|
||||
raw_data = json_decode(raw_json)
|
||||
|
||||
// Now pass through all our stuff
|
||||
@@ -141,7 +141,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
DIRECT_OUTPUT(world.log, "Overrides found for this instance. Loading them.")
|
||||
var/start = start_watch() // Time tracking
|
||||
|
||||
var/raw_json = rustg_toml2json(override_file)
|
||||
var/raw_json = rustg_read_toml_file(override_file)
|
||||
raw_data = json_decode(raw_json)
|
||||
|
||||
// Now safely load our overrides.
|
||||
|
||||
@@ -408,12 +408,65 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(player.mind.assigned_role != player.mind.special_role)
|
||||
SSjobs.AssignRank(player, player.mind.assigned_role, FALSE)
|
||||
SSjobs.EquipRank(player, player.mind.assigned_role, FALSE)
|
||||
EquipCustomItems(player)
|
||||
equip_cuis(player)
|
||||
|
||||
if(captainless)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M))
|
||||
to_chat(M, "Captainship not forced on anyone.")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/equip_cuis(mob/living/carbon/human/H)
|
||||
if(!H.client)
|
||||
return // If they are spawning without a client (somehow), they *cant* have a CUI list
|
||||
for(var/datum/custom_user_item/cui in H.client.cui_entries)
|
||||
// Skip items with invalid character names
|
||||
if((cui.characer_name != H.real_name) && !cui.all_characters_allowed)
|
||||
continue
|
||||
|
||||
var/ok = FALSE
|
||||
|
||||
if(!cui.all_jobs_allowed)
|
||||
var/alt_blocked = FALSE
|
||||
if(H.mind.role_alt_title)
|
||||
if(!(H.mind.role_alt_title in cui.allowed_jobs))
|
||||
alt_blocked = TRUE
|
||||
if(!(H.mind.assigned_role in cui.allowed_jobs) || alt_blocked)
|
||||
continue
|
||||
|
||||
var/obj/item/I = new cui.object_typepath()
|
||||
var/name_override = cui.item_name_override
|
||||
var/desc_override = cui.item_desc_override
|
||||
|
||||
if(name_override)
|
||||
I.name = name_override
|
||||
if(desc_override)
|
||||
I.desc = desc_override
|
||||
|
||||
if(istype(H.back, /obj/item/storage)) // Try to place it in something on the mob's back
|
||||
var/obj/item/storage/S = H.back
|
||||
if(length(S.contents) < S.storage_slots)
|
||||
I.forceMove(H.back)
|
||||
ok = TRUE
|
||||
to_chat(H, "<span class='notice'>Your [I.name] has been added to your [H.back.name].</span>")
|
||||
|
||||
if(!ok)
|
||||
for(var/obj/item/storage/S in H.contents) // Try to place it in any item that can store stuff, on the mob.
|
||||
if(length(S.contents) < S.storage_slots)
|
||||
I.forceMove(S)
|
||||
ok = TRUE
|
||||
to_chat(H, "<span class='notice'>Your [I.name] has been added to your [S.name].</span>")
|
||||
break
|
||||
|
||||
if(!ok) // Finally, since everything else failed, place it on the ground
|
||||
var/turf/T = get_turf(H)
|
||||
if(T)
|
||||
I.forceMove(T)
|
||||
to_chat(H, "<span class='notice'>Your [I.name] is on the [T.name] below you.</span>")
|
||||
else
|
||||
to_chat(H, "<span class='notice'>Your [I.name] couldnt spawn anywhere on you or even on the floor below you. Please file a bug report.</span>")
|
||||
qdel(I)
|
||||
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/send_tip_of_the_round()
|
||||
var/m
|
||||
if(selected_tip)
|
||||
|
||||
@@ -266,8 +266,12 @@ SUBSYSTEM_DEF(vote)
|
||||
<a href='?src=[UID()];vote=open'>Click here or type vote to place your vote.</a>
|
||||
You have [GLOB.configuration.vote.vote_time / 10] seconds to vote.</font>"})
|
||||
switch(vote_type)
|
||||
if("crew transfer", "gamemode", "custom", "map")
|
||||
if("crew transfer", "gamemode", "custom")
|
||||
SEND_SOUND(world, sound('sound/ambience/alarm4.ogg'))
|
||||
if("map")
|
||||
SEND_SOUND(world, sound('sound/ambience/alarm4.ogg'))
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M.throw_alert("Map Vote", /obj/screen/alert/notify_mapvote, timeout_override = GLOB.configuration.vote.vote_time)
|
||||
if(mode == "gamemode" && SSticker.ticker_going)
|
||||
SSticker.ticker_going = FALSE
|
||||
to_chat(world, "<font color='red'><b>Round start has been delayed.</b></font>")
|
||||
|
||||
Reference in New Issue
Block a user