Merge remote-tracking branch 'upstream/master' into diagonal-movement

This commit is contained in:
Couls
2019-07-07 22:17:19 -04:00
89 changed files with 590 additions and 416 deletions
-1
View File
@@ -167,7 +167,6 @@ var/global/nologevent = 0
body += "<B>Is an AI</B> "
else if(ishuman(M))
body += {"<A href='?_src_=holder;makeai=[M.UID()]'>Make AI</A> |
<A href='?_src_=holder;makemask=[M.UID()]'>Make Mask</A> |
<A href='?_src_=holder;makerobot=[M.UID()]'>Make Robot</A> |
<A href='?_src_=holder;makealien=[M.UID()]'>Make Alien</A> |
<A href='?_src_=holder;makeslime=[M.UID()]'>Make Slime</A> |
@@ -81,7 +81,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
var/exp
var/ooccolor = "#b82e00"
var/be_special = list() //Special role selection
var/list/be_special = list() //Special role selection
var/UI_style = "Midnight"
var/nanoui_fancy = TRUE
var/toggles = TOGGLES_DEFAULT
@@ -2280,3 +2280,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
/datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves")
//Check if the user has ANY job selected.
/datum/preferences/proc/check_any_job()
return(job_support_high || job_support_med || job_support_low || job_medsci_high || job_medsci_med || job_medsci_low || job_engsec_high || job_engsec_med || job_engsec_low || job_karma_high || job_karma_med || job_karma_low)
+2
View File
@@ -319,6 +319,8 @@
else if(href_list["create"])
var/amount = (text2num(href_list["amount"]))
//Can't be outside these (if you change this keep a sane limit)
amount = Clamp(amount, 1, 10)
var/datum/design/D = locate(href_list["create"])
create_product(D, amount)
updateUsrDialog()
+1
View File
@@ -13,6 +13,7 @@
armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50)
allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe)
resistance_flags = FIRE_PROOF
hide_tail_by_species = list("Vox" , "Vulpkanin" , "Unathi" , "Tajaran")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/suit.dmi',
+12 -7
View File
@@ -1480,19 +1480,22 @@
if(usr != src)
return 0 //something is terribly wrong
if(incapacitated())
to_chat(src, "<span class='warning'>You can't write on the floor in your current state!</span>")
return
if(!bloody_hands)
verbs -= /mob/living/carbon/human/proc/bloody_doodle
if(src.gloves)
to_chat(src, "<span class='warning'>Your [src.gloves] are getting in the way.</span>")
if(gloves)
to_chat(src, "<span class='warning'>[gloves] are preventing you from writing anything down!</span>")
return
var/turf/simulated/T = src.loc
var/turf/simulated/T = loc
if(!istype(T)) //to prevent doodling out of mechs and lockers
to_chat(src, "<span class='warning'>You cannot reach the floor.</span>")
return
var/turf/origin = T
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
if(direction != "Here")
T = get_step(T,text2dir(direction))
@@ -1510,7 +1513,9 @@
var/max_length = bloody_hands * 30 //tweeter style
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
if(origin != loc)
to_chat(src, "<span class='notice'>Stay still while writing!</span>")
return
if(message)
var/used_blood_amount = round(length(message) / 30, 1)
bloody_hands = max(0, bloody_hands - used_blood_amount) //use up some blood
@@ -1518,7 +1523,8 @@
if(length(message) > max_length)
message += "-"
to_chat(src, "<span class='warning'>You ran out of blood to write with!</span>")
else
to_chat(src, "<span class='notice'>You daub '[message]' on [T] in shiny red lettering.</span>")
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
W.message = message
W.add_fingerprint(src)
@@ -1935,7 +1941,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
. += "---"
.["Set Species"] = "?_src_=vars;setspecies=[UID()]"
.["Make AI"] = "?_src_=vars;makeai=[UID()]"
.["Make Mask of Nar'sie"] = "?_src_=vars;makemask=[UID()]"
.["Make cyborg"] = "?_src_=vars;makerobot=[UID()]"
.["Make monkey"] = "?_src_=vars;makemonkey=[UID()]"
.["Make alien"] = "?_src_=vars;makealien=[UID()]"
+21
View File
@@ -638,5 +638,26 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
// Cast to 1/0
return !!(client.prefs.toggles & toggleflag)
// Used to make sure that a player has a valid job preference setup, used to knock players out of eligibility for anything if their prefs don't make sense.
// A "valid job preference setup" in this situation means at least having one job set to low, or not having "return to lobby" enabled
// Prevents "antag rolling" by setting antag prefs on, all jobs to never, and "return to lobby if preferences not availible"
// Doing so would previously allow you to roll for antag, then send you back to lobby if you didn't get an antag role
// This also does some admin notification and logging as well
/mob/proc/has_valid_preferences()
if(!client)
return FALSE //Not sure how this would get run without the mob having a client, but let's just be safe.
if(client.prefs.alternate_option != RETURN_TO_LOBBY)
return TRUE
// If they have antags enabled, they're potentially doing this on purpose instead of by accident. Notify admins if so.
var/has_antags = FALSE
if(client.prefs.be_special.len > 0)
has_antags = TRUE
if(!client.prefs.check_any_job())
to_chat(src, "<span class='danger'>You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences.</span>")
if(has_antags)
log_admin("[src.ckey] just got booted back to lobby with no jobs, but antags enabled.")
message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.")
return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well
return TRUE
#define isterrorspider(A) (istype((A), /mob/living/simple_animal/hostile/poison/terror_spider))