mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Merge remote-tracking branch 'upstream/master' into diagonal-movement
This commit is contained in:
@@ -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()]"
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user