mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Fixes Dreamchecker warnings in the codebase (#17422)
This commit is contained in:
@@ -385,9 +385,9 @@
|
||||
switch(child)
|
||||
if(/datum)
|
||||
return null
|
||||
if(/obj || /mob)
|
||||
if(/obj, /mob)
|
||||
return /atom/movable
|
||||
if(/area || /turf)
|
||||
if(/area, /turf)
|
||||
return /atom
|
||||
else
|
||||
return /datum
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
var/race = synd_mob.dna.species.name
|
||||
|
||||
switch(race)
|
||||
if("Vox" || "Vox Armalis")
|
||||
if("Vox", "Vox Armalis")
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(synd_mob), slot_wear_mask)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/tank/internals/emergency_oxygen/double/vox(synd_mob), slot_l_hand)
|
||||
synd_mob.internal = synd_mob.l_hand
|
||||
|
||||
@@ -49,12 +49,11 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
charges -= 1
|
||||
switch(rand(1,2))
|
||||
if(1)
|
||||
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
|
||||
src.updateUsrDialog()
|
||||
spawn(rand(50,200)) selfdestruct()
|
||||
return
|
||||
if(prob(50))
|
||||
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
|
||||
updateUsrDialog()
|
||||
addtimer(CALLBACK(src, .proc/selfdestruct), rand(50, 200))
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/N = M
|
||||
var/objective = "Free Objective"
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
alpha = 255
|
||||
|
||||
switch(dir)
|
||||
if(SOUTH || NORTH)
|
||||
if(SOUTH, NORTH)
|
||||
initialize_directions = SOUTH|NORTH
|
||||
if(EAST || WEST)
|
||||
if(EAST, WEST)
|
||||
initialize_directions = EAST|WEST
|
||||
if(NORTHEAST)
|
||||
initialize_directions = NORTH|EAST
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
if(3) //X is Ying an abstract
|
||||
message = "THE [ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionobjects]"
|
||||
|
||||
if(40 to INFINITY) //Static laws
|
||||
else //Static laws
|
||||
message = uppertext(generate_static_ion_law())
|
||||
|
||||
return message
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/proc/Intoxicated(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
if(rand(1,3)==3)
|
||||
if(lowertext(newletter)=="o") newletter="u"
|
||||
if(lowertext(newletter)=="s") newletter="ch"
|
||||
if(lowertext(newletter)=="a") newletter="ah"
|
||||
if(lowertext(newletter)=="c") newletter="k"
|
||||
switch(rand(1,7))
|
||||
if(1,3,5,8) newletter="[lowertext(newletter)]"
|
||||
if(2,4,6,15) newletter="[uppertext(newletter)]"
|
||||
if(7) newletter+="'"
|
||||
//if(9,10) newletter="<b>[newletter]</b>"
|
||||
//if(11,12) newletter="<big>[newletter]</big>"
|
||||
//if(13) newletter="<small>[newletter]</small>"
|
||||
newphrase+="[newletter]";counter-=1
|
||||
return newphrase
|
||||
|
||||
/proc/NewStutter(phrase,stunned)
|
||||
phrase = html_decode(phrase)
|
||||
|
||||
var/list/split_phrase = splittext(phrase," ") //Split it up into words.
|
||||
|
||||
var/list/unstuttered_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
if(stunned) i = split_phrase.len
|
||||
for(,i > 0,i--) //Pick a few words to stutter on.
|
||||
|
||||
if(!unstuttered_words.len)
|
||||
break
|
||||
var/word = pick(unstuttered_words)
|
||||
unstuttered_words -= word //Remove from unstuttered words so we don't stutter it again.
|
||||
var/index = split_phrase.Find(word) //Find the word in the split phrase so we can replace it.
|
||||
|
||||
//Search for dipthongs (two letters that make one sound.)
|
||||
var/first_sound = copytext(word,1,3)
|
||||
var/first_letter = copytext(word,1,2)
|
||||
if(lowertext(first_sound) in list("ch","th","sh"))
|
||||
first_letter = first_sound
|
||||
|
||||
//Repeat the first letter to create a stutter.
|
||||
var/rnum = rand(1,3)
|
||||
switch(rnum)
|
||||
if(1)
|
||||
word = "[first_letter]-[word]"
|
||||
if(2)
|
||||
word = "[first_letter]-[first_letter]-[word]"
|
||||
if(3)
|
||||
word = "[first_letter]-[word]"
|
||||
|
||||
split_phrase[index] = word
|
||||
|
||||
return sanitize(jointext(split_phrase," "))
|
||||
|
||||
/proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||
|
||||
/proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance <= 0) return "..."
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list/words = splittext(original_msg," ")
|
||||
var/list/new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
for(var/w in words)
|
||||
if(prob(chance))
|
||||
new_words += "..."
|
||||
else
|
||||
new_words += w
|
||||
|
||||
new_msg = jointext(new_words," ")
|
||||
|
||||
return new_msg
|
||||
@@ -56,7 +56,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
switch(rand(100))
|
||||
if(0 to HALLUCINATE_MINOR_WEIGHT)
|
||||
severity = HALLUCINATE_MINOR
|
||||
if((HALLUCINATE_MINOR_WEIGHT + 1) to HALLUCINATE_MODERATE_WEIGHT)
|
||||
if((HALLUCINATE_MINOR_WEIGHT + 1) to (HALLUCINATE_MINOR_WEIGHT + HALLUCINATE_MODERATE_WEIGHT))
|
||||
severity = HALLUCINATE_MODERATE
|
||||
if((HALLUCINATE_MINOR_WEIGHT + HALLUCINATE_MODERATE_WEIGHT + 1) to 100)
|
||||
severity = HALLUCINATE_MAJOR
|
||||
|
||||
@@ -221,9 +221,8 @@
|
||||
if(1,3,5,8) newletter="[lowertext(newletter)]"
|
||||
if(2,4,6,15) newletter="[uppertext(newletter)]"
|
||||
if(7) newletter+=pick(slurletters)
|
||||
//if(9,10) newletter="<b>[newletter]</b>"
|
||||
//if(11,12) newletter="<big>[newletter]</big>"
|
||||
//if(13) newletter="<small>[newletter]</small>"
|
||||
else
|
||||
pass()
|
||||
newphrase+="[newletter]"
|
||||
counter-=1
|
||||
return newphrase
|
||||
@@ -658,6 +657,9 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
|
||||
newletter="nglu"
|
||||
if(5)
|
||||
newletter="glor"
|
||||
else
|
||||
pass()
|
||||
|
||||
newphrase+="[newletter]";counter-=1
|
||||
return newphrase
|
||||
|
||||
|
||||
@@ -335,10 +335,10 @@
|
||||
var/dir2 = 0
|
||||
var/dir3 = 0
|
||||
switch(direction)
|
||||
if(NORTH||SOUTH)
|
||||
if(NORTH, SOUTH)
|
||||
dir2 = 4
|
||||
dir3 = 8
|
||||
if(EAST||WEST)
|
||||
if(EAST, WEST)
|
||||
dir2 = 1
|
||||
dir3 = 2
|
||||
var/turf/T2 = T
|
||||
|
||||
@@ -1444,6 +1444,8 @@
|
||||
if(2)
|
||||
update_flags |= M.adjustToxLoss(1, FALSE)
|
||||
to_chat(M, "<span class='warning'>Your stomach grumbles painfully!</span>")
|
||||
else
|
||||
pass()
|
||||
else
|
||||
if(prob(60))
|
||||
M.adjust_nutrition(-remove_nutrition)
|
||||
|
||||
@@ -893,6 +893,8 @@
|
||||
if(2)
|
||||
update_flags |= M.adjustToxLoss(1, FALSE)
|
||||
to_chat(M, "<span class='warning'>Your stomach grumbles painfully!</span>")
|
||||
else
|
||||
pass()
|
||||
else
|
||||
if(prob(60))
|
||||
var/fat_to_burn = max(round(M.nutrition / 100, 1), 5)
|
||||
|
||||
@@ -1595,7 +1595,6 @@
|
||||
#include "code\modules\fish\fish_types.dm"
|
||||
#include "code\modules\fish\fishtank.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
#include "code\modules\food_and_drinks\food.dm"
|
||||
#include "code\modules\food_and_drinks\drinks\drinks.dm"
|
||||
#include "code\modules\food_and_drinks\drinks\bottler\bottler.dm"
|
||||
|
||||
Reference in New Issue
Block a user