Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel_tweaks_3-31-14

Conflicts:
	code/game/machinery/camera/camera.dm
This commit is contained in:
MrPerson
2014-04-08 04:53:05 -07:00
184 changed files with 16221 additions and 4574 deletions
+3 -14
View File
@@ -5,22 +5,15 @@
icon_state = "portal"
density = 1
unacidable = 1//Can't destroy energy portals.
var/failchance = 5
var/obj/item/target = null
var/creator = null
anchored = 1.0
/obj/effect/portal/Bumped(mob/M as mob|obj)
spawn(0)
src.teleport(M)
return
return
src.teleport(M)
/obj/effect/portal/Crossed(AM as mob|obj)
spawn(0)
src.teleport(AM)
return
return
src.teleport(AM)
/obj/effect/portal/New(loc, turf/target, creator, lifespan=300)
portals += src
@@ -52,9 +45,5 @@
qdel(src)
return
if (istype(M, /atom/movable))
if(prob(failchance)) //oh dear a problem, put em in deep space
src.icon_state = "portal1"
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
else
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
+1 -3
View File
@@ -122,7 +122,7 @@ move an amendment</a> to the drawing.</p>
return
var/area/A = new
A.name = str
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
A.tagbase="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
//var/ma
//ma = A.master ? "[A.master]" : "(null)"
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
@@ -205,8 +205,6 @@ move an amendment</a> to the drawing.</p>
return BORDER_2NDTILE
if (locate(/obj/structure/falsewall) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falserwall) in T2)
return BORDER_2NDTILE
return BORDER_NONE
@@ -108,6 +108,15 @@
brightness_on = 2
/obj/item/device/flashlight/seclite
name = "seclite"
desc = "A robust flashlight used by security."
icon_state = "seclite"
item_state = "seclite"
force = 9 // Not as good as a stun baton.
brightness_on = 5 // A little better than the standard flashlight.
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
name = "desk lamp"
+4 -1
View File
@@ -16,6 +16,7 @@
var/power_drained = 0 // has drained this much power
var/max_power = 1e8 // maximum power that can be drained before exploding
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
var/admins_warned = 0 // stop spam, only warn the admins once that we are about to boom
var/const/DISCONNECTED = 0
var/const/CLAMPED_OFF = 1
@@ -133,7 +134,9 @@
A.charging = 1 // It's no longer full
if(power_drained > max_power * 0.95)
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is about to explode")
if (!admins_warned)
admins_warned = 1
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
if(power_drained >= max_power)
@@ -494,6 +494,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
freq_text = "Service"
if(SUPP_FREQ)
freq_text = "Supply"
if(AIPRIV_FREQ)
freq_text = "AI Private"
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
if(!freq_text)
@@ -520,7 +522,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
part_a = "<span class='suppradio'><span class='name'>"
else if (display_freq==DSQUAD_FREQ)
part_a = "<span class='dsquadradio'><span class='name'>"
else if (display_freq==AIPRIV_FREQ)
part_a = "<span class='aiprivradio'><span class='name'>"
var/quotedmsg = M.say_quote(message)
//This following recording is intended for research and feedback in the use of department radio channels.
@@ -13,6 +13,11 @@
song = new("violin", src)
song.instrumentExt = "ogg"
/obj/item/device/violin/Destroy()
qdel(song)
song = null
..()
/obj/item/device/violin/attack_self(mob/user as mob)
interact(user)
+79 -8
View File
@@ -66,7 +66,13 @@
var/obj/item/robot_parts/r_leg/r_leg = null
var/obj/item/robot_parts/chest/chest = null
var/obj/item/robot_parts/head/head = null
var/created_name = ""
var/mob/living/silicon/ai/forced_ai
var/locomotion = 1
var/lawsync = 1
var/aisync = 1
var/panel_locked = 1
/obj/item/robot_parts/robot_suit/New()
..()
@@ -156,6 +162,12 @@
else
user << "\blue You need to attach a flash to it first!"
if (istype(W, /obj/item/device/multitool))
if(check_completion())
Interact(user)
else
user << "<span class='notice'>The endoskeleton must be assembled before debugging can begin.</span>"
if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
@@ -194,13 +206,26 @@
user.drop_item()
O.invisibility = 0
//Transfer debug settings to new mob
O.custom_name = created_name
O.updatename("Default")
O.locked = panel_locked
if(!aisync)
lawsync = 0
O.connected_ai = null
O.notify_ai(1)
else if(forced_ai)
O.connected_ai = forced_ai
if(!lawsync)
O.lawupdate = 0
O.make_laws()
if(ticker.mode.config_tag == "malfunction") //Don't let humans get a cyborg on their side during malf, for balance reasons.
O.set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*&110010")
M.brainmob.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
O.mind.store_memory("As a cyborg, any objectives listed here are null and void, and will be marked as failed. They are simply here for memory purposes.")
O.job = "Cyborg"
@@ -214,18 +239,64 @@
src.loc = O
O.robot_suit = src
if(!locomotion)
O.lockcharge = 1
O.update_canmove()
O << "<span class='warning'>Error: Servo motors unresponsive.</span>"
else
user << "\blue The MMI must go in after everything else!"
user << "<span class='notice'>The MMI must go in after everything else!</span>"
if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
return
/obj/item/robot_parts/robot_suit/proc/Interact(mob/user)
var/t1 = text("Designation: <A href='?src=\ref[];Name=1'>[(created_name ? "[created_name]" : "Default Cyborg")]</a><br>\n",src)
t1 += text("Master AI: <A href='?src=\ref[];Master=1'>[(forced_ai ? "[forced_ai.name]" : "Automatic")]</a><br><br>\n",src)
t1 += text("LawSync Port: <A href='?src=\ref[];Law=1'>[(lawsync ? "Open" : "Closed")]</a><br>\n",src)
t1 += text("AI Connection Port: <A href='?src=\ref[];AI=1'>[(aisync ? "Open" : "Closed")]</a><br>\n",src)
t1 += text("Servo Motor Functions: <A href='?src=\ref[];Loco=1'>[(locomotion ? "Unlocked" : "Locked")]</a><br>\n",src)
t1 += text("Panel Lock: <A href='?src=\ref[];Panel=1'>[(panel_locked ? "Engaged" : "Disengaged")]</a><br>\n",src)
var/datum/browser/popup = new(user, "robotdebug", "Cyborg Boot Debug", 310, 220)
popup.set_content(t1)
popup.open()
/obj/item/robot_parts/robot_suit/Topic(href, href_list)
if(usr.lying || usr.stat || usr.stunned || !Adjacent(usr))
return
var/mob/living/living_user = usr
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/device/multitool))
living_user << "<span class='error'>You need a multitool!</span>"
return
if(href_list["Name"])
var/new_name = reject_bad_name(input(usr, "Enter new designation. Set to blank to reset to default.", "Cyborg Debug", src.created_name))
if(!in_range(src, usr) && src.loc != usr)
return
if(new_name)
created_name = new_name
else
created_name = ""
src.created_name = t
else if(href_list["Master"])
forced_ai = select_active_ai(usr)
if(!forced_ai)
usr << "<span class='error'>No active AIs detected.</span>"
else if(href_list["Law"])
lawsync = !lawsync
else if(href_list["AI"])
aisync = !aisync
else if(href_list["Loco"])
locomotion = !locomotion
else if(href_list["Panel"])
panel_locked = !panel_locked
add_fingerprint(usr)
Interact(usr)
return
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
@@ -35,6 +35,8 @@
R.modtype = "robot"
R.updatename("Default")
R.status_flags |= CANPUSH
R.designation = "Default"
R.notify_ai(2)
R.updateicon()
return 1
@@ -51,8 +53,10 @@
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
R.notify_ai(3, R.name, heldname)
R.name = heldname
R.real_name = heldname
R.camera.c_tag = heldname
R.custom_name = heldname //Required or else if the cyborg's module changes, their name is lost.
return 1
@@ -75,6 +79,8 @@
R.key = ghost.key
R.stat = CONSCIOUS
R.notify_ai(1)
return 1
+1 -1
View File
@@ -27,7 +27,7 @@
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
istype(user, /mob/living/carbon/monkey)) )
user << "\red You don't have the dexterity to do this!"
return 1
@@ -179,4 +179,10 @@
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
item_state = "captainpack"
item_state = "captainpack"
/obj/item/weapon/storage/backpack/mime
name = "Parcel Parceaux"
desc = "A silent backpack made for those silent workers. Silence Co."
icon_state = "mimepack"
item_state = "mimepack"
@@ -36,7 +36,7 @@
max_w_class = 2
storage_slots = 21
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
cant_hold = list(/obj/item/weapon/disk/nuclear)
/obj/item/weapon/storage/bag/trash/update_icon()
@@ -72,7 +72,7 @@
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list("/obj/item/weapon/ore")
can_hold = list(/obj/item/weapon/ore)
// -----------------------------
@@ -87,7 +87,7 @@
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
////////
@@ -261,4 +261,4 @@
max_combined_w_class = 21
max_w_class = 3
w_class = 4 //Bigger than a book because physics
can_hold = list("/obj/item/weapon/book", "/obj/item/weapon/spellbook") //No bibles, consistent with bookcase
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/spellbook) //No bibles, consistent with bookcase
+57 -38
View File
@@ -41,16 +41,16 @@
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
"/obj/item/weapon/wirecutters",
"/obj/item/weapon/wrench",
"/obj/item/device/multitool",
"/obj/item/device/flashlight",
"/obj/item/stack/cable_coil",
"/obj/item/device/t_scanner",
"/obj/item/device/analyzer")
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/stack/cable_coil,
/obj/item/device/t_scanner,
/obj/item/device/analyzer)
/obj/item/weapon/storage/belt/utility/full/New()
@@ -80,19 +80,18 @@
icon_state = "medicalbelt"
item_state = "medical"
can_hold = list(
"/obj/item/device/healthanalyzer",
"/obj/item/weapon/dnainjector",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/reagent_containers/glass/beaker",
"/obj/item/weapon/reagent_containers/glass/bottle",
"/obj/item/weapon/reagent_containers/pill",
"/obj/item/weapon/reagent_containers/syringe",
"/obj/item/weapon/reagent_containers/glass/dispenser",
"/obj/item/weapon/lighter/zippo",
"/obj/item/weapon/storage/fancy/cigarettes",
"/obj/item/weapon/storage/pill_bottle",
"/obj/item/stack/medical",
"/obj/item/device/flashlight/pen"
/obj/item/device/healthanalyzer,
/obj/item/weapon/dnainjector,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/reagent_containers/glass/beaker,
/obj/item/weapon/reagent_containers/glass/bottle,
/obj/item/weapon/reagent_containers/pill,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/lighter/zippo,
/obj/item/weapon/storage/fancy/cigarettes,
/obj/item/weapon/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen
)
@@ -104,19 +103,24 @@
storage_slots = 5
max_w_class = 3 //Because the baton wouldn't fit otherwise. - Neerti
can_hold = list(
"/obj/item/weapon/melee/baton",
"/obj/item/weapon/melee/classic_baton",
"/obj/item/weapon/grenade/flashbang",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_box",
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly"
/obj/item/weapon/melee/baton,
/obj/item/weapon/melee/classic_baton,
/obj/item/weapon/grenade/flashbang,
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/handcuffs,
/obj/item/device/flash,
/obj/item/clothing/glasses,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_box,
/obj/item/weapon/reagent_containers/food/snacks/donut/normal,
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
/obj/item/device/flashlight/seclite
)
/obj/item/weapon/storage/belt/security/New()
..()
new /obj/item/device/flashlight/seclite(src)
/obj/item/weapon/storage/belt/soulstone
name = "soul stone belt"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away"
@@ -124,7 +128,7 @@
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
"/obj/item/device/soulstone"
/obj/item/device/soulstone
)
/obj/item/weapon/storage/belt/soulstone/full/New()
@@ -144,7 +148,7 @@
item_state = "champion"
storage_slots = 1
can_hold = list(
"/obj/item/clothing/mask/luchador"
/obj/item/clothing/mask/luchador
)
/obj/item/weapon/storage/belt/military
@@ -160,7 +164,7 @@
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
"/obj/item/weapon/gun/magic/wand"
/obj/item/weapon/gun/magic/wand
)
/obj/item/weapon/storage/belt/wands/full/New()
@@ -174,4 +178,19 @@
for(var/obj/item/weapon/gun/magic/wand/W in contents) //All wands in this pack come in the best possible condition
W.max_charges = initial(W.max_charges)
W.charges = W.max_charges
W.charges = W.max_charges
/obj/item/weapon/storage/belt/janitor
name = "janibelt"
desc = "A belt used to hold most janitorial supplies."
icon_state = "janibelt"
item_state = "janibelt"
storage_slots = 6
max_w_class = 4 // Set to this so the light replacer can fit.
can_hold = list(
/obj/item/weapon/grenade/chem_grenade/cleaner,
/obj/item/device/lightreplacer,
/obj/item/device/flashlight,
/obj/item/weapon/reagent_containers/spray,
/obj/item/weapon/soap
)
@@ -110,6 +110,11 @@
var/water2holy = A.reagents.get_reagent_amount("water")
A.reagents.del_reagent("water")
A.reagents.add_reagent("holywater",water2holy)
if(A.reagents && A.reagents.has_reagent("unholywater")) //yeah yeah, copy pasted code - sue me
user << "\blue You purify [A]."
var/unholy2clean = A.reagents.get_reagent_amount("unholywater")
A.reagents.del_reagent("unholywater")
A.reagents.add_reagent("cleaner",unholy2clean) //it cleans their soul, get it? I'll get my coat...
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
@@ -329,7 +329,7 @@
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube)
New()
..()
for(var/i = 1; i <= 5; i++)
@@ -483,7 +483,7 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb")
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
max_combined_w_class = 21
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
@@ -48,7 +48,7 @@
icon_type = "donut"
name = "donut box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
/obj/item/weapon/storage/fancy/donut_box/New()
@@ -67,7 +67,7 @@
icon_type = "egg"
name = "egg box"
storage_slots = 12
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
/obj/item/weapon/storage/fancy/egg_box/New()
..()
@@ -153,7 +153,7 @@
throwforce = 0
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list("/obj/item/clothing/mask/cigarette")
can_hold = list(/obj/item/clothing/mask/cigarette)
icon_type = "cigarette"
/obj/item/weapon/storage/fancy/cigarettes/New()
@@ -122,7 +122,7 @@
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice")
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice)
allow_quick_gather = 1
use_to_pickup = 1
@@ -227,7 +227,7 @@
max_w_class = 8
anchored = 1.0
density = 0
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
New()
..()
@@ -202,7 +202,7 @@
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
if(istype(W, A))
ok = 1
break
if(!ok)
@@ -211,7 +211,7 @@
return 0
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, text2path(A) ))
if(istype(W, A))
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
@@ -19,8 +19,8 @@
new /obj/item/device/sbeacondrop/bomb(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/device/powersink(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
new /obj/item/clothing/suit/space/syndicate/black/red(src)
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
return
if("guns")
@@ -60,8 +60,8 @@
if("lordsingulo")
new /obj/item/device/sbeacondrop(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
new /obj/item/clothing/suit/space/syndicate/black/red(src)
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
new /obj/item/weapon/card/emag(src)
return
@@ -132,11 +132,13 @@
/obj/item/weapon/storage/box/syndie_kit/space
name = "boxed space suit and helmet"
can_hold = list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate)
max_w_class = 3
/obj/item/weapon/storage/box/syndie_kit/space/New()
..()
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
new /obj/item/clothing/suit/space/syndicate/black/red(src) // Black and red is so in right now
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
return
/obj/item/weapon/storage/box/syndie_kit/emp
@@ -5,25 +5,25 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
"/obj/item/seeds",
"/obj/item/stack/medical",
"/obj/item/toy/crayon",
"/obj/item/weapon/coin",
"/obj/item/weapon/dice",
"/obj/item/weapon/disk",
"/obj/item/weapon/implanter",
"/obj/item/weapon/lighter",
"/obj/item/weapon/match",
"/obj/item/weapon/paper",
"/obj/item/weapon/pen",
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
/obj/item/weapon/spacecash,
/obj/item/weapon/card,
/obj/item/clothing/mask/cigarette,
/obj/item/device/flashlight/pen,
/obj/item/seeds,
/obj/item/stack/medical,
/obj/item/toy/crayon,
/obj/item/weapon/coin,
/obj/item/weapon/dice,
/obj/item/weapon/disk,
/obj/item/weapon/implanter,
/obj/item/weapon/lighter,
/obj/item/weapon/match,
/obj/item/weapon/paper,
/obj/item/weapon/pen,
/obj/item/weapon/photo,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/screwdriver,
/obj/item/weapon/stamp)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
@@ -17,8 +17,9 @@
/obj/item/weapon/watertank/New()
..()
create_reagents(volume)
noz = make_noz()
return
/obj/item/weapon/watertank/examine()
set src in usr
..()
@@ -41,32 +42,32 @@
var/mob/living/carbon/human/user = usr
if(on)
//Detach the nozzle into the user's hands
make_noz()
var/list/L = list("left hand" = slot_l_hand,"right hand" = slot_r_hand)
if(!user.equip_in_one_of_slots(noz, L))
on = 0
user << "<span class='notice'>You need a free hand to hold the mister!</span>"
return
noz.loc = user
else
//Remove from their hands and put back "into" the tank
remove_noz(user)
return
/obj/item/weapon/watertank/proc/make_noz()
noz = new /obj/item/weapon/reagent_containers/spray/mister(src)
return
return new /obj/item/weapon/reagent_containers/spray/mister(src)
/obj/item/weapon/watertank/equipped(mob/user, slot)
if (slot != slot_back)
remove_noz(user)
/obj/item/weapon/watertank/proc/remove_noz(mob/user)
if (noz != null)
var/mob/living/carbon/human/M = user
var/mob/living/carbon/human/M = user
if(noz in get_both_hands(M))
M.unEquip(noz)
return
/obj/item/weapon/watertank/Destroy()
if (noz)
if (on)
var/M = get(noz, /mob)
remove_noz(M)
..()
@@ -91,23 +92,24 @@
/obj/item/weapon/reagent_containers/spray/mister/New(parent_tank)
..()
if(check_tank_exists(parent_tank, usr, src))
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
return
loc = tank
return
/obj/item/weapon/reagent_containers/spray/mister/dropped(mob/user as mob)
user << "<span class='notice'>The mister snaps back onto the watertank!</span>"
tank.on = 0
qdel(src)
loc = tank
/obj/item/weapon/reagent_containers/spray/mister/attack_self()
return
/proc/check_tank_exists(parent_tank, var/mob/living/carbon/human/M, var/obj/O)
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank) || !M || !istype(M)) //To avoid weird issues from admin spawns
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
M.unEquip(O)
qdel(O)
qdel(0)
return 0
else
return 1
@@ -118,12 +120,12 @@
desc = "A janitorial watertank backpack with nozzle to clean dirt and graffiti."
icon_state = "waterbackpackjani"
item_state = "waterbackpackjani"
/obj/item/weapon/watertank/janitor/New()
..()
reagents.add_reagent("cleaner", 250)
reagents.add_reagent("cleaner", 500)
/obj/item/weapon/reagent_containers/spray/mister/janitor
name = "janitor spray nozzle"
desc = "A janitorial spray nozzle attached to a watertank, designed to clean up large messes."
@@ -134,13 +136,12 @@
possible_transfer_amounts = null
/obj/item/weapon/watertank/janitor/make_noz()
noz = new /obj/item/weapon/reagent_containers/spray/mister/janitor(src)
return
return new /obj/item/weapon/reagent_containers/spray/mister/janitor(src)
/obj/item/weapon/reagent_containers/spray/mister/janitor/attack_self(var/mob/user)
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
user << "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
//Atmos tank
/obj/item/weapon/watertank/atmos
name = "backpack water tank"
@@ -148,10 +149,10 @@
icon_state = "waterbackpackatmos"
item_state = "waterbackpackatmos"
volume = 100
/obj/item/weapon/watertank/atmos/make_noz()
noz = new /obj/item/weapon/extinguisher/mini/nozzle(src)
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
/obj/item/weapon/extinguisher/mini/nozzle
name = "fire extinguisher nozzle"
desc = "A fire extinguisher nozzle attached to a water tank."
@@ -160,18 +161,19 @@
item_state = "misteratmos"
safety = 0
var/obj/item/weapon/watertank/tank
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
if(check_tank_exists(parent_tank, usr, src))
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents
max_water = tank.volume
loc = tank
return
/obj/item/weapon/extinguisher/mini/nozzle/dropped(mob/user as mob)
user << "<span class='notice'>The nozzle snaps back onto the watertank!</span>"
tank.on = 0
qdel(src)
loc = tank
/obj/item/weapon/extinguisher/mini/nozzle/attack_self()
return
@@ -23,12 +23,12 @@
if (isrobot(usr) || src.locked)
if(istype(O, /obj/item/device/multitool))
user << "\red Resetting circuitry..."
user << "<span class = 'caution'> Resetting circuitry...</span>"
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
sleep(50) // Sleeping time~
src.locked = 0
user << "\blue You disable the locking modules."
update_icon()
if(do_after(user, 20))
src.locked = 0
user << "<span class = 'caution'> You disable the locking modules.</span>"
update_icon()
return
else if(istype(O, /obj/item/weapon))
var/obj/item/weapon/W = O
@@ -41,7 +41,7 @@
else
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
user << "\blue The cabinet's protective glass glances off the hit."
user << "<span class = 'warning'> The cabinet's protective glass glances off the hit.</span>"
else
src.hitstaken++
if(src.hitstaken == 4)
@@ -54,12 +54,12 @@
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "\red Unwield the axe first."
user << "<span class = 'warning'> Unwield the axe first.</span>"
return
fireaxe = O
user.drop_item()
src.contents += O
user << "\blue You place the fire axe back in the [src.name]."
user << "<span class = 'caution'> You place the fire axe back in the [src.name].</span>"
update_icon()
else
if(src.smashed)
@@ -82,11 +82,11 @@
spawn(10) update_icon()
return
else
user << "\red Resetting circuitry..."
sleep(50)
src.locked = 1
user << "\blue You re-enable the locking modules."
user << "<span class = 'caution'> Resetting circuitry...</span>"
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user, 20))
src.locked = 1
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
return
else
localopened = !localopened
@@ -107,13 +107,13 @@
hasaxe = 1
if(src.locked)
user <<"\red The cabinet won't budge!"
user <<"<span class = 'warning'> The cabinet won't budge!</span>"
return
if(localopened)
if(fireaxe)
user.put_in_hands(fireaxe)
fireaxe = null
user << "\blue You take the fire axe from the [name]."
user << "<span class = 'caution'> You take the fire axe from the [name].</span>"
src.add_fingerprint(user)
update_icon()
else
@@ -140,7 +140,7 @@
attack_tk(mob/user as mob)
if(localopened && fireaxe)
fireaxe.loc = loc
user << "\blue You telekinetically remove the fire axe."
user << "<span class = 'caution'> You telekinetically remove the fire axe.</span>"
fireaxe = null
update_icon()
return
@@ -184,14 +184,14 @@
attack_ai(mob/user as mob)
if(src.smashed)
user << "\red The security of the cabinet is compromised."
user << "<span class = 'warning'> The security of the cabinet is compromised.</span>"
return
else
locked = !locked
if(locked)
user << "\red Cabinet locked."
user << "<span class = 'caution'> Cabinet locked.</span>"
else
user << "\blue Cabinet unlocked."
user << "<span class = 'caution'> Cabinet unlocked.</span>"
return
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
@@ -204,4 +204,4 @@
return
close()
return
return
@@ -82,6 +82,7 @@
new /obj/item/weapon/storage/bag/trash(src)
new /obj/item/clothing/shoes/galoshes(src)
new /obj/item/weapon/watertank/janitor(src)
new /obj/item/weapon/storage/belt/janitor(src)
/*
* Lawyer
@@ -26,6 +26,7 @@
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/weapon/airlock_painter(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/flash(src)
@@ -74,6 +74,7 @@
sleep(2)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
new /obj/item/clothing/head/helmet/HoS/dermal(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
+14 -1
View File
@@ -296,6 +296,16 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_shuttle
name = "Shuttle Airlock Assembly"
icon_state = "door_as_shuttle1"
typetext = "shuttle"
icontext = "shuttle"
airlock_type = /obj/machinery/door/airlock/shuttle
anchored = 1
density = 1
state = 1
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
@@ -545,7 +555,10 @@ obj/structure/door_assembly
door = new src.airlock_type( src.loc )
//door.req_access = src.req_access
door.electronics = src.electronics
door.req_access = src.electronics.conf_access
if(src.electronics.use_one_access)
door.req_one_access = src.electronics.conf_access
else
door.req_access = src.electronics.conf_access
if(created_name)
door.name = created_name
src.electronics.loc = door
+92 -137
View File
@@ -8,6 +8,8 @@
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
var/opening = 0
density = 1
opacity = 1
/obj/structure/falsewall/New()
relativewall_neighbours()
@@ -15,17 +17,14 @@
/obj/structure/falsewall/Destroy()
var/temploc = src.loc
var/temploc = loc
loc = null
spawn(10)
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falserwall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
..()
@@ -45,44 +44,43 @@
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "[mineral][junction]"
return
/obj/structure/falsewall/attack_hand(mob/user as mob)
/obj/structure/falsewall/attack_hand(mob/user)
if(opening)
return
opening = 1
if(density)
opening = 1
icon_state = "[mineral]fwall_open"
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
do_the_flick()
sleep(4)
density = 0
SetOpacity(0)
opening = 0
update_icon(0)
else
opening = 1
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
do_the_flick()
density = 1
sleep(15)
sleep(4)
SetOpacity(1)
src.relativewall()
opening = 0
update_icon()
opening = 0
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
/obj/structure/falsewall/proc/do_the_flick()
if(density)
flick("[mineral]fwall_opening", src)
else
flick("[mineral]fwall_closing", src)
/obj/structure/falsewall/update_icon(relativewall = 1)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
if(density)
icon_state = "[mineral]0"
src.relativewall()
if(relativewall)
relativewall()
else
icon_state = "[mineral]fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(var/delete = 1)
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
if(!mineral || mineral == "metal")
T.ChangeTurf(/turf/simulated/wall)
@@ -92,91 +90,79 @@
qdel(src)
return T
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/falsewall/attackby(obj/item/weapon/W, mob/user)
if(opening)
user << "\red You must wait until the door has stopped moving."
user << "<span class='warning'>You must wait until the door has stopped moving.</span>"
return
if(density)
var/turf/T = get_turf(src)
if(T.density)
user << "\red The wall is blocked!"
user << "<span class='warning'>[src] is blocked!</span>"
return
if(istype(W, /obj/item/weapon/screwdriver))
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
if (!istype(T, /turf/simulated/floor))
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
return
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
ChangeToWall()
if( istype(W, /obj/item/weapon/weldingtool) )
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if( WT:welding )
ChangeToWall(0)
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
T = get_turf(src)
T.attackby(W,user)
qdel(src)
if(WT.remove_fuel(0,user))
dismantle(user)
else
user << "\blue You can't reach, close it first!"
user << "<span class='warning'>You can't reach, close it first!</span>"
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/pickaxe/diamonddrill) || istype(W, /obj/item/weapon/melee/energy/blade))
ChangeToWall(0)
if(mineral != "plasma")
var/turf/T = get_turf(src)
T.attackby(W,user)
qdel(src)
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/pickaxe/diamonddrill) || istype(W, /obj/item/weapon/melee/energy/blade))
dismantle()
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
if(density)
icon_state = "[mineral]0"
src.relativewall()
/obj/structure/falsewall/proc/dismantle(mob/user)
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
new /obj/structure/girder/displaced(loc)
if(mineral == "metal")
if(istype(src, /obj/structure/falsewall/reinforced))
new /obj/item/stack/sheet/plasteel(loc)
new /obj/item/stack/sheet/plasteel(loc)
else
new /obj/item/stack/sheet/metal(loc)
new /obj/item/stack/sheet/metal(loc)
else
icon_state = "[mineral]fwall_open"
var/P = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new P(loc)
new P(loc)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
qdel(src)
/*
* False R-Walls
*/
/obj/structure/falserwall
/obj/structure/falsewall/reinforced
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
anchored = 1
var/mineral = "metal"
var/opening = 0
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falserwall/attack_hand(mob/user as mob)
if(opening)
return
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall/r_wall)
if(delete)
qdel(src)
return T
/obj/structure/falsewall/reinforced/do_the_flick()
if(density)
opening = 1
// Open wall
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
opening = 0
else
opening = 1
icon_state = "r_wall"
flick("frwall_closing", src)
density = 1
sleep(15)
SetOpacity(1)
relativewall()
opening = 0
/obj/structure/falserwall/relativewall()
/obj/structure/falsewall/reinforced/update_icon(relativewall = 1)
if(density)
icon_state = "rwall0"
src.relativewall()
else
icon_state = "frwall_open"
/obj/structure/falsewall/reinforced/relativewall()
if(!density)
icon_state = "frwall_open"
@@ -192,58 +178,9 @@
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
return
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ChangeTurf(/turf/simulated/wall) //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
qdel(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
qdel(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
qdel(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
qdel(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
qdel(src)
/*
* Uranium Falsewalls
*/
@@ -256,11 +193,11 @@
var/active = null
var/last_event = 0
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W, mob/user)
radiate()
..()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
/obj/structure/falsewall/uranium/attack_hand(mob/user)
radiate()
..()
@@ -304,6 +241,24 @@
icon_state = ""
mineral = "plasma"
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user)
if(is_hot(W) > 300)
message_admins("Plasma falsewall ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma falsewall ignited by [user.ckey]([user]) in ([x],[y],[z])")
burnbabyburn()
return
..()
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 400)
new /obj/structure/girder/displaced(loc)
qdel(src)
/obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
burnbabyburn()
//-----------wtf?-----------start
/obj/structure/falsewall/clown
name = "bananium wall"
+10 -4
View File
@@ -73,7 +73,9 @@
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
if(!anchored)
if(S.amount < 2) return
if(S.amount < 2)
user << "<span class='warning'>You need at least two sheets to create a false wall.</span>"
return
S.use(2)
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
var/obj/structure/falsewall/F = new (loc)
@@ -95,10 +97,12 @@
if(/obj/item/stack/sheet/plasteel)
if(!anchored)
if(S.amount < 2) return
if(S.amount < 2)
user << "<span class='warning'>You need at least two sheets to create a false wall.</span>"
return
S.use(2)
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
var/obj/structure/falserwall/FW = new (loc)
var/obj/structure/falsewall/reinforced/FW = new (loc)
transfer_fingerprints_to(FW)
qdel(src)
else
@@ -130,7 +134,9 @@
if(S.sheettype)
var/M = S.sheettype
if(!anchored)
if(S.amount < 2) return
if(S.amount < 2)
user << "<span class='warning'>You need at least two sheets to create a false wall.</span>"
return
S.use(2)
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
var/F = text2path("/obj/structure/falsewall/[M]")
+172 -172
View File
@@ -19,172 +19,172 @@
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
air_update_turf(1)
/obj/structure/mineral_door/New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
air_update_turf(1)
return
/obj/structure/mineral_door/Destroy()
density = 0
air_update_turf(1)
..()
/obj/structure/mineral_door/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/mineral_door/Bumped(atom/user)
..()
if(!state)
return TryToSwitchState(user)
return
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
Destroy()
density = 0
air_update_turf(1)
..()
Move()
var/turf/T = loc
..()
move_update_air(T)
Bumped(atom/user)
..()
if(!state)
else if(isrobot(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
return
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
else if(isrobot(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
/obj/structure/mineral_door/attack_paw(mob/user)
return TryToSwitchState(user)
attack_paw(mob/user as mob)
return TryToSwitchState(user)
/obj/structure/mineral_door/attack_hand(mob/user)
return TryToSwitchState(user)
attack_hand(mob/user as mob)
return TryToSwitchState(user)
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
/obj/structure/mineral_door/CanAtmosPass()
return !density
CanAtmosPass()
return !density
proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
SwitchState()
else
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
else
SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
proc/SwitchState()
if(state)
Close()
else
Open()
proc/Open()
isSwitchingStates = 1
playsound(loc, openSound, 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
air_update_turf(1)
update_icon()
isSwitchingStates = 0
if(close_delay != -1)
spawn(close_delay)
if(!isSwitchingStates && state == 1)
Close()
proc/Close()
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
return
isSwitchingStates = 1
playsound(loc, closeSound, 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
opacity = 1
state = 0
air_update_turf(1)
update_icon()
isSwitchingStates = 0
/obj/structure/mineral_door/proc/SwitchState()
if(state)
Close()
else
Open()
/obj/structure/mineral_door/proc/Open()
isSwitchingStates = 1
playsound(loc, openSound, 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
air_update_turf(1)
update_icon()
if(state)
icon_state = "[mineralType]open"
else
icon_state = mineralType
isSwitchingStates = 0
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "You start digging the [name]."
if(do_after(user,digTool.digspeed*hardness) && src)
user << "You finished digging."
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
else
attack_hand(user)
if(close_delay != -1)
spawn(close_delay)
if(!isSwitchingStates && state == 1)
Close()
/obj/structure/mineral_door/proc/Close()
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
return
isSwitchingStates = 1
playsound(loc, closeSound, 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
opacity = 1
state = 0
air_update_turf(1)
update_icon()
isSwitchingStates = 0
/obj/structure/mineral_door/update_icon()
if(state)
icon_state = "[mineralType]open"
else
icon_state = mineralType
bullet_act(var/obj/item/projectile/Proj)
hardness -= Proj.damage
..()
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "You start digging the [name]."
if(do_after(user,digTool.digspeed*hardness) && src)
user << "You finished digging."
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
return
else
attack_hand(user)
return
proc/CheckHardness()
if(hardness <= 0)
Dismantle(1)
/obj/structure/mineral_door/bullet_act(obj/item/projectile/Proj)
hardness -= Proj.damage
..()
CheckHardness()
return
proc/Dismantle(devastated = 0)
if(!devastated)
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
/obj/structure/mineral_door/proc/CheckHardness()
if(hardness <= 0)
Dismantle(1)
/obj/structure/mineral_door/proc/Dismantle(devastated = 0)
if(!devastated)
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
qdel(src)
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
qdel(src)
ex_act(severity = 1)
switch(severity)
if(1)
/obj/structure/mineral_door/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(1)
if(2)
if(prob(20))
Dismantle(1)
if(2)
if(prob(20))
Dismantle(1)
else
hardness--
CheckHardness()
if(3)
hardness -= 0.1
else
hardness--
CheckHardness()
return
if(3)
hardness -= 0.1
CheckHardness()
return
@@ -211,28 +211,28 @@
/obj/structure/mineral_door/transparent
opacity = 0
Close()
..()
opacity = 0
/obj/structure/mineral_door/transparent/Close()
..()
opacity = 0
/obj/structure/mineral_door/transparent/plasma
mineralType = "plasma"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
TemperatureAct(100)
..()
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user)
if(is_hot(W))
message_admins("Plasma mineral door ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma mineral door ignited by [user.ckey]([user]) in ([x],[y],[z])")
TemperatureAct(100)
..()
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
/obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct(temperature)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
@@ -244,11 +244,11 @@
openSound = 'sound/effects/doorcreaky.ogg'
closeSound = 'sound/effects/doorcreaky.ogg'
Dismantle(devastated = 0)
if(!devastated)
for(var/i = 1, i <= oreAmount, i++)
new/obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
/obj/structure/mineral_door/wood/Dismantle(devastated = 0)
if(!devastated)
for(var/i = 1, i <= oreAmount, i++)
new/obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
/obj/structure/mineral_door/resin
mineralType = "resin"
@@ -257,14 +257,14 @@
openSound = 'sound/effects/attackblob.ogg'
closeSound = 'sound/effects/attackblob.ogg'
TryToSwitchState(atom/user)
if(isalien(user))
return ..()
/obj/structure/mineral_door/resin/TryToSwitchState(atom/user)
if(isalien(user))
return ..()
Dismantle(devastated = 0)
qdel(src)
/obj/structure/mineral_door/resin/Dismantle(devastated = 0)
qdel(src)
CheckHardness()
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
..()
/obj/structure/mineral_door/resin/CheckHardness()
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
..()
+14 -1
View File
@@ -19,6 +19,10 @@
instrumentDir = dir
instrumentObj = obj
/datum/song/Destroy()
instrumentObj = null
..()
// note is a number from 1-7 for A-G
// acc is either "b", "n", or "#"
// oct is 1-8 (or 9 for C)
@@ -47,10 +51,14 @@
// now generate name
var/soundfile = "sound/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
soundfile = file(soundfile)
// make sure the note exists
if(!fexists(soundfile))
return
// and play
var/turf/source = get_turf(instrumentObj)
for(var/mob/M in hearers(15, source))
M.playsound_local(source, file(soundfile), 100, falloff = 5)
M.playsound_local(source, soundfile, 100, falloff = 5)
/datum/song/proc/updateDialog(mob/user as mob)
instrumentObj.updateDialog() // assumes it's an object in world, override if otherwise
@@ -309,6 +317,11 @@
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
icon_state = "piano"
/obj/structure/piano/Destroy()
qdel(song)
song = null
..()
/obj/structure/piano/attack_hand(mob/user as mob)
interact(user)
@@ -558,6 +558,7 @@
if (istype(I, /obj/item/weapon/wrench))
table_destroy(2, user)
return
if(isrobot(user))
return
@@ -569,6 +570,7 @@
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
table_destroy(1, user)
return
if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_;
if(user.drop_item())
@@ -238,7 +238,10 @@ obj/structure/windoor_assembly/Destroy()
windoor.dir = src.dir
windoor.density = 0
windoor.req_access = src.electronics.conf_access
if(src.electronics.use_one_access)
windoor.req_one_access = src.electronics.conf_access
else
windoor.req_access = src.electronics.conf_access
windoor.electronics = src.electronics
src.electronics.loc = windoor
windoor.close()