no relative pathing (#16234)

* the voices win in the end

* cleanup

* changelog

* secure.dm hates me

* make_exact_fit() in initialize instead of whatever was happening before
This commit is contained in:
harryob
2023-04-30 21:10:13 +00:00
committed by GitHub
parent ad29453d4a
commit 578bae6f6f
144 changed files with 9951 additions and 9675 deletions
File diff suppressed because it is too large Load Diff
@@ -912,7 +912,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if (ghostimage)
client.images -= ghostimage //remove ourself
mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
/mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
if(!client)
return 0
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
@@ -54,7 +54,7 @@
else
to_chat(src, "<span class ='notice'>You're already using that style.</span>")
mob/living/carbon/human/proc/change_monitor()
/mob/living/carbon/human/proc/change_monitor()
set name = "Change IPC Screen"
set desc = "Change the display on your screen."
set category = "Abilities"
@@ -1262,7 +1262,7 @@ mob/living/carbon/human/proc/change_monitor()
if(!istype(M))
to_chat(usr, SPAN_WARNING("You aren't allowed to rename \the [src]."))
return
if(usr == src)
to_chat(usr, SPAN_WARNING("You're a simple creature, you can't rename yourself!"))
return
@@ -182,12 +182,12 @@
darksight = 8
death_message = "chitters faintly before crumbling to the ground, their eyes dead and lifeless..."
halloss_message = "crumbles to the ground, too weak to continue fighting."
list/heat_discomfort_strings = list(
heat_discomfort_strings = list(
"Your blood feels like its boiling in the heat.",
"You feel uncomfortably warm.",
"Your carapace feels hot as the sun."
)
list/cold_discomfort_strings = list(
cold_discomfort_strings = list(
"You chitter in the cold.",
"You shiver suddenly.",
"Your carapace is ice to the touch."
+1 -1
View File
@@ -64,7 +64,7 @@ var/list/department_radio_keys = list(
var/list/channel_to_radio_key = new
proc/get_radio_key_from_channel(var/channel)
/proc/get_radio_key_from_channel(var/channel)
var/key = channel_to_radio_key[channel]
if(!key)
for(var/radio_key in department_radio_keys)
+139 -139
View File
@@ -47,157 +47,157 @@
var/atom/currentlyEating //what the worm is currently eating
var/eatingDuration = 0 //how long he's been eating it for
head
name = "space worm head"
icon_state = "spacewormhead0"
icon_living = "spacewormhead0"
icon_dead = "spacewormheaddead"
/mob/living/simple_animal/space_worm/Life()
..()
maxHealth = 20
health = 20
if(next && !(next in view(src,1)))
Detach()
melee_damage_lower = 10
melee_damage_upper = 15
attacktext = "bitten"
animate_movement = SLIDE_STEPS
New(var/location, var/segments = 6)
..()
var/mob/living/simple_animal/space_worm/current = src
for(var/i = 1 to segments)
var/mob/living/simple_animal/space_worm/newSegment = new /mob/living/simple_animal/space_worm(loc)
current.Attach(newSegment)
current = newSegment
update_icon()
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
icon_state = "spacewormhead[previous?1:0]"
if(previous)
set_dir(get_dir(previous,src))
else
icon_state = "spacewormheaddead"
Life()
..()
if(next && !(next in view(src,1)))
Detach()
if(stat == DEAD) //dead chunks fall off and die immediately
if(previous)
previous.Detach()
if(next)
Detach(1)
if(prob(stomachProcessProbability))
ProcessStomach()
update_icon()
return
Destroy() //if a chunk a destroyed, make a new worm out of the split halves
if(stat == DEAD) //dead chunks fall off and die immediately
if(previous)
previous.Detach()
return ..()
if(next)
Detach(1)
Move()
var/attachementNextPosition = loc
if(..())
if(previous)
previous.Move(attachementNextPosition)
update_icon()
if(prob(stomachProcessProbability))
ProcessStomach()
Collide(atom/obstacle)
. = ..()
if(currentlyEating != obstacle)
currentlyEating = obstacle
eatingDuration = 0
update_icon()
if(!AttemptToEat(obstacle))
eatingDuration++
else
currentlyEating = null
eatingDuration = 0
return
update_icon() //only for the sake of consistency with the other update icon procs
if(stat != DEAD)
if(previous) //midsection
icon_state = "spaceworm[get_dir(src,previous) | get_dir(src,next)]" //see 3 lines below
else //tail
icon_state = "spacewormtail"
set_dir(get_dir(src,next)) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
else
icon_state = "spacewormdead"
return
proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
var/turf/simulated/wall/W = target
if((!W.reinf_material && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
W.dismantle_wall()
return 1
else if(istype(target,/atom/movable))
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
var/atom/movable/objectOrMob = target
contents += objectOrMob
return 1
return 0
proc/Attach(var/mob/living/simple_animal/space_worm/attachement)
if(!attachement)
return
previous = attachement
attachement.next = src
return
proc/Detach(die = 0)
var/mob/living/simple_animal/space_worm/newHead = new /mob/living/simple_animal/space_worm/head(loc,0)
var/mob/living/simple_animal/space_worm/newHeadPrevious = previous
previous = null //so that no extra heads are spawned
newHead.Attach(newHeadPrevious)
if(die)
newHead.death()
qdel(src)
proc/ProcessStomach()
for(var/atom/movable/stomachContent in contents)
if(prob(digestionProbability))
if(istype(stomachContent,/obj/item/stack)) //converts to plasma, keeping the stack value
if(!istype(stomachContent,/obj/item/stack/material/phoron))
var/obj/item/stack/oldStack = stomachContent
new /obj/item/stack/material/phoron(src, oldStack.get_amount())
qdel(oldStack)
continue
else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class
var/obj/item/oldItem = stomachContent
new /obj/item/stack/material/phoron(src, oldItem.w_class)
qdel(oldItem)
continue
else
new /obj/item/stack/material/phoron(src, flatPlasmaValue) //just flat amount
qdel(stomachContent)
continue
/mob/living/simple_animal/space_worm/Destroy() //if a chunk a destroyed, make a new worm out of the split halves
if(previous)
previous.Detach()
return ..()
/mob/living/simple_animal/space_worm/Move()
var/attachementNextPosition = loc
if(..())
if(previous)
for(var/atom/movable/stomachContent in contents) //transfer it along the digestive tract
previous.contents += stomachContent
else
for(var/atom/movable/stomachContent in contents) //or poop it out
loc.contents += stomachContent
previous.Move(attachementNextPosition)
update_icon()
/mob/living/simple_animal/space_worm/Collide(atom/obstacle)
. = ..()
if(currentlyEating != obstacle)
currentlyEating = obstacle
eatingDuration = 0
if(!AttemptToEat(obstacle))
eatingDuration++
else
currentlyEating = null
eatingDuration = 0
/mob/living/simple_animal/space_worm/update_icon() //only for the sake of consistency with the other update icon procs
if(stat != DEAD)
if(previous) //midsection
icon_state = "spaceworm[get_dir(src,previous) | get_dir(src,next)]" //see 3 lines below
else //tail
icon_state = "spacewormtail"
set_dir(get_dir(src,next)) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
else
icon_state = "spacewormdead"
return
/mob/living/simple_animal/space_worm/proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
var/turf/simulated/wall/W = target
if((!W.reinf_material && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
W.dismantle_wall()
return 1
else if(istype(target,/atom/movable))
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
var/atom/movable/objectOrMob = target
contents += objectOrMob
return 1
return 0
/mob/living/simple_animal/space_worm/proc/Attach(var/mob/living/simple_animal/space_worm/attachement)
if(!attachement)
return
previous = attachement
attachement.next = src
return
/mob/living/simple_animal/space_worm/proc/Detach(die = 0)
var/mob/living/simple_animal/space_worm/newHead = new /mob/living/simple_animal/space_worm/head(loc,0)
var/mob/living/simple_animal/space_worm/newHeadPrevious = previous
previous = null //so that no extra heads are spawned
newHead.Attach(newHeadPrevious)
if(die)
newHead.death()
qdel(src)
/mob/living/simple_animal/space_worm/proc/ProcessStomach()
for(var/atom/movable/stomachContent in contents)
if(prob(digestionProbability))
if(istype(stomachContent,/obj/item/stack)) //converts to plasma, keeping the stack value
if(!istype(stomachContent,/obj/item/stack/material/phoron))
var/obj/item/stack/oldStack = stomachContent
new /obj/item/stack/material/phoron(src, oldStack.get_amount())
qdel(oldStack)
continue
else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class
var/obj/item/oldItem = stomachContent
new /obj/item/stack/material/phoron(src, oldItem.w_class)
qdel(oldItem)
continue
else
new /obj/item/stack/material/phoron(src, flatPlasmaValue) //just flat amount
qdel(stomachContent)
continue
if(previous)
for(var/atom/movable/stomachContent in contents) //transfer it along the digestive tract
previous.contents += stomachContent
else
for(var/atom/movable/stomachContent in contents) //or poop it out
loc.contents += stomachContent
return
/mob/living/simple_animal/space_worm/can_name(var/mob/living/M)
return FALSE
/mob/living/simple_animal/space_worm/head
name = "space worm head"
icon_state = "spacewormhead0"
icon_living = "spacewormhead0"
icon_dead = "spacewormheaddead"
maxHealth = 20
health = 20
melee_damage_lower = 10
melee_damage_upper = 15
attacktext = "bitten"
animate_movement = SLIDE_STEPS
/mob/living/simple_animal/space_worm/head/New(var/location, var/segments = 6)
..()
var/mob/living/simple_animal/space_worm/current = src
for(var/i = 1 to segments)
var/mob/living/simple_animal/space_worm/newSegment = new /mob/living/simple_animal/space_worm(loc)
current.Attach(newSegment)
current = newSegment
/mob/living/simple_animal/space_worm/head/update_icon()
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
icon_state = "spacewormhead[previous?1:0]"
if(previous)
set_dir(get_dir(previous,src))
else
icon_state = "spacewormheaddead"
+6 -6
View File
@@ -200,27 +200,27 @@
return 1
return 0
proc/isdeaf(A)
/proc/isdeaf(A)
if(istype(A, /mob))
var/mob/M = A
return M.ear_deaf
return 0
proc/iscuffed(A)
/proc/iscuffed(A)
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/C = A
if(C.handcuffed)
return 1
return 0
proc/hassensorlevel(A, var/level)
/proc/hassensorlevel(A, var/level)
var/mob/living/carbon/human/H = A
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = H.w_uniform
return U.sensor_mode >= level
return 0
proc/getsensorlevel(A)
/proc/getsensorlevel(A)
var/mob/living/carbon/human/H = A
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = H.w_uniform
@@ -371,7 +371,7 @@ var/list/global/organ_rel_size = list(
p++
return t
proc/slur(phrase, strength = 100)
/proc/slur(phrase, strength = 100)
phrase = html_decode(phrase)
var/leng=length(phrase)
var/counter=length(phrase)
@@ -397,7 +397,7 @@ proc/slur(phrase, strength = 100)
newphrase+="[newletter]";counter-=1
return newphrase
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
/proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
/* Turn text into complete gibberish! */
var/returntext = ""
for(var/i = 1, i <= length(t), i++)