Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+49 -130
View File
@@ -11,12 +11,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda"
item_state = "electronic"
flags = NOBLUDGEON
w_class = WEIGHT_CLASS_TINY
w_class = 1
slot_flags = SLOT_ID | SLOT_BELT
origin_tech = "programming=2"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
//Main variables
var/owner = null // String name of owner
@@ -53,35 +50,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/image/photo = null //Scanned photo
var/list/contained_item = list(/obj/item/weapon/pen, /obj/item/toy/crayon, /obj/item/weapon/lipstick, /obj/item/device/flashlight/pen, /obj/item/clothing/mask/cigarette)
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)
inserted_item = new /obj/item/weapon/pen(src)
update_icon()
new /obj/item/weapon/pen(src)
/obj/item/device/pda/proc/update_label()
name = "PDA-[owner] ([ownjob])" //Name generalisation
@@ -95,25 +71,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/GetID()
return id
/obj/item/device/pda/update_icon()
cut_overlays()
if(id)
var/image/I = image(icon_state = "id_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(inserted_item)
var/image/I = image(icon_state = "insert_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(fon)
var/image/I = image(icon_state = "light_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(pai)
if(pai.pai)
var/image/I = image(icon_state = "pai_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
else
var/image/I = image(icon_state = "pai_off_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
/obj/item/device/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
@@ -213,14 +170,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
if (cartridge.access_remote_door)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
if (cartridge.access_dronephone)
dat += "<li><a href='byond://?src=\ref[src];choice=Drone Phone'><img src=pda_dronephone.png> Drone Phone</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
if (pai)
if(pai.loc != src)
pai = null
update_icon()
else
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"
@@ -303,6 +257,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C<br>"
dat += "<br>"
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
dat += cart
@@ -335,19 +290,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge.mode = mode
cartridge.unlock()
if ("Authenticate")//Checks for ID
id_check(U)
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
update_label()
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>"
var/turf/T = loc
if(ismob(T))
T = T.loc
cartridge.loc = T
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
update_icon()
//MENU FUNCTIONS===================================
@@ -370,17 +326,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)
update_icon()
set_light(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
@@ -409,14 +358,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_atmos))
scanmode = 5
if("Drone Phone")
var/area/A = get_area(U)
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
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, 1)
U << msg
//NOTEKEEPER FUNCTIONS===================================
@@ -500,7 +441,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
M.close()
if("Detonate")//Detonate PDA
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"])
@@ -557,7 +497,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
//EXTRA FUNCTIONS===================================
if (mode == 2||mode == 21)//To clear message overlays.
update_icon()
cut_overlays()
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
@@ -579,7 +519,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
id.loc = get_turf(src)
id = null
update_icon()
/obj/item/device/pda/proc/msg_input(mob/living/U = usr)
var/t = stripped_input(U, "Please enter message", name, null, MAX_MESSAGE_LEN)
@@ -651,7 +590,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
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>)"
update_icon()
cut_overlays()
add_overlay(image(icon, icon_alert))
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
@@ -707,7 +646,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(id)
remove_id()
else
remove_pen()
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
@@ -732,54 +671,50 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
if (usr.canUseTopic(src))
remove_pen()
/obj/item/device/pda/proc/remove_pen()
if(inserted_item)
if(ismob(loc))
var/mob/M = loc
M.put_in_hands(inserted_item)
var/obj/item/weapon/pen/O = locate() in src
if(O)
if (istype(loc, /mob))
var/mob/M = loc
if(M.get_active_hand() == null)
M.put_in_hands(O)
usr << "<span class='notice'>You remove \the [O] from \the [src].</span>"
return
O.loc = get_turf(src)
else
inserted_item.forceMove(loc)
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>"
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)
if(!I)
if(id)
/obj/item/device/pda/proc/id_check(mob/user, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
if(choice == 1)
if (id)
remove_id()
return 1
else
var/obj/item/weapon/card/id/C = user.get_active_held_item()
if(istype(C))
I = C
if(I && I.registered_name)
if(!user.unEquip(I))
return 0
var/obj/old_id = id
I.forceMove(src)
id = I
if(old_id)
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(!user.unEquip(I))
return 0
I.loc = src
id = I
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if(!user.unEquip(I))
return 0
var/obj/old_id = id
I.loc = src
id = I
user.put_in_hands(old_id)
update_icon()
return 1
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C, mob/user, params)
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
cartridge = C
if(!user.unEquip(C))
return
cartridge = C
cartridge.loc = src
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
if(cartridge.radio)
cartridge.radio.hostpda = src
update_icon()
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
@@ -793,8 +728,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
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))
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if(!id_check(user, 2))
return
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
@@ -806,24 +741,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
C.loc = src
pai = C
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>"
else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src
if(O)
user << "<span class='warning'>There is already a pen in \the [src]!</span>"
else
if(!user.unEquip(C))
return
C.forceMove(src)
C.loc = src
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>"
else if(hidden_uplink && hidden_uplink.active)
hidden_uplink.attackby(C, user, params)
else
return ..()
@@ -919,18 +850,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/Destroy()
PDAs -= src
if(id)
qdel(id)
id = null
if(cartridge)
qdel(cartridge)
cartridge = null
if(pai)
qdel(pai)
pai = null
if(inserted_item)
qdel(inserted_item)
inserted_item = null
return ..()
//AI verb and proc for sending PDA messages.
@@ -166,15 +166,14 @@
icon_state = "pda-library"
icon_alert = "pda-r-library"
default_cartridge = /obj/item/weapon/cartridge/librarian
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
overlays_x_offset = -3
/obj/item/device/pda/clear
name = "clear PDA"
icon_state = "pda-clear"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special edition with a transparent case."
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
/obj/item/device/pda/cook
+1 -10
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/pda.dmi'
icon_state = "cart"
item_state = "electronic"
w_class = WEIGHT_CLASS_TINY
w_class = 1
var/obj/item/radio/integrated/radio = null
var/access_security = 0
@@ -23,7 +23,6 @@
var/access_status_display = 0
var/access_quartermaster = 0
var/access_hydroponics = 0
var/access_dronephone = 0
var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
var/spam_enabled = 0 //Enables "Send to All" Option
@@ -46,14 +45,12 @@
name = "\improper Power-ON cartridge"
icon_state = "cart-e"
access_engine = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/atmos
name = "\improper BreatheDeep cartridge"
icon_state = "cart-a"
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/medical
@@ -87,7 +84,6 @@
desc = "The ultimate in clean-room design."
icon_state = "cart-j"
access_janitor = 1
access_dronephone = 1
bot_access_flags = CLEAN_BOT
/obj/item/weapon/cartridge/lawyer
@@ -124,7 +120,6 @@
name = "\improper B.O.O.P. Remote Control cartridge"
desc = "Packed with heavy duty triple-bot interlink!"
bot_access_flags = FLOOR_BOT|CLEAN_BOT|MED_BOT
access_dronephone = 1
/obj/item/weapon/cartridge/signal
name = "generic signaler cartridge"
@@ -166,7 +161,6 @@
access_security = 1
access_newscaster = 1
access_quartermaster = 1
access_dronephone = 1
/obj/item/weapon/cartridge/hos
name = "\improper R.O.B.U.S.T. DELUXE cartridge"
@@ -184,7 +178,6 @@
access_status_display = 1
access_engine = 1
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/cmo
@@ -203,7 +196,6 @@
access_status_display = 1
access_reagent_scanner = 1
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT|CLEAN_BOT|MED_BOT
/obj/item/weapon/cartridge/rd/New()
@@ -224,7 +216,6 @@
access_newscaster = 1
access_quartermaster = 1
access_janitor = 1
access_dronephone = 1
bot_access_flags = SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
spam_enabled = 1
+13 -15
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/aicards.dmi'
icon_state = "aicard" // aicard-full
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
slot_flags = SLOT_BELT
flags = NOBLUDGEON
var/flush = FALSE
@@ -53,7 +53,7 @@
data["wireless"] = !AI.control_disabled //todo disabled->enabled
data["radio"] = AI.radio_enabled
data["isDead"] = AI.stat == DEAD
data["isBraindead"] = AI.client ? FALSE : TRUE
data["isBraindead"] = AI.client ? TRUE : FALSE
data["wiping"] = flush
return data
@@ -62,19 +62,17 @@
return
switch(action)
if("wipe")
if(flush)
flush = FALSE
else
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
AI << "Your core files are being wiped!"
while(AI.stat != DEAD && flush)
AI.adjustOxyLoss(1)
AI.updatehealth()
sleep(5)
flush = FALSE
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", name, "Yes", "No")
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
AI.suiciding = TRUE
AI << "Your core files are being wiped!"
while(AI.stat != DEAD)
AI.adjustOxyLoss(2)
AI.updatehealth()
sleep(10)
flush = FALSE
. = TRUE
if("wireless")
AI.control_disabled = !AI.control_disabled
+18 -32
View File
@@ -10,7 +10,7 @@
desc = "For illicit snooping through the camera network."
icon = 'icons/obj/device.dmi'
icon_state = "camera_bug"
w_class = WEIGHT_CLASS_TINY
w_class = 1
item_state = "camera_bug"
throw_speed = 4
throw_range = 20
@@ -60,14 +60,13 @@
/obj/item/device/camera_bug/check_eye(mob/user)
if ( loc != user || user.incapacitated() || user.eye_blind || !current )
user.unset_machine()
return 0
return
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>"
current = null
user.unset_machine()
return 0
return 1
/obj/item/device/camera_bug/on_unset_machine(mob/user)
user.reset_perspective(null)
@@ -136,16 +135,11 @@
return .(cameras)
return html
/obj/item/device/camera_bug/proc/get_seens()
if(current && current.can_use())
var/list/seen = current.can_see()
return seen
/obj/item/device/camera_bug/proc/camera_report()
// this should only be called if current exists
var/dat = ""
var/list/seen = get_seens()
if(seen && seen.len >= 1)
if(current && current.can_use())
var/list/seen = current.can_see()
var/list/names = list()
for(var/obj/singularity/S in seen) // god help you if you see more than one
if(S.name in names)
@@ -195,29 +189,23 @@
if("mode" in href_list)
track_mode = text2num(href_list["mode"])
if("monitor" in href_list)
//You can't locate on a list with keys
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["monitor"]) in cameras
if(C && istype(C))
var/obj/machinery/camera/C = locate(href_list["monitor"])
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_perspective(null)
interact()
if("track" in href_list)
var/list/seen = get_seens()
if(seen && seen.len >= 1)
var/atom/A = locate(href_list["track"]) in seen
if(A && istype(A))
tracking = A
tracked_name = A.name
last_found = current.c_tag
last_seen = world.time
track_mode = BUGMODE_TRACK
var/atom/A = locate(href_list["track"])
if(A)
tracking = A
tracked_name = A.name
last_found = current.c_tag
last_seen = world.time
track_mode = BUGMODE_TRACK
if("emp" in href_list)
//You can't locate on a list with keys
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["emp"]) in cameras
if(C && istype(C) && C.bug == src)
var/obj/machinery/camera/C = locate(href_list["emp"])
if(istype(C) && C.bug == src)
C.emp_act(1)
C.bug = null
bugged_cameras -= C.c_tag
@@ -228,10 +216,8 @@
current = null
return
if("view" in href_list)
//You can't locate on a list with keys
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["view"]) in cameras
if(C && istype(C))
var/obj/machinery/camera/C = locate(href_list["view"])
if(istype(C))
if(!C.can_use())
usr << "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>"
return
@@ -7,7 +7,7 @@
throwforce = 5
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_SMALL
w_class = 2
origin_tech = "syndicate=4;magnets=4"
var/can_use = 1
var/obj/effect/dummy/chameleon/active_dummy = null
@@ -23,7 +23,6 @@
disrupt()
/obj/item/device/chameleon/equipped()
..()
disrupt()
/obj/item/device/chameleon/attack_self()
@@ -38,7 +37,6 @@
var/obj/temp = new/obj()
temp.appearance = target.appearance
temp.layer = initial(target.layer) // scanning things in your inventory
temp.plane = initial(target.plane)
saved_appearance = temp.appearance
/obj/item/device/chameleon/proc/toggle()
@@ -116,7 +114,7 @@
master.disrupt()
/obj/effect/dummy/chameleon/relaymove(mob/user, direction)
if(isspaceturf(loc) || !direction)
if(istype(loc, /turf/open/space) || !direction)
return //No magical space movement!
if(can_move)
@@ -3,7 +3,7 @@
desc = null //Different examine for traitors
item_state = "electronic"
icon_state = "doorCharge"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
throw_range = 4
throw_speed = 1
flags = NOBLUDGEON
@@ -25,13 +25,6 @@
if(prob(25))
ex_act(1)
/obj/item/device/doorCharge/Destroy()
if(istype(loc, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = loc
if(A.charge == src)
A.charge = null
return ..()
/obj/item/device/doorCharge/examine(mob/user)
..()
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
+27 -57
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/lighting.dmi'
icon_state = "flashlight"
item_state = "flashlight"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = CONDUCT
slot_flags = SLOT_BELT
materials = list(MAT_METAL=50, MAT_GLASS=20)
@@ -14,30 +14,19 @@
/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)
/obj/item/device/flashlight/proc/update_brightness()
if(on)
icon_state = "[initial(icon_state)]-on"
if(loc == user)
user.AddLuminosity(brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
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
update_brightness(user)
update_brightness()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
@@ -56,15 +45,17 @@
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)))
if(istype(M, /mob/living/carbon/human) && ((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>"
return
if(M == user) //they're using it on themselves
if(M.flash_act(visual = 1))
M.visible_message("[M] directs [src] to [M.p_their()] eyes.", "<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
if(M.flash_eyes(visual = 1))
M.visible_message("[M] directs [src] to \his eyes.", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
else
M.visible_message("[M] directs [src] to [M.p_their()] eyes.", "<span class='notice'>You wave the light in front of your eyes.</span>")
M.visible_message("[M] directs [src] to \his eyes.", \
"<span class='notice'>You wave the light in front of your eyes.</span>")
else
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
@@ -75,26 +66,11 @@
else if(C.dna.check_mutation(XRAY)) //mob has X-RAY vision
user << "<span class='danger'>[C] pupils give an eerie glow!</span>"
else //they're okay!
if(C.flash_act(visual = 1))
if(C.flash_eyes(visual = 1))
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."
@@ -145,7 +121,7 @@
icon_state = "lamp"
item_state = "lamp"
brightness_on = 5
w_class = WEIGHT_CLASS_BULKY
w_class = 4
flags = CONDUCT
materials = list()
on = 1
@@ -168,7 +144,7 @@
attack_self(usr)
//Bananalamp
/obj/item/device/flashlight/lamp/bananalamp
obj/item/device/flashlight/lamp/bananalamp
name = "banana lamp"
desc = "Only a clown would think to make a ghetto banana-shaped lamp. Even has a goofy pullstring."
icon_state = "bananalamp"
@@ -179,7 +155,7 @@
/obj/item/device/flashlight/flare
name = "flare"
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
w_class = WEIGHT_CLASS_SMALL
w_class = 2
brightness_on = 7 // Pretty bright.
icon_state = "flare"
item_state = "flare"
@@ -188,13 +164,16 @@
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.
..()
/obj/item/device/flashlight/flare/process()
open_flame(heat)
var/turf/pos = get_turf(src)
if(pos)
pos.hotspot_expose(produce_heat, 5)
fuel = max(fuel - 1, 0)
if(!fuel || !on)
turn_off()
@@ -202,24 +181,13 @@
icon_state = "[initial(icon_state)]-empty"
STOP_PROCESSING(SSobj, src)
/obj/item/device/flashlight/flare/ignition_effect(atom/A, mob/user)
if(fuel && on)
. = "<span class='notice'>[user] lights [A] with [src] like a real \
badass.</span>"
else
. = ""
/obj/item/device/flashlight/flare/proc/turn_off()
on = 0
force = initial(src.force)
damtype = initial(src.damtype)
if(ismob(loc))
var/mob/U = loc
update_brightness(U)
else
update_brightness(null)
update_brightness()
/obj/item/device/flashlight/flare/update_brightness(mob/user = null)
/obj/item/device/flashlight/flare/update_brightness()
..()
if(on)
item_state = "[initial(item_state)]-on"
@@ -249,7 +217,7 @@
/obj/item/device/flashlight/flare/torch
name = "torch"
desc = "A torch fashioned from some leaves and a log."
w_class = WEIGHT_CLASS_BULKY
w_class = 4
brightness_on = 4
icon_state = "torch"
item_state = "torch"
@@ -262,6 +230,7 @@
item_state = "lantern"
desc = "A mining lantern."
brightness_on = 6 // luminosity when on
light_color = LIGHT_COLOR_FIRE
/obj/item/device/flashlight/slime
@@ -271,13 +240,14 @@
icon = 'icons/obj/lighting.dmi'
icon_state = "slime"
item_state = "slime"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
slot_flags = SLOT_BELT
materials = list()
brightness_on = 6 //luminosity when on
light_color = LIGHT_COLOR_SLIME_LAMP
/obj/item/device/flashlight/emp
origin_tech = "magnets=3;syndicate=1"
origin_tech = "magnets=3;syndicate=1"
var/emp_max_charges = 4
var/emp_cur_charges = 4
var/charge_tick = 0
@@ -9,7 +9,7 @@
desc = "A handheld device used for detecting and measuring radiation pulses."
icon_state = "geiger_off"
item_state = "multitool"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
slot_flags = SLOT_BELT
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
var/scanning = 0
@@ -99,7 +99,7 @@
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(user.a_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)
@@ -122,7 +122,7 @@
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)
if(!do_after(user, 40*I.toolspeed, target = user))
if(!do_after(user, 40/I.toolspeed, target = user))
return 0
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1)
+5 -14
View File
@@ -1,9 +1,8 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/instrument
name = "generic instrument"
resistance_flags = FLAMMABLE
obj_integrity = 100
max_integrity = 100
burn_state = FLAMMABLE
burntime = 20
var/datum/song/handheld/song
var/instrumentId = "generic"
var/instrumentExt = "ogg"
@@ -11,7 +10,6 @@
/obj/item/device/instrument/New()
song = new(instrumentId, src)
song.instrumentExt = instrumentExt
..()
/obj/item/device/instrument/Destroy()
qdel(song)
@@ -19,7 +17,7 @@
return ..()
/obj/item/device/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/device/instrument/initialize()
@@ -52,13 +50,6 @@
hitsound = "swing_hit"
instrumentId = "violin"
/obj/item/device/instrument/violin/golden
name = "golden violin"
desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "golden_violin"
item_state = "golden_violin"
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/device/instrument/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
@@ -71,7 +62,7 @@
instrumentId = "guitar"
/obj/item/device/instrument/eguitar
name = "electric guitar"
name = "eletric guitar"
desc = "Makes all your shredding needs possible."
icon = 'icons/obj/musician.dmi'
icon_state = "eguitar"
@@ -79,4 +70,4 @@
force = 12
attack_verb = list("played metal on", "shredded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "eguitar"
instrumentId = "eguitar"
@@ -8,7 +8,7 @@
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
materials = list(MAT_METAL=500, MAT_GLASS=500)
w_class = WEIGHT_CLASS_SMALL
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
origin_tech = "combat=1;magnets=2"
var/turf/pointer_loc
var/energy = 5
@@ -71,7 +71,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna.check_mutation(HULK) || (NOGUNS in H.dna.species.species_traits))
if(H.dna.check_mutation(HULK) || (NOGUNS in H.dna.species.specflags))
user << "<span class='warning'>Your fingers can't press the button!</span>"
return
@@ -98,7 +98,7 @@
severity = 0
//20% chance to actually hit the eyes
if(prob(effectchance * diode.rating) && C.flash_act(severity))
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
if(C.weakeyes)
C.Stun(1)
@@ -106,11 +106,11 @@
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
//robots
else if(iscyborg(target))
else if(isrobot(target))
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
S.flash_act(affect_silicon = 1)
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
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>"
@@ -89,18 +89,8 @@
else
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>"
return
if(!user.unEquip(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>"
qdel(W)
return
if(istype(W, /obj/item/weapon/light))
var/new_bulbs = 0
var/obj/item/weapon/light/L = W
if(L.status == 0) // LIGHT OKAY
if(uses < max_uses)
@@ -111,9 +101,11 @@
else
if(!user.unEquip(W))
return
user << "<span class='notice'>You insert the [L.name] into the [src.name]</span>"
AddShards(1, user)
new_bulbs += AddShards(1)
qdel(L)
if(new_bulbs != 0)
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
user << "<span class='notice'>You insert the [L.name] into the [src.name]. " + status_string() + "</span>"
return
if(istype(W, /obj/item/weapon/storage))
@@ -134,7 +126,7 @@
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
replaced_something = TRUE
AddShards(1, user)
AddShards(1)
qdel(L)
if(!found_lightbulbs)
@@ -154,6 +146,7 @@
/obj/item/device/lightreplacer/attack_self(mob/user)
user << status_string()
/obj/item/device/lightreplacer/update_icon()
icon_state = "lightreplacer[emagged]"
@@ -161,6 +154,7 @@
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
/obj/item/device/lightreplacer/proc/Use(mob/user)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
AddUses(-1)
return 1
@@ -169,15 +163,12 @@
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
uses = Clamp(uses + amount, 0, max_uses)
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
/obj/item/device/lightreplacer/proc/AddShards(amount = 1)
bulb_shards += amount
var/new_bulbs = round(bulb_shards / shards_required)
if(new_bulbs > 0)
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>"
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
return new_bulbs
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
@@ -194,7 +185,11 @@
U << "<span class='notice'>You replace the [target.fitting] with \the [src].</span>"
if(target.status != LIGHT_EMPTY)
AddShards(1, U)
var/new_bulbs = AddShards(1)
if(new_bulbs != 0)
U << "<span class='notice'>\The [src] has fabricated a new bulb from the broken bulbs it has stored. It now has [uses] uses.</span>"
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
target.status = LIGHT_EMPTY
target.update()
@@ -228,8 +223,11 @@
name = initial(name)
update_icon()
//Can you use it?
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
src.add_fingerprint(user)
//Not sure what else to check for. Maybe if clumsy?
if(uses > 0)
return 1
else
+39 -7
View File
@@ -3,25 +3,57 @@
desc = "A device used to project your voice. Loudly."
icon_state = "megaphone"
item_state = "radio"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = FPRINT
siemens_coefficient = 1
var/spamcheck = 0
var/emagged = 0
var/list/voicespan = list(SPAN_COMMAND)
var/insults = 0
var/voicespan = "command_headset" // sic
var/list/insultmsg = list("FUCK EVERYONE!", "DEATH TO LIZARDS!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!", "VIVA!", "HONK!")
/obj/item/device/megaphone/attack_self(mob/living/carbon/human/user)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
src << "<span class='warning'>You cannot speak in IC (muted).</span>"
return
if(!ishuman(user))
user << "<span class='warning'>You don't know how to use this!</span>"
return
/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>"
else
return
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
if(!message)
return
message = capitalize(message)
if(!user.can_speak(message))
user << "<span class='warning'>You find yourself unable to speak at all!</span>"
return
if ((src.loc == user && user.stat == 0))
if(emagged)
if(insults)
user.say(pick(insultmsg),"machine", list(voicespan))
insults--
else
user << "<span class='warning'>*BZZZZzzzzzt*</span>"
else
user.say(message,"machine", list(voicespan))
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
spamcheck = world.time + 50
return voicespan
return
/obj/item/device/megaphone/emag_act(mob/user)
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
emagged = 1
voicespan = list(SPAN_REALLYBIG, "userdanger")
insults = rand(1, 3) //to prevent dickflooding
/obj/item/device/megaphone/sec
name = "security megaphone"
@@ -39,4 +71,4 @@
name = "clown's megaphone"
desc = "Something that should not exist."
icon_state = "megaphone-clown"
voicespan = list(SPAN_CLOWN)
voicespan = "clown"
+3 -10
View File
@@ -13,7 +13,7 @@
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon_state = "multitool"
force = 5
w_class = WEIGHT_CLASS_SMALL
w_class = 2
throwforce = 0
throw_range = 7
throw_speed = 3
@@ -88,12 +88,5 @@
/obj/item/device/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
/obj/item/device/multitool/abductor
name = "alien multitool"
desc = "An omni-technological interface."
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
origin_tech = "magnets=5;engineering=5;abductor=3"
icon = 'icons/obj/items_cyborg.dmi'
toolspeed = 2
+17 -27
View File
@@ -3,20 +3,19 @@
icon = 'icons/obj/aicards.dmi'
icon_state = "pai"
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
slot_flags = SLOT_BELT
origin_tech = "programming=2"
var/obj/item/device/radio/radio
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
/obj/item/device/paicard/New()
..()
pai_card_list += src
add_overlay("pai-off")
/obj/item/device/paicard/Destroy()
//Will stop people throwing friend pAIs into the singularity so they can respawn
pai_card_list -= src
if(!isnull(pai))
pai.death(0)
return ..()
@@ -36,22 +35,22 @@
dat += "<a href='byond://?src=\ref[src];setlaws=1'>Configure Directives</a><br>"
dat += "<br>"
dat += "<h3>Device Settings</h3><br>"
if(pai.radio)
if(radio)
dat += "<b>Radio Uplink</b><br>"
dat += "Transmit: <A href='byond://?src=\ref[src];wires=[WIRE_TX]'>[(pai.radio.wires.is_cut(WIRE_TX)) ? "Disabled" : "Enabled"]</A><br>"
dat += "Receive: <A href='byond://?src=\ref[src];wires=[WIRE_RX]'>[(pai.radio.wires.is_cut(WIRE_RX)) ? "Disabled" : "Enabled"]</A><br>"
dat += "Transmit: <A href='byond://?src=\ref[src];wires=[WIRE_TX]'>[(radio.wires.is_cut(WIRE_TX)) ? "Disabled" : "Enabled"]</A><br>"
dat += "Receive: <A href='byond://?src=\ref[src];wires=[WIRE_RX]'>[(radio.wires.is_cut(WIRE_RX)) ? "Disabled" : "Enabled"]</A><br>"
else
dat += "<b>Radio Uplink</b><br>"
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.real_name == pai.master || H.dna.unique_enzymes == pai.master_dna)
dat += "<A href='byond://?src=\ref[src];toggle_holo=1'>\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]</a><br>"
dat += "<A href='byond://?src=\ref[src];wipe=1'>\[Wipe current pAI personality\]</a><br>"
else
dat += "No personality installed.<br>"
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
if(looking_for_personality)
dat += "Searching for a personality..."
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
else
dat += "No personality is installed.<br>"
dat += "<A href='byond://?src=\ref[src];request=1'>\[Request personal AI personality\]</a><br>"
dat += "Each time this button is pressed, a request will be sent out to any available personalities. Check back often and give a lot of time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness."
user << browse(dat, "window=paicard")
onclose(user, "paicard")
return
@@ -62,6 +61,7 @@
return
if(href_list["request"])
src.looking_for_personality = 1
SSpai.findPAI(src, usr)
if(pai)
@@ -75,7 +75,6 @@
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>"
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")
@@ -85,10 +84,11 @@
pai << "<span class='userdanger'>Your mental faculties leave you.</span>"
pai << "<span class='rose'>oblivion... </span>"
pai.death(0)
removePersonality()
if(href_list["wires"])
var/wire = text2num(href_list["wires"])
if(pai.radio)
pai.radio.wires.cut(wire)
if(radio)
radio.wires.cut(wire)
if(href_list["setlaws"])
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1]) as message),1,MAX_MESSAGE_LEN)
if(newlaws && pai)
@@ -97,16 +97,6 @@
pai << "Prime Directive : <br>[pai.laws.zeroth]"
for(var/slaws in pai.laws.supplied)
pai << "Supplemental Directives: <br>[slaws]"
if(href_list["toggle_holo"])
if(pai.canholo)
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>"
else
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>"
attack_self(usr)
// WIRE_SIGNAL = 1
@@ -27,8 +27,9 @@
return
var/obj/machinery/atmospherics/pipe/P = A
P.add_atom_colour(modes[mode], FIXED_COLOUR_PRIORITY)
P.color = modes[mode]
P.pipe_color = modes[mode]
P.stored.color = modes[mode]
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
P.update_node_icon() //updates the neighbors
+3 -3
View File
@@ -5,7 +5,7 @@
name = "power sink"
icon_state = "powersink0"
item_state = "electronic"
w_class = WEIGHT_CLASS_BULKY
w_class = 4
flags = CONDUCT
throwforce = 5
throw_speed = 1
@@ -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))
@@ -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
@@ -7,14 +7,6 @@
origin_tech = "bluespace=1"
dog_fashion = null
/obj/item/device/radio/beacon/New()
..()
teleportbeacons += src
/obj/item/device/radio/beacon/Destroy()
teleportbeacons.Remove(src)
return ..()
/obj/item/device/radio/beacon/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
return
@@ -6,7 +6,7 @@
item_state = "electropack"
flags = CONDUCT
slot_flags = SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
w_class = 5
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
var/on = 1
var/code = 2
@@ -14,18 +14,13 @@
var/shock_cooldown = 0
/obj/item/device/electropack/suicide_act(mob/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>")
user.visible_message("<span class='suicide'>[user] hooks \himself to the electropack and spams the trigger! It looks like \he's trying to commit suicide..</span>")
return (FIRELOSS)
/obj/item/device/electropack/initialize()
if(SSradio)
SSradio.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/electropack/New()
if(SSradio)
SSradio.add_object(src, frequency, RADIO_CHAT)
..()
/obj/item/device/electropack/Destroy()
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -45,7 +40,7 @@
A.icon = 'icons/obj/assemblies.dmi'
if(!user.unEquip(W))
user << "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>"
user << "<span class='warning'>\the [W] is stuck to your hand, you cannot attach it to \the [src]!</span>"
return
W.loc = A
W.master = A
@@ -68,7 +63,7 @@
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)))
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
usr.set_machine(src)
if(href_list["freq"])
SSradio.remove_object(src, frequency)
@@ -129,7 +124,7 @@
/obj/item/device/electropack/attack_self(mob/user)
if(!ishuman(user))
if(!istype(user, /mob/living/carbon/human))
return
user.set_machine(src)
var/dat = {"<TT>Turned [on ? "On" : "Off"] -
@@ -1,10 +1,10 @@
/obj/item/device/encryptionkey
/obj/item/device/encryptionkey/
name = "standard encryption key"
desc = "An encryption key for a radio headset. Has no special codes in it. WHY DOES IT EXIST? ASK NANOTRASEN."
icon = 'icons/obj/radio.dmi'
icon_state = "cypherkey"
w_class = WEIGHT_CLASS_TINY
w_class = 1
origin_tech = "engineering=2;bluespace=1"
var/translate_binary = 0
var/translate_hive = 0
@@ -13,9 +13,7 @@
var/list/channels = list()
/obj/item/device/encryptionkey/syndicate
name = "syndicate encryption key"
desc = "An encryption key for a radio headset. To access the syndicate channel, use :t."
icon_state = "syn_cypherkey"
icon_state = "cypherkey"
channels = list("Syndicate" = 1)
origin_tech = "syndicate=1;engineering=3;bluespace=2"
syndie = 1//Signifies that it de-crypts Syndicate transmissions
@@ -23,7 +21,7 @@
/obj/item/device/encryptionkey/binary
name = "binary translator key"
desc = "An encryption key for a radio headset. To access the binary channel, use :b."
icon_state = "bin_cypherkey"
icon_state = "cypherkey"
translate_binary = 1
origin_tech = "syndicate=3;engineering=4;bluespace=3"
@@ -111,12 +109,6 @@
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1)
/obj/item/device/encryptionkey/headset_mining
name = "mining radio encryption key"
desc = "An encryption key for a radio headset. To access the supply channel, use :u. For science, use :n."
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1, "Science" = 1)
/obj/item/device/encryptionkey/headset_service
name = "service radio encryption key"
desc = "An encryption key for a radio headset. To access the service channel, use :v."
@@ -24,8 +24,8 @@
/obj/item/device/radio/headset/talk_into(mob/living/M, message, channel, list/spans)
if (!listening)
return ITALICS | REDUCE_RANGE
return ..()
return
..()
/obj/item/device/radio/headset/receive_range(freq, level, AIuser)
if(ishuman(src.loc))
@@ -173,9 +173,8 @@
/obj/item/device/radio/headset/headset_cargo/mining
name = "mining radio headset"
desc = "Headset used by shaft miners. \nTo access the supply channel, use :u. For science, use :n."
desc = "Headset used by shaft miners. \nTo access the supply channel, use :u."
icon_state = "mine_headset"
keyslot = new /obj/item/device/encryptionkey/headset_mining
/obj/item/device/radio/headset/headset_srv
name = "service radio headset"
@@ -3,7 +3,7 @@
desc = "Talk through this."
icon_state = "intercom"
anchored = 1
w_class = WEIGHT_CLASS_BULKY
w_class = 4
canhear_range = 2
var/number = 0
var/anyai = 1
@@ -34,7 +34,7 @@
languages_understood = HUMAN | ROBOT
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
w_class = 2
materials = list(MAT_METAL=75, MAT_GLASS=25)
var/const/TRANSMISSION_DELAY = 5 // only 2/second/radio
@@ -110,7 +110,7 @@
/obj/item/device/radio/interact(mob/user)
if (..())
return
if(b_stat && !isAI(user))
if(b_stat && !istype(user, /mob/living/silicon/ai))
wires.interact(user)
else
ui_interact(user)
@@ -197,10 +197,6 @@
. = TRUE
/obj/item/device/radio/talk_into(atom/movable/M, message, channel, list/spans)
addtimer(src,"talk_into_impl",0, TIMER_NORMAL,M,message,channel,spans)
return ITALICS | REDUCE_RANGE
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans)
if(!on) return // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return
@@ -281,7 +277,7 @@
jobname = "AI"
// --- Cyborg ---
else if(iscyborg(M))
else if(isrobot(M))
var/mob/living/silicon/robot/B = M
jobname = "[B.designation] Cyborg"
+13 -19
View File
@@ -14,7 +14,7 @@ MASS SPECTROMETER
icon_state = "t-ray0"
var/on = 0
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
w_class = 2
item_state = "electronic"
materials = list(MAT_METAL=150)
origin_tech = "magnets=1;engineering=1"
@@ -74,7 +74,7 @@ MASS SPECTROMETER
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = WEIGHT_CLASS_TINY
w_class = 1
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=200)
@@ -114,7 +114,7 @@ MASS SPECTROMETER
// Used by the PDA medical scanner too
/proc/healthscan(mob/living/user, mob/living/M, mode = 1)
if(user.incapacitated() || user.eye_blind)
if(user.stat || user.eye_blind)
return
//Damage specifics
var/oxy_loss = M.getOxyLoss()
@@ -131,12 +131,6 @@ MASS SPECTROMETER
var/mob/living/carbon/human/H = M
if(H.heart_attack && H.stat != DEAD)
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>"
user << "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>"
// Damage descriptions
@@ -162,9 +156,9 @@ MASS SPECTROMETER
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(istype(M, /mob/living/carbon/human) && mode == 1)
var/mob/living/carbon/human/H = M
var/list/damaged = H.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>"
for(var/obj/item/bodypart/org in damaged)
@@ -208,13 +202,13 @@ MASS SPECTROMETER
else
user << "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>"
var/cyberimp_detect
var/implant_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)
implant_detect += "[C.name] is modified with a [CI.name].<br>"
if(implant_detect)
user << "<span class='notice'>Detected cybernetic modifications:</span>"
user << "<span class='notice'>[cyberimp_detect]</span>"
user << "<span class='notice'>[implant_detect]</span>"
/proc/chemscan(mob/living/user, mob/living/M)
if(ishuman(M))
@@ -253,7 +247,7 @@ MASS SPECTROMETER
name = "analyzer"
icon_state = "atmos"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 0
@@ -327,7 +321,7 @@ MASS SPECTROMETER
name = "mass-spectrometer"
icon_state = "spectrometer"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = CONDUCT | OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
@@ -388,7 +382,7 @@ MASS SPECTROMETER
icon_state = "adv_spectrometer"
item_state = "analyzer"
origin_tech = "biotech=2"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = CONDUCT
throwforce = 0
throw_speed = 3
@@ -3,7 +3,7 @@
desc = "A miniature machine that tracks suit sensors across the station."
icon = 'icons/obj/device.dmi'
icon_state = "scanner"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
slot_flags = SLOT_BELT
origin_tech = "programming=3;materials=3;magnets=3"
@@ -3,7 +3,7 @@
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
icon_state = "taperecorder_empty"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = HEAR
slot_flags = SLOT_BELT
languages_spoken = ALL //this is a translator, after all.
@@ -22,7 +22,6 @@
/obj/item/device/taperecorder/New()
mytape = new /obj/item/device/tape/random(src)
update_icon()
..()
/obj/item/device/taperecorder/examine(mob/user)
@@ -48,14 +47,14 @@
mytape = null
update_icon()
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
/obj/item/device/taperecorder/fire_act()
mytape.ruin() //Fires destroy the tape
..()
return()
/obj/item/device/taperecorder/attack_hand(mob/user)
if(loc == user)
if(mytape)
if(!user.is_holding(src))
if(user.l_hand != src && user.r_hand != src)
..()
return
eject(user)
@@ -239,7 +238,7 @@
desc = "A magnetic tape that can hold up to ten minutes of content."
icon_state = "tape_white"
item_state = "analyzer"
w_class = WEIGHT_CLASS_TINY
w_class = 1
materials = list(MAT_METAL=20, MAT_GLASS=5)
force = 1
throwforce = 0
@@ -249,9 +248,8 @@
var/list/timestamp = list()
var/ruined = 0
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
/obj/item/device/tape/fire_act()
ruin()
..()
/obj/item/device/tape/attack_self(mob/user)
if(!ruined)
@@ -260,10 +258,7 @@
/obj/item/device/tape/proc/ruin()
//Lets not add infinite amounts of overlays when our fireact is called
//repeatedly
if(!ruined)
add_overlay("ribbonoverlay")
add_overlay("ribbonoverlay")
ruined = 1
@@ -275,7 +270,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You start winding the tape back in...</span>"
if(do_after(user, 120*I.toolspeed, target = src))
if(do_after(user, 120/I.toolspeed, target = src))
user << "<span class='notice'>You wound the tape back in.</span>"
fix()
@@ -283,4 +278,3 @@
//Random colour tapes
/obj/item/device/tape/random/New()
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
..()
@@ -20,7 +20,7 @@ effective or pretty fucking useless.
desc = "A strange device with twin antennas."
icon_state = "batterer"
throwforce = 5
w_class = WEIGHT_CLASS_TINY
w_class = 1
throw_speed = 3
throw_range = 7
flags = CONDUCT
@@ -85,16 +85,16 @@
tank_one.loc = get_turf(src)
tank_one = null
update_icon()
if((!tank_two || tank_two.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
if((!tank_two || tank_two.w_class < 4) && (w_class > 3))
w_class = 3
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
if((!tank_one || tank_one.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
if((!tank_one || tank_one.w_class < 4) && (w_class > 3))
w_class = 3
else if(href_list["open"])
toggle_valve()
else if(attached_device)