Polaris December Sync

This commit is contained in:
killer653
2016-12-10 09:51:11 -05:00
263 changed files with 5254 additions and 1644 deletions
@@ -288,8 +288,8 @@
src.add_fingerprint(user)
return
/obj/structure/closet/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
/obj/structure/closet/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/closet/relaymove(mob/user as mob)
@@ -317,7 +317,7 @@
if(!usr.canmove || usr.stat || usr.restrained())
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.toggle(usr)
else
@@ -118,4 +118,6 @@
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
@@ -32,6 +32,7 @@
new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/device/flash(src)
new /obj/item/taperoll/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
@@ -236,6 +236,37 @@
req_access = list(access_chemistry)
New()
..()
new /obj/item/clothing/under/rank/psych(src)
new /obj/item/clothing/under/rank/psych/turtleneck(src)
new /obj/item/clothing/suit/straight_jacket(src)
new /obj/item/weapon/reagent_containers/glass/bottle/stoxin(src)
new /obj/item/weapon/reagent_containers/syringe(src)
new /obj/item/weapon/storage/pill_bottle/citalopram(src)
new /obj/item/weapon/reagent_containers/pill/methylphenidate(src)
new /obj/item/weapon/clipboard(src)
new /obj/item/weapon/folder/white(src)
new /obj/item/device/taperecorder(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/camera(src)
new /obj/item/toy/therapy_blue(src)
return
/obj/structure/closet/secure_closet/psych
name = "psychiatric closet"
desc = "Store psychology tools and medicines in here."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_psychiatrist)
New()
..()
new /obj/item/weapon/storage/box/pillbottles(src)
@@ -134,7 +134,7 @@
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
else
@@ -280,6 +280,10 @@
new /obj/item/device/flashlight/maglight(src)
new /obj/item/weapon/reagent_containers/food/drinks/flask/detflask(src)
new /obj/item/weapon/storage/briefcase/crimekit(src)
new /obj/item/device/taperecorder(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
@@ -177,7 +177,7 @@
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
else
+26 -20
View File
@@ -138,14 +138,20 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
/obj/structure/door_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/door_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
@@ -156,7 +162,7 @@
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the [glass] plating off!</span>"
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
var/M = text2path("/obj/item/stack/material/[glass]")
new M(src.loc, 2)
glass = 0
@@ -164,18 +170,18 @@
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the glass panel out!</span>"
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You dissasembled the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
new /obj/item/stack/material/steel(src.loc, 4)
qdel (src)
else
user << "<span class='notice'>You need more welding fuel.</span>"
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
return
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
@@ -187,19 +193,19 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 40) && state == 0 && anchored)
if (C.use(1))
src.state = 1
user << "<span class='notice'>You wire the airlock.</span>"
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -207,7 +213,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the airlock wires.!</span>"
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
@@ -219,14 +225,14 @@
if(!src) return
user.drop_item()
W.loc = src
user << "<span class='notice'>You installed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
src.state = 2
src.electronics = W
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
user << "<span class='notice'>There was nothing to remove.</span>"
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
src.state = 1
return
@@ -235,7 +241,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You removed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
src.state = 1
electronics.loc = src.loc
electronics = null
@@ -250,28 +256,28 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>")
glass = 1
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now finishing the airlock.</span>"
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You finish the airlock!</span>"
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
var/path
if(istext(glass))
path = text2path("/obj/machinery/door/airlock/[glass]")
+26 -17
View File
@@ -4,14 +4,20 @@
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_wall"
w_class = ITEMSIZE_NORMAL
var/deploy_path = /obj/structure/inflatable
attack_self(mob/user)
playsound(loc, 'sound/items/zip.ogg', 75, 1)
user << "<span class='notice'>You inflate [src].</span>"
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
/obj/item/inflatable/attack_self(mob/user)
inflate(user,user.loc)
/obj/item/inflatable/afterattack(var/atom/A, var/mob/user)
..(A, user)
if(!user)
return
if(!user.Adjacent(A))
to_chat(user,"You can't reach!")
return
if(istype(A, /turf))
inflate(user,A)
/obj/structure/inflatable
name = "inflatable wall"
@@ -82,6 +88,17 @@
if(health <= 0)
deflate(1)
/obj/structure/inflatable/CtrlClick()
hand_deflate()
/obj/item/inflatable/proc/inflate(var/mob/user,var/location)
playsound(location, 'sound/items/zip.ogg', 75, 1)
to_chat(user,"<span class='notice'>You inflate [src].</span>")
var/obj/structure/inflatable/R = new deploy_path(location)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
/obj/structure/inflatable/proc/deflate(var/violent=0)
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
if(violent)
@@ -102,7 +119,7 @@
set category = "Object"
set src in oview(1)
if(isobserver(usr)) //to stop ghosts from deflating
if(isobserver(usr) || usr.restrained() || !usr.Adjacent(src))
return
verbs -= /obj/structure/inflatable/verb/hand_deflate
@@ -123,14 +140,7 @@
desc = "A folded membrane which rapidly expands into a simple door on activation."
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_door"
attack_self(mob/user)
playsound(loc, 'sound/items/zip.ogg', 75, 1)
user << "<span class='notice'>You inflate [src].</span>"
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
deploy_path = /obj/structure/inflatable/door
/obj/structure/inflatable/door //Based on mineral door code
name = "inflatable door"
@@ -165,7 +175,6 @@
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
@@ -25,6 +25,7 @@ obj/structure/windoor_assembly
var/facing = "l" //Does the windoor open to the left or right?
var/secure = "" //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed in terms of sprites
var/step = null //How far the door assembly has progressed in terms of steps
obj/structure/windoor_assembly/secure
name = "secure windoor assembly"
@@ -41,6 +42,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
set_dir(start_dir)
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
set_dir(NORTH)
update_state()
update_nearby_tiles(need_rebuild=1)
@@ -69,13 +71,20 @@ obj/structure/windoor_assembly/Destroy()
else
return 1
/obj/structure/windoor_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/windoor_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
switch(state)
@@ -88,14 +97,14 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You disassembled the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
if(secure)
new /obj/item/stack/material/glass/reinforced(get_turf(src), 2)
else
new /obj/item/stack/material/glass(get_turf(src), 2)
qdel(src)
else
user << "<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>"
to_chat(user,"<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>")
return
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
@@ -105,12 +114,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've secured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = 1
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(istype(W, /obj/item/weapon/wrench) && anchored)
@@ -119,12 +125,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've unsecured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = 0
if(src.secure)
src.name = "secure windoor assembly"
else
src.name = "windoor assembly"
step = null
//Adding cable to the assembly. Step 5 complete.
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
@@ -133,12 +136,9 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/stack/cable_coil/CC = W
if(do_after(user, 40))
if (CC.use(1))
user << "<span class='notice'>You wire the windoor!</span>"
to_chat(user,"<span class='notice'>You wire the windoor!</span>")
src.state = "02"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
step = 1
else
..()
@@ -152,16 +152,13 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the windoor wires.!</span>"
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
new/obj/item/stack/cable_coil(get_turf(user), 1)
src.state = "01"
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked")
else if(istype(W, /obj/item/weapon/airlock_electronics))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
@@ -170,8 +167,8 @@ obj/structure/windoor_assembly/Destroy()
user.drop_item()
W.loc = src
user << "<span class='notice'>You've installed the airlock electronics!</span>"
src.name = "near finished windoor assembly"
to_chat(user,"<span class='notice'>You've installed the airlock electronics!</span>")
step = 2
src.electronics = W
else
W.loc = src.loc
@@ -183,11 +180,8 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !src.electronics) return
user << "<span class='notice'>You've removed the airlock electronics!</span>"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
step = 1
var/obj/item/weapon/airlock_electronics/ae = electronics
electronics = null
ae.loc = src.loc
@@ -195,9 +189,12 @@ obj/structure/windoor_assembly/Destroy()
//Crowbar to complete the assembly, Step 7 complete.
else if(istype(W, /obj/item/weapon/crowbar))
if(!src.electronics)
usr << "<span class='warning'>The assembly is missing electronics.</span>"
to_chat(usr,"<span class='warning'>The assembly is missing electronics.</span>")
return
usr << browse(null, "window=windoor_access")
if(src.electronics && istype(src.electronics, /obj/item/weapon/circuitboard/broken))
to_chat(usr,"<span class='warning'>The assembly has broken airlock electronics.</span>")
return
to_chat(usr,browse(null, "window=windoor_access")) //Not sure what this actually does... -Ner
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
@@ -206,7 +203,7 @@ obj/structure/windoor_assembly/Destroy()
if(!src) return
density = 1 //Shouldn't matter but just incase
user << "<span class='notice'>You finish the windoor!</span>"
to_chat(user,"<span class='notice'>You finish the windoor!</span>")
if(secure)
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
@@ -218,7 +215,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "rightsecure"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -239,7 +237,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "right"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -263,7 +262,15 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/proc/update_state()
update_icon()
name += " ([created_name])"
name = ""
switch(step)
if (0)
name = "anchored "
if (1)
name = "wired "
if (2)
name = "near finished "
name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]"
//Rotates the windoor assembly clockwise
/obj/structure/windoor_assembly/verb/revrotate()
@@ -272,7 +279,7 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
@@ -292,11 +299,11 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if(src.facing == "l")
usr << "The windoor will now slide to the right."
to_chat(usr,"The windoor will now slide to the right.")
src.facing = "r"
else
src.facing = "l"
usr << "The windoor will now slide to the left."
to_chat(usr,"The windoor will now slide to the left.")
update_icon()
return