Merged in Erthilo's stuff.

This commit is contained in:
SkyMarshal
2012-03-29 21:11:17 -07:00
71 changed files with 9980 additions and 7140 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
+64 -19
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
@@ -168,6 +189,8 @@
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("<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
@@ -697,22 +741,11 @@
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()
..()
+107
View File
@@ -0,0 +1,107 @@
/obj/structure/stool/bed/chair/e_chair
name = "electrified chair"
desc = "Looks absolutely terrifying!"
icon_state = "e_chair0"
var/atom/movable/overlay/overl = null
var/on = 0.0
var/obj/item/assembly/shock_kit/part1 = null
var/isshocking
var/datum/effect/effect/system/spark_spread/spark = new /datum/effect/effect/system/spark_spread
var/list/mob/living/affected = list()
/obj/structure/stool/bed/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/bed/chair/e_chair/Del()
//src.overl = null
del(src.overl)
..()
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.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/bed/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/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(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/bed/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()
+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_name)
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."
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.mutations2 & 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( )
@@ -211,6 +211,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
if(!istype(M, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = M
if(H.mind in ticker.mode.head_revolutionaries)
visible_message("\red [M] seems to resist the implant.", 1)
for(var/mob/O in (viewers(M) - M))
O.show_message("\red [M] seems to resist the implant.", 1)
M << "\red You resist the implant."
@@ -220,7 +221,6 @@ the implant may become unstable and either pre-maturely inject the subject or si
H << "\blue You feel a surge of loyalty towards NanoTrasen."
return
//BS12 Explosive
/obj/item/weapon/implant/explosive
name = "explosive"
+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), \
+71 -249
View File
@@ -1,49 +1,34 @@
/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
@@ -51,52 +36,49 @@
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
+33 -14
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()
..()