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

Conflicts:
	code/_onclick/telekinesis.dm
This commit is contained in:
Miauw
2014-04-08 14:29:58 +02:00
172 changed files with 15844 additions and 4189 deletions
@@ -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)
@@ -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()