Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into bowmanupgrade
This commit is contained in:
@@ -10,22 +10,23 @@
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/on = TRUE
|
||||
|
||||
var/code = 2
|
||||
var/frequency = FREQ_ELECTROPACK
|
||||
var/shock_cooldown = 0
|
||||
var/on = TRUE
|
||||
var/shock_cooldown = FALSE
|
||||
|
||||
/obj/item/electropack/suicide_act(mob/user)
|
||||
/obj/item/electropack/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] hooks [user.p_them()]self to the electropack and spams the trigger! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/electropack/Initialize()
|
||||
. = ..()
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/electropack/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/electropack/attack_hand(mob/user)
|
||||
@@ -36,7 +37,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/attackby(obj/item/W, mob/user, params)
|
||||
/obj/item/electropack/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit(user)
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
@@ -57,43 +58,47 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/Topic(href, href_list)
|
||||
//..()
|
||||
var/mob/living/carbon/C = usr
|
||||
if(usr.stat || usr.restrained() || C.back == src)
|
||||
return
|
||||
if((ishuman(usr) && usr.contents.Find(src)) || usr.contents.Find(master) || (in_range(src, usr) && isturf(loc)))
|
||||
usr.set_machine(src)
|
||||
if(href_list["freq"])
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
else
|
||||
if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = min(100, code)
|
||||
code = max(1, code)
|
||||
else
|
||||
if(href_list["power"])
|
||||
on = !( on )
|
||||
icon_state = "electropack[on]"
|
||||
if(!( master ))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
if(ismob(master.loc))
|
||||
attack_self(master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, master))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
usr << browse(null, "window=radio")
|
||||
onclose(usr, "radio")
|
||||
return
|
||||
|
||||
if(href_list["set"])
|
||||
if(href_list["set"] == "freq")
|
||||
var/new_freq = input(usr, "Input a new receiving frequency", "Electropack Frequency", format_frequency(frequency)) as num|null
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
new_freq = unformat_frequency(new_freq)
|
||||
new_freq = sanitize_frequency(new_freq, TRUE)
|
||||
set_frequency(new_freq)
|
||||
|
||||
if(href_list["set"] == "code")
|
||||
var/new_code = input(usr, "Input a new receiving code", "Electropack Code", code) as num|null
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
new_code = round(new_code)
|
||||
new_code = CLAMP(new_code, 1, 100)
|
||||
code = new_code
|
||||
|
||||
if(href_list["set"] == "power")
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
on = !(on)
|
||||
icon_state = "electropack[on]"
|
||||
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/electropack/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
return
|
||||
|
||||
/obj/item/electropack/receive_signal(datum/signal/signal)
|
||||
@@ -101,10 +106,10 @@
|
||||
return
|
||||
|
||||
if(isliving(loc) && on)
|
||||
if(shock_cooldown != 0)
|
||||
if(shock_cooldown == TRUE)
|
||||
return
|
||||
shock_cooldown = 1
|
||||
addtimer(VARSET_CALLBACK(src, shock_cooldown, 0), 100)
|
||||
shock_cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, shock_cooldown, FALSE), 100)
|
||||
var/mob/living/L = loc
|
||||
step(L, pick(GLOB.cardinals))
|
||||
|
||||
@@ -119,25 +124,22 @@
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/electropack/attack_self(mob/user)
|
||||
|
||||
/obj/item/electropack/ui_interact(mob/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"<TT>Turned [on ? "On" : "Off"] -
|
||||
<A href='?src=[REF(src)];power=1'>Toggle</A><BR>
|
||||
var/dat = {"
|
||||
<TT>
|
||||
Turned [on ? "On" : "Off"] - <A href='?src=[REF(src)];set=power'>Toggle</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<BR>
|
||||
Frequency:
|
||||
<A href='byond://?src=[REF(src)];freq=-10'>-</A>
|
||||
<A href='byond://?src=[REF(src)];freq=-2'>-</A> [format_frequency(frequency)]
|
||||
<A href='byond://?src=[REF(src)];freq=2'>+</A>
|
||||
<A href='byond://?src=[REF(src)];freq=10'>+</A><BR>
|
||||
[format_frequency(src.frequency)]
|
||||
<A href='byond://?src=[REF(src)];set=freq'>Set</A><BR>
|
||||
|
||||
Code:
|
||||
<A href='byond://?src=[REF(src)];code=-5'>-</A>
|
||||
<A href='byond://?src=[REF(src)];code=-1'>-</A> [code]
|
||||
<A href='byond://?src=[REF(src)];code=1'>+</A>
|
||||
<A href='byond://?src=[REF(src)];code=5'>+</A><BR>
|
||||
[src.code]
|
||||
<A href='byond://?src=[REF(src)];set=code'>Set</A><BR>
|
||||
</TT>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
|
||||
@@ -466,17 +466,18 @@ SLIME SCANNER
|
||||
msg += "<span class='notice'>Subject is not addicted to any reagents.</span>\n"
|
||||
|
||||
var/datum/reagent/impure/fermiTox/F = M.reagents.has_reagent(/datum/reagent/impure/fermiTox)
|
||||
switch(F?.volume)
|
||||
if(5 to 10)
|
||||
msg += "<span class='notice'>Subject contains a low amount of toxic isomers.</span>\n"
|
||||
if(10 to 25)
|
||||
msg += "<span class='danger'>Subject contains toxic isomers.</span>\n"
|
||||
if(25 to 50)
|
||||
msg += "<span class='danger'>Subject contains a substantial amount of toxic isomers.</span>\n"
|
||||
if(50 to 95)
|
||||
msg += "<span class='danger'>Subject contains a high amount of toxic isomers.</span>\n"
|
||||
if(95 to INFINITY)
|
||||
msg += "<span class='danger'>Subject contains a extremely dangerous amount of toxic isomers.</span>\n"
|
||||
if(istype(F))
|
||||
switch(F.volume)
|
||||
if(5 to 10)
|
||||
msg += "<span class='notice'>Subject contains a low amount of toxic isomers.</span>\n"
|
||||
if(10 to 25)
|
||||
msg += "<span class='danger'>Subject contains toxic isomers.</span>\n"
|
||||
if(25 to 50)
|
||||
msg += "<span class='danger'>Subject contains a substantial amount of toxic isomers.</span>\n"
|
||||
if(50 to 95)
|
||||
msg += "<span class='danger'>Subject contains a high amount of toxic isomers.</span>\n"
|
||||
if(95 to INFINITY)
|
||||
msg += "<span class='danger'>Subject contains a extremely dangerous amount of toxic isomers.</span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
|
||||
@@ -78,12 +78,20 @@
|
||||
|
||||
/obj/item/holosign_creator/atmos
|
||||
name = "ATMOS holofan projector"
|
||||
desc = "A holographic projector that creates holographic barriers that prevent changes in atmosphere conditions."
|
||||
desc = "A holographic projector that creates holographic fans that prevent changes in atmosphere conditions. Somehow."
|
||||
icon_state = "signmaker_atmos"
|
||||
holosign_type = /obj/structure/holosign/barrier/atmos
|
||||
creation_time = 0
|
||||
max_signs = 3
|
||||
|
||||
/obj/item/holosign_creator/firelock
|
||||
name = "ATMOS holofirelock projector"
|
||||
desc = "A holographic projector that creates holographic barriers that prevent changes in temperature conditions."
|
||||
icon_state = "signmaker_engi"
|
||||
holosign_type = /obj/structure/holosign/barrier/firelock
|
||||
creation_time = 0
|
||||
max_signs = 3
|
||||
|
||||
/obj/item/holosign_creator/medical
|
||||
name = "\improper PENLITE barrier projector"
|
||||
desc = "A holographic projector that creates PENLITE holobarriers. Useful during quarantines since they halt those with malicious diseases."
|
||||
|
||||
@@ -781,6 +781,11 @@
|
||||
throwforce = 20
|
||||
throw_speed = 4
|
||||
attack_verb = list("gored")
|
||||
var/clonechance = 50
|
||||
var/clonedamage = 12
|
||||
var/clonespeed = 0
|
||||
var/clone_replication_chance = 30
|
||||
var/clone_lifespan = 100
|
||||
|
||||
/obj/item/twohanded/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity)
|
||||
. = ..()
|
||||
@@ -791,10 +796,11 @@
|
||||
var/mob/living/L = AM
|
||||
if(istype (L, /mob/living/simple_animal/hostile/illusion))
|
||||
return
|
||||
if(!L.stat && prob(50))
|
||||
if(!L.stat && prob(clonechance))
|
||||
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
|
||||
M.faction = user.faction.Copy()
|
||||
M.Copy_Parent(user, 100, user.health/2.5, 12, 30)
|
||||
M.set_varspeed(clonespeed)
|
||||
M.Copy_Parent(user, clone_lifespan, user.health/2.5, clonedamage, clone_replication_chance)
|
||||
M.GiveTarget(L)
|
||||
|
||||
/obj/item/twohanded/pitchfork
|
||||
@@ -1010,4 +1016,4 @@
|
||||
var/client/C = user.client
|
||||
C.change_view(CONFIG_GET(string/default_view))
|
||||
user.client.pixel_x = 0
|
||||
user.client.pixel_y = 0
|
||||
user.client.pixel_y = 0
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
new /obj/item/tank/internals/emergency_oxygen/engi(src)
|
||||
new /obj/item/analyzer(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
new /obj/item/holosign_creator/firelock(src)
|
||||
new /obj/item/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
|
||||
@@ -619,6 +619,24 @@
|
||||
skip_reentry_check = TRUE
|
||||
banType = "ghostcafe"
|
||||
|
||||
/datum/action/toggle_dead_chat_mob
|
||||
icon_icon = 'icons/mob/mob.dmi'
|
||||
button_icon_state = "ghost"
|
||||
name = "Toggle deadchat"
|
||||
desc = "Turn off or on your ability to hear ghosts."
|
||||
|
||||
/datum/action/toggle_dead_chat_mob/Trigger()
|
||||
if(!..())
|
||||
return 0
|
||||
var/mob/M = target
|
||||
if(HAS_TRAIT_FROM(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT))
|
||||
REMOVE_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
|
||||
to_chat(M,"<span class='notice'>You're no longer hearing deadchat.</span>")
|
||||
else
|
||||
ADD_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
|
||||
to_chat(M,"<span class='notice'>You're once again longer hearing deadchat.</span>")
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn)
|
||||
if(new_spawn.client)
|
||||
new_spawn.client.prefs.copy_to(new_spawn)
|
||||
@@ -629,10 +647,13 @@
|
||||
new_spawn.AddElement(/datum/element/ghost_role_eligibility)
|
||||
ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT)
|
||||
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
|
||||
to_chat(new_spawn,"<span class='boldwarning'>You maybe sharing your cafe with some ninja-captured individuals, so make sure to only interact with the ghosts you hear as a ghost!</span>")
|
||||
ADD_TRAIT(new_spawn,TRAIT_PACIFISM,GHOSTROLE_TRAIT)
|
||||
to_chat(new_spawn,"<span class='boldwarning'>You may be sharing your cafe with some ninja-captured individuals, so make sure to only interact with the ghosts you hear as a ghost!</span>")
|
||||
to_chat(new_spawn,"<span class='boldwarning'>You can turn yourself into a ghost and freely reenter your body with the ghost action.</span>")
|
||||
var/datum/action/ghost/G = new(new_spawn)
|
||||
G.Grant(new_spawn)
|
||||
var/datum/action/toggle_dead_chat_mob/D = new(new_spawn)
|
||||
D.Grant(new_spawn)
|
||||
|
||||
/datum/outfit/ghostcafe
|
||||
name = "ID, jumpsuit and shoes"
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
|
||||
/obj/structure/holosign/barrier/atmos
|
||||
name = "holo firelock"
|
||||
desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects from passing through, gas is kept out."
|
||||
icon_state = "holo_firelock"
|
||||
name = "holo fan"
|
||||
desc = "A holographic barrier resembling a tiny fan. Though it does not prevent solid objects from passing through, gas is kept out. Somehow."
|
||||
icon_state = "holo_fan"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
@@ -81,6 +81,18 @@
|
||||
. = ..()
|
||||
air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/holosign/barrier/firelock
|
||||
name = "holo firelock"
|
||||
desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects or gas from passing through, temperature changes are kept out."
|
||||
icon_state = "holo_firelock"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
alpha = 150
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/firelock/blocksTemperature()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg
|
||||
name = "Energy Field"
|
||||
desc = "A fragile energy field that blocks movement. Excels at blocking lethal projectiles."
|
||||
|
||||
Reference in New Issue
Block a user