Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+37 -58
View File
@@ -57,26 +57,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/overlays_x_offset = 0 //x offset to use for certain overlays
/obj/item/device/pda/pickup(mob/user)
..()
if(fon)
SetLuminosity(0)
user.AddLuminosity(f_lum)
/obj/item/device/pda/dropped(mob/user)
..()
if(fon)
user.AddLuminosity(-f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
if(fon)
if(!isturf(loc))
loc.AddLuminosity(f_lum)
SetLuminosity(0)
else
SetLuminosity(f_lum)
set_light(f_lum)
PDAs += src
if(default_cartridge)
cartridge = new default_cartridge(src)
@@ -344,7 +329,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
U.put_in_hands(cartridge)
U << "<span class='notice'>You remove [cartridge] from [src].</span>"
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
@@ -372,16 +357,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Light")
if(fon)
fon = 0
if(src in U.contents)
U.AddLuminosity(-f_lum)
else
SetLuminosity(0)
set_light(0)
else
fon = 1
if(src in U.contents)
U.AddLuminosity(f_lum)
else
SetLuminosity(f_lum)
set_light(2.3)
update_icon()
if("Medical Scan")
if(scanmode == 1)
@@ -417,7 +396,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(A && alert_s)
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
_alert_drones(msg, TRUE)
U << msg
to_chat(U, msg)
//NOTEKEEPER FUNCTIONS===================================
@@ -447,7 +426,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(t)
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
hidden_uplink.interact(U)
U << "The PDA softly beeps."
to_chat(U, "The PDA softly beeps.")
U << browse(null, "window=pda")
src.mode = 0
else
@@ -472,7 +451,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.show_message("<span class='notice'>Virus sent!</span>", 1)
P.honkamt = (rand(15,20))
else
U << "PDA not found."
to_chat(U, "PDA not found.")
else
U << browse(null, "window=pda")
return
@@ -486,7 +465,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
P.silent = 1
P.ttone = "silence"
else
U << "PDA not found."
to_chat(U, "PDA not found.")
else
U << browse(null, "window=pda")
return
@@ -528,7 +507,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.show_message("<span class='notice'>Success!</span>", 1)
P.explode()
else
U << "PDA not found."
to_chat(U, "PDA not found.")
else
U.unset_machine()
U << browse(null, "window=pda")
@@ -577,7 +556,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (ismob(loc))
var/mob/M = loc
M.put_in_hands(id)
usr << "<span class='notice'>You remove the ID from the [name].</span>"
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
else
id.loc = get_turf(src)
id = null
@@ -624,7 +603,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
log_pda("[user] (PDA: [src.name]) sent \"[message]\" to [P.name]")
else
if(!multiple)
user << "<span class='notice'>ERROR: Server isn't responding.</span>"
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
return
photo = null
@@ -651,7 +630,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
L = get(src, /mob/living/silicon)
if(L && L.stat != UNCONSCIOUS)
L << "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)"
to_chat(L, "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)")
update_icon()
add_overlay(image(icon, icon_alert))
@@ -660,7 +639,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
for(var/mob/M in player_list)
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
var/link = FOLLOW_LINK(M, user)
M << "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>"
to_chat(M, "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>")
/obj/item/device/pda/proc/can_send(obj/item/device/pda/P)
if(!P || QDELETED(P) || P.toff)
@@ -723,7 +702,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(id)
remove_id()
else
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
to_chat(usr, "<span class='warning'>This PDA does not have an ID in it!</span>")
/obj/item/device/pda/verb/verb_remove_pen()
set category = "Object"
@@ -743,11 +722,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
M.put_in_hands(inserted_item)
else
inserted_item.forceMove(loc)
usr << "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>"
to_chat(usr, "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>")
inserted_item = null
update_icon()
else
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
to_chat(usr, "<span class='warning'>This PDA does not have a pen in it!</span>")
//trying to insert or remove an id
/obj/item/device/pda/proc/id_check(mob/user, obj/item/weapon/card/id/I)
@@ -776,7 +755,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!user.transferItemToLoc(C, src))
return
cartridge = C
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
if(cartridge.radio)
cartridge.radio.hostpda = src
update_icon()
@@ -784,19 +763,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
if(!idcard.registered_name)
user << "<span class='warning'>\The [src] rejects the ID!</span>"
to_chat(user, "<span class='warning'>\The [src] rejects the ID!</span>")
return
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
update_label()
user << "<span class='notice'>Card scanned.</span>"
to_chat(user, "<span class='notice'>Card scanned.</span>")
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
if(!id_check(user, idcard))
return
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.</span>")
updateSelfDialog()//Update self dialog on success.
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
@@ -804,22 +783,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!user.transferItemToLoc(C, src))
return
pai = C
user << "<span class='notice'>You slot \the [C] into [src].</span>"
to_chat(user, "<span class='notice'>You slot \the [C] into [src].</span>")
update_icon()
updateUsrDialog()
else if(is_type_in_list(C, contained_item)) //Checks if there is a pen
if(inserted_item)
user << "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>"
to_chat(user, "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>")
else
if(!user.transferItemToLoc(C, src))
return
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
to_chat(user, "<span class='notice'>You slide \the [C] into \the [src].</span>")
inserted_item = C
update_icon()
else if(istype(C, /obj/item/weapon/photo))
var/obj/item/weapon/photo/P = C
photo = P.img
user << "<span class='notice'>You scan \the [C].</span>"
to_chat(user, "<span class='notice'>You scan \the [C].</span>")
else if(hidden_uplink && hidden_uplink.active)
hidden_uplink.attackby(C, user, params)
else
@@ -854,13 +833,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!isnull(A.reagents))
if(A.reagents.reagent_list.len > 0)
var/reagents_length = A.reagents.reagent_list.len
user << "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>"
to_chat(user, "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>")
for (var/re in A.reagents.reagent_list)
user << "<span class='notice'>\t [re]</span>"
to_chat(user, "<span class='notice'>\t [re]</span>")
else
user << "<span class='notice'>No active chemical agents found in [A].</span>"
to_chat(user, "<span class='notice'>No active chemical agents found in [A].</span>")
else
user << "<span class='notice'>No significant chemical agents found in [A].</span>"
to_chat(user, "<span class='notice'>No significant chemical agents found in [A].</span>")
if(5)
if (istype(A, /obj/item/weapon/tank))
@@ -884,7 +863,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
var/obj/item/weapon/paper/PP = A
if (!PP.info)
user << "<span class='warning'>Unable to scan! Paper is blank.</span>"
to_chat(user, "<span class='warning'>Unable to scan! Paper is blank.</span>")
return
notehtml = PP.info
note = replacetext(notehtml, "<BR>", "\[br\]")
@@ -893,7 +872,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
note = replacetext(note, "</ul>", "\[/list\]")
note = html_encode(note)
notescanned = 1
user << "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" //concept of scanning paper copyright brainoblivion 2009
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
/obj/item/device/pda/proc/explode() //This needs tuning.
@@ -941,7 +920,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return //won't work if dead
if(src.aiPDA.toff)
user << "Turn on your receiver in order to send messages."
to_chat(user, "Turn on your receiver in order to send messages.")
return
for (var/obj/item/device/pda/P in get_viewable_pdas())
@@ -974,9 +953,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
return //won't work if dead
if(!isnull(aiPDA))
aiPDA.toff = !aiPDA.toff
usr << "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>"
to_chat(usr, "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>")
else
usr << "You do not have a PDA. You should make an issue report about this."
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
/mob/living/silicon/ai/verb/cmd_toggle_pda_silent()
set category = "AI Commands"
@@ -986,9 +965,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!isnull(aiPDA))
//0
aiPDA.silent = !aiPDA.silent
usr << "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>"
to_chat(usr, "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>")
else
usr << "You do not have a PDA. You should make an issue report about this."
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user)
if(user.stat == 2)
@@ -997,7 +976,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
else
user << "You do not have a PDA. You should make an issue report about this."
to_chat(user, "You do not have a PDA. You should make an issue report about this.")
/obj/item/weapon/storage/box/PDAs/New()
..()
+3 -3
View File
@@ -69,7 +69,7 @@
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
AI << "Your core files are being wiped!"
to_chat(AI, "Your core files are being wiped!")
while(AI.stat != DEAD && flush)
AI.adjustOxyLoss(1)
AI.updatehealth()
@@ -78,10 +78,10 @@
. = TRUE
if("wireless")
AI.control_disabled = !AI.control_disabled
AI << "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!"
to_chat(AI, "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!")
. = TRUE
if("radio")
AI.radio_enabled = !AI.radio_enabled
AI << "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!"
to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!")
. = TRUE
update_icon()
@@ -63,7 +63,7 @@
return 0
var/turf/T = get_turf(user.loc)
if(T.z != current.z || !current.can_use())
user << "<span class='danger'>[src] has lost the signal.</span>"
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.unset_machine()
return 0
@@ -233,11 +233,11 @@
var/obj/machinery/camera/C = locate(href_list["view"]) in cameras
if(C && istype(C))
if(!C.can_use())
usr << "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>"
to_chat(usr, "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>")
return
var/turf/T = get_turf(loc)
if(!T || C.z != T.z)
usr << "<span class='warning'>You can't get a signal!</span>"
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
return
current = C
spawn(6)
@@ -34,7 +34,7 @@
if(!active_dummy)
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
user << "<span class='notice'>Scanned [target].</span>"
to_chat(user, "<span class='notice'>Scanned [target].</span>")
var/obj/temp = new/obj()
temp.appearance = target.appearance
temp.layer = initial(target.layer) // scanning things in your inventory
@@ -48,19 +48,19 @@
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
usr << "<span class='notice'>You deactivate \the [src].</span>"
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
new /obj/effect/overlay/temp/emp/pulse(get_turf(src))
else
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(usr, saved_appearance, src)
usr << "<span class='notice'>You activate \the [src].</span>"
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
new /obj/effect/overlay/temp/emp/pulse(get_turf(src))
/obj/item/device/chameleon/proc/disrupt(delete_dummy = 1)
if(active_dummy)
for(var/mob/M in active_dummy)
M << "<span class='danger'>Your chameleon-projector deactivates.</span>"
to_chat(M, "<span class='danger'>Your chameleon-projector deactivates.</span>")
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -35,6 +35,6 @@
/obj/item/device/doorCharge/examine(mob/user)
..()
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
user << "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within."
to_chat(user, "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within.")
else
user << "A small, suspicious object that feels lukewarm when held."
to_chat(user, "A small, suspicious object that feels lukewarm when held.")
+135 -48
View File
@@ -10,30 +10,23 @@
materials = list(MAT_METAL=50, MAT_GLASS=20)
actions_types = list(/datum/action/item_action/toggle_light)
var/on = 0
var/brightness_on = 4 //luminosity when on
var/brightness_on = 4 //range of light when on
var/flashlight_power //strength of the light when on. optional
/obj/item/device/flashlight/Initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
SetLuminosity(brightness_on)
else
icon_state = initial(icon_state)
SetLuminosity(0)
update_brightness()
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
if(on)
icon_state = "[initial(icon_state)]-on"
if(loc == user)
user.AddLuminosity(brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
if(flashlight_power)
set_light(l_range = brightness_on, l_power = flashlight_power)
else
set_light(brightness_on)
else
icon_state = initial(icon_state)
if(loc == user)
user.AddLuminosity(-brightness_on)
else if(isturf(loc))
SetLuminosity(0)
set_light(0)
/obj/item/device/flashlight/attack_self(mob/user)
on = !on
@@ -52,12 +45,12 @@
return ..() //just hit them in the head
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
var/mob/living/carbon/human/H = M //mob has protective eyewear
if(ishuman(M) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES)))
user << "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>"
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
return
if(M == user) //they're using it on themselves
@@ -71,30 +64,15 @@
var/mob/living/carbon/C = M
if(istype(C))
if(C.stat == DEAD || (C.disabilities & BLIND)) //mob is dead or fully blind
user << "<span class='warning'>[C] pupils don't react to the light!</span>"
to_chat(user, "<span class='warning'>[C] pupils don't react to the light!</span>")
else if(C.dna.check_mutation(XRAY)) //mob has X-RAY vision
user << "<span class='danger'>[C] pupils give an eerie glow!</span>"
to_chat(user, "<span class='danger'>[C] pupils give an eerie glow!</span>")
else //they're okay!
if(C.flash_act(visual = 1))
user << "<span class='notice'>[C]'s pupils narrow.</span>"
to_chat(user, "<span class='notice'>[C]'s pupils narrow.</span>")
else
return ..()
/obj/item/device/flashlight/pickup(mob/user)
..()
if(on)
user.AddLuminosity(brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
..()
if(on)
user.AddLuminosity(-brightness_on)
SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen
name = "penlight"
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
@@ -107,7 +85,7 @@
/obj/item/device/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
if(!proximity_flag)
if(holo_cooldown > world.time)
user << "<span class='warning'>[src] is not ready yet!</span>"
to_chat(user, "<span class='warning'>[src] is not ready yet!</span>")
return
var/T = get_turf(target)
if(locate(/mob/living) in T)
@@ -188,6 +166,7 @@
var/on_damage = 7
var/produce_heat = 1500
heat = 1000
light_color = LIGHT_COLOR_FLARE
/obj/item/device/flashlight/flare/New()
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
@@ -230,9 +209,10 @@
// Usual checks
if(!fuel)
user << "<span class='warning'>It's out of fuel!</span>"
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
return
if(on)
to_chat(user, "<span class='notice'>[src] is already on.</span>")
return
. = ..()
@@ -284,19 +264,20 @@
/obj/item/device/flashlight/emp/New()
..()
START_PROCESSING(SSobj, src)
..()
START_PROCESSING(SSobj, src)
/obj/item/device/flashlight/emp/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/device/flashlight/emp/process()
charge_tick++
if(charge_tick < 10) return 0
charge_tick = 0
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
return 1
charge_tick++
if(charge_tick < 10)
return FALSE
charge_tick = 0
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
return TRUE
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
if(on && user.zone_selected == "eyes") // call original attack proc only if aiming at the eyes
@@ -317,8 +298,114 @@
"<span class='userdanger'>[user] blinks \the [src] at you.")
else
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].")
user << "\The [src] now has [emp_cur_charges] charge\s."
to_chat(user, "\The [src] now has [emp_cur_charges] charge\s.")
A.emp_act(1)
else
user << "<span class='warning'>\The [src] needs time to recharge!</span>"
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
return
// Glowsticks, in the uncomfortable range of similar to flares,
// but not similar enough to make it worth a refactor
/obj/item/device/flashlight/glowstick
name = "green glowstick"
desc = "A military-grade glowstick."
w_class = WEIGHT_CLASS_SMALL
brightness_on = 4
color = LIGHT_COLOR_GREEN
icon_state = "glowstick"
item_state = "glowstick"
var/fuel = 0
/obj/item/device/flashlight/glowstick/Initialize()
fuel = rand(1600, 2000)
light_color = color
..()
/obj/item/device/flashlight/glowstick/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/device/flashlight/glowstick/process()
fuel = max(fuel - 1, 0)
if(!fuel)
turn_off()
STOP_PROCESSING(SSobj, src)
update_icon()
/obj/item/device/flashlight/glowstick/proc/turn_off()
on = 0
update_icon()
/obj/item/device/flashlight/glowstick/update_icon()
item_state = "glowstick"
overlays.Cut()
if(!fuel)
icon_state = "glowstick-empty"
cut_overlays()
set_light(0)
else if(on)
var/image/I = image(icon,"glowstick-glow",color)
add_overlay(I)
item_state = "glowstick-on"
set_light(brightness_on)
else
icon_state = "glowstick"
cut_overlays()
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
if(!fuel)
to_chat(user, "<span class='notice'>[src] is spent.</span>")
return
if(on)
to_chat(user, "<span class='notice'>[src] is already lit.</span>")
return
. = ..()
if(.)
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
START_PROCESSING(SSobj, src)
/obj/item/device/flashlight/glowstick/red
name = "red glowstick"
color = LIGHT_COLOR_RED
/obj/item/device/flashlight/glowstick/blue
name = "blue glowstick"
color = LIGHT_COLOR_BLUE
/obj/item/device/flashlight/glowstick/cyan
name = "cyan glowstick"
color = LIGHT_COLOR_CYAN
/obj/item/device/flashlight/glowstick/orange
name = "orange glowstick"
color = LIGHT_COLOR_ORANGE
/obj/item/device/flashlight/glowstick/yellow
name = "yellow glowstick"
color = LIGHT_COLOR_YELLOW
/obj/item/device/flashlight/glowstick/pink
name = "pink glowstick"
color = LIGHT_COLOR_PINK
/obj/item/device/flashlight/glowstick/random
name = "random colored glowstick"
/obj/item/device/flashlight/glowstick/random/Initialize()
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
glowtypes -= /obj/item/device/flashlight/glowstick/random
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
name = initial(glowtype.name)
color = initial(glowtype.color)
. = ..()
/obj/item/device/flashlight/flashdark
name = "flashdark"
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
icon_state = "flashdark"
item_state = "flashdark"
brightness_on = 2.5
flashlight_power = -3
@@ -0,0 +1,107 @@
/obj/item/device/forcefield
name = "forcefield projector"
desc = "An experimental device that can create several forcefields at a distance."
icon_state = "signmaker_engi"
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
flags = NOBLUDGEON
item_state = "electronic"
materials = list(MAT_METAL=250, MAT_GLASS=500)
origin_tech = "magnets=5;engineering=5;powerstorage=4"
var/max_shield_integrity = 250
var/shield_integrity = 250
var/max_fields = 3
var/list/current_fields
var/field_distance_limit = 7
/obj/item/device/forcefield/afterattack(atom/target, mob/user, proximity_flag)
if(!check_allowed_items(target, 1))
return
if(istype(target, /obj/structure/projected_forcefield))
var/obj/structure/projected_forcefield/F = target
if(F.generator == src)
to_chat(user, "<span class='notice'>You deactivate [F].</span>")
qdel(F)
return
var/turf/T = get_turf(target)
if(T.density)
return
if(get_dist(T,src) > field_distance_limit)
return
if(LAZYLEN(current_fields) >= max_fields)
to_chat(user, "<span class='notice'>[src] cannot sustain any more forcefields!</span>")
return
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
user.visible_message("<span class='warning'>[user] projects a forcefield!</span>","<span class='notice'>You project a forcefield.</span>")
var/obj/structure/projected_forcefield/F = new(T, src)
current_fields += F
user.changeNext_move(CLICK_CD_MELEE)
/obj/item/device/forcefield/attack_self(mob/user)
if(LAZYLEN(current_fields))
to_chat(user, "<span class='notice'>You deactivate [src], disabling all active forcefields.</span>")
for(var/obj/structure/projected_forcefield/F in current_fields)
qdel(F)
/obj/item/device/forcefield/examine(mob/user)
..()
var/percent_charge = round((shield_integrity/max_shield_integrity)*100)
to_chat(user, "<span class='notice'>It is currently sustaining [LAZYLEN(current_fields)]/[max_fields] fields, and it's [percent_charge]% charged.</span>")
/obj/item/device/forcefield/Initialize(mapload)
..()
current_fields = list()
START_PROCESSING(SSobj, src)
/obj/item/device/forcefield/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/device/forcefield/process()
if(!LAZYLEN(current_fields))
shield_integrity = min(shield_integrity + 4, max_shield_integrity)
else
shield_integrity = max(shield_integrity - LAZYLEN(current_fields), 0) //fields degrade slowly over time
for(var/obj/structure/projected_forcefield/F in current_fields)
if(shield_integrity <= 0 || get_dist(F,src) > field_distance_limit)
qdel(F)
/obj/structure/projected_forcefield
name = "forcefield"
desc = "A glowing barrier, generated by a projector nearby. It could be overloaded if hit enough times."
icon = 'icons/effects/effects.dmi'
icon_state = "forcefield"
layer = ABOVE_ALL_MOB_LAYER
anchored = TRUE
density = TRUE
mouse_opacity = 2
obj_integrity = INFINITY
max_integrity = INFINITY
CanAtmosPass = ATMOS_PASS_DENSITY
armor = list(melee = 0, bullet = 25, laser = 50, energy = 50, bomb = 25, bio = 100, rad = 100, fire = 100, acid = 100)
var/obj/item/device/forcefield/generator
/obj/structure/projected_forcefield/Initialize(mapload, obj/item/device/forcefield/origin)
generator = origin
..()
/obj/structure/projected_forcefield/Destroy()
visible_message("<span class='warning'>[src] flickers and disappears!</span>")
playsound(src,'sound/weapons/resonator_blast.ogg',25,1)
generator.current_fields -= src
generator = null
return ..()
/obj/structure/projected_forcefield/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
return !density
/obj/structure/projected_forcefield/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
/obj/structure/projected_forcefield/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
if(sound_effect)
play_attack_sound(damage_amount, damage_type, damage_flag)
generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0)
@@ -37,23 +37,23 @@
..()
if(!scanning)
return 1
user << "<span class='info'>Alt-click it to clear stored radiation levels.</span>"
to_chat(user, "<span class='info'>Alt-click it to clear stored radiation levels.</span>")
if(emagged)
user << "<span class='warning'>The display seems to be incomprehensible.</span>"
to_chat(user, "<span class='warning'>The display seems to be incomprehensible.</span>")
return 1
switch(radiation_count)
if(-INFINITY to RAD_LEVEL_NORMAL)
user << "<span class='notice'>Ambient radiation level count reports that all is well.</span>"
to_chat(user, "<span class='notice'>Ambient radiation level count reports that all is well.</span>")
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
user << "<span class='disarm'>Ambient radiation levels slightly above average.</span>"
to_chat(user, "<span class='disarm'>Ambient radiation levels slightly above average.</span>")
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
user << "<span class='warning'>Ambient radiation levels above average.</span>"
to_chat(user, "<span class='warning'>Ambient radiation levels above average.</span>")
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
user << "<span class='danger'>Ambient radiation levels highly above average.</span>"
to_chat(user, "<span class='danger'>Ambient radiation levels highly above average.</span>")
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
user << "<span class='suicide'>Ambient radiation levels nearing critical level.</span>"
to_chat(user, "<span class='suicide'>Ambient radiation levels nearing critical level.</span>")
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
user << "<span class='boldannounce'>Ambient radiation levels above critical level!</span>"
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>")
/obj/item/device/geiger_counter/update_icon()
if(!scanning)
@@ -86,27 +86,27 @@
if(isliving(loc))
var/mob/living/M = loc
if(!emagged)
M << "<span class='boldannounce'>\icon[src] RADIATION PULSE DETECTED.</span>"
M << "<span class='boldannounce'>\icon[src] Severity: [amount]</span>"
to_chat(M, "<span class='boldannounce'>\icon[src] RADIATION PULSE DETECTED.</span>")
to_chat(M, "<span class='boldannounce'>\icon[src] Severity: [amount]</span>")
else
M << "<span class='boldannounce'>\icon[src] !@%$AT!(N P!LS! D/TEC?ED.</span>"
M << "<span class='boldannounce'>\icon[src] &!F2rity: <=[amount]#1</span>"
to_chat(M, "<span class='boldannounce'>\icon[src] !@%$AT!(N P!LS! D/TEC?ED.</span>")
to_chat(M, "<span class='boldannounce'>\icon[src] &!F2rity: <=[amount]#1</span>")
update_icon()
/obj/item/device/geiger_counter/attack_self(mob/user)
scanning = !scanning
update_icon()
user << "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>"
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>")
/obj/item/device/geiger_counter/attack(mob/living/M, mob/user)
if(user.a_intent == INTENT_HELP)
if(!emagged)
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='notice'>You scan [M]'s radiation levels with [src]...</span>")
if(!M.radiation)
user << "<span class='notice'>\icon[src] Radiation levels within normal boundaries.</span>"
to_chat(user, "<span class='notice'>\icon[src] Radiation levels within normal boundaries.</span>")
return 1
else
user << "<span class='boldannounce'>\icon[src] Subject is irradiated. Radiation levels: [M.radiation].</span>"
to_chat(user, "<span class='boldannounce'>\icon[src] Subject is irradiated. Radiation levels: [M.radiation].</span>")
return 1
else
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [M]'s body!</span>")
@@ -118,7 +118,7 @@
/obj/item/device/geiger_counter/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver) && emagged)
if(scanning)
user << "<span class='warning'>Turn off [src] before you perform this action!</span>"
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
return 0
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
playsound(user, I.usesound, 50, 1)
@@ -137,18 +137,18 @@
if(!istype(user) || user.incapacitated())
return ..()
if(!scanning)
usr << "<span class='warning'>[src] must be on to reset its radiation level!</span>"
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
return 0
radiation_count = 0
usr << "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>"
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
update_icon()
/obj/item/device/geiger_counter/emag_act(mob/user)
if(!emagged)
if(scanning)
user << "<span class='warning'>Turn off [src] before you perform this action!</span>"
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
return 0
user << "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>"
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
emagged = 1
#undef RAD_LEVEL_NORMAL
@@ -29,7 +29,7 @@
/obj/item/device/instrument/attack_self(mob/user)
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 1
interact(user)
+11 -11
View File
@@ -44,13 +44,13 @@
if(!user.transferItemToLoc(W, src))
return
diode = W
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
to_chat(user, "<span class='notice'>You install a [diode.name] in [src].</span>")
else
user << "<span class='notice'>[src] already has a diode installed.</span>"
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
else if(istype(W, /obj/item/weapon/screwdriver))
if(diode)
user << "<span class='notice'>You remove the [diode.name] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
diode.loc = get_turf(src.loc)
diode = null
else
@@ -63,22 +63,22 @@
if( !(user in (viewers(7,target))) )
return
if (!diode)
user << "<span class='notice'>You point [src] at [target], but nothing happens!</span>"
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
return
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna.check_mutation(HULK) || (NOGUNS in H.dna.species.species_traits))
user << "<span class='warning'>Your fingers can't press the button!</span>"
to_chat(user, "<span class='warning'>Your fingers can't press the button!</span>")
return
add_fingerprint(user)
//nothing happens if the battery is drained
if(recharge_locked)
user << "<span class='notice'>You point [src] at [target], but it's still charging.</span>"
to_chat(user, "<span class='notice'>You point [src] at [target], but it's still charging.</span>")
return
var/outmsg
@@ -109,7 +109,7 @@
if(prob(effectchance * diode.rating))
S.flash_act(affect_silicon = 1)
S.Weaken(rand(5,10))
S << "<span class='danger'>Your sensors were overloaded by a laser!</span>"
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
add_logs(user, S, "shone in the sensors", src)
else
@@ -139,9 +139,9 @@
I.pixel_y = target.pixel_y + rand(-5,5)
if(outmsg)
user << outmsg
to_chat(user, outmsg)
else
user << "<span class='info'>You point [src] at [target].</span>"
to_chat(user, "<span class='info'>You point [src] at [target].</span>")
energy -= 1
if(energy <= max_energy)
@@ -149,7 +149,7 @@
recharging = 1
START_PROCESSING(SSobj, src)
if(energy <= 0)
user << "<span class='warning'>[src]'s battery is overused, it needs time to recharge!</span>"
to_chat(user, "<span class='warning'>[src]'s battery is overused, it needs time to recharge!</span>")
recharge_locked = 1
flick_overlay_view(I, targloc, 10)
@@ -73,30 +73,30 @@
/obj/item/device/lightreplacer/examine(mob/user)
..()
user << status_string()
to_chat(user, status_string())
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full.</span>"
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
return
else if(G.use(decrement))
AddUses(increment)
user << "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>"
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
return
else
user << "<span class='warning'>You need one sheet of glass to replace lights!</span>"
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
if(istype(W, /obj/item/weapon/shard))
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full.</span>"
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
return
if(!user.temporarilyRemoveItemFromInventory(W))
return
AddUses(round(increment*0.75))
user << "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>"
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
qdel(W)
return
@@ -111,7 +111,7 @@
else
if(!user.temporarilyRemoveItemFromInventory(W))
return
user << "<span class='notice'>You insert the [L.name] into the [src.name]</span>"
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
AddShards(1, user)
qdel(L)
return
@@ -138,21 +138,21 @@
qdel(L)
if(!found_lightbulbs)
user << "<span class='warning'>\The [S] contains no bulbs.</span>"
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
return
if(!replaced_something && src.uses == max_uses)
user << "<span class='warning'>\The [src] is full!</span>"
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
return
user << "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>"
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
/obj/item/device/lightreplacer/emag_act()
if(!emagged)
Emag()
/obj/item/device/lightreplacer/attack_self(mob/user)
user << status_string()
to_chat(user, status_string())
/obj/item/device/lightreplacer/update_icon()
icon_state = "lightreplacer[emagged]"
@@ -176,7 +176,7 @@
AddUses(new_bulbs)
bulb_shards = bulb_shards % shards_required
if(new_bulbs != 0)
user << "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>"
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
return new_bulbs
@@ -191,7 +191,7 @@
if(target.status != LIGHT_OK)
if(CanUse(U))
if(!Use(U)) return
U << "<span class='notice'>You replace the [target.fitting] with \the [src].</span>"
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
if(target.status != LIGHT_EMPTY)
AddShards(1, U)
@@ -213,10 +213,10 @@
return
else
U << failmsg
to_chat(U, failmsg)
return
else
U << "<span class='warning'>There is a working [target.fitting] already inserted!</span>"
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
return
/obj/item/device/lightreplacer/proc/Emag()
@@ -250,7 +250,7 @@
ReplaceLight(A, U)
if(!used)
U << failmsg
to_chat(U, failmsg)
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
+2 -2
View File
@@ -11,14 +11,14 @@
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
if(spamcheck > world.time)
user << "<span class='warning'>\The [src] needs to recharge!</span>"
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
else
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
spamcheck = world.time + 50
return voicespan
/obj/item/device/megaphone/emag_act(mob/user)
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
emagged = 1
voicespan = list(SPAN_REALLYBIG, "userdanger")
+12 -10
View File
@@ -65,25 +65,27 @@
SSpai.findPAI(src, usr)
if(pai)
if(!(loc == usr))
return
if(href_list["setdna"])
if(pai.master_dna)
return
if(!istype(usr, /mob/living/carbon))
usr << "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>"
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
else
var/mob/living/carbon/M = usr
pai.master = M.real_name
pai.master_dna = M.dna.unique_enzymes
pai << "<span class='notice'>You have been bound to a new master.</span>"
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
pai.emittersemicd = FALSE
if(href_list["wipe"])
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
if(confirm == "Yes")
if(pai)
pai << "<span class='warning'>You feel yourself slipping away from reality.</span>"
pai << "<span class='danger'>Byte by byte you lose your sense of self.</span>"
pai << "<span class='userdanger'>Your mental faculties leave you.</span>"
pai << "<span class='rose'>oblivion... </span>"
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
to_chat(pai, "<span class='danger'>Byte by byte you lose your sense of self.</span>")
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
to_chat(pai, "<span class='rose'>oblivion... </span>")
pai.death(0)
if(href_list["wires"])
var/wire = text2num(href_list["wires"])
@@ -95,13 +97,13 @@
pai.add_supplied_law(0,newlaws)
if(href_list["toggle_holo"])
if(pai.canholo)
pai << "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>"
to_chat(pai, "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>")
pai.canholo = FALSE
usr << "<span class='warning'>You disable your pAI's holomatrix!</span>"
to_chat(usr, "<span class='warning'>You disable your pAI's holomatrix!</span>")
else
pai << "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>"
to_chat(pai, "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>")
pai.canholo = TRUE
usr << "<span class='notice'>You enable your pAI's holomatrix!</span>"
to_chat(usr, "<span class='notice'>You enable your pAI's holomatrix!</span>")
attack_self(usr)
@@ -37,4 +37,4 @@
/obj/item/device/pipe_painter/examine()
..()
usr << "It is set to [mode]."
to_chat(usr, "It is set to [mode].")
+4 -4
View File
@@ -52,7 +52,7 @@
mode = value
update_icon()
SetLuminosity(0)
set_light(0)
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
@@ -61,7 +61,7 @@
if(isturf(T) && !T.intact)
attached = locate() in T
if(!attached)
user << "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>"
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(CLAMPED_OFF)
user.visible_message( \
@@ -69,7 +69,7 @@
"<span class='notice'>You attach \the [src] to the cable.</span>",
"<span class='italics'>You hear some wires being connected to something.</span>")
else
user << "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>"
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(DISCONNECTED)
user.visible_message( \
@@ -113,7 +113,7 @@
var/datum/powernet/PN = attached.powernet
if(PN)
SetLuminosity(5)
set_light(5)
// found a powernet, so drain up to max power from it
@@ -0,0 +1,99 @@
/obj/item/device/pressure_plate
name = "pressure plate"
desc = "Useful for autismforts"
item_state = "flash"
icon_state = "pressureplate"
level = 1
var/trigger_mob = TRUE
var/trigger_item = FALSE
var/trigger_silent = FALSE
var/sound/trigger_sound = 'sound/effects/pressureplate.ogg'
var/obj/item/device/assembly/signaler/sigdev = null
var/roundstart_signaller = FALSE
var/roundstart_signaller_freq = 1447
var/roundstart_signaller_code = 30
var/roundstart_hide = FALSE
var/removable_signaller = TRUE
var/active = FALSE
var/image/tile_overlay = null
var/crossed = FALSE
var/trigger_delay = 10
/obj/item/device/pressure_plate/Initialize()
..()
tile_overlay = image(icon = 'icons/turf/floors.dmi', icon_state = "pp_overlay")
if(roundstart_signaller)
sigdev = new
sigdev.code = roundstart_signaller_code
sigdev.frequency = roundstart_signaller_freq
if(istype(loc, /turf/open))
hide(TRUE)
/obj/item/device/pressure_plate/Crossed(atom/movable/AM)
if(!active)
return
if(isliving(AM) && trigger_mob)
var/mob/living/L = AM
step_living(L)
crossed = TRUE
else if(trigger_item)
step_item(AM)
crossed = TRUE
if(!trigger_silent)
if(isturf(loc))
loc.visible_message("<span class='danger'>Click!</span>")
playsound(loc, trigger_sound, 50, 1)
. = ..()
/obj/item/device/pressure_plate/Uncrossed(atom/movable/AM)
if(crossed)
playsound(loc, trigger_sound, 50, 1)
if(isliving(AM))
var/mob/living/L = AM
to_chat(L, "<span class='warning'>You feel something click back into place as you step off [loc]!</span>")
addtimer(CALLBACK(src, .proc/trigger), trigger_delay)
. = ..()
/obj/item/device/pressure_plate/proc/trigger()
if(istype(sigdev))
sigdev.signal()
/obj/item/device/pressure_plate/proc/step_living(mob/living/L)
to_chat(L, "<span class='warning'>You feel a click under your feet!</span>")
/obj/item/device/pressure_plate/proc/step_item(atom/movable/AM)
return
/obj/item/device/pressure_plate/attackby(obj/item/I, mob/living/L)
if(istype(I, /obj/item/device/assembly/signaler) && !istype(sigdev) && removable_signaller && L.transferItemToLoc(I, src))
sigdev = I
to_chat(L, "<span class='notice'>You attach [I] to [src]!</span>")
. = ..()
/obj/item/device/pressure_plate/attack_self(mob/living/L)
if(removable_signaller && istype(sigdev))
to_chat(L, "<span class='notice'>You remove [sigdev] from [src]</span>")
if(!L.put_in_hands(sigdev))
sigdev.forceMove(get_turf(src))
sigdev = null
. = ..()
/obj/item/device/pressure_plate/hide(yes)
if(yes)
invisibility = INVISIBILITY_MAXIMUM
anchored = TRUE
icon_state = null
active = TRUE
if(tile_overlay)
loc.overlays += tile_overlay
else
if(crossed)
trigger() //no cheesing.
invisibility = initial(invisibility)
anchored = FALSE
icon_state = initial(icon_state)
active = FALSE
if(tile_overlay)
loc.overlays -= tile_overlay
@@ -30,7 +30,7 @@
if(iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.back)
user << "<span class='warning'>You need help taking this off!</span>"
to_chat(user, "<span class='warning'>You need help taking this off!</span>")
return
..()
@@ -40,7 +40,7 @@
A.icon = 'icons/obj/assemblies.dmi'
if(!user.transferItemToLoc(W, A))
user << "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>"
to_chat(user, "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>")
return
W.master = A
A.part1 = W
@@ -109,7 +109,7 @@
var/mob/M = loc
step(M, pick(cardinal))
M << "<span class='danger'>You feel a sharp shock!</span>"
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, M)
s.start()
@@ -42,11 +42,14 @@
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
name = "syndicate headset"
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs. \nTo access the syndicate channel, use ; before speaking."
flags = EARBANGPROTECT
origin_tech = "syndicate=3"
icon_state = "syndie_headset"
item_state = "syndie_headset"
/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/syndicate/alt/leader
name = "team leader headset"
command = TRUE
@@ -72,10 +75,13 @@
/obj/item/device/radio/headset/headset_sec/alt
name = "security bowman headset"
desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s."
flags = EARBANGPROTECT
icon_state = "sec_headset_alt"
item_state = "sec_headset_alt"
/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/headset_eng
name = "engineering radio headset"
desc = "When the engineers wish to chat like girls. \nTo access the engineering channel, use :e. "
@@ -124,10 +130,13 @@
/obj/item/device/radio/headset/heads/captain/alt
name = "\proper the captain's bowman headset"
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/heads/rd
name = "\proper the research director's headset"
desc = "Headset of the fellow who keeps society marching towards technological singularity. \nTo access the science channel, use :n. For command, use :c."
@@ -143,10 +152,13 @@
/obj/item/device/radio/headset/heads/hos/alt
name = "\proper the head of security's bowman headset"
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/heads/ce
name = "\proper the chief engineer's headset"
desc = "The headset of the guy in charge of keeping the station powered and undamaged. \nTo access the engineering channel, use :e. For command, use :c."
@@ -196,11 +208,14 @@
/obj/item/device/radio/headset/headset_cent/alt
name = "\improper Centcom bowman headset"
desc = "A headset especially for emergency response personnel. Protects ears from flashbangs. \nTo access the centcom channel, use :y."
flags = EARBANGPROTECT
icon_state = "cent_headset_alt"
item_state = "cent_headset_alt"
keyslot = null
/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/ai
name = "\proper Integrated Subspace Transceiver "
keyslot2 = new /obj/item/device/encryptionkey/ai
@@ -235,14 +250,14 @@
keyslot2 = null
recalculateChannels()
user << "<span class='notice'>You pop out the encryption keys in the headset.</span>"
to_chat(user, "<span class='notice'>You pop out the encryption keys in the headset.</span>")
else
user << "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>"
to_chat(user, "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>")
else if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot && keyslot2)
user << "<span class='warning'>The headset can't hold another key!</span>"
to_chat(user, "<span class='warning'>The headset can't hold another key!</span>")
return
if(!keyslot)
+20 -8
View File
@@ -238,6 +238,12 @@
var/freqnum = text2num(freq) //Why should we call text2num three times when we can just do it here?
var/turf/position = get_turf(src)
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
if(get_dist(position,get_turf(jammer)) < jammer.range)
jammed = TRUE
break
//#### Tagging the signal with all appropriate identity values ####//
// ||-- The mob's name identity --||
@@ -254,6 +260,8 @@
var/jobname // the mob's "job"
if(jammed)
message = Gibberish(message,100)
// --- Human: use their job as seen on the crew manifest - makes it unneeded to carry an ID for an AI to see their job
if(ishuman(M))
@@ -499,18 +507,18 @@
/obj/item/device/radio/examine(mob/user)
..()
if (b_stat)
user << "<span class='notice'>[name] can be attached and modified.</span>"
to_chat(user, "<span class='notice'>[name] can be attached and modified.</span>")
else
user << "<span class='notice'>[name] can not be modified or attached.</span>"
to_chat(user, "<span class='notice'>[name] can not be modified or attached.</span>")
/obj/item/device/radio/attackby(obj/item/weapon/W, mob/user, params)
add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver))
b_stat = !b_stat
if(b_stat)
user << "<span class='notice'>The radio can now be attached and modified!</span>"
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
else
user << "<span class='notice'>The radio can no longer be modified or attached!</span>"
to_chat(user, "<span class='notice'>The radio can no longer be modified or attached!</span>")
else
return ..()
@@ -518,7 +526,7 @@
emped++ //There's been an EMP; better count it
var/curremp = emped //Remember which EMP this was
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
loc << "<span class='warning'>\The [src] overloads.</span>"
to_chat(loc, "<span class='warning'>\The [src] overloads.</span>")
broadcasting = 0
listening = 0
for (var/ch_name in channels)
@@ -541,6 +549,10 @@
subspace_switchable = 1
dog_fashion = null
/obj/item/device/radio/borg/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, NO_EMP_WIRES)
/obj/item/device/radio/borg/syndicate
syndie = 1
keyslot = new /obj/item/device/encryptionkey/syndicate
@@ -565,14 +577,14 @@
keyslot = null
recalculateChannels()
user << "<span class='notice'>You pop out the encryption key in the radio.</span>"
to_chat(user, "<span class='notice'>You pop out the encryption key in the radio.</span>")
else
user << "<span class='warning'>This radio doesn't have any encryption keys!</span>"
to_chat(user, "<span class='warning'>This radio doesn't have any encryption keys!</span>")
else if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot)
user << "<span class='warning'>The radio can't hold another key!</span>"
to_chat(user, "<span class='warning'>The radio can't hold another key!</span>")
return
if(!keyslot)
+74 -75
View File
@@ -80,22 +80,22 @@ MASS SPECTROMETER
/obj/item/device/healthanalyzer/attack_self(mob/user)
if(!scanmode)
user << "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>"
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
scanmode = 1
else
user << "<span class='notice'>You switch the health analyzer to check physical health.</span>"
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
scanmode = 0
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
// Clumsiness/brain damage check
if ((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
user << "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>"
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
user << "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>"
user << "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>"
user << "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>"
user << "<span class='info'>Body temperature: ???</span>"
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
to_chat(user, "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>")
to_chat(user, "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>")
to_chat(user, "<span class='info'>Body temperature: ???</span>")
return
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
@@ -126,63 +126,62 @@ MASS SPECTROMETER
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
user << "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>"
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>")
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.has_brain_worms())
user << "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>"
to_chat(user, "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>")
user << "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>"
to_chat(user, "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>")
// Damage descriptions
if(brute_loss > 10)
user << "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>"
to_chat(user, "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>")
if(fire_loss > 10)
user << "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>"
to_chat(user, "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>")
if(oxy_loss > 10)
user << "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>"
to_chat(user, "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>")
if(tox_loss > 10)
user << "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>"
to_chat(user, "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>")
if(M.getStaminaLoss())
user << "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>"
to_chat(user, "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>")
if (M.getCloneLoss())
user << "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>"
to_chat(user, "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
if (M.reagents && M.reagents.get_reagent_amount("epinephrine"))
user << "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>"
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
user << "\t<span class='alert'>Subject brain function is non-existent.</span>"
to_chat(user, "\t<span class='alert'>Subject brain function is non-existent.</span>")
else if (M.getBrainLoss() >= 60)
user << "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>"
to_chat(user, "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
else if (M.getBrainLoss() >= 10)
user << "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>"
to_chat(user, "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>")
// Organ damage report
if(iscarbon(M) && mode == 1)
var/mob/living/carbon/C = M
var/list/damaged = C.get_damaged_bodyparts(1,1)
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
user << "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>"
to_chat(user, "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>")
for(var/obj/item/bodypart/org in damaged)
user << "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]"
to_chat(user, "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
// Species and body temperature
if(ishuman(M))
var/mob/living/carbon/human/H = M
user << "<span class='info'>Species: [H.dna.species.name]</span>"
user << "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] &deg;C ([round(M.bodytemperature*1.8-459.67,0.1)] &deg;F)</span>"
to_chat(user, "<span class='info'>Species: [H.dna.species.name]</span>")
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] &deg;C ([round(M.bodytemperature*1.8-459.67,0.1)] &deg;F)</span>")
// Time of death
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
user << "<span class='info'>Time of Death:</span> [M.tod]"
to_chat(user, "<span class='info'>Time of Death:</span> [M.tod]")
var/tdelta = round(world.time - M.timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
user << "<span class='danger'>Subject died [tdelta / 10] seconds \
ago, defibrillation may be possible!</span>"
to_chat(user, "<span class='danger'>Subject died [tdelta / 10] seconds ago, defibrillation may be possible!</span>")
for(var/datum/disease/D in M.viruses)
if(!(D.visibility_flags & HIDDEN_SCANNER))
user << "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>"
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
// Blood Level
if(M.has_dna())
@@ -192,7 +191,7 @@ MASS SPECTROMETER
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.bleed_rate)
user << "<span class='danger'>Subject is bleeding!</span>"
to_chat(user, "<span class='danger'>Subject is bleeding!</span>")
var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100)
var/blood_type = C.dna.blood_type
if(blood_id != "blood")//special blood substance
@@ -202,36 +201,36 @@ MASS SPECTROMETER
else
blood_type = blood_id
if(C.blood_volume <= BLOOD_VOLUME_SAFE && C.blood_volume > BLOOD_VOLUME_OKAY)
user << "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>"
to_chat(user, "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
else if(C.blood_volume <= BLOOD_VOLUME_OKAY)
user << "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>"
to_chat(user, "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
else
user << "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>"
to_chat(user, "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>")
var/cyberimp_detect
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
if(CI.status == ORGAN_ROBOTIC)
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
if(cyberimp_detect)
user << "<span class='notice'>Detected cybernetic modifications:</span>"
user << "<span class='notice'>[cyberimp_detect]</span>"
to_chat(user, "<span class='notice'>Detected cybernetic modifications:</span>")
to_chat(user, "<span class='notice'>[cyberimp_detect]</span>")
/proc/chemscan(mob/living/user, mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.reagents)
if(H.reagents.reagent_list.len)
user << "<span class='notice'>Subject contains the following reagents:</span>"
to_chat(user, "<span class='notice'>Subject contains the following reagents:</span>")
for(var/datum/reagent/R in H.reagents.reagent_list)
user << "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]"
to_chat(user, "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]")
else
user << "<span class='notice'>Subject contains no reagents.</span>"
to_chat(user, "<span class='notice'>Subject contains no reagents.</span>")
if(H.reagents.addiction_list.len)
user << "<span class='boldannounce'>Subject is addicted to the following reagents:</span>"
to_chat(user, "<span class='boldannounce'>Subject is addicted to the following reagents:</span>")
for(var/datum/reagent/R in H.reagents.addiction_list)
user << "<span class='danger'>[R.name]</span>"
to_chat(user, "<span class='danger'>[R.name]</span>")
else
user << "<span class='notice'>Subject is not addicted to any reagents.</span>"
to_chat(user, "<span class='notice'>Subject is not addicted to any reagents.</span>")
/obj/item/device/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"
@@ -243,9 +242,9 @@ MASS SPECTROMETER
mode = !mode
switch (mode)
if(1)
usr << "The scanner now shows specific limb damage."
to_chat(usr, "The scanner now shows specific limb damage.")
if(0)
usr << "The scanner no longer shows limb damage."
to_chat(usr, "The scanner no longer shows limb damage.")
/obj/item/device/analyzer
@@ -278,11 +277,11 @@ MASS SPECTROMETER
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
user << "<span class='info'><B>Results:</B></span>"
to_chat(user, "<span class='info'><B>Results:</B></span>")
if(abs(pressure - ONE_ATMOSPHERE) < 10)
user << "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>"
to_chat(user, "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>")
else
user << "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>"
to_chat(user, "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>")
if(total_moles)
var/list/env_gases = environment.gases
@@ -294,32 +293,32 @@ MASS SPECTROMETER
environment.garbage_collect()
if(abs(n2_concentration - N2STANDARD) < 20)
user << "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
else
user << "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
if(abs(o2_concentration - O2STANDARD) < 2)
user << "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
else
user << "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
if(co2_concentration > 0.01)
user << "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
else
user << "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
if(plasma_concentration > 0.005)
user << "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
else
user << "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
for(var/id in env_gases)
if(id in hardcoded_gases)
continue
var/gas_concentration = env_gases[id][MOLES]/total_moles
user << "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>"
user << "<span class='info'>Temperature: [round(environment.temperature-T0C)] &deg;C</span>"
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] &deg;C</span>")
/obj/item/device/mass_spectrometer
@@ -352,14 +351,14 @@ MASS SPECTROMETER
if (user.stat || user.eye_blind)
return
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
var/list/blood_traces = list()
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id != "blood")
reagents.clear_reagents()
user << "<span class='warning'>The sample was contaminated! Please insert another sample.</span>"
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample.</span>")
return
else
blood_traces = params2list(R.data["trace_chem"])
@@ -373,7 +372,7 @@ MASS SPECTROMETER
if(details)
dat += " ([blood_traces[R]] units)"
dat += "</i>"
user << dat
to_chat(user, dat)
reagents.clear_reagents()
@@ -400,31 +399,31 @@ MASS SPECTROMETER
if(user.stat || user.eye_blind)
return
if (!isslime(M))
user << "<span class='warning'>This device can only scan slimes!</span>"
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
return
var/mob/living/simple_animal/slime/T = M
user << "Slime scan results:"
user << "[T.colour] [T.is_adult ? "adult" : "baby"] slime"
user << "Nutrition: [T.nutrition]/[T.get_max_nutrition()]"
to_chat(user, "Slime scan results:")
to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime")
to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")
if (T.nutrition < T.get_starve_nutrition())
user << "<span class='warning'>Warning: slime is starving!</span>"
to_chat(user, "<span class='warning'>Warning: slime is starving!</span>")
else if (T.nutrition < T.get_hunger_nutrition())
user << "<span class='warning'>Warning: slime is hungry</span>"
user << "Electric change strength: [T.powerlevel]"
user << "Health: [round(T.health/T.maxHealth,0.01)*100]"
to_chat(user, "<span class='warning'>Warning: slime is hungry</span>")
to_chat(user, "Electric change strength: [T.powerlevel]")
to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]")
if (T.slime_mutation[4] == T.colour)
user << "This slime does not evolve any further."
to_chat(user, "This slime does not evolve any further.")
else
if (T.slime_mutation[3] == T.slime_mutation[4])
if (T.slime_mutation[2] == T.slime_mutation[1])
user << "Possible mutation: [T.slime_mutation[3]]"
user << "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting"
to_chat(user, "Possible mutation: [T.slime_mutation[3]]")
to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting")
else
user << "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)"
user << "Genetic destability: [T.mutation_chance] % chance of mutation on splitting"
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
else
user << "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]"
user << "Genetic destability: [T.mutation_chance] % chance of mutation on splitting"
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
if (T.cores > 1)
user << "Anomalious slime core amount detected"
user << "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]"
to_chat(user, "Anomalious slime core amount detected")
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
+12 -12
View File
@@ -27,7 +27,7 @@
/obj/item/device/taperecorder/examine(mob/user)
..()
user << "The wire panel is [open_panel ? "opened" : "closed"]."
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
@@ -35,13 +35,13 @@
if(!user.transferItemToLoc(I,src))
return
mytape = I
user << "<span class='notice'>You insert [I] into [src].</span>"
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
update_icon()
/obj/item/device/taperecorder/proc/eject(mob/user)
if(mytape)
user << "<span class='notice'>You remove [mytape] from [src].</span>"
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
stop()
user.put_in_hands(mytape)
mytape = null
@@ -111,7 +111,7 @@
return
if(mytape.used_capacity < mytape.max_capacity)
usr << "<span class='notice'>Recording started.</span>"
to_chat(usr, "<span class='notice'>Recording started.</span>")
recording = 1
update_icon()
mytape.timestamp += mytape.used_capacity
@@ -127,7 +127,7 @@
recording = 0
update_icon()
else
usr << "<span class='notice'>The tape is full.</span>"
to_chat(usr, "<span class='notice'>The tape is full.</span>")
/obj/item/device/taperecorder/verb/stop()
@@ -141,7 +141,7 @@
recording = 0
mytape.timestamp += mytape.used_capacity
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
usr << "<span class='notice'>Recording stopped.</span>"
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
return
else if(playing)
playing = 0
@@ -165,7 +165,7 @@
playing = 1
update_icon()
usr << "<span class='notice'>Playing started.</span>"
to_chat(usr, "<span class='notice'>Playing started.</span>")
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
var/max = mytape.max_capacity
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
@@ -210,12 +210,12 @@
if(!mytape)
return
if(!canprint)
usr << "<span class='notice'>The recorder can't print that fast!</span>"
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
return
if(recording || playing)
return
usr << "<span class='notice'>Transcript printed.</span>"
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
var/t1 = "<B>Transcript:</B><BR><BR>"
for(var/i = 1, mytape.storedinfo.len >= i, i++)
@@ -254,7 +254,7 @@
/obj/item/device/tape/attack_self(mob/user)
if(!ruined)
user << "<span class='notice'>You pull out all the tape!</span>"
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
ruin()
@@ -279,9 +279,9 @@
else if(istype(I, /obj/item/weapon/pen))
delay = 120*1.5
if (delay != -1)
user << "<span class='notice'>You start winding the tape back in...</span>"
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
if(do_after(user, delay, target = src))
user << "<span class='notice'>You wound the tape back in.</span>"
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
fix()
//Random colour tapes
@@ -34,7 +34,7 @@ effective or pretty fucking useless.
/obj/item/device/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!user) return
if(times_used >= max_uses)
user << "<span class='danger'>The mind batterer has been burnt out!</span>"
to_chat(user, "<span class='danger'>The mind batterer has been burnt out!</span>")
return
add_logs(user, null, "knocked down people in the area", src)
@@ -45,13 +45,13 @@ effective or pretty fucking useless.
M.Weaken(rand(10,20))
if(prob(25))
M.Stun(rand(5,10))
M << "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>"
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
else
M << "<span class='userdanger'>You feel a sudden, electric jolt travel through your head.</span>"
to_chat(M, "<span class='userdanger'>You feel a sudden, electric jolt travel through your head.</span>")
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
user << "<span class='notice'>You trigger [src].</span>"
to_chat(user, "<span class='notice'>You trigger [src].</span>")
times_used += 1
if(times_used >= max_uses)
icon_state = "battererburnt"
@@ -86,14 +86,14 @@ effective or pretty fucking useless.
used = 1
icon_state = "health1"
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
user << "<span class='warning'>Successfully irradiated [M].</span>"
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
spawn((wavelength+(intensity*4))*5)
if(M)
if(intensity >= 5)
M.apply_effect(round(intensity/1.5), PARALYZE)
M.rad_act(intensity*10)
else
user << "<span class='warning'>The radioactive microlaser is still recharging.</span>"
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
/obj/item/device/healthanalyzer/rad_laser/proc/handle_cooldown(cooldown)
spawn(cooldown)
@@ -192,14 +192,14 @@ effective or pretty fucking useless.
/obj/item/device/shadowcloak/proc/Activate(mob/living/carbon/human/user)
if(!user)
return
user << "<span class='notice'>You activate [src].</span>"
to_chat(user, "<span class='notice'>You activate [src].</span>")
src.user = user
START_PROCESSING(SSobj, src)
old_alpha = user.alpha
on = 1
/obj/item/device/shadowcloak/proc/Deactivate()
user << "<span class='notice'>You deactivate [src].</span>"
to_chat(user, "<span class='notice'>You deactivate [src].</span>")
STOP_PROCESSING(SSobj, src)
if(user)
user.alpha = old_alpha
@@ -218,8 +218,27 @@ effective or pretty fucking useless.
var/turf/T = get_turf(src)
if(on)
var/lumcount = T.get_lumcount()
if(lumcount > 3)
if(lumcount > 0.3)
charge = max(0,charge - 25)//Quick decrease in light
else
charge = min(max_charge,charge + 50) //Charge in the dark
animate(user,alpha = Clamp(255 - charge,0,255),time = 10)
/obj/item/device/jammer
name = "radio jammer"
desc = "Device used to disrupt nearby radio communication."
icon_state = "jammer"
var/active = FALSE
var/range = 7
/obj/item/device/jammer/attack_self(mob/user)
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
active = !active
if(active)
active_jammers |= src
else
active_jammers -= src
update_icon()
@@ -18,21 +18,21 @@
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/weapon/tank))
if(tank_one && tank_two)
user << "<span class='warning'>There are already two tanks attached, remove one first!</span>"
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first!</span>")
return
if(!tank_one)
if(!user.transferItemToLoc(item, src))
return
tank_one = item
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
else if(!tank_two)
if(!user.transferItemToLoc(item, src))
return
tank_two = item
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
@@ -41,15 +41,15 @@
else if(isassembly(item))
var/obj/item/device/assembly/A = item
if(A.secured)
user << "<span class='notice'>The device is secured.</span>"
to_chat(user, "<span class='notice'>The device is secured.</span>")
return
if(attached_device)
user << "<span class='warning'>There is already a device attached to the valve, remove it first!</span>"
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first!</span>")
return
if(!user.transferItemToLoc(item, src))
return
attached_device = A
user << "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>"
to_chat(user, "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>")
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).