Merge branch 'master' into departmentalclothes

This commit is contained in:
faaaay
2021-07-24 16:31:47 +01:00
committed by GitHub
22 changed files with 198 additions and 41 deletions
+1
View File
@@ -53,3 +53,4 @@
#define JOB_UNAVAILABLE_PLAYTIME 3
#define JOB_UNAVAILABLE_ACCOUNTAGE 4
#define JOB_UNAVAILABLE_SLOTFULL 5
#define JOB_UNAVAILABLE_WHITELIST 6
+21
View File
@@ -1130,6 +1130,27 @@ B --><-- A
if (target)
return target
/proc/get_safe_random_station_turf_nochasm() //same method as above but with chasm detection
for (var/i in 1 to 5)
var/list/L = get_area_turfs(pick(GLOB.the_station_areas))
var/turf/target
while (L.len && !target)
var/I = rand(1, L.len)
var/turf/T = L[I]
if(!T.density)
var/clear = TRUE
for(var/obj/O in T)
if(O.density)
clear = FALSE
break
if(ischasm(T)) //stop right there criminal scum
clear = FALSE
if(clear)
target = T
if (!target)
L.Cut(I,I+1)
if (target)
return target
/proc/get_closest_atom(type, list, source)
var/closest_atom
@@ -297,7 +297,7 @@
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 2
chaos_min = 3.0
chaos_min = 1.2
/datum/dynamic_ruleset/event/anomaly_flux
name = "Anomaly: Hyper-Energetic Flux"
+4
View File
@@ -227,6 +227,10 @@
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
if(istype(A, /obj/item/beacon))
continue // don't teleport beacons because that's just insanely stupid
if(isliving(A))
var/turf/L = get_safe_random_station_turf_nochasm() //Safe and cuddly.
do_teleport(A, L, forceMove = TRUE, channel = TELEPORT_CHANNEL_BLUESPACE)
continue
if(A.anchored)
continue
+20 -14
View File
@@ -222,17 +222,6 @@
framed_offset_x = 5
framed_offset_y = 6
/obj/item/canvas/twentyfour_twentyfour
name = "ai universal standard canvas"
desc = "Besides being very large, the AI can accept these as a display from their internal database after you've hung it up."
icon_state = "24x24"
width = 24
height = 24
pixel_x = 2
pixel_y = 1
framed_offset_x = 4
framed_offset_y = 5
/obj/item/wallframe/painting
name = "painting frame"
desc = "The perfect showcase for your favorite deathtrap memories."
@@ -284,9 +273,26 @@
if(persistence_id)
. += "<span class='notice'>Any painting placed here will be archived at the end of the shift.</span>"
if(current_canvas)
current_canvas.ui_interact(user)
ui_interact(user, state = GLOB.physical_obscured_state)
. += "<span class='notice'>Use wirecutters to remove the painting.</span>"
//Hyperstation UI hotwire code ahead. No, I'm not particularly proud of this but if it works, it works.
/obj/structure/sign/painting/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "canvas", name, current_canvas.ui_x, current_canvas.ui_y, master_ui, state)
ui.set_autoupdate(FALSE)
ui.open()
/obj/structure/sign/painting/ui_data(mob/user)
. = ..()
.["grid"] = current_canvas.grid
.["name"] = current_canvas.painting_name
.["finalized"] = current_canvas.finalized
//End of hotwire code
/obj/structure/sign/painting/wirecutter_act(mob/living/user, obj/item/I)
. = ..()
if(current_canvas)
@@ -319,9 +325,9 @@
/obj/structure/sign/painting/update_icon_state()
// icon_state = "[base_icon_state]-[current_canvas?.generated_icon ? "overlay" : "empty"]"
if(current_canvas?.generated_icon)
icon_state = "frame-null"
else
icon_state = "frame-empty"
//else
// icon_state = null // or "frame-empty"
return ..()
/obj/structure/sign/painting/update_overlays()
+5 -2
View File
@@ -199,8 +199,11 @@
body += "<A href='?_src_=holder;[HrefToken()];tdomeadmin=[REF(M)]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeobserve=[REF(M)]'>Thunderdome Observer</A> | "
body += "<A href='?_src_=holder;[HrefToken()];makementor=[M.ckey]'>Make mentor</A> | "
body += "<A href='?_src_=holder;[HrefToken()];removementor=[M.ckey]'>Remove mentor</A>"
body += "<A href='?_src_=holder;[HrefToken()];makeeligible=[REF(M)]'>Allow reentering round</A>"
body += "<A href='?_src_=holder;[HrefToken()];removementor=[M.ckey]'>Remove mentor</A> |"
body += "<A href='?_src_=holder;[HrefToken()];makeeligible=[REF(M)]'>Allow reentering round</A> |"
body += "<A href='?_src_=holder;[HrefToken()];sillyroles=[M.ckey]'>Toggle Silly Roles</A> |"
body += "<A href='?_src_=holder;[HrefToken()];roleplayroles=[M.ckey]'>Toggle Roleplay Roles</A> |"
body += "<A href='?_src_=holder;[HrefToken()];importantroles=[M.ckey]'>Toggle Important Roles</A> |"
body += "<br>"
body += "</body></html>"
+62 -1
View File
@@ -22,6 +22,16 @@
if(!CheckAdminHref(href, href_list))
return
if(href_list["sillyroles"]) //toggle, clown and mime.
togglesilly(href_list["sillyroles"])
if(href_list["roleplayroles"]) //toggle, roleplay jobs
toggleroleplay(href_list["roleplayroles"])
if(href_list["importantroles"]) //toggle, roleplay jobs
toggleimportant(href_list["importantroles"])
if(href_list["makementor"])
makeMentor(href_list["makementor"])
else if(href_list["removementor"])
@@ -1359,7 +1369,7 @@
else if(href_list["f_secret"])
return HandleFSecret()
//Dynamic mode
else if(href_list["f_dynamic_roundstart"])
if(!check_rights(R_ADMIN))
@@ -2991,3 +3001,54 @@
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
to_chat(usr, "<span class='adminnotice'>Mentor removed.</span>")
/datum/admins/proc/togglesilly(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(!C)
return
C.prefs.sillyroles = !C.prefs.sillyroles
if(C.prefs.sillyroles)
to_chat(usr, "<span class='adminnotice'>Silly roles have been allowed.</span>")
else
to_chat(usr, "<span class='adminnotice'>Silly roles have been disabled.</span>")
C.prefs.save_preferences()
/datum/admins/proc/toggleroleplay(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(!C)
return
C.prefs.roleplayroles = !C.prefs.roleplayroles
if(C.prefs.roleplayroles)
to_chat(usr, "<span class='adminnotice'>Roleplay roles have been allowed.</span>")
else
to_chat(usr, "<span class='adminnotice'>Roleplay roles have been disabled.</span>")
C.prefs.save_preferences()
/datum/admins/proc/toggleimportant(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(!C)
return
C.prefs.importantroles = !C.prefs.importantroles
if(C.prefs.importantroles)
to_chat(usr, "<span class='adminnotice'>Important roles have been allowed.</span>")
else
to_chat(usr, "<span class='adminnotice'>Important roles have been disabled.</span>")
C.prefs.save_preferences()
@@ -292,8 +292,8 @@
S.burnmod *= 0.5
S.coldmod *= 0.5
if(20)
//Free wizard!
user.mind.make_Wizard()
//Gives the roller a healing staff!
new /obj/item/gun/magic/staff/healing(drop_location())
/datum/outfit/butler
+5 -1
View File
@@ -96,10 +96,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/eye_color = "000" //Eye color
var/wing_color = "fff" //Wing color
//H13
//HS13
var/body_size = 100 //Body Size in percent
var/can_get_preg = 0 //if they can get preggers
//HS13 jobs
var/sillyroles = FALSE //for clown and mime
var/roleplayroles = FALSE //for the roleplay roles
var/importantroles = FALSE //for things that define as important.
var/datum/species/pref_species = new /datum/species/human() //Mutant race
var/list/features = list("mcolor" = "FFF",
@@ -141,6 +141,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Hyper code
S["noncon"] >> noncon
S["sillyroles"] >> sillyroles
S["roleplayroles"] >> roleplayroles
S["importantroles"] >> importantroles
//try to fix any outdated data if necessfary
if(needs_update >= 0)
@@ -152,6 +155,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
UI_style = sanitize_inlist(UI_style, GLOB.available_ui_styles, GLOB.available_ui_styles[1])
hotkeys = sanitize_integer(hotkeys, 0, 1, initial(hotkeys))
autocorrect = sanitize_integer(autocorrect, 0, 1, initial(autocorrect))
sillyroles = sanitize_integer(sillyroles, 0, 1, initial(sillyroles))
roleplayroles = sanitize_integer(roleplayroles, 0, 1, initial(roleplayroles))
importantroles = sanitize_integer(importantroles, 0, 1, initial(importantroles))
chat_on_map = sanitize_integer(chat_on_map, 0, 1, initial(chat_on_map))
radiosounds = sanitize_integer(radiosounds, 0, 1, initial(radiosounds))
max_chat_length = sanitize_integer(max_chat_length, 1, CHAT_MESSAGE_MAX_LENGTH, initial(max_chat_length))
@@ -212,6 +218,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["hotkeys"], hotkeys)
WRITE_FILE(S["chat_on_map"], chat_on_map)
WRITE_FILE(S["autocorrect"], autocorrect)
WRITE_FILE(S["sillyroles"], sillyroles)
WRITE_FILE(S["roleplayroles"], roleplayroles)
WRITE_FILE(S["importantroles"], importantroles)
WRITE_FILE(S["radiosounds"], radiosounds)
WRITE_FILE(S["max_chat_length"], max_chat_length)
WRITE_FILE(S["see_chat_non_mob"], see_chat_non_mob)
+3
View File
@@ -17,6 +17,8 @@ Clown
access = list(ACCESS_THEATRE)
minimal_access = list(ACCESS_THEATRE)
whitelist_type = "silly"
/datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M)
..()
H.apply_pref_name("clown", M.client)
@@ -81,6 +83,7 @@ Mime
access = list(ACCESS_THEATRE)
minimal_access = list(ACCESS_THEATRE)
whitelist_type = "silly"
/datum/job/mime/after_spawn(mob/living/carbon/human/H, mob/M)
..()
+3
View File
@@ -63,6 +63,9 @@
var/override_roundstart_spawn = null //Where the player spawns at roundstart if defined
//whitelisting
var/whitelist_type = ""
//Only override this proc
//H is usually a human unless an /equip override transformed it
/datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE)
-1
View File
@@ -55,7 +55,6 @@ GLOBAL_LIST_INIT(security_positions, list(
"Security Officer",
"Rookie"))
GLOBAL_LIST_INIT(nonhuman_positions, list(
"AI",
"Cyborg",
@@ -318,6 +318,8 @@
return "[jobtitle] is unavailable."
if(JOB_UNAVAILABLE_BANNED)
return "You are currently banned from [jobtitle]."
if(JOB_UNAVAILABLE_WHITELIST)
return "You are not whitelisted for [jobtitle]."
if(JOB_UNAVAILABLE_PLAYTIME)
return "You do not have enough relevant playtime for [jobtitle]."
if(JOB_UNAVAILABLE_ACCOUNTAGE)
@@ -341,6 +343,13 @@
return JOB_UNAVAILABLE_SLOTFULL
if(jobban_isbanned(src,rank))
return JOB_UNAVAILABLE_BANNED
if(job.whitelist_type) //whitelisting
if(job.whitelist_type == "roleplay" && !client.prefs.roleplayroles)
return JOB_UNAVAILABLE_WHITELIST
if(job.whitelist_type == "important" && !client.prefs.importantroles)
return JOB_UNAVAILABLE_WHITELIST
if(job.whitelist_type == "silly" && !client.prefs.sillyroles)
return JOB_UNAVAILABLE_WHITELIST
if(QDELETED(src))
return JOB_UNAVAILABLE_GENERIC
if(!job.player_old_enough(client))