Adds basketball simulation to the Holodeck

Credit to Ausops for the ball sprites
Credit to Sly for the Hoop sprite

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4012 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
ericgfwong@hotmail.com
2012-07-08 01:08:23 +00:00
parent 303fe6fb62
commit 070ce4f118
7 changed files with 3395 additions and 3310 deletions

View File

@@ -810,6 +810,9 @@ proc/process_ghost_teleport_locs()
/area/holodeck/source_boxingcourt /area/holodeck/source_boxingcourt
name = "\improper Holodeck - Boxing Court" name = "\improper Holodeck - Boxing Court"
/area/holodeck/source_basketball
name = "\improper Holodeck - Basketball Court"
/area/holodeck/source_thunderdomecourt /area/holodeck/source_thunderdomecourt
name = "\improper Holodeck - Thunderdome Court" name = "\improper Holodeck - Thunderdome Court"

View File

@@ -29,6 +29,7 @@
dat += "<A href='?src=\ref[src];emptycourt=1'>((Empty Court)</font>)</A><BR>" dat += "<A href='?src=\ref[src];emptycourt=1'>((Empty Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];boxingcourt=1'>((Boxing Court)</font>)</A><BR>" dat += "<A href='?src=\ref[src];boxingcourt=1'>((Boxing Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];basketball=1'>((Basketball Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];thunderdomecourt=1'>((Thunderdome Court)</font>)</A><BR>" dat += "<A href='?src=\ref[src];thunderdomecourt=1'>((Thunderdome Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];beach=1'>((Beach)</font>)</A><BR>" dat += "<A href='?src=\ref[src];beach=1'>((Beach)</font>)</A><BR>"
// dat += "<A href='?src=\ref[src];turnoff=1'>((Shutdown System)</font>)</A><BR>" // dat += "<A href='?src=\ref[src];turnoff=1'>((Shutdown System)</font>)</A><BR>"
@@ -74,6 +75,11 @@
if(target) if(target)
loadProgram(target) loadProgram(target)
else if(href_list["basketball"])
target = locate(/area/holodeck/source_basketball)
if(target)
loadProgram(target)
else if(href_list["thunderdomecourt"]) else if(href_list["thunderdomecourt"])
target = locate(/area/holodeck/source_thunderdomecourt) target = locate(/area/holodeck/source_thunderdomecourt)
if(target) if(target)
@@ -146,7 +152,7 @@
playsound(src.loc, 'sparks4.ogg', 75, 1) playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1 emagged = 1
user << "\blue You vastly increase projector power and override the safety and security protocols." user << "\blue You vastly increase projector power and override the safety and security protocols."
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintence and do not use the simulator." user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
src.updateUsrDialog() src.updateUsrDialog()
return return
@@ -440,9 +446,57 @@
New() New()
color = "red" color = "red"
//BASKETBALL OBJECTS
/obj/item/weapon/beach_ball/holoball
icon = 'basketball.dmi'
icon_state = "basketball"
name = "basketball"
item_state = "basketball"
desc = "Here's your chance to do your dance at the Space Jam."
/obj/structure/holohoop
name = "basketball hoop"
desc = "Boom, Shakalaka!."
icon = 'basketball.dmi'
icon_state = "hoop"
anchored = 1
density = 1
throwpass = 1
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/M in viewers(src))
M.show_message("\red [G.assailant] dunks [G.affecting] into the [src]!", 3)
del(W)
return
else if (istype(W, /obj/item) && get_dist(src,user)<2)
user.drop_item(src)
for(var/mob/M in viewers(src))
M.show_message("\blue [user] dunks [W] into the [src]!", 3)
return
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item) && mover.throwing)
var/obj/item/I = mover
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
return
if(prob(60))
I.loc = src.loc
for(var/mob/M in viewers(src))
M.show_message("\blue Swish! \the [I] lands in \the [src].", 3)
else
for(var/mob/M in viewers(src))
M.show_message("\red \the [I] bounces off of \the [src]'s rim!", 3)
return 0
else
return ..(mover, target, height, air_group)
/obj/machinery/readybutton /obj/machinery/readybutton

View File

@@ -46,6 +46,14 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit tho. Thanks. --> should be listed in the changelog upon commit tho. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here --> <!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">Saturday July 7th, 2012</h2>
<h3 class="author">Icarus updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">A basketball simulation is now available at the holodeck. Credit to Sly and Ausops for the sprites.</li>
</ul>
</div>
<div class="commit sansserif"> <div class="commit sansserif">
<h2 class="date">Friday July 6th, 2012</h2> <h2 class="date">Friday July 6th, 2012</h2>
<h3 class="author">Giacom updated:</h3> <h3 class="author">Giacom updated:</h3>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 112 KiB

BIN
icons/obj/basketball.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because it is too large Load Diff