A large amount of groundwork for /tg/ code. Comes with some gameplay changes.

* + You now take severe brute damage in environments over 750kPA. A new HUD icon warns you when it's above 500kPA. Space suits block this.
* > Welding fuel tanks explode when shot.
* > Riot shields prevent you from being pushed.
* > People cannot be shoved when being pulled and handcuffed.
* > The internals button on the hud now works for tanks in almost any area, such as your pocket.
* > No more popups when you insert your ID into your PDA. There's a link in the PDA menu to update info.
* - Removed photo system from ID's as it doesn't work.
This commit is contained in:
Ren Erthilo
2012-03-26 03:16:01 +01:00
parent 4c6d0f2489
commit 089e844be9
76 changed files with 4026 additions and 1253 deletions
+4 -3
View File
@@ -213,9 +213,10 @@ var/const
proc/RemoveActiveIndicators() //removes the "active" facehugger indicator from all aliens in the world for this hugger
for(var/mob/living/carbon/alien/alien in world)
for(var/image/image in alien.client.images)
if(image.icon_state == "facehugger_active" && image.loc == src)
del(image)
if(alien.client)
for(var/image/image in alien.client.images)
if(image.icon_state == "facehugger_active" && image.loc == src)
del(image)
return
+5 -5
View File
@@ -31,17 +31,17 @@
user << "\red It appears to be broken."
return
var/obj/item/weapon/card/id/I = W
if(!I || !I.registered_name) return
if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered_name)))
if(!I || !I.registered) return
if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )
if(src.locked) src.icon_state = src.icon_locked
else src.icon_state = src.icon_closed
if(!src.registered)
src.registered = I.registered_name
src.desc = "Owned by [I.registered_name]."
src.name = "Personal Closet - [I.registered_name]"
src.registered = I.registered
src.desc = "Owned by [I.registered]."
src.name = "Personal Closet - [I.registered]"
else
user << "\red Access Denied"
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
+68 -23
View File
@@ -104,6 +104,7 @@
/obj/item/device/pda/captain
default_cartridge = /obj/item/weapon/cartridge/captain
icon_state = "pda-c"
toff = 1
/obj/item/device/pda/quartermaster
default_cartridge = /obj/item/weapon/cartridge/quartermaster
@@ -143,6 +144,26 @@
if (default_cartridge)
cartridge = new default_cartridge(src)
/obj/item/device/pda/proc/can_use()
if(!ismob(loc))
return 0
var/mob/M = loc
if(!M.canmove)
return 0
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ) )
return 1
else
return 0
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && !M.restrained() && !M.stat && can_use())
return attack_self(M)
return
//NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user as mob)
user.machine = src
@@ -167,7 +188,9 @@
if (0)
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
dat += "Owner: [owner], [ownjob]<br>"
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered_name], [id.assignment]" : "----------"))
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered], [id.assignment]" : "----------"))
dat += text("<A href='?src=\ref[];choice=UpdateInfo'>[]</A><br>", src, (id ? "Update PDA Info" : ""))
dat += "Station Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"//:[world.time / 100 % 6][world.time / 100 % 10]"
dat += "<br><br>"
@@ -323,6 +346,7 @@
dat += data_core.get_manifest(1)
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
@@ -333,9 +357,10 @@
/obj/item/device/pda/Topic(href, href_list)
..()
var/mob/living/U = usr
U.last_target_click = world.time
//Looking for master was kind of pointless since PDAs don't appear to have one.
if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
if ( !(U.stat || U.restrained()) )
add_fingerprint(U)
@@ -362,6 +387,9 @@
cartridge.unlock()
if ("Authenticate")//Checks for ID
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
var/turf/T = loc
@@ -470,6 +498,7 @@
return
var/obj/item/device/pda/P = locate(href_list["target"])
if(!istype(P)) return
if(istype(P, /obj/item/device/pda))
if (isnull(P)||P.toff || toff)
@@ -480,8 +509,15 @@
last_text = world.time
// var/AnsweringMS = 0
for (var/obj/machinery/message_server/MS in world)
MS.send_pda_message("[P.owner]","[owner]","[t]")
// if(MS.active)
// AnsweringMS++
// if(!AnsweringMS)
// return
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
@@ -508,13 +544,20 @@
// pAI Message
else
/* var/AnsweringMS = 0
for (var/obj/machinery/message_server/MS in world)
MS.send_pda_message("[P]","[src]","[t]")
if(MS.active)
AnsweringMS++
if(!AnsweringMS)
return
*/
tnote += "<i><b>&rarr; To [P]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
for (var/obj/machinery/message_server/MS in world)
MS.send_pda_message("[P]","[src]","[t]")
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src
if(prob(50))
@@ -524,6 +567,7 @@
playsound(P.loc, 'twobeep.ogg', 50, 1)
// log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
if("Send Honk")//Honk virus
@@ -667,7 +711,7 @@
id = I
else
var/obj/item/weapon/card/I = user.equipped()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if (istype(I, /obj/item/weapon/card/id) && I:registered)
if(id)//Get id and replace it.
user.drop_item()
I.loc = src
@@ -690,29 +734,18 @@
if (C:radio)
C:radio.hostpda = src
else if (istype(C, /obj/item/weapon/card/id) && C:registered_name)
else if (istype(C, /obj/item/weapon/card/id) && C:registered)
if(!owner)
owner = C:registered_name
owner = C:registered
ownjob = C:assignment
name = "PDA-[owner] ([ownjob])"
user << "\blue Card scanned."
else
var/input=alert("Would you like to insert the card or update owner information?",,"Insert","Update")
//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) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if ( !(user.stat || user.restrained()) )//If they can still act.
if(input=="Insert")
id_check(user, 2)
else
if(!(owner == C:registered_name))
user << "\blue Name on card does not match registered name. Please try again."
else if((owner == C:registered_name) && (ownjob == C:assignment))
user << "\blue Rank is up to date."
else if((owner == C:registered_name) && (ownjob != C:assignment))
ownjob = C:assignment
name = "PDA-[owner] ([ownjob])"
user << "\blue Rank updated."
id_check(user, 2)
user << "\blue You put the ID into the [src.name]'s slot."
updateSelfDialog()//Update self dialog on success.
return//Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
@@ -733,10 +766,21 @@
O.show_message("\red [user] has analyzed [C]'s vitals!", 1)
user.show_message("\blue Analyzing Results for [C]:")
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]", 1)
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]", 1)
user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1)
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1)
/*
if(istype(C, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
else
user.show_message("\blue \t Limbs are OK.",1)
*/
for(var/datum/disease/D in C.viruses)
if(!D.hidden[SCANNER])
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
@@ -916,6 +960,7 @@
icon = 'pda.dmi'
icon_state = "pdabox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/PDAbox/New()
..()
+77
View File
@@ -0,0 +1,77 @@
/obj/structure/stool/bed/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
icon_state = "echair0"
var/on = 0
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1.0
/obj/structure/stool/bed/chair/e_chair/New()
overlays += image('objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
return
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(src.loc)
playsound(src.loc, 'Ratchet.ogg', 50, 1)
C.dir = src.dir
src.part.loc = src.loc
src.part.master = null
src.part = null
del(src)
return
return
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
set name = "Toggle Electric Chair"
set category = "Object"
set src in oview(1)
if(on)
on = 0
icon_state = "echair0"
else
on = 1
icon_state = "echair1"
return
/obj/structure/stool/bed/chair/e_chair/rotate()
..()
overlays = null
overlays += image('objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
return
/obj/structure/stool/bed/chair/e_chair/proc/shock()
if(!(src.on))
return
if((src.last_time + 50) > world.time)
return
src.last_time = world.time
// special power handling
var/area/A = get_area(src)
if(!isarea(A))
return
if(!A.powered(EQUIP))
return
A.use_power(EQUIP, 5000)
var/light = A.power_light
A.updateicon()
flick("echair1", src)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(12, 1, src)
s.start()
if(buckled_mob)
buckled_mob.burn_skin(85)
buckled_mob << "\red <B>You feel a deep shock course through your body!</B>"
sleep(1)
buckled_mob.burn_skin(85)
buckled_mob.Stun(600)
for(var/mob/M in hearers(src, null))
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
A.power_light = light
A.updateicon()
return
+2 -2
View File
@@ -49,8 +49,8 @@
/obj/item/assembly/shock_kit/receive_signal()
//*****
//world << "Shock kit got r_signal"
if (istype(src.loc, /obj/structure/stool/chair/e_chair))
var/obj/structure/stool/chair/e_chair/C = src.loc
if (istype(src.loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = src.loc
//world << "Shock kit sending shock to EC"
C.shock()
return
+20 -108
View File
@@ -4,38 +4,13 @@ DATA CARD
ID CARD
FINGERPRINT CARD HOLDER
FINGERPRINT CARD
*/
/obj/item/weapon/card
name = "card"
desc = "Does card things."
icon = 'card.dmi'
w_class = 1.0
var/list/files = list( )
/obj/item/weapon/card/emag
desc = "An identification card. Seems to have some funny chip on it, though."
name = "modified identification card"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
var/uses = 5
New()
..()
uses = rand(3,5)
return
// DATA CARDS
/obj/item/weapon/card/data
name = "data disk"
desc = "A disk with data."
icon_state = "data"
var/function = "storage"
var/data = "null"
var/special = null
item_state = "card-id"
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
@@ -50,58 +25,9 @@ FINGERPRINT CARD
return
// ID CARDS
/obj/item/weapon/card/id
name = "identification card"
desc = "An identification card."
icon_state = "id"
item_state = "card-id"
var/access = list()
var/registered_name = null // The name registered on the card
var/assignment = null
var/obj/item/weapon/photo/PHOTO = null
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/gold
name = "identification card"
desc = "A golden identification card."
icon_state = "gold"
item_state = "gold_id"
/obj/item/weapon/card/id/captains_spare
name = "Captain's spare ID"
icon_state = "gold"
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
New()
access = get_access("Captain")
..()
/obj/item/weapon/card/id/centcom
name = "CentCom ID"
desc = "An ID straight from Cent. Com."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
New()
access = get_all_centcom_access()
..()
/obj/item/weapon/card/id/syndicate
name = "agent card"
desc = "Shhhhh."
access = list(access_maint_tunnels)
origin_tech = "syndicate=3"
/obj/item/weapon/card/id/syndicate_command
name = "Syndicate ID card"
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
access = list(access_syndicate)
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
@@ -110,6 +36,14 @@ FINGERPRINT CARD
src.add_fingerprint(user)
return
/obj/item/weapon/card/id/attack_hand(mob/user as mob)
var/obj/item/weapon/storage/wallet/WL
if( istype(loc, /obj/item/weapon/storage/wallet) )
WL = loc
..()
if(WL)
WL.update_icon()
/obj/item/weapon/card/id/verb/read()
set name = "Read ID Card"
set category = "Object"
@@ -119,37 +53,13 @@ FINGERPRINT CARD
return
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W,/obj/item/weapon/photo))
if(!(PHOTO))
src.PHOTO = W
usr.before_take_item(W)
W.loc = src
//src.orient2hud(usr)
add_fingerprint(usr)
usr << "\blue You add the photo to the ID."
else
usr << "\blue There is already a photo on this ID."
//PHOTO.loc = locate(0,0,0)
/obj/item/weapon/card/id/verb/removePhoto()
set name = "Remove Photo From ID"
set category = "Object"
if(PHOTO)
contents -= PHOTO
PHOTO.loc = usr.loc
PHOTO.layer = 3
PHOTO = null
if(!src.registered)
src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
src.name = "[src.registered]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
else
usr << "\blue There is no photo to remove."
..()
// FINGERPRINT HOLDER
@@ -271,7 +181,9 @@ FINGERPRINT CARD
return
/obj/item/weapon/f_card/proc/display()
if(!fingerprints) return
if (!istype(src.fingerprints, /list))
src.fingerprints = params2list(src.fingerprints)
if (length(src.fingerprints))
var/dat = "<B>Fingerprints on Card</B><HR>"
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
@@ -23,7 +23,7 @@
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob)
M.radiation += rand(20,50)
if (!(M.mutations & HUSK)) // prevents husks from having their DNA changed
if (!(M.mutations & NOCLONE)) // prevents drained people from having their DNA changed
if (dnatype == "ui")
if (!block) //isolated block?
if (ue) //unique enzymes? yes
@@ -66,6 +66,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
// log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])</font>")
if (user)
if (istype(M, /mob/living/carbon/human))
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
+69 -44
View File
@@ -1,142 +1,142 @@
/obj/item/device/radio/headset
name = "Radio Headset"
desc = "An intercom that fits over the head."
name = "radio headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
icon_state = "headset"
item_state = "headset"
g_amt = 0
m_amt = 75
subspace_transmission = 1
protective_temperature = 0
canhear_range = 1
var
translate_binary = 0
translate_hive = 0
obj/item/device/encryptionkey/keyslot1 = null
obj/item/device/encryptionkey/keyslot2 = null
canhear_range = 1 // can't hear headsets from very far away
var/protective_temperature = 0
var/translate_binary = 0
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
/obj/item/device/radio/headset/New()
..()
keyslot1 = new /obj/item/device/encryptionkey
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/traitor
origin_tech = "syndicate=3"
canhear_range = 0
New()
..()
del(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/traitor
/obj/item/device/radio/headset/traitor/New()
..()
del(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/traitor
recalculateChannels()
/obj/item/device/radio/headset/binary
origin_tech = "syndicate=3"
canhear_range = 0
New()
..()
del(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/binary
/obj/item/device/radio/headset/binary/New()
..()
del(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/binary
recalculateChannels()
/obj/item/device/radio/headset/headset_sec
name = "Security Radio Headset"
name = "security radio headset"
desc = "This is used by your elite security force. To access the security channel, use :s."
icon_state = "sec_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sec
/obj/item/device/radio/headset/headset_eng
name = "Engineering Radio Headset"
name = "engineering radio headset"
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
icon_state = "eng_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_eng
/obj/item/device/radio/headset/headset_rob
name = "Robotics Radio Headset"
name = "robotics radio headset"
desc = "Made specifically for the roboticists who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
icon_state = "rob_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_rob
/obj/item/device/radio/headset/headset_med
name = "Medical Radio Headset"
name = "medical radio headset"
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
icon_state = "med_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_med
/obj/item/device/radio/headset/headset_sci
name = "Science Radio Headset"
name = "science radio headset"
desc = "A sciency headset. Like usual. To access the science channel, use :n."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sci
/obj/item/device/radio/headset/headset_medsci
name = "Medical Research Radio Headset"
name = "medical research radio headset"
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
icon_state = "med_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_medsci
/obj/item/device/radio/headset/headset_com
name = "Command Radio Headset"
name = "command radio headset"
desc = "A headset with a commanding channel. To access the command channel, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_com
/obj/item/device/radio/headset/heads/captain
name = "Captain's Headset"
name = "captain's headset"
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :d - mining, :q - cargo, :m - medical, :n - science."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/rd
name = "Research Director's Headset"
name = "research director's deadset"
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/rd
/obj/item/device/radio/headset/heads/hos
name = "Head of Security's Headset"
name = "head of security's headset"
desc = "The headset of the man who protects your worthless lifes. To access the security channel, use :s. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hos
/obj/item/device/radio/headset/heads/ce
name = "Chief Engineer's Headset"
name = "chief engineer's headset"
desc = "The headset of the guy who is in charge of morons. To access the engineering channel, use :e. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/ce
/obj/item/device/radio/headset/heads/cmo
name = "Chief Medical Officer's Headset"
name = "chief medical officer's headset"
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/cmo
/obj/item/device/radio/headset/heads/hop
name = "Head of Personnel's Headset"
name = "head of personnel's headset"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :c - command, :s - security, :q - cargo, :d - mining."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
/obj/item/device/radio/headset/headset_mine
name = "Mining Radio Headset"
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
icon_state = "mine_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
/obj/item/device/radio/headset/heads/qm
name = "Quartermaster's Headset"
name = "quartermaster's headset"
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
icon_state = "cargo_headset"
item_state = "headset"
@@ -154,7 +154,7 @@
keyslot2 = new /obj/item/device/encryptionkey/ert
/obj/item/device/radio/headset/headset_cargo
name = "Cargo Radio Headset"
name = "cargo radio headset"
desc = "Headset used by the QM's slaves. To access the cargo channel, use :q."
icon_state = "cargo_headset"
item_state = "headset"
@@ -163,17 +163,32 @@
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.machine = src
if (!istype(W, /obj/item/weapon/screwdriver) && !istype(W, /obj/item/device/encryptionkey/))
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(keyslot1 || keyslot2)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot1)
user.put_in_hands(keyslot1)
var/turf/T = get_turf(user)
if(T)
keyslot1.loc = T
keyslot1 = null
if(keyslot2)
user.put_in_hands(keyslot2)
var/turf/T = get_turf(user)
if(T)
keyslot2.loc = T
keyslot2 = null
recalculateChannels()
user << "You pop out the encryption keys in the headset!"
@@ -196,7 +211,9 @@
W.loc = src
keyslot2 = W
recalculateChannels()
return
@@ -204,10 +221,13 @@
src.channels = list()
src.translate_binary = 0
src.translate_hive = 0
var/temp_channels = list()
if(keyslot1)
temp_channels += keyslot1.channels
for(var/ch_name in keyslot1.channels)
if(ch_name in src.channels)
continue
src.channels += ch_name
src.channels[ch_name] = keyslot1.channels[ch_name]
if(keyslot1.translate_binary)
src.translate_binary = 1
@@ -216,7 +236,11 @@
src.translate_hive = 1
if(keyslot2)
temp_channels += keyslot2.channels
for(var/ch_name in keyslot2.channels)
if(ch_name in src.channels)
continue
src.channels += ch_name
src.channels[ch_name] = keyslot2.channels[ch_name]
if(keyslot2.translate_binary)
src.translate_binary = 1
@@ -224,13 +248,14 @@
if(keyslot2.translate_hive)
src.translate_hive = 1
config(temp_channels)
for (var/ch_name in channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
src.name = "Broken Radio Headset"
src.name = "broken radio headset"
return
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
+3 -3
View File
@@ -61,9 +61,9 @@ FLOOR TILES
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool), \
new/datum/stack_recipe("chair", /obj/structure/stool/chair, one_per_turf = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1), \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1), \
+72 -250
View File
@@ -1,102 +1,84 @@
/obj/structure/stool/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
if(3.0)
if (prob(5))
//SN src = null
del(src)
return
else
return
/obj/structure/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal( src.loc )
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal( src.loc )
//SN src = null
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
/obj/structure/stool/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal( src.loc )
del(src)
return
/obj/structure/stool/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/assembly/shock_kit))
var/obj/structure/stool/chair/e_chair/E = new /obj/structure/stool/chair/e_chair( src.loc )
if(istype(W, /obj/item/assembly/shock_kit))
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
E.dir = src.dir
E.part1 = W
E.part = W
W.loc = E
W.master = E
user.u_equip(W)
W.layer = initial(W.layer)
//SN src = null
del(src)
return
return
/obj/structure/stool/bed/Del()
for(var/mob/M in src.buckled_mobs)
if (M.buckled == src)
M.lying = 0
unbuckle_all()
unbuckle()
..()
return
/obj/structure/stool/proc/unbuckle_all()
for(var/mob/M in src:buckled_mobs)
if (M.buckled == src)
M.buckled = null
M.anchored = 0
M.update_clothing()
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = 0
buckled_mob.lying = 0
buckled_mob = null
return
/obj/structure/stool/proc/manual_unbuckle_all(mob/user as mob)
var/N = 0;
for(var/mob/M in src:buckled_mobs)
if (M.buckled == src)
if (M != user)
M.visible_message(\
"\blue [M.name] was unbuckled by [user.name]!",\
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
"You unbuckled from [src] by [user.name].",\
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] unbuckled \himself!",\
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
// world << "[M] is no longer buckled to [src]"
M.anchored = 0
M.buckled = null
M.update_clothing()
N++
return N
unbuckle()
src.add_fingerprint(user)
return
/obj/structure/stool/proc/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled))
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai)))
return
unbuckle()
if (M == usr)
M.visible_message(\
"\blue [M.name] buckles in!",\
@@ -104,180 +86,57 @@
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled into [src] by [user.name]!",\
"You buckled in to [src] by [user.name].",\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You are buckled in to [src] by [user.name].",\
"You hear metal clanking")
M.anchored = 1
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.update_clothing()
src:buckled_mobs += M
src.buckled_mob = M
src.add_fingerprint(user)
return
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if (!istype(M)) return
if(!istype(M)) return
buckle_mob(M, user)
M.lying = 1
return
/obj/structure/stool/bed/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/stool/bed/attack_hand(mob/user as mob)
for(var/mob/M in src.buckled_mobs)
if (M.buckled == src)
M.lying = 0
if (manual_unbuckle_all(user))
src.add_fingerprint(user)
manual_unbuckle(user)
return
/obj/structure/stool/chair/e_chair/New()
src.overl = new /atom/movable/overlay( src.loc )
src.overl.icon = 'objects.dmi'
src.overl.icon_state = "e_chairo0"
src.overl.layer = 5
src.overl.name = "electrified chair"
src.overl.master = src
spark.set_up(12, 1, src)
return
/obj/structure/stool/chair/e_chair/Del()
//src.overl = null
del(src.overl)
..()
return
/obj/structure/stool/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/chair/C = new /obj/structure/stool/chair( src.loc )
playsound(src.loc, 'Ratchet.ogg', 50, 1)
C.dir = src.dir
src.part1.loc = src.loc
src.part1.master = null
src.part1 = null
//SN src = null
del(src)
return
if(istype(W, /obj/item/device/assembly/signaler))
var/obj/item/assembly/shock_kit/kit = src.part1
var/obj/item/device/radio/electropack/target = kit.part2
var/obj/item/device/assembly/signaler/S = W
target.set_frequency(S.frequency)
target.code = S.code
for(var/mob/M in viewers(src, null))
M.show_message("\red [user] has set the electric chair using the [W].")
return
/obj/structure/stool/chair/e_chair/verb/toggle_power()
set name = "Toggle Electric Chair"
set category = "Object"
set src in oview(1)
if ((usr.stat || usr.restrained() || !( usr.canmove ) || usr.lying))
return
if(isshocking && on)
shock()
src.on = !( src.on )
src.icon_state = text("e_chair[]", src.on)
src.overl.icon_state = text("e_chairo[]", src.on)
return
/obj/structure/stool/chair/e_chair/proc/shock()
if (!( src.on ))
return
if(isshocking)
processing_objects.Remove(src)
src.icon_state = text("e_chair[]", src.on)
src.overl.icon_state = text("e_chairo[]", src.on)
for(var/mob/living/M in affected)
M.jitteriness = 0
M.is_jittery = 0
M.anchored = 0
affected.Remove(M)
isshocking = 0
return
else
src.icon_state = "e_chairs"
src.overl.icon_state = "e_chairos"
spark.start()
for(var/mob/M in hearers(src, null))
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
processing_objects.Add(src)
isshocking = 1
return
/obj/structure/stool/chair/e_chair/process()
// special power handling
var/area/A = get_area(src)
if(isarea(A) && A.powered(EQUIP))
A.use_power(EQUIP, 5000)
for(var/mob/living/M in src.loc)
affected.Add(M)
M.make_jittery(1000)
M.anchored = 1
M.Stun(600)
M.burn_skin(10)
spark.start()
/obj/structure/stool/chair/ex_act(severity)
unbuckle_all()
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
return
/obj/structure/stool/chair/blob_act()
if(prob(75))
unbuckle_all()
del(src)
/obj/structure/stool/chair/New()
/obj/structure/stool/bed/chair/New()
src.verbs -= /atom/movable/verb/pull
if (src.dir == NORTH)
if(src.dir == NORTH)
src.layer = FLY_LAYER
..()
return
/obj/structure/stool/chair/Del()
unbuckle_all()
..()
return
/obj/structure/stool/chair/verb/rotate()
/obj/structure/stool/bed/chair/verb/rotate()
set name = "Rotate Chair"
set category = "Object"
set src in oview(1)
src.dir = turn(src.dir, 90)
if (src.dir == NORTH)
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
src.layer = OBJ_LAYER
if(buckled_mob)
buckled_mob.dir = dir
return
/obj/structure/stool/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
/obj/structure/stool/chair/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/stool/chair/attack_hand(mob/user as mob)
if (manual_unbuckle_all(user))
src.add_fingerprint(user)
return
//roller bed
/obj/structure/stool/bed/roller
@@ -286,65 +145,28 @@
icon_state = "down"
anchored = 0
Move()
..()
for(var/mob/M in src:buckled_mobs)
if (M.buckled == src)
M.loc = src.loc
/obj/structure/stool/bed/roller/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = src.loc
buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
return 0
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled))
return 0
if (M == usr)
M.visible_message(\
"\blue [M.name] buckles in!",\
"You buckle yourself to [src].",\
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You buckled into [src] by [user.name].",\
"You hear metal clanking")
M.anchored = 1
M.buckled = src
M.loc = src.loc
M.pixel_y = 6
M.update_clothing()
src:buckled_mobs += M
src.add_fingerprint(user)
density = 1
icon_state = "up"
return 1
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(usr, /mob/living/silicon/pai)))
return
M.pixel_y = 6
M.update_clothing()
density = 1
icon_state = "up"
..()
return
manual_unbuckle_all(mob/user as mob)
var/N = 0;
for(var/mob/M in src:buckled_mobs)
if (M.buckled == src)
if (M != user)
M.visible_message(\
"\blue [M.name] was unbuckled by [user.name]!",\
"You unbuckled from [src] by [user.name].",\
"You hear metal clanking")
else
var/t_himself = "itself"
if (M.gender == MALE)
t_himself = "himself"
else if (M.gender == FEMALE)
t_himself = "herself"
M.visible_message(\
"\blue [M.name] unbuckled [t_himself]!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
M.pixel_y = 0
M.anchored = 0
M.buckled = null
M.update_clothing()
N++
if(N)
density = 0
icon_state = "down"
return N
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
if(buckled_mob)
buckled_mob.pixel_y = 0
buckled_mob.anchored = 0
buckled_mob.buckled = null
density = 0
icon_state = "down"
..()
return
+40 -15
View File
@@ -9,6 +9,7 @@
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
w_class = 3.0
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
/obj/item/weapon/storage/proc/return_inv()
@@ -96,7 +97,7 @@
return
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
..()
if(isrobot(user))
user << "\blue You're a robot. No."
@@ -138,6 +139,7 @@
user << "\red The tray won't fit in [src]."
return
else
W.loc = user.loc
if ((user.client && user.s_active != src))
user.client.screen -= W
@@ -157,19 +159,13 @@
user << "\red The [src] cannot hold [W] as it's a storage item of the same size."
return //To prevent the stacking of the same sized items.
if(user)
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
for(var/mob/O in viewers(user, null))
O.show_message(text("\blue [user] has added [W] to [src]!"))
else
W.loc = src
orient_objs(5, 10, 4 + min(7, storage_slots), 10)
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
if(istype(src, /obj/item/weapon/storage/backpack/santabag)) // update the santa bag icon
if(contents.len < 5)
@@ -180,6 +176,8 @@
src.icon_state = "giftbag2"
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
for(var/mob/O in viewers(user, null))
O.show_message(text("\blue [user] has added [W] to [src]!"))
//Foreach goto(139)
return
@@ -249,8 +247,29 @@
/obj/screen/storage/attackby(W, mob/user as mob)
src.master.attackby(W, user)
return
// BubbleWrap - A box can be folded up to make card
/obj/item/weapon/storage/attack_self(mob/user as mob)
if ( contents.len )
return
if ( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
if ( M == user )
found = 1
if ( !found ) // User is too far away
return
// Now make the cardboard
user << "\blue You fold [src] flat."
new src.foldable(get_turf(src))
del(src)
//BubbleWrap END
/obj/item/weapon/storage/box/
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/box/survival/New()
..()
@@ -296,7 +315,7 @@
/obj/item/weapon/storage/box/syndicate/New()
..()
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "freedom" = 1)))
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1)))
if ("bloodyspai")
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
@@ -325,6 +344,12 @@
new /obj/item/weapon/plastique(src)
return
if ("murder")
new /obj/item/weapon/melee/energy/sword(src)
new /obj/item/clothing/glasses/thermal(src)
new /obj/item/weapon/card/emag(src)
return
if("freedom")
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/freedom(O)