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

This commit is contained in:
Ergovisavi
2014-04-16 16:58:28 -07:00
285 changed files with 17880 additions and 5644 deletions
@@ -310,7 +310,7 @@
return //Door's open, not locked or welded, no point in resisting.
//okay, so the closet is either welded or locked... resist!!!
user.next_move = world.time + 100
user.changeNext_move(100)
user.last_special = world.time + 100
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
for(var/mob/O in viewers(src))
@@ -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)
@@ -227,7 +228,7 @@
/obj/structure/closet/secure_closet/injection
name = "lethal injections"
req_access = list(access_captain)
req_access = list(access_hos)
New()
..()
@@ -294,3 +295,19 @@
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/ammunitionlocker
name = "ammunition locker"
req_access = list(access_armory)
/obj/structure/closet/secure_closet/ammunitionlocker/New()
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
@@ -11,7 +11,7 @@
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/sheet/wood(src)
new /obj/item/stack/sheet/mineral/wood(src)
var/turf/T = get_turf(src)
for(var/obj/O in contents)
O.loc = T
+47 -25
View File
@@ -19,7 +19,7 @@ obj/structure/door_assembly
New()
base_icon_state = copytext(icon_state,1,lentext(icon_state))
door_assembly_0
/obj/structure/door_assembly/door_assembly_0
name = "airlock assembly"
icon_state = "door_as_1"
airlock_type = /obj/machinery/door/airlock
@@ -27,7 +27,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_com
/obj/structure/door_assembly/door_assembly_com
name = "command airlock assembly"
icon_state = "door_as_com1"
glass_base_icon_state = "door_as_gcom"
@@ -43,7 +43,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gcom1"
door_assembly_sec
/obj/structure/door_assembly/door_assembly_sec
name = "security airlock assembly"
icon_state = "door_as_sec1"
glass_base_icon_state = "door_as_gsec"
@@ -59,7 +59,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gsec1"
door_assembly_eng
/obj/structure/door_assembly/door_assembly_eng
name = "Engineering Airlock Assembly"
icon_state = "door_as_eng1"
glass_base_icon_state = "door_as_geng"
@@ -75,7 +75,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_geng1"
door_assembly_min
/obj/structure/door_assembly/door_assembly_min
name = "Mining Airlock Assembly"
icon_state = "door_as_min1"
glass_base_icon_state = "door_as_gmin"
@@ -91,7 +91,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gmin1"
door_assembly_atmo
/obj/structure/door_assembly/door_assembly_atmo
name = "Atmospherics Airlock Assembly"
icon_state = "door_as_atmo1"
glass_base_icon_state = "door_as_gatmo"
@@ -107,7 +107,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gatmo1"
door_assembly_research
/obj/structure/door_assembly/door_assembly_research
name = "Research Airlock Assembly"
icon_state = "door_as_res1"
glass_base_icon_state = "door_as_gres"
@@ -123,7 +123,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gres1"
door_assembly_science
/obj/structure/door_assembly/door_assembly_science
name = "Science Airlock Assembly"
icon_state = "door_as_sci1"
glass_base_icon_state = "door_as_gsci"
@@ -139,7 +139,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gsci1"
door_assembly_med
/obj/structure/door_assembly/door_assembly_med
name = "Medical Airlock Assembly"
icon_state = "door_as_med1"
typetext = "medical"
@@ -153,7 +153,7 @@ obj/structure/door_assembly
mineral = "glass"
icon_state = "door_as_gmed1"
door_assembly_mai
/obj/structure/door_assembly/door_assembly_mai
name = "Maintenance Airlock Assembly"
icon_state = "door_as_mai1"
typetext = "maintenance"
@@ -163,7 +163,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_ext
/obj/structure/door_assembly/door_assembly_ext
name = "External Airlock Assembly"
icon_state = "door_as_ext1"
typetext = "external"
@@ -173,7 +173,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_fre
/obj/structure/door_assembly/door_assembly_fre
name = "Freezer Airlock Assembly"
icon_state = "door_as_fre1"
typetext = "freezer"
@@ -183,7 +183,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_hatch
/obj/structure/door_assembly/door_assembly_hatch
name = "Airtight Hatch Assembly"
icon_state = "door_as_hatch1"
typetext = "hatch"
@@ -193,7 +193,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_mhatch
/obj/structure/door_assembly/door_assembly_mhatch
name = "Maintenance Hatch Assembly"
icon_state = "door_as_mhatch1"
typetext = "maintenance_hatch"
@@ -203,7 +203,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_glass
/obj/structure/door_assembly/door_assembly_glass
name = "Glass Airlock Assembly"
icon_state = "door_as_g1"
airlock_type = /obj/machinery/door/airlock/glass
@@ -212,7 +212,7 @@ obj/structure/door_assembly
state = 1
mineral = "glass"
door_assembly_gold
/obj/structure/door_assembly/door_assembly_gold
name = "Gold Airlock Assembly"
icon_state = "door_as_gold1"
airlock_type = /obj/machinery/door/airlock/gold
@@ -221,7 +221,7 @@ obj/structure/door_assembly
state = 1
mineral = "gold"
door_assembly_silver
/obj/structure/door_assembly/door_assembly_silver
name = "Silver Airlock Assembly"
icon_state = "door_as_silver1"
airlock_type = /obj/machinery/door/airlock/silver
@@ -230,7 +230,7 @@ obj/structure/door_assembly
state = 1
mineral = "silver"
door_assembly_diamond
/obj/structure/door_assembly/door_assembly_diamond
name = "Diamond Airlock Assembly"
icon_state = "door_as_diamond1"
airlock_type = /obj/machinery/door/airlock/diamond
@@ -239,7 +239,7 @@ obj/structure/door_assembly
state = 1
mineral = "diamond"
door_assembly_uranium
/obj/structure/door_assembly/door_assembly_uranium
name = "Uranium Airlock Assembly"
icon_state = "door_as_uranium1"
airlock_type = /obj/machinery/door/airlock/uranium
@@ -248,7 +248,7 @@ obj/structure/door_assembly
state = 1
mineral = "uranium"
door_assembly_plasma
/obj/structure/door_assembly/door_assembly_plasma
name = "Plasma Airlock Assembly"
icon_state = "door_as_plasma1"
airlock_type = /obj/machinery/door/airlock/plasma
@@ -257,7 +257,7 @@ obj/structure/door_assembly
state = 1
mineral = "plasma"
door_assembly_clown
/obj/structure/door_assembly/door_assembly_clown
name = "Bananium Airlock Assembly"
desc = "Honk"
icon_state = "door_as_clown1"
@@ -267,7 +267,7 @@ obj/structure/door_assembly
state = 1
mineral = "clown"
door_assembly_sandstone
/obj/structure/door_assembly/door_assembly_sandstone
name = "Sandstone Airlock Assembly"
icon_state = "door_as_sandstone1"
airlock_type = /obj/machinery/door/airlock/sandstone
@@ -276,7 +276,7 @@ obj/structure/door_assembly
state = 1
mineral = "sandstone"
door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
name = "High Tech Security Assembly"
icon_state = "door_as_highsec1"
typetext = "highsecurity"
@@ -286,7 +286,7 @@ obj/structure/door_assembly
density = 1
state = 1
door_assembly_vault
/obj/structure/door_assembly/door_assembly_vault
name = "Vault Door Assembly"
icon_state = "door_as_vault1"
typetext = "vault"
@@ -296,6 +296,25 @@ obj/structure/door_assembly
density = 1
state = 1
/obj/structure/door_assembly/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/door_assembly_wood
name = "Wooden Airlock Assembly"
icon_state = "door_as_wood1"
airlock_type = /obj/machinery/door/airlock/wood
anchored = 1
density = 1
state = 1
mineral = "wood"
/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 +564,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
+99 -138
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"
@@ -316,4 +271,10 @@
desc = "A wall with sandstone plating."
icon_state = ""
mineral = "sandstone"
//------------wtf?------------end
//------------wtf?------------end
/obj/structure/falsewall/wood
name = "wooden wall"
desc = "A wall with wooden plating."
icon_state = ""
mineral = "wood"
+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]")
+5 -1
View File
@@ -30,6 +30,7 @@
attack_hand(user)
/obj/structure/grille/attack_hand(mob/user as mob)
user.changeNext_move(8)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>", \
@@ -45,7 +46,7 @@
/obj/structure/grille/attack_alien(mob/user as mob)
if(istype(user, /mob/living/carbon/alien/larva)) return
user.changeNext_move(8)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
"<span class='warning'>You mangle [src].</span>", \
@@ -57,6 +58,7 @@
return
/obj/structure/grille/attack_slime(mob/living/carbon/slime/user as mob)
user.changeNext_move(8)
if(!user.is_adult) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -69,6 +71,7 @@
return
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
M.changeNext_move(8)
if(M.melee_damage_upper == 0) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -101,6 +104,7 @@
return
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.changeNext_move(8)
if(istype(W, /obj/item/weapon/wirecutters))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
+1 -1
View File
@@ -136,7 +136,7 @@
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
signs--
else
warning("[src] signs ([signs]) didn't match contents")
WARNING("Signs ([signs]) didn't match contents")
signs = 0
update_icon()
+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/mineral/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)
@@ -88,7 +88,7 @@
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/wood(src.loc)
new /obj/item/stack/sheet/mineral/wood(src.loc)
qdel(src)
else
..()
@@ -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()
+3
View File
@@ -114,6 +114,7 @@
R.add_fingerprint(user)
qdel(src)
else
user.changeNext_move(8)
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
@@ -126,6 +127,7 @@
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
if(!can_be_reached(user))
return
user.changeNext_move(8)
health -= damage
if(health <= 0)
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
@@ -193,6 +195,7 @@
qdel(src)
else
if(I.damtype == BRUTE || I.damtype == BURN)
user.changeNext_move(8)
hit(I.force)
if(health <= 7)
anchored = 0