mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge branch 'master' of github.com:ParadiseSS13/Paradise into human_icons_tweak
This commit is contained in:
@@ -323,7 +323,7 @@ proc/checkhtml(var/t)
|
||||
//This proc strips html properly, but it's not lazy like the other procs.
|
||||
//This means that it doesn't just remove < and > and call it a day.
|
||||
//Also limit the size of the input, if specified.
|
||||
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
if(!input)
|
||||
return
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
@@ -345,10 +345,10 @@ proc/checkhtml(var/t)
|
||||
break
|
||||
if(max_length)
|
||||
input = copytext(input,1,max_length)
|
||||
return sanitize(input)
|
||||
return sanitize(input, allow_lines ? list("\t" = " ") : list("\n" = " ", "\t" = " "))
|
||||
|
||||
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||
return trim(strip_html_properly(input, max_length))
|
||||
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
return trim(strip_html_properly(input, max_length, allow_lines))
|
||||
|
||||
//Used in preferences' SetFlavorText and human's set_flavor verb
|
||||
//Previews a string of len or less length
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
var/has_been_rev = 0//Tracks if this mind has been a rev or not
|
||||
|
||||
var/miming = 0 // Mime's vow of silence
|
||||
var/datum/faction/faction //associated faction
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
var/datum/vampire/vampire //vampire holder
|
||||
|
||||
@@ -19,6 +19,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
|
||||
var/charge_max = 100 //recharge time in deciseconds if charge_type = "recharge" or starting charges if charge_type = "charges"
|
||||
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each decisecond if charge_type = "recharge" or -- each cast if charge_type = "charges"
|
||||
var/still_recharging_msg = "<span class='notice'>The spell is still recharging.</span>"
|
||||
|
||||
var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
|
||||
var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
|
||||
@@ -27,6 +28,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
var/clothes_req = 1 //see if it requires clothes
|
||||
var/stat_allowed = 0 //see if it requires being conscious/alive, need to set to 1 for ghostpells
|
||||
var/invocation = "HURP DURP" //what is uttered when the wizard casts the spell
|
||||
var/invocation_emote_self = null
|
||||
var/invocation_type = "none" //can be none, whisper and shout
|
||||
var/range = 7 //the range of the spell; outer radius for aoe spells
|
||||
var/message = "" //whatever it says to the guy affected by it
|
||||
@@ -74,7 +76,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
if(charge_counter < charge_max)
|
||||
user << "<span class='notice'>[name] is still recharging.</span>"
|
||||
user << still_recharging_msg
|
||||
return 0
|
||||
if("charges")
|
||||
if(!charge_counter)
|
||||
@@ -128,10 +130,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
user.whisper(invocation)
|
||||
else
|
||||
user.whisper(replacetext(invocation," ","`"))
|
||||
if("emote")
|
||||
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
|
||||
|
||||
/obj/effect/proc_holder/spell/New()
|
||||
..()
|
||||
|
||||
still_recharging_msg = "<span class='notice'>[name] is still recharging.</span>"
|
||||
charge_counter = charge_max
|
||||
|
||||
/obj/effect/proc_holder/spell/Destroy()
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall
|
||||
name = "Invisible wall"
|
||||
desc = "The mime's performance transmutates into physical reality."
|
||||
school = "mime"
|
||||
panel = "Mime"
|
||||
summon_type = list(/obj/effect/forcefield/mime)
|
||||
invocation_type = "emote"
|
||||
invocation_emote_self = "<span class='notice'>You form a wall in front of yourself.</span>"
|
||||
summon_lifespan = 300
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
range = 0
|
||||
|
||||
action_icon_state = "mime"
|
||||
action_background_icon_state = "bg_mime"
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall/Click()
|
||||
if(usr && usr.mind)
|
||||
if(!usr.mind.miming)
|
||||
usr << "<span class='notice'>You must dedicate yourself to silence first.</span>"
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> looks as if a wall is in front of them."
|
||||
else
|
||||
invocation_type ="none"
|
||||
..()
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mime/speak
|
||||
name = "Speech"
|
||||
desc = "Make or break a vow of silence."
|
||||
school = "mime"
|
||||
panel = "Mime"
|
||||
clothes_req = 0
|
||||
charge_max = 3000
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
action_icon_state = "mime"
|
||||
action_background_icon_state = "bg_mime"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mime/speak/Click()
|
||||
if(!usr)
|
||||
return
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(H.mind.miming)
|
||||
still_recharging_msg = "<span class='warning'>You can't break your vow of silence that fast!</span>"
|
||||
else
|
||||
still_recharging_msg = "<span class='warning'>You'll have to wait before you can give your vow of silence again!</span>"
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mime/speak/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
H.mind.miming=!H.mind.miming
|
||||
if(H.mind.miming)
|
||||
H << "<span class='notice'>You make a vow of silence.</span>"
|
||||
else
|
||||
H << "<span class='notice'>You break your vow of silence.</span>"
|
||||
@@ -518,6 +518,15 @@ var/list/uplink_items = list()
|
||||
/datum/uplink_item/stealthy_weapons
|
||||
category = "Stealthy and Inconspicuous Weapons"
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/martialarts
|
||||
name = "Martial Arts Scroll"
|
||||
desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \
|
||||
deflecting all ranged weapon fire, but you also refuse to use dishonorable ranged weaponry."
|
||||
reference = "SCS"
|
||||
item = /obj/item/weapon/sleeping_carp_scroll
|
||||
cost = 17
|
||||
excludefrom = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/edagger
|
||||
name = "Energy Dagger"
|
||||
desc = "A dagger made of energy that looks and functions as a pen when off."
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
|
||||
|
||||
if(!msg_sanitized)
|
||||
message = trim_strip_html_properly(message)
|
||||
message = trim_strip_html_properly(message, allow_lines = 1)
|
||||
message_title = html_encode(message_title)
|
||||
|
||||
Message(message, message_title, from)
|
||||
|
||||
@@ -17,7 +17,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
/area
|
||||
var/fire = null
|
||||
var/atmos = 1
|
||||
var/atmosalm = 0
|
||||
var/poweralm = 1
|
||||
var/party = null
|
||||
@@ -2402,12 +2401,17 @@ area/security/podbay
|
||||
|
||||
/area/awaymission/beach
|
||||
name = "Beach"
|
||||
icon_state = "null"
|
||||
icon_state = "beach"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg')
|
||||
|
||||
/area/awaymission/undersea
|
||||
name = "Undersea"
|
||||
icon_state = "undersea"
|
||||
|
||||
|
||||
////////////////////////AWAY AREAS///////////////////////////////////
|
||||
|
||||
/area/awaycontent
|
||||
@@ -2576,62 +2580,3 @@ var/list/the_station_areas = list (
|
||||
/area/turret_protected/ai,
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
/area/beach
|
||||
name = "Keelin's private beach"
|
||||
icon_state = "null"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
var/sound/mysound = null
|
||||
|
||||
New()
|
||||
..()
|
||||
var/sound/S = new/sound()
|
||||
mysound = S
|
||||
S.file = 'sound/ambience/shore.ogg'
|
||||
S.repeat = 1
|
||||
S.wait = 0
|
||||
S.channel = 123
|
||||
S.volume = 100
|
||||
S.priority = 255
|
||||
S.status = SOUND_UPDATE
|
||||
process()
|
||||
|
||||
Entered(atom/movable/Obj,atom/OldLoc)
|
||||
if(ismob(Obj))
|
||||
if(Obj:client)
|
||||
mysound.status = SOUND_UPDATE
|
||||
Obj << mysound
|
||||
return
|
||||
|
||||
Exited(atom/movable/Obj)
|
||||
if(ismob(Obj))
|
||||
if(Obj:client)
|
||||
mysound.status = SOUND_PAUSED | SOUND_UPDATE
|
||||
Obj << mysound
|
||||
|
||||
proc/process()
|
||||
//set background = 1
|
||||
|
||||
var/sound/S = null
|
||||
var/sound_delay = 0
|
||||
if(prob(25))
|
||||
S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100)
|
||||
sound_delay = rand(0, 50)
|
||||
|
||||
for(var/mob/living/carbon/human/H in src)
|
||||
// if(H.s_tone > -55) //ugh...nice/novel idea but please no.
|
||||
// H.s_tone--
|
||||
// H.update_body()
|
||||
if(H.client)
|
||||
mysound.status = SOUND_UPDATE
|
||||
H << mysound
|
||||
if(S)
|
||||
spawn(sound_delay)
|
||||
H << S
|
||||
|
||||
spawn(60) .()
|
||||
|
||||
|
||||
@@ -282,11 +282,10 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
|
||||
H.verbs += /client/proc/mimespeak
|
||||
H.verbs += /client/proc/mimewall
|
||||
H.mind.special_verbs += /client/proc/mimespeak
|
||||
H.mind.special_verbs += /client/proc/mimewall
|
||||
H.miming = 1
|
||||
if(H.mind)
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null))
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mime/speak(null))
|
||||
H.mind.miming = 1
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
|
||||
//TODO: put these somewhere else
|
||||
/client/proc/mimewall()
|
||||
set category = "Mime"
|
||||
set name = "Invisible wall"
|
||||
set desc = "Create an invisible wall on your location."
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapicated."
|
||||
return
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(!H.miming)
|
||||
usr << "You still haven't atoned for your speaking transgression. Wait."
|
||||
return
|
||||
H.verbs -= /client/proc/mimewall
|
||||
spawn(300)
|
||||
H.verbs += /client/proc/mimewall
|
||||
for (var/mob/V in viewers(H))
|
||||
if(V!=usr)
|
||||
V.show_message("[H] looks as if a wall is in front of them.", 3, "", 2)
|
||||
usr << "You form a wall in front of yourself."
|
||||
new /obj/effect/forcefield/mime(locate(usr.x,usr.y,usr.z))
|
||||
return
|
||||
|
||||
/client/proc/mimespeak()
|
||||
set category = "Mime"
|
||||
set name = "Speech"
|
||||
set desc = "Toggle your speech."
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(H.miming)
|
||||
H.miming = 0
|
||||
else
|
||||
H << "You'll have to wait if you want to atone for your sins."
|
||||
spawn(3000)
|
||||
H.miming = 1
|
||||
return
|
||||
|
||||
@@ -144,15 +144,15 @@
|
||||
/obj/item/weapon/disk/data/New()
|
||||
..()
|
||||
var/diskcolor = pick(0,1,2)
|
||||
src.icon_state = "datadisk[diskcolor]"
|
||||
icon_state = "datadisk[diskcolor]"
|
||||
|
||||
/obj/item/weapon/disk/data/attack_self(mob/user as mob)
|
||||
src.read_only = !src.read_only
|
||||
user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
|
||||
read_only = !read_only
|
||||
user << "You flip the write-protect tab to [read_only ? "protected" : "unprotected"]."
|
||||
|
||||
/obj/item/weapon/disk/data/examine(mob/user)
|
||||
..(user)
|
||||
user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]."
|
||||
user << "The write-protect tab is set to [read_only ? "protected" : "unprotected"]."
|
||||
|
||||
|
||||
//Health Tracker Implant
|
||||
@@ -162,24 +162,26 @@
|
||||
var/healthstring = ""
|
||||
|
||||
/obj/item/weapon/implant/health/proc/sensehealth()
|
||||
if (!src.implanted)
|
||||
if (!implanted)
|
||||
return "ERROR"
|
||||
else
|
||||
if(isliving(src.implanted))
|
||||
var/mob/living/L = src.implanted
|
||||
src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
|
||||
if (!src.healthstring)
|
||||
src.healthstring = "ERROR"
|
||||
return src.healthstring
|
||||
if(isliving(implanted))
|
||||
var/mob/living/L = implanted
|
||||
healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
|
||||
if (!healthstring)
|
||||
healthstring = "ERROR"
|
||||
return healthstring
|
||||
|
||||
/obj/machinery/clonepod/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/clonepod/attack_hand(mob/user as mob)
|
||||
if ((isnull(src.occupant)) || (stat & NOPOWER))
|
||||
if ((isnull(occupant)) || (stat & NOPOWER))
|
||||
if(mess)
|
||||
go_out()
|
||||
return
|
||||
if ((!isnull(src.occupant)) && (src.occupant.stat != 2))
|
||||
var/completion = (100 * ((src.occupant.health + 100) / (src.heal_level + 100)))
|
||||
if ((!isnull(occupant)) && (occupant.stat != 2))
|
||||
var/completion = (100 * ((occupant.health + 100) / (heal_level + 100)))
|
||||
user << "Current clone cycle is [round(completion)]% complete."
|
||||
return
|
||||
|
||||
@@ -210,16 +212,16 @@
|
||||
return 0
|
||||
|
||||
if(biomass >= CLONE_BIOMASS)
|
||||
src.biomass -= CLONE_BIOMASS
|
||||
biomass -= CLONE_BIOMASS
|
||||
else
|
||||
return 0
|
||||
|
||||
src.attempting = 1 //One at a time!!
|
||||
src.locked = 1
|
||||
attempting = 1 //One at a time!!
|
||||
locked = 1
|
||||
|
||||
src.eject_wait = 1
|
||||
eject_wait = 1
|
||||
spawn(30)
|
||||
src.eject_wait = 0
|
||||
eject_wait = 0
|
||||
|
||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
|
||||
occupant = H
|
||||
@@ -248,7 +250,7 @@
|
||||
ticker.mode.update_synd_icons_added()
|
||||
if (H.mind in ticker.mode.cult)
|
||||
ticker.mode.add_cult_viewpoint(H)
|
||||
ticker.mode.add_cultist(src.occupant.mind)
|
||||
ticker.mode.add_cultist(occupant.mind)
|
||||
ticker.mode.update_cult_icons_added() //So the icon actually appears
|
||||
if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted))
|
||||
ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears
|
||||
@@ -275,7 +277,7 @@
|
||||
H.dna.UpdateUI()
|
||||
|
||||
H.set_species(R.dna.species)
|
||||
H.sync_organ_dna(assimilate=1) // It's literally a fresh body as you can get, so all organs properly belong to it
|
||||
H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it
|
||||
H.UpdateAppearance()
|
||||
|
||||
H.update_body()
|
||||
@@ -285,54 +287,54 @@
|
||||
H.add_language(L.name)
|
||||
|
||||
H.suiciding = 0
|
||||
src.attempting = 0
|
||||
attempting = 0
|
||||
return 1
|
||||
|
||||
//Grow clones to maturity then kick them out. FREELOADERS
|
||||
/obj/machinery/clonepod/process()
|
||||
|
||||
if(stat & NOPOWER) //Autoeject if power is lost
|
||||
if (src.occupant)
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
if (occupant)
|
||||
locked = 0
|
||||
go_out()
|
||||
return
|
||||
|
||||
if((src.occupant) && (src.occupant.loc == src))
|
||||
if((src.occupant.stat == DEAD) || (src.occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
src.connected_message("Clone Rejected: Deceased.")
|
||||
if((occupant) && (occupant.loc == src))
|
||||
if((occupant.stat == DEAD) || (occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
|
||||
locked = 0
|
||||
go_out()
|
||||
connected_message("Clone Rejected: Deceased.")
|
||||
return
|
||||
|
||||
else if(src.occupant.cloneloss > (100 - src.heal_level))
|
||||
src.occupant.Paralyse(4)
|
||||
else if(occupant.cloneloss > (100 - heal_level))
|
||||
occupant.Paralyse(4)
|
||||
|
||||
//Slowly get that clone healed and finished.
|
||||
src.occupant.adjustCloneLoss(-((speed_coeff/2)))
|
||||
occupant.adjustCloneLoss(-((speed_coeff/2)))
|
||||
|
||||
//Premature clones may have brain damage.
|
||||
src.occupant.adjustBrainLoss(-((speed_coeff/20)*efficiency))
|
||||
occupant.adjustBrainLoss(-((speed_coeff/20)*efficiency))
|
||||
|
||||
//So clones don't die of oxyloss in a running pod.
|
||||
if (src.occupant.reagents.get_reagent_amount("salbutamol") < 5)
|
||||
src.occupant.reagents.add_reagent("salbutamol", 5)
|
||||
if (occupant.reagents.get_reagent_amount("salbutamol") < 5)
|
||||
occupant.reagents.add_reagent("salbutamol", 5)
|
||||
|
||||
//Also heal some oxyloss ourselves just in case!!
|
||||
src.occupant.adjustOxyLoss(-4)
|
||||
occupant.adjustOxyLoss(-4)
|
||||
|
||||
use_power(7500) //This might need tweaking.
|
||||
return
|
||||
|
||||
else if((src.occupant.cloneloss <= (100 - src.heal_level)) && (!src.eject_wait))
|
||||
src.connected_message("Cloning Process Complete.")
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
else if((occupant.cloneloss <= (100 - heal_level)) && (!eject_wait))
|
||||
connected_message("Cloning Process Complete.")
|
||||
locked = 0
|
||||
go_out()
|
||||
return
|
||||
|
||||
else if ((!src.occupant) || (src.occupant.loc != src))
|
||||
src.occupant = null
|
||||
if (src.locked)
|
||||
src.locked = 0
|
||||
else if ((!occupant) || (occupant.loc != src))
|
||||
occupant = null
|
||||
if (locked)
|
||||
locked = 0
|
||||
//use_power(200)
|
||||
return
|
||||
|
||||
@@ -356,16 +358,16 @@
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (!src.check_access(W))
|
||||
if (!check_access(W))
|
||||
user << "\red Access Denied."
|
||||
return
|
||||
if ((!src.locked) || (isnull(src.occupant)))
|
||||
if ((!locked) || (isnull(occupant)))
|
||||
return
|
||||
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
|
||||
if ((occupant.health < -20) && (occupant.stat != 2))
|
||||
user << "\red Access Refused."
|
||||
return
|
||||
else
|
||||
src.locked = 0
|
||||
locked = 0
|
||||
user << "System unlocked."
|
||||
|
||||
//Removing cloning pod biomass
|
||||
@@ -376,16 +378,16 @@
|
||||
qdel(W)
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/wrench))
|
||||
if(src.locked && (src.anchored || src.occupant))
|
||||
if(locked && (anchored || occupant))
|
||||
user << "\red Can not do that while [src] is in use."
|
||||
else
|
||||
if(src.anchored)
|
||||
src.anchored = 0
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
connected.pods -= src
|
||||
connected = null
|
||||
else
|
||||
src.anchored = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
anchored = 1
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
|
||||
else
|
||||
@@ -399,22 +401,22 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/clonepod/emag_act(user as mob)
|
||||
if (isnull(src.occupant))
|
||||
if (isnull(occupant))
|
||||
return
|
||||
user << "You force an emergency ejection."
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
locked = 0
|
||||
go_out()
|
||||
return
|
||||
|
||||
//Put messages in the connected computer's temp var for display.
|
||||
/obj/machinery/clonepod/proc/connected_message(var/message)
|
||||
if ((isnull(src.connected)) || (!istype(src.connected, /obj/machinery/computer/cloning)))
|
||||
if ((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
|
||||
return 0
|
||||
if (!message)
|
||||
return 0
|
||||
|
||||
src.connected.temp = "[name] : [message]"
|
||||
src.connected.updateUsrDialog()
|
||||
connected.temp = "[name] : [message]"
|
||||
connected.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/clonepod/verb/eject()
|
||||
@@ -426,43 +428,46 @@
|
||||
return
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
src.go_out(usr)
|
||||
go_out(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/proc/go_out(user)
|
||||
if (src.mess) //Clean that mess and dump those gibs!
|
||||
src.mess = 0
|
||||
gibs(src.loc)
|
||||
if (mess) //Clean that mess and dump those gibs!
|
||||
if(occupant)
|
||||
return
|
||||
mess = 0
|
||||
gibs(loc)
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (!(src.occupant))
|
||||
if (!(occupant))
|
||||
user << "<span class=\"warning\">The cloning pod is empty!</span>"
|
||||
return
|
||||
|
||||
if (src.locked)
|
||||
if (locked)
|
||||
user << "<span class=\"warning\">The cloning pod is locked!</span>"
|
||||
return
|
||||
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.forceMove(get_turf(src))
|
||||
src.eject_wait = 0 //If it's still set somehow.
|
||||
domutcheck(src.occupant) //Waiting until they're out before possible notransform.
|
||||
src.occupant = null
|
||||
if (occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.forceMove(get_turf(src))
|
||||
eject_wait = 0 //If it's still set somehow.
|
||||
domutcheck(occupant) //Waiting until they're out before possible notransform.
|
||||
occupant = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/proc/malfunction()
|
||||
if(src.occupant)
|
||||
src.connected_message("Critical Error!")
|
||||
src.mess = 1
|
||||
if(occupant)
|
||||
connected_message("Critical Error!")
|
||||
mess = 1
|
||||
occupant.ghostize()
|
||||
qdel(occupant)
|
||||
occupant = null
|
||||
update_icon()
|
||||
src.occupant.ghostize()
|
||||
spawn(5)
|
||||
qdel(src.occupant)
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/update_icon()
|
||||
@@ -476,7 +481,7 @@
|
||||
/obj/machinery/clonepod/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
go_out()
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/emp_act(severity)
|
||||
@@ -487,22 +492,22 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
|
||||
+25
-20
@@ -17,6 +17,8 @@
|
||||
var/current_heat_capacity = 50
|
||||
var/efficiency
|
||||
|
||||
var/running_bob_animation = 0 // This is used to prevent threads from building up if update_icons is called multiple times
|
||||
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
power_change()
|
||||
..()
|
||||
@@ -327,34 +329,37 @@
|
||||
|
||||
overlays += pickle
|
||||
overlays += "lid[on]"
|
||||
if(src.on) //no bobbing if off
|
||||
if(src.on && !running_bob_animation) //no bobbing if off
|
||||
var/up = 0 //used to see if we are going up or down, 1 is down, 2 is up
|
||||
while(occupant)
|
||||
overlays -= "lid[on]" //have to remove the overlays first, to force an update- remove cloning pod overlay
|
||||
overlays -= pickle //remove mob overlay
|
||||
spawn(0) // Without this, the icon update will block. The new thread will die once the occupant leaves.
|
||||
running_bob_animation = 1
|
||||
while(occupant)
|
||||
overlays -= "lid[on]" //have to remove the overlays first, to force an update- remove cloning pod overlay
|
||||
overlays -= pickle //remove mob overlay
|
||||
|
||||
switch(pickle.pixel_y) //this looks messy as fuck but it works, switch won't call itself twice
|
||||
switch(pickle.pixel_y) //this looks messy as fuck but it works, switch won't call itself twice
|
||||
|
||||
if(23) //inbetween state, for smoothness
|
||||
switch(up) //this is set later in the switch, to keep track of where the mob is supposed to go
|
||||
if(2) //2 is up
|
||||
pickle.pixel_y = 24 //set to highest
|
||||
if(23) //inbetween state, for smoothness
|
||||
switch(up) //this is set later in the switch, to keep track of where the mob is supposed to go
|
||||
if(2) //2 is up
|
||||
pickle.pixel_y = 24 //set to highest
|
||||
|
||||
if(1) //1 is down
|
||||
pickle.pixel_y = 22 //set to lowest
|
||||
if(1) //1 is down
|
||||
pickle.pixel_y = 22 //set to lowest
|
||||
|
||||
if(22) //mob is at it's lowest
|
||||
pickle.pixel_y = 23 //set to inbetween
|
||||
up = 2 //have to go up
|
||||
if(22) //mob is at it's lowest
|
||||
pickle.pixel_y = 23 //set to inbetween
|
||||
up = 2 //have to go up
|
||||
|
||||
if(24) //mob is at it's highest
|
||||
pickle.pixel_y = 23 //set to inbetween
|
||||
up = 1 //have to go down
|
||||
if(24) //mob is at it's highest
|
||||
pickle.pixel_y = 23 //set to inbetween
|
||||
up = 1 //have to go down
|
||||
|
||||
overlays += pickle //re-add the mob to the icon
|
||||
overlays += "lid[on]" //re-add the overlay of the pod, they are inside it, not floating
|
||||
overlays += pickle //re-add the mob to the icon
|
||||
overlays += "lid[on]" //re-add the overlay of the pod, they are inside it, not floating
|
||||
|
||||
sleep(7) //don't want to jiggle violently, just slowly bob
|
||||
sleep(7) //don't want to jiggle violently, just slowly bob
|
||||
running_bob_animation = 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
|
||||
if(air_contents.total_moles() < 10)
|
||||
|
||||
@@ -5,15 +5,18 @@
|
||||
icon_state = "airlock_control_standby"
|
||||
anchored = 1 //this is what I get for assuming /obj/machinery has anchored set to 1 by default
|
||||
var/list/linkedturfs = list() //List contains all of the linked pool turfs to this controller, assignment happens on New()
|
||||
var/linked_area = null
|
||||
var/temperature = "normal" //The temperature of the pool, starts off on normal, which has no effects.
|
||||
var/temperaturecolor = "" //used for nanoUI fancyness
|
||||
var/srange = 5 //The range of the search for pool turfs, change this for bigger or smaller pools.
|
||||
var/list/linkedmist = list() //Used to keep track of created mist
|
||||
var/deep_water = 0 //set to 1 to drown even standing people
|
||||
|
||||
|
||||
/obj/machinery/poolcontroller/New() //This proc automatically happens on world start
|
||||
for(var/turf/simulated/floor/beach/water/W in range(srange,src)) //Search for /turf/simulated/floor/beach/water in the range of var/srange
|
||||
linkedturfs += W //Add found pool turfs to the central list.
|
||||
if(!linked_area)
|
||||
for(var/turf/simulated/floor/beach/water/W in range(srange,src)) //Search for /turf/simulated/floor/beach/water in the range of var/srange
|
||||
linkedturfs += W //Add found pool turfs to the central list.
|
||||
..() //Changed to call parent as per MarkvA's recommendation
|
||||
|
||||
/obj/machinery/poolcontroller/emag_act(user as mob) //Emag_act, this is called when it is hit with a cryptographic sequencer.
|
||||
@@ -39,63 +42,74 @@
|
||||
updatePool() //Call the mob affecting/decal cleaning proc
|
||||
|
||||
/obj/machinery/poolcontroller/proc/updatePool()
|
||||
for(var/turf/simulated/floor/beach/water/W in linkedturfs) //Check for pool-turfs linked to the controller.
|
||||
for(var/mob/M in W) //Check for mobs in the linked pool-turfs.
|
||||
//Sanity checks, don't affect robuts, AI eyes, and observers
|
||||
if(isAIEye(M))
|
||||
continue
|
||||
if(issilicon(M))
|
||||
continue
|
||||
if(isobserver(M))
|
||||
continue
|
||||
if(M.stat == DEAD)
|
||||
continue
|
||||
//End sanity checks, go on
|
||||
switch(temperature) //Apply different effects based on what the temperature is set to.
|
||||
if("scalding") //Burn the mob.
|
||||
M.bodytemperature = min(500, M.bodytemperature + 35) //heat mob at 35k(elvin) per cycle
|
||||
M << "<span class='danger'>The water is searing hot!</span>"
|
||||
|
||||
if("warm") //Gently warm the mob.
|
||||
M.bodytemperature = min(330, M.bodytemperature + 10) //Heats up mobs to just over normal, not enough to burn
|
||||
if(prob(50)) //inform the mob of warm water half the time
|
||||
M << "<span class='warning'>The water is quite warm.</span>" //Inform the mob it's warm water.
|
||||
|
||||
if("cool") //Gently cool the mob.
|
||||
M.bodytemperature = max(290, M.bodytemperature - 10) //Cools mobs to just below normal, not enough to burn
|
||||
if(prob(50)) //inform the mob of cold water half the time
|
||||
M << "<span class='warning'>The water is chilly.</span>" //Inform the mob it's chilly water.
|
||||
|
||||
if("frigid") //Freeze the mob.
|
||||
M.bodytemperature = max(80, M.bodytemperature - 35) //cool mob at -35k per cycle
|
||||
M << "<span class='danger'>The water is freezing!</span>"
|
||||
|
||||
for(var/turf/T in linkedturfs) //Check for pool-turfs linked to the controller.
|
||||
for(var/mob/M in T) //Check for mobs in the linked pool-turfs.
|
||||
handleTemp(M) //handles pool temp effects on the swimmers
|
||||
|
||||
if(ishuman(M)) //Make sure they are human before typecasting.
|
||||
var/mob/living/carbon/human/drownee = M //Typecast them as human.
|
||||
if(drownee && drownee.lying) //Mob lying down
|
||||
if(drownee.internal)
|
||||
continue //Has internals, no drowning
|
||||
if((drownee.species.flags & NO_BREATHE) || (NO_BREATHE in drownee.mutations))
|
||||
continue //doesn't breathe, no drowning
|
||||
if(drownee.get_species() == "Skrell" || drownee.get_species() == "Neara")
|
||||
continue //fish things don't drown
|
||||
handleDrowning(drownee) //Only human types will drown, to keep things simple for non-human mobs that live in the water
|
||||
|
||||
if(drownee.stat) //Mob is in critical.
|
||||
drownee.adjustOxyLoss(9) //Kill em quickly.
|
||||
add_logs(drownee, src, "drowned")
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] appears to be drowning!</span>","<span class='userdanger'>You're quickly drowning!</span>") //inform them that they are fucked.
|
||||
else
|
||||
drownee.adjustOxyLoss(5) //5 oxyloss per cycle.
|
||||
add_logs(drownee, src, "drowned")
|
||||
if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then.
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] flails, almost like they are drowning!</span>","<span class='userdanger'>You're lacking air!</span>") //*gasp* *gasp* *gasp* *gasp* *gasp*
|
||||
|
||||
for(var/obj/effect/decal/cleanable/decal in W)
|
||||
for(var/obj/effect/decal/cleanable/decal in T) //Cleans up cleanable decals like blood and such
|
||||
animate(decal, alpha = 10, time = 20)
|
||||
spawn(25)
|
||||
qdel(decal)
|
||||
|
||||
/obj/machinery/poolcontroller/proc/handleTemp(var/mob/M)
|
||||
if(temperature == "normal") //This setting does nothing, so let's skip the next checks since we won't be doing jack
|
||||
return
|
||||
if(!M || isAIEye(M) || issilicon(M) || isobserver(M) || M.stat == DEAD)
|
||||
return
|
||||
|
||||
switch(temperature) //Apply different effects based on what the temperature is set to.
|
||||
if("scalding") //Burn the mob.
|
||||
M.bodytemperature = min(500, M.bodytemperature + 35) //heat mob at 35k(elvin) per cycle
|
||||
M << "<span class='danger'>The water is searing hot!</span>"
|
||||
|
||||
if("warm") //Gently warm the mob.
|
||||
M.bodytemperature = min(330, M.bodytemperature + 10) //Heats up mobs to just over normal, not enough to burn
|
||||
if(prob(50)) //inform the mob of warm water half the time
|
||||
M << "<span class='warning'>The water is quite warm.</span>" //Inform the mob it's warm water.
|
||||
|
||||
if("cool") //Gently cool the mob.
|
||||
M.bodytemperature = max(290, M.bodytemperature - 10) //Cools mobs to just below normal, not enough to burn
|
||||
if(prob(50)) //inform the mob of cold water half the time
|
||||
M << "<span class='warning'>The water is chilly.</span>" //Inform the mob it's chilly water.
|
||||
|
||||
if("frigid") //Freeze the mob.
|
||||
M.bodytemperature = max(80, M.bodytemperature - 35) //cool mob at -35k per cycle
|
||||
M << "<span class='danger'>The water is freezing!</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/poolcontroller/proc/handleDrowning(var/mob/living/carbon/human/drownee)
|
||||
if(!drownee)
|
||||
return
|
||||
|
||||
if(drownee && (drownee.lying || deep_water)) //Mob lying down or water is deep (determined by controller)
|
||||
if(drownee.internal)
|
||||
return //Has internals, no drowning
|
||||
if((drownee.species.flags & NO_BREATHE) || (NO_BREATHE in drownee.mutations))
|
||||
return //doesn't breathe, no drowning
|
||||
if(drownee.get_species() == "Skrell" || drownee.get_species() == "Neara")
|
||||
return //fish things don't drown
|
||||
|
||||
if(drownee.stat == DEAD) //Dead spacemen don't drown more
|
||||
return
|
||||
if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control.
|
||||
return
|
||||
|
||||
if(drownee.stat) //Mob is in critical.
|
||||
drownee.losebreath -= 3 //You're gonna die here.
|
||||
add_logs(drownee, src, "drowned")
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] appears to be drowning!</span>","<span class='userdanger'>You're quickly drowning!</span>") //inform them that they are fucked.
|
||||
else
|
||||
drownee.losebreath -= 2 //For every time you drown, you miss 2 breath attempts. Hope you catch on quick!
|
||||
add_logs(drownee, src, "drowned")
|
||||
if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then.
|
||||
drownee.visible_message("<span class='danger'>\The [drownee] flails, almost like they are drowning!</span>","<span class='userdanger'>You're lacking air!</span>") //*gasp* *gasp* *gasp* *gasp* *gasp*
|
||||
|
||||
|
||||
|
||||
/obj/machinery/poolcontroller/proc/miston() //Spawn /obj/effect/mist (from the shower) on all linked pool tiles
|
||||
if(linkedmist.len)
|
||||
return
|
||||
@@ -155,4 +169,30 @@
|
||||
temperaturecolor = ""
|
||||
mistoff()
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/poolcontroller/seacontroller
|
||||
invisibility = 101
|
||||
unacidable = 1
|
||||
|
||||
name = "Sea Controller"
|
||||
desc = "A controller for the underwater portion of the sea. Players shouldn't see this."
|
||||
deep_water = 1 //deep sea is deep water
|
||||
|
||||
/obj/machinery/poolcontroller/seacontroller/New()
|
||||
linked_area = get_area(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/poolcontroller/seacontroller/updatePool()
|
||||
for(var/turf/T in linked_area)
|
||||
for(var/mob/M in T)
|
||||
handleTemp(M) //handles pool temp effects on the swimmers
|
||||
|
||||
if(ishuman(M)) //Make sure they are human before typecasting.
|
||||
var/mob/living/carbon/human/drownee = M //Typecast them as human.
|
||||
handleDrowning(drownee) //Only human types will drown, to keep things simple for non-human mobs that live in the water
|
||||
|
||||
for(var/obj/effect/decal/cleanable/decal in T)
|
||||
animate(decal, alpha = 10, time = 20)
|
||||
spawn(25)
|
||||
qdel(decal)
|
||||
@@ -17,19 +17,19 @@
|
||||
/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
|
||||
..()
|
||||
|
||||
src.product_path = path
|
||||
product_path = path
|
||||
|
||||
if(!name)
|
||||
var/atom/tmp = new path
|
||||
src.product_name = initial(tmp.name)
|
||||
product_name = initial(tmp.name)
|
||||
qdel(tmp)
|
||||
else
|
||||
src.product_name = name
|
||||
product_name = name
|
||||
|
||||
src.amount = amount
|
||||
src.price = price
|
||||
src.display_color = color
|
||||
src.category = category
|
||||
amount = amount
|
||||
price = price
|
||||
display_color = color
|
||||
category = category
|
||||
|
||||
/**
|
||||
* A vending machine
|
||||
@@ -101,18 +101,18 @@
|
||||
..()
|
||||
wires = new(src)
|
||||
spawn(50)
|
||||
if(src.product_slogans)
|
||||
src.slogan_list += text2list(src.product_slogans, ";")
|
||||
if(product_slogans)
|
||||
slogan_list += text2list(product_slogans, ";")
|
||||
|
||||
// So not all machines speak at the exact same time.
|
||||
// The first time this machine says something will be at slogantime + this random value,
|
||||
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
|
||||
src.last_slogan = world.time + rand(0, slogan_delay)
|
||||
last_slogan = world.time + rand(0, slogan_delay)
|
||||
|
||||
if(src.product_ads)
|
||||
src.ads_list += text2list(src.product_ads, ";")
|
||||
if(product_ads)
|
||||
ads_list += text2list(product_ads, ";")
|
||||
|
||||
src.build_inventory()
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
return
|
||||
@@ -128,9 +128,9 @@
|
||||
*/
|
||||
/obj/machinery/vending/proc/build_inventory()
|
||||
var/list/all_products = list(
|
||||
list(src.products, CAT_NORMAL),
|
||||
list(src.contraband, CAT_HIDDEN),
|
||||
list(src.premium, CAT_COIN))
|
||||
list(products, CAT_NORMAL),
|
||||
list(contraband, CAT_HIDDEN),
|
||||
list(premium, CAT_COIN))
|
||||
|
||||
for(var/current_list in all_products)
|
||||
var/category = current_list[2]
|
||||
@@ -138,12 +138,12 @@
|
||||
for(var/entry in current_list[1])
|
||||
var/datum/data/vending_product/product = new/datum/data/vending_product(entry)
|
||||
|
||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||
product.price = (entry in prices) ? prices[entry] : 0
|
||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||
product.max_amount = product.amount
|
||||
product.category = category
|
||||
|
||||
src.product_records.Add(product)
|
||||
product_records.Add(product)
|
||||
|
||||
/obj/machinery/vending/Destroy()
|
||||
qdel(wires) // qdel
|
||||
@@ -168,9 +168,8 @@
|
||||
|
||||
/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
|
||||
if(component_parts)
|
||||
build_inventory()
|
||||
for(var/obj/item/weapon/vending_refill/VR in component_parts)
|
||||
refill_inventory(VR, product_records)
|
||||
refill_inventory(VR, product_records, usr)
|
||||
|
||||
/obj/machinery/vending/blob_act()
|
||||
if(prob(75))
|
||||
@@ -178,7 +177,7 @@
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/vending/proc/refill_inventory(obj/item/weapon/vending_refill/refill, datum/data/vending_product/machine, mob/user)
|
||||
/obj/machinery/vending/proc/refill_inventory(obj/item/weapon/vending_refill/refill, list/machine, mob/user)
|
||||
var/total = 0
|
||||
|
||||
var/to_restock = 0
|
||||
@@ -188,7 +187,8 @@
|
||||
if(to_restock <= refill.charges)
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
if(machine_content.amount != machine_content.max_amount)
|
||||
usr << "<span class='notice'>[machine_content.max_amount - machine_content.amount] of [machine_content.product_name]</span>"
|
||||
if(user)
|
||||
user << "<span class='notice'>[machine_content.max_amount - machine_content.amount] of [machine_content.product_name]</span>"
|
||||
machine_content.amount = machine_content.max_amount
|
||||
refill.charges -= to_restock
|
||||
total = to_restock
|
||||
@@ -202,7 +202,8 @@
|
||||
refill.charges -= restock
|
||||
total += restock
|
||||
if(restock)
|
||||
usr << "<span class='notice'>[restock] of [machine_content.product_name]</span>"
|
||||
if(user)
|
||||
user << "<span class='notice'>[restock] of [machine_content.product_name]</span>"
|
||||
if(refill.charges == 0) //due to rounding, we ran out of refill charges, exit.
|
||||
break
|
||||
return total
|
||||
@@ -221,7 +222,7 @@
|
||||
handled = 1
|
||||
|
||||
if(paid)
|
||||
src.vend(currently_vending, usr)
|
||||
vend(currently_vending, usr)
|
||||
return
|
||||
else if(handled)
|
||||
nanomanager.update_uis(src)
|
||||
@@ -231,7 +232,7 @@
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && anchored)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
panel_open = !panel_open
|
||||
user << "You [panel_open ? "open" : "close"] the maintenance panel."
|
||||
overlays.Cut()
|
||||
@@ -980,9 +981,9 @@
|
||||
*/
|
||||
/obj/machinery/vending/hydroseeds/build_inventory()
|
||||
var/list/all_products = list(
|
||||
list(src.products, CAT_NORMAL),
|
||||
list(src.contraband, CAT_HIDDEN),
|
||||
list(src.premium, CAT_COIN))
|
||||
list(products, CAT_NORMAL),
|
||||
list(contraband, CAT_HIDDEN),
|
||||
list(premium, CAT_COIN))
|
||||
|
||||
for(var/current_list in all_products)
|
||||
var/category = current_list[2]
|
||||
@@ -992,12 +993,12 @@
|
||||
var/name = S.name
|
||||
var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name)
|
||||
|
||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||
product.price = (entry in prices) ? prices[entry] : 0
|
||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||
product.max_amount = product.amount
|
||||
product.category = category
|
||||
|
||||
src.product_records.Add(product)
|
||||
product_records.Add(product)
|
||||
|
||||
/obj/machinery/vending/magivend
|
||||
name = "\improper MagiVend"
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
name = "FORCEWALL"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "m_shield"
|
||||
anchored = 1.0
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 1
|
||||
unacidable = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/effect/forcefield/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
@@ -18,7 +17,7 @@
|
||||
icon_state = "empty"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
var/timeleft = 50
|
||||
var/timeleft = 300
|
||||
var/last_process = 0
|
||||
|
||||
/obj/effect/forcefield/mime/New()
|
||||
|
||||
@@ -19,13 +19,19 @@
|
||||
if(!ishuman(user))
|
||||
user << "\red You don't know how to use this!"
|
||||
return
|
||||
if(user:miming || user.silent)
|
||||
user << "\red You find yourself unable to speak at all."
|
||||
if(user.silent)
|
||||
user << "<span class='warning'>You find yourself unable to speak at all.</span>"
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H & H.mind)
|
||||
if(H.mind.miming)
|
||||
user << "<span class='warning'>Your vow of silence prevents you from speaking.</span>"
|
||||
return
|
||||
if(spamcheck)
|
||||
user << "\red \The [src] needs to recharge!"
|
||||
return
|
||||
|
||||
|
||||
var/message = input(user, "Shout a message:", "Megaphone") as text|null
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -285,6 +285,9 @@ var/global/list/default_medbay_channels = list(
|
||||
if(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||
return 0
|
||||
|
||||
if(!M.IsVocal())
|
||||
return 0
|
||||
|
||||
M.last_target_click = world.time
|
||||
|
||||
/* Quick introduction:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
var/use_verb = "climbs"
|
||||
|
||||
/obj/structure/ladder/New()
|
||||
spawn(8)
|
||||
@@ -14,9 +15,13 @@
|
||||
if(L.id == id)
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
if(isnull(L.up))
|
||||
L.up = src
|
||||
continue
|
||||
if(L.height == (height + 1))
|
||||
up = L
|
||||
if(isnull(L.down))
|
||||
L.down = src
|
||||
continue
|
||||
|
||||
if(up && down) //if both our connections are filled
|
||||
@@ -42,12 +47,12 @@
|
||||
if("Up")
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
user.forceMove(get_turf(up))
|
||||
up.add_fingerprint(user)
|
||||
if("Down")
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
user.forceMove(get_turf(down))
|
||||
down.add_fingerprint(user)
|
||||
if("Cancel")
|
||||
return
|
||||
@@ -55,16 +60,43 @@
|
||||
else if(up)
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
user.forceMove(get_turf(up))
|
||||
up.add_fingerprint(user)
|
||||
|
||||
else if(down)
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
user.forceMove(get_turf(down))
|
||||
down.add_fingerprint(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob, params)
|
||||
return attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/dive_point/buoy
|
||||
name = "diving point bouy"
|
||||
desc = "A buoy marking the location of an underwater dive area."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "buoy"
|
||||
id = "dive"
|
||||
height = 2
|
||||
use_verb = "dives"
|
||||
layer = MOB_LAYER + 0.2 //0.1 higher than the water overlay, this also means people can "swim" behind/under it
|
||||
|
||||
/obj/structure/ladder/dive_point/anchor
|
||||
name = "diving point anchor"
|
||||
desc = "An anchor tethered to the buoy at the surface, to keep the dive area marked."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "anchor"
|
||||
id = "dive"
|
||||
height = 1
|
||||
use_verb = "ascends"
|
||||
light_range = 5
|
||||
|
||||
/obj/structure/ladder/dive_point/New()
|
||||
..()
|
||||
set_light(light_range, light_power) //magical glowing anchor
|
||||
|
||||
/obj/structure/ladder/dive_point/update_icon()
|
||||
return
|
||||
@@ -1,20 +1,66 @@
|
||||
/turf/unsimulated/beach
|
||||
name = "Beach"
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
var/water_overlay_image = null
|
||||
|
||||
/turf/unsimulated/beach/New()
|
||||
..()
|
||||
if(water_overlay_image)
|
||||
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"= water_overlay_image,"layer"=MOB_LAYER+0.1)
|
||||
|
||||
/turf/unsimulated/beach/sand
|
||||
name = "Sand"
|
||||
icon_state = "sand"
|
||||
icon_state = "desert"
|
||||
|
||||
/turf/unsimulated/beach/sand/New() //adds some aesthetic randomness to the beach sand
|
||||
icon_state = pick("desert", "desert0", "desert1", "desert2", "desert3", "desert4")
|
||||
..()
|
||||
|
||||
/turf/unsimulated/beach/sand/dense //for boundary "walls"
|
||||
density = 1
|
||||
|
||||
/turf/unsimulated/beach/coastline
|
||||
name = "Coastline"
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
icon_state = "sandwater"
|
||||
//icon = 'icons/misc/beach2.dmi'
|
||||
//icon_state = "sandwater"
|
||||
icon_state = "beach"
|
||||
water_overlay_image = "water_coast"
|
||||
|
||||
/turf/unsimulated/beach/coastline/dense //for boundary "walls"
|
||||
density = 1
|
||||
|
||||
/turf/unsimulated/beach/water
|
||||
name = "Water"
|
||||
icon_state = "water"
|
||||
name = "Shallow Water"
|
||||
icon_state = "seashallow"
|
||||
water_overlay_image = "water_shallow"
|
||||
|
||||
/turf/unsimulated/beach/water/New()
|
||||
..()
|
||||
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water2","layer"=MOB_LAYER+0.1)
|
||||
/turf/unsimulated/beach/water/drop
|
||||
name = "Water"
|
||||
icon_state = "seadrop"
|
||||
|
||||
/turf/unsimulated/beach/water/dense //for boundary "walls"
|
||||
density = 1
|
||||
|
||||
/turf/unsimulated/beach/water/deep
|
||||
name = "Deep Water"
|
||||
icon_state = "seadeep"
|
||||
water_overlay_image = "water_deep"
|
||||
|
||||
/turf/unsimulated/beach/water/deep/dense
|
||||
density = 1
|
||||
|
||||
/turf/unsimulated/beach/water/deep/wood_floor
|
||||
name = "Sunken Floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "wood"
|
||||
|
||||
/turf/unsimulated/beach/water/deep/sand_floor
|
||||
name = "Sea Floor"
|
||||
icon_state = "sand"
|
||||
|
||||
/turf/unsimulated/beach/water/deep/rock_wall
|
||||
name = "Reef Stone"
|
||||
icon_state = "desert7"
|
||||
density = 1
|
||||
opacity = 1
|
||||
explosion_block = 2
|
||||
@@ -6,6 +6,9 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
|
||||
plantname = "ambrosia"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato
|
||||
plantname = "potato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
|
||||
plantname = "tomato"
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
|
||||
var/miming = 0
|
||||
if(mind)
|
||||
miming = mind.miming
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
if(!prob(martial_art.deflection_chance))
|
||||
return ..()
|
||||
if(!src.lying && !(HULK in mutations)) //But only if they're not lying down, and hulks can't do it
|
||||
src.visible_message("<span class='warning'>[src] deflects the projectile!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
visible_message("<span class='danger'>[src] deflects the projectile; they can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
|
||||
var/datum/martial_art/martial_art = null
|
||||
|
||||
var/miming = null //Toggle for the mime's abilities.
|
||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||
var/said_last_words=0
|
||||
|
||||
|
||||
@@ -90,6 +90,11 @@
|
||||
return GetSpecialVoice()
|
||||
return real_name
|
||||
|
||||
/mob/living/carbon/human/IsVocal()
|
||||
if(mind)
|
||||
return !mind.miming
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/SetSpecialVoice(var/new_voice)
|
||||
if(new_voice)
|
||||
special_voice = new_voice
|
||||
|
||||
@@ -71,6 +71,8 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
var/list/returns[3]
|
||||
var/speech_problem_flag = 0
|
||||
|
||||
|
||||
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
@@ -91,6 +93,9 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
else if(COMIC in mutations)
|
||||
message = "<span class='sans'>[message]</span>"
|
||||
|
||||
if(!IsVocal())
|
||||
message = ""
|
||||
speech_problem_flag = 1
|
||||
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/mob/living/silicon/ai/proc/IsVocal()
|
||||
|
||||
var/announcing_vox = 0 // Stores the time of the last announcement
|
||||
var/const/VOX_CHANNEL = 200
|
||||
var/const/VOX_DELAY = 100
|
||||
@@ -30,7 +28,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
|
||||
/mob/living/silicon/ai/proc/ai_announcement()
|
||||
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
|
||||
return
|
||||
|
||||
|
||||
if(announcing_vox > world.time)
|
||||
src << "<span class='warning'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>"
|
||||
return
|
||||
@@ -38,7 +36,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
|
||||
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", last_announcement) as text|null
|
||||
|
||||
last_announcement = message
|
||||
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/carp
|
||||
name = "sea carp"
|
||||
desc = "A large fish bearing similarities to a certain space-faring menace."
|
||||
icon_state = "carp"
|
||||
icon_living = "carp"
|
||||
icon_dead = "carp_dead"
|
||||
icon_gib = "carp_gib"
|
||||
speak_chance = 0
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
|
||||
meat_amount = 1
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
speed = 0
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
|
||||
retreat_distance = 6
|
||||
vision_range = 5
|
||||
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
speak_emote = list("gnashes")
|
||||
|
||||
faction = list("carp")
|
||||
flying = 1
|
||||
@@ -625,7 +625,7 @@ var/list/slot_equipment_priority = list( \
|
||||
set category = "IC"
|
||||
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = sanitize(msg)
|
||||
msg = sanitize_simple(html_encode(msg), list("\n" = "<BR>"))
|
||||
|
||||
if(mind)
|
||||
mind.store_memory(msg)
|
||||
@@ -1448,4 +1448,7 @@ mob/proc/yank_out_object()
|
||||
|
||||
//Can this mob leave its location without breaking things terrifically?
|
||||
/mob/proc/can_safely_leave_loc()
|
||||
return 1 // Yes, you can
|
||||
return 1 // Yes, you can
|
||||
|
||||
/mob/proc/IsVocal()
|
||||
return 1
|
||||
@@ -105,20 +105,24 @@
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser() || istype(user, /mob/living/simple_animal/diona))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
user << "<span class='danger'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if (HULK in M.mutations)
|
||||
M << "\red Your meaty finger is much too large for the trigger guard!"
|
||||
M << "<span class='danger'>Your meaty finger is much too large for the trigger guard!</span>"
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.name == "Golem")
|
||||
user << "\red Your metal fingers don't fit in the trigger guard!"
|
||||
if(H.get_species() == "Golem")
|
||||
user << "<span class='danger'>Your metal fingers don't fit in the trigger guard!</span>"
|
||||
return
|
||||
if(user.dna && user.dna.species == "Shadowling")
|
||||
if(H.get_species() == "Shadowling")
|
||||
user << "<span class='danger'>The muzzle flash would cause damage to your form!</span>"
|
||||
return
|
||||
if(H.martial_art && H.martial_art.name == "The Sleeping Carp") //great dishonor to famiry
|
||||
user << "<span class='danger'>Use of ranged weaponry would bring dishonor to the clan.</span>"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -3350,15 +3350,6 @@
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 3)
|
||||
|
||||
// potato + knife = raw sticks
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/weapon/kitchen/knife))
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(src)
|
||||
user << "You cut the potato."
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawsticks
|
||||
name = "raw potato sticks"
|
||||
desc = "Raw fries, not very tasty."
|
||||
|
||||
Reference in New Issue
Block a user