mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
CHANGELOG && Dangercon Update:
•Fireaxes, extinguishers and fireaxe closets placed around the station. Functionality described in changelog. Airlock modifying is because you can use the fireaxe to crank open doors. •Piano? Being able to be smashed? What are you talking about? •The two handed system is purely experimental and subject to much cleaning up/proc making to enable it for other objects as well. The mob modifications is because of the two handed system making it unable for you to switch hands. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1543 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1066,7 +1066,7 @@ proc/move_mining_shuttle()
|
||||
if(1)
|
||||
usr << "The satchel now picks up all ore in a tile at once."
|
||||
if(0)
|
||||
usr << "The satchel now picks up ore one at a time."
|
||||
usr << "The satchel now picks up one ore at a time."
|
||||
|
||||
|
||||
/**********************Ore box**************************/
|
||||
@@ -2634,11 +2634,11 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list(
|
||||
..()
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
recipes = gold_recipes
|
||||
/* recipes = gold_recipes //Commenting out until there's a proper sprite. The golden plaque is supposed to be a special item dedicated to a really good player. -Agouri
|
||||
|
||||
var/global/list/datum/stack_recipe/gold_recipes = list ( \
|
||||
var/global/list/datum/stack_recipe/gold_recipes = list ( \
|
||||
new/datum/stack_recipe("Plaque", /obj/item/weapon/plaque_assembly, 2), \
|
||||
)
|
||||
)*/
|
||||
|
||||
|
||||
/obj/item/stack/sheet/silver
|
||||
|
||||
+4
-2
@@ -275,7 +275,7 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/item/weapon/plaque_assembly
|
||||
/*/obj/item/weapon/plaque_assembly //commenting this out until there's a better rework
|
||||
desc = "Put this on a wall and engrave an epitaph"
|
||||
name = "Plaque Assembly"
|
||||
icon = 'decals.dmi'
|
||||
@@ -288,7 +288,7 @@
|
||||
var/obj/sign/goldenplaque/gp = new/obj/sign/goldenplaque(A)
|
||||
gp.name = epitaph
|
||||
gp.layer = 2.9
|
||||
del(src)
|
||||
del(src)*/
|
||||
|
||||
/obj/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
|
||||
desc = "The Maltese Falcon, Space Bar and Grill"
|
||||
@@ -343,6 +343,8 @@
|
||||
var/burning = null
|
||||
var/hitsound = null
|
||||
var/w_class = 3.0
|
||||
var/wielded = 0
|
||||
var/twohanded = 0 ///Two handed and wielded off by default, nyoro~n -Agouri
|
||||
flags = FPRINT | TABLEPASS
|
||||
pressure_resistance = 50
|
||||
var/obj/item/master = null
|
||||
|
||||
+304
-6
@@ -36,6 +36,215 @@
|
||||
icon_closed = "firecloset"
|
||||
icon_opened = "fireclosetopen"
|
||||
|
||||
/obj/closet/hydrant //wall mounted fire closet
|
||||
desc = "A wall mounted closet which comes with supplies to fight fire."
|
||||
name = "Fire Closet"
|
||||
icon_state = "hydrant"
|
||||
icon_closed = "hydrant"
|
||||
icon_opened = "hydrant_open"
|
||||
|
||||
/obj/closet/fireaxecabinet
|
||||
name = "Fire Axe Cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/fireaxe/FIREAXE = new/obj/item/weapon/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
icon_closed = "fireaxe1000"
|
||||
icon_opened = "fireaxe1100"
|
||||
anchored = 1
|
||||
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
|
||||
opened = 1
|
||||
var/hitstaken = 0
|
||||
var/locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
if(FIREAXE)
|
||||
hasaxe = 1
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "\red Resetting circuitry..."
|
||||
playsound(user, 'lockreset.wav', 50, 1)
|
||||
sleep(50) // Sleeping time~
|
||||
src.locked = 0
|
||||
user << "\blue You disable the locking modules."
|
||||
update_icon()
|
||||
return
|
||||
if(istype(O, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = O
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
playsound(user, '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."
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
playsound(user, 'Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
|
||||
src.smashed = 1
|
||||
src.locked = 0
|
||||
src.localopened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/fireaxe) && src.localopened)
|
||||
if(!FIREAXE)
|
||||
if(O.wielded)
|
||||
user << "\red Unwield the axe first."
|
||||
return
|
||||
FIREAXE = O
|
||||
user.drop_item(O)
|
||||
src.contents += O
|
||||
user << "\blue You place the fire axe back in the [src.name]."
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
if(localopened)
|
||||
localopened = 0
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "\red Resetting circuitry..."
|
||||
sleep(50)
|
||||
src.locked = 1
|
||||
user << "\blue You re-enable the locking modules."
|
||||
playsound(user, 'lockenable.wav', 50, 1)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
|
||||
var/hasaxe = 0
|
||||
if(FIREAXE)
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"\red The cabinet won't budge!"
|
||||
return
|
||||
if(localopened)
|
||||
if(FIREAXE)
|
||||
user.put_in_hand(FIREAXE)
|
||||
FIREAXE = null
|
||||
user << "\blue You take the fire axe from the [name]."
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
else
|
||||
localopened = !localopened //I'm pretty sure we don't need an if(src.smashed) in here. In case I'm wrong and it fucks up teh cabinet, **MARKER**. -Agouri
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr) || src.locked || src.smashed)
|
||||
if(src.locked)
|
||||
usr << "\red The cabinet won't budge!"
|
||||
else if(src.smashed)
|
||||
usr << "\blue The protective glass is broken!"
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
verb/remove_fire_axe()
|
||||
set name = "Remove Fire Axe"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
|
||||
if (localopened)
|
||||
if(FIREAXE)
|
||||
usr.put_in_hand(FIREAXE)
|
||||
FIREAXE = null
|
||||
usr << "\blue You take the Fire axe from the [name]."
|
||||
else
|
||||
usr << "\blue The [src.name] is empty."
|
||||
else
|
||||
usr << "\blue The [src.name] is closed."
|
||||
update_icon()
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "\red The security of the cabinet is compromised."
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "\red Cabinet locked."
|
||||
else
|
||||
user << "\blue Cabinet unlocked."
|
||||
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
|
||||
var/hasaxe = 0
|
||||
if(FIREAXE)
|
||||
hasaxe = 1
|
||||
icon_state = text("fireaxe[][][][]",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
|
||||
open()
|
||||
return
|
||||
|
||||
close()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/closet/toolcloset
|
||||
desc = "A bulky (yet mobile) closet. Contains tools."
|
||||
name = "Tool Closet"
|
||||
icon_state = "toolcloset"
|
||||
icon_closed = "toolcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/closet/jcloset
|
||||
desc = "A bulky (yet mobile) closet. Comes with janitor's clothes and biohazard gear."
|
||||
name = "Custodial Closet"
|
||||
@@ -112,8 +321,97 @@
|
||||
|
||||
// Inserting the gimmick clothing stuff here for generic items, IE Tacticool stuff
|
||||
|
||||
/obj/closet/extinguisher
|
||||
name = "Extinguisher closet"
|
||||
var/obj/item/weapon/extinguisher/EXTINGUISHER = new/obj/item/weapon/extinguisher
|
||||
icon_state = "extinguisher10"
|
||||
icon_opened = "extinguisher11"
|
||||
icon_closed = "extinguisher10"
|
||||
opened = 1
|
||||
var/localopened = 1
|
||||
desc = "Sure was nice of CentCom to install these everywhere."
|
||||
anchored = 1
|
||||
|
||||
open()
|
||||
return
|
||||
|
||||
close()
|
||||
return
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
//..() don't want it to behave like a normal closet.
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/extinguisher))
|
||||
if(!EXTINGUISHER)
|
||||
user.drop_item(O)
|
||||
src.contents += O
|
||||
EXTINGUISHER = O
|
||||
user << "\blue You place the extinguisher in the [src.name]."
|
||||
else
|
||||
localopened = !localopened
|
||||
else
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(localopened)
|
||||
if(EXTINGUISHER)
|
||||
user.put_in_hand(EXTINGUISHER)
|
||||
EXTINGUISHER = null
|
||||
user << "\blue You take the extinguisher from the [name]."
|
||||
else
|
||||
localopened = !localopened
|
||||
|
||||
else
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
verb/toggle_openness() //nice name, huh? HUH?!
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
verb/remove_extinguisher()
|
||||
set name = "Remove Extinguisher"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
|
||||
if (localopened)
|
||||
if(EXTINGUISHER)
|
||||
usr.put_in_hand(EXTINGUISHER)
|
||||
EXTINGUISHER = null
|
||||
usr << "\blue You take the extinguisher from the [name]."
|
||||
else
|
||||
usr << "\blue The [name] is empty."
|
||||
else
|
||||
usr << "\blue The [name] is closed."
|
||||
update_icon()
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
var/hasextinguisher = 0
|
||||
if(EXTINGUISHER)
|
||||
hasextinguisher = 1
|
||||
icon_state = text("extinguisher[][]",hasextinguisher,src.localopened)
|
||||
|
||||
|
||||
/obj/closet/gimmick
|
||||
desc = "Administrative Supply Closet"
|
||||
name = "Administrative Supply Closet"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
@@ -121,14 +419,14 @@
|
||||
anchored = 0
|
||||
|
||||
/obj/closet/gimmick/russian
|
||||
desc = "Russian Surplus"
|
||||
name = "Russian Surplus"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
desc = "Russian Surplus Closet"
|
||||
|
||||
/obj/closet/gimmick/tacticool
|
||||
desc = "Tacticool Gear"
|
||||
name = "Tacticool Gear"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
@@ -141,7 +439,7 @@
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
desc = "Thunderdome closet."
|
||||
name = "Thunderdome closet."
|
||||
anchored = 1
|
||||
|
||||
/obj/closet/thunderdome/tdred
|
||||
@@ -149,14 +447,14 @@
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
desc = "Thunderdome closet."
|
||||
name = "Thunderdome closet."
|
||||
|
||||
/obj/closet/thunderdome/tdgreen
|
||||
desc = "Everything you need!"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
desc = "Thunderdome closet."
|
||||
name = "Thunderdome closet."
|
||||
|
||||
/obj/closet/malf/suits
|
||||
desc = "Gear preparations closet."
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
name = "weapon"
|
||||
icon = 'weapons.dmi'
|
||||
|
||||
/obj/item/weapon/offhand
|
||||
name = "Offhand"
|
||||
var/linked_weapon_name = ""
|
||||
w_class = 5.0
|
||||
icon_state = "offhand"
|
||||
|
||||
/obj/item/weapon/shield
|
||||
name = "shield"
|
||||
|
||||
@@ -490,6 +496,15 @@
|
||||
icon = 'items.dmi'
|
||||
icon_state = "red_crowbar"
|
||||
|
||||
/obj/item/weapon/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
name = "Fire axe"
|
||||
desc = "Truly, the tool of a madman. Who would possibly think to fight fire with an axe?"
|
||||
force = 5
|
||||
w_class = 4.0
|
||||
twohanded = 1
|
||||
|
||||
|
||||
/obj/item/weapon/disk
|
||||
name = "disk"
|
||||
icon = 'items.dmi'
|
||||
|
||||
@@ -867,8 +867,13 @@ About the new airlock wires panel:
|
||||
return src.attack_hand(user)
|
||||
else if (istype(C, /obj/item/device/radio/signaler))
|
||||
return src.attack_hand(user)
|
||||
else if (istype(C, /obj/item/weapon/crowbar))
|
||||
if ((src.density) && ( src.welded ) && !( src.operating ) && src.p_open && (!src.arePowerSystemsOn() || (stat & NOPOWER)) && !src.locked)
|
||||
else if (istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/fireaxe) )
|
||||
var/beingcrowbarred = null
|
||||
if(istype(C, /obj/item/weapon/crowbar) )
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
if ( ((src.density) && ( src.welded ) && !( src.operating ) && src.p_open && (!src.arePowerSystemsOn() || (stat & NOPOWER)) && !src.locked) && beingcrowbarred == 1 )
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics into the airlock assembly.")
|
||||
if(do_after(user,40))
|
||||
@@ -898,32 +903,70 @@ About the new airlock wires panel:
|
||||
else if (src.locked)
|
||||
user << "\blue The airlock's bolts prevent it from being pried open."
|
||||
if ((src.density) && (!( src.welded ) && !( src.operating ) && ((!src.arePowerSystemsOn()) || (stat & NOPOWER)) && !( src.locked )))
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("opening")
|
||||
|
||||
sleep(15)
|
||||
if(beingcrowbarred == 0) //being fireaxe'd
|
||||
var/obj/item/weapon/fireaxe/F = C
|
||||
if(F.wielded == 1)
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("opening")
|
||||
|
||||
src.density = 0
|
||||
update_icon()
|
||||
sleep(15)
|
||||
|
||||
if (!istype(src, /obj/machinery/door/airlock/glass))
|
||||
src.sd_SetOpacity(0)
|
||||
src.operating = 0
|
||||
src.density = 0
|
||||
update_icon()
|
||||
|
||||
if (!istype(src, /obj/machinery/door/airlock/glass))
|
||||
src.sd_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
return
|
||||
else
|
||||
if ((!src.density) && (!( src.welded ) && !( src.operating ) && !( src.locked )))
|
||||
else
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("closing")
|
||||
animate("opening")
|
||||
|
||||
src.density = 1
|
||||
sleep(15)
|
||||
|
||||
src.density = 0
|
||||
update_icon()
|
||||
|
||||
if ((src.visible) && (!istype(src, /obj/machinery/door/airlock/glass)))
|
||||
src.sd_SetOpacity(1)
|
||||
if (!istype(src, /obj/machinery/door/airlock/glass))
|
||||
src.sd_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
|
||||
else
|
||||
if ((!src.density) && (!( src.welded ) && !( src.operating ) && !( src.locked )))
|
||||
if(beingcrowbarred == 0)
|
||||
var/obj/item/weapon/fireaxe/F = C
|
||||
if(F.wielded == 1)
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("closing")
|
||||
|
||||
src.density = 1
|
||||
sleep(15)
|
||||
update_icon()
|
||||
|
||||
if ((src.visible) && (!istype(src, /obj/machinery/door/airlock/glass)))
|
||||
src.sd_SetOpacity(1)
|
||||
src.operating = 0
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
else
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("closing")
|
||||
|
||||
src.density = 1
|
||||
sleep(15)
|
||||
update_icon()
|
||||
|
||||
if ((src.visible) && (!istype(src, /obj/machinery/door/airlock/glass)))
|
||||
src.sd_SetOpacity(1)
|
||||
src.operating = 0
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
user << text("\red You [blocked?"welded":"unwelded"] the [src]")
|
||||
update_icon()
|
||||
return
|
||||
if (istype(C, /obj/item/weapon/crowbar))
|
||||
if (istype(C, /obj/item/weapon/crowbar) || (istype(C,/obj/item/weapon/fireaxe) && C.wielded == 1) )
|
||||
if (!src.blocked && !src.operating)
|
||||
if(src.density)
|
||||
spawn( 0 )
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (!( istype(C, /obj/item/weapon/crowbar) ))
|
||||
if (!( istype(C, /obj/item/weapon/crowbar || istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
return
|
||||
if ((src.density && (stat & NOPOWER) && !( src.operating )))
|
||||
spawn( 0 )
|
||||
|
||||
+39
-19
@@ -4,12 +4,15 @@ datum/song
|
||||
var/list/lines = list()
|
||||
|
||||
|
||||
|
||||
/obj/device/piano
|
||||
name = "space piano"
|
||||
icon = 'musician.dmi'
|
||||
icon_state = "piano"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/hitstaken = 0
|
||||
var/broken = 0
|
||||
var
|
||||
datum/song/song
|
||||
playing = 0
|
||||
@@ -52,25 +55,28 @@ datum/song
|
||||
src.playing = 0
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
//var/dat = "<HEAD><TITLE>Piano</TITLE></HEAD><BODY>\n <META HTTP-EQUIV='Refresh' CONTENT='10'>"
|
||||
var/dat
|
||||
var/calctempo = (10/tempo)*60
|
||||
dat += "Tempo : [calctempo] BPM (<A href='?src=\ref[src];lowertempo=1'>-</A>/<A href='?src=\ref[src];raisetempo=1'>+</A>)"
|
||||
dat += "<A href='?src=\ref[src];newsong=1'>(Start a New Song)</A><BR>"
|
||||
if(src.song)
|
||||
var/linecount = 0
|
||||
for(var/line in song.lines)
|
||||
linecount += 1
|
||||
dat += "Bar [linecount]: [line]<BR>"//<A href='?src=\ref[src];deletebar=[linecount]'>(Delete bar)</A><BR>" // TODO: Replace delimeters with spaces, clean up display
|
||||
dat += "<A href='?src=\ref[src];newbar=1'>(Write a new bar)</A><BR>"
|
||||
if(src.song.lines.len > 0 && !(src.playing))
|
||||
dat += "<A href='?src=\ref[src];play=1'>(Play song)</A><BR>"
|
||||
if(src.playing)
|
||||
dat += "<A href='?src=\ref[src];stop=1'>(Stop playing)</A><BR>"
|
||||
dat += "<I><BR><BR><BR>Bars are a series of notes separated by asterisks (*)<BR><BR>Example: A*B*C*D*E*F*G will play a scale<BR>Chords can be played simply by listing more than one note before a pause : AB*CD*EF*GA<BR><BR>Bars may be up to 30 characters (including pauses)<BR>A song may only contain up to 10 bars<BR></I>"
|
||||
user << browse(dat, "window=piano")
|
||||
onclose(user, "piano")
|
||||
if(src.broken)
|
||||
return
|
||||
else
|
||||
usr.machine = src
|
||||
//var/dat = "<HEAD><TITLE>Piano</TITLE></HEAD><BODY>\n <META HTTP-EQUIV='Refresh' CONTENT='10'>"
|
||||
var/dat
|
||||
var/calctempo = (10/tempo)*60
|
||||
dat += "Tempo : [calctempo] BPM (<A href='?src=\ref[src];lowertempo=1'>-</A>/<A href='?src=\ref[src];raisetempo=1'>+</A>)"
|
||||
dat += "<A href='?src=\ref[src];newsong=1'>(Start a New Song)</A><BR>"
|
||||
if(src.song)
|
||||
var/linecount = 0
|
||||
for(var/line in song.lines)
|
||||
linecount += 1
|
||||
dat += "Bar [linecount]: [line]<BR>"//<A href='?src=\ref[src];deletebar=[linecount]'>(Delete bar)</A><BR>" // TODO: Replace delimeters with spaces, clean up display
|
||||
dat += "<A href='?src=\ref[src];newbar=1'>(Write a new bar)</A><BR>"
|
||||
if(src.song.lines.len > 0 && !(src.playing))
|
||||
dat += "<A href='?src=\ref[src];play=1'>(Play song)</A><BR>"
|
||||
if(src.playing)
|
||||
dat += "<A href='?src=\ref[src];stop=1'>(Stop playing)</A><BR>"
|
||||
dat += "<I><BR><BR><BR>Bars are a series of notes separated by asterisks (*)<BR><BR>Example: A*B*C*D*E*F*G will play a scale<BR>Chords can be played simply by listing more than one note before a pause : AB*CD*EF*GA<BR><BR>Bars may be up to 30 characters (including pauses)<BR>A song may only contain up to 10 bars<BR></I>"
|
||||
user << browse(dat, "window=piano")
|
||||
onclose(user, "piano")
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["lowertempo"])
|
||||
@@ -108,6 +114,20 @@ datum/song
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/fireaxe) && W.wielded == 1)
|
||||
playsound(src.loc, 'woodhit.ogg', 50, 0)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B> [] forcefully slams the [] with the Fire axe!</B>", user, src), 1)
|
||||
if(!src.broken) //we don't want an already damaged piano to be more damageable
|
||||
src.hitstaken++
|
||||
if(prob(src.hitstaken*8))
|
||||
src.broken = 1
|
||||
src.icon_state = "pianobroken"
|
||||
playsound(src.loc, 'pianocrash.ogg', 50, 0)
|
||||
return
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/* src.playing = 1
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
/obj/closet/firecloset/full/New()
|
||||
..()
|
||||
sleep(4)
|
||||
contents = list()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat(src)
|
||||
|
||||
/obj/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
if (prob (1))
|
||||
del(src)
|
||||
return
|
||||
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
@@ -29,4 +37,36 @@
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat(src)*/
|
||||
new /obj/item/clothing/head/helmet/hardhat(src)*/
|
||||
|
||||
/obj/closet/toolcloset/New()
|
||||
if(prob(60))
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/t_scanner(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/utilitybelt(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
if(prob(30))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(10))
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
if(prob(60))
|
||||
new /obj/item/clothing/head/helmet/hardhat(src)
|
||||
@@ -101,6 +101,12 @@
|
||||
|
||||
|
||||
/mob/living/carbon/proc/swap_hand()
|
||||
var/obj/item/item_in_hand = src.get_active_hand()
|
||||
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
|
||||
if(item_in_hand.twohanded == 1)
|
||||
if(item_in_hand.wielded == 1)
|
||||
usr << text("Your other hand is too busy holding the []",item_in_hand.name)
|
||||
return
|
||||
src.hand = !( src.hand )
|
||||
if (!( src.hand ))
|
||||
src.hands.dir = NORTH
|
||||
|
||||
@@ -1101,6 +1101,18 @@
|
||||
|
||||
/mob/proc/drop_item()
|
||||
var/obj/item/W = src.equipped()
|
||||
if(istype(W,/obj/item/weapon/fireaxe))
|
||||
if(W.wielded)
|
||||
if(src.hand)
|
||||
var/obj/item/weapon/offhand/O = src.r_hand
|
||||
del O
|
||||
else
|
||||
var/obj/item/weapon/offhand/O = src.l_hand
|
||||
del O
|
||||
W.wielded = 0 //Kinda crude, but gets the job done with minimal pain -Agouri
|
||||
W.name = "Fire axe" //name reset so people don't see world fireaxes with (unwielded) or (wielded) tags
|
||||
W.update_icon()
|
||||
|
||||
if (W)
|
||||
u_equip(W)
|
||||
if (src.client)
|
||||
@@ -1202,6 +1214,7 @@
|
||||
|
||||
update_clothing()
|
||||
|
||||
|
||||
/mob/proc/ret_grab(obj/list_container/mobl/L as obj, flag)
|
||||
if ((!( istype(src.l_hand, /obj/item/weapon/grab) ) && !( istype(src.r_hand, /obj/item/weapon/grab) )))
|
||||
if (!( L ))
|
||||
|
||||
Reference in New Issue
Block a user