*Prison Station nows has a lounge with vending machines and a couple of scrubbers.

*Code for AI liquid dispensers is in. Not on map yet due to lack of sprite (they're fire alarms right now) and to assess player opinion.
*Changelog updated.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@434 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
crazyclonetheninja
2010-11-17 00:36:07 +00:00
parent d0db5bdd57
commit 03e5163018
3 changed files with 6240 additions and 6080 deletions

View File

@@ -0,0 +1,122 @@
/obj/machinery/ai_slipper
name = "AI Liquid Dispenser"
icon = 'monitors.dmi'
icon_state = "fire0"
layer = 3
anchored = 1.0
var/uses = 20
var/disabled = 0
var/lethal = 0
var/locked = 1
var/cooldown_time = 0
var/cooldown_timeleft = 0
var/cooldown_on = 0
req_access = list(access_ai_upload)
/obj/machinery/ai_slipper/New()
..()
/obj/machinery/turret/power_change()
if(stat & BROKEN)
return
else
if( powered() )
stat &= ~NOPOWER
else
stat |= NOPOWER
/obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses)
src.disabled = disabled
src.uses = uses
src.power_change()
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user)
if(stat & (NOPOWER|BROKEN))
return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
else // trying to unlock the interface
if (src.allowed(usr))
locked = !locked
user << "You [ locked ? "lock" : "unlock"] the device."
if (locked)
if (user.machine==src)
user.machine = null
user << browse(null, "window=ai_slipper")
else
if (user.machine==src)
src.attack_hand(usr)
else
user << "\red Access denied."
return
return
/obj/machinery/ai_slipper/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/ai_slipper/attack_hand(mob/user as mob)
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user << text("Too far away.")
user.machine = null
user << browse(null, "window=ai_slipper")
return
user.machine = src
var/loc = src.loc
if (istype(loc, /turf))
loc = loc:loc
if (!istype(loc, /area))
user << text("Turret badly positioned - loc.loc is [].", loc)
return
var/area/area = loc
var/t = "<TT><B>AI Liquid Dispenser</B> ([area.name])<HR>"
if(src.locked && (!istype(user, /mob/living/silicon)))
t += "<I>(Swipe ID card to unlock control panel.)</I><BR>"
else
t += text("Dispenser [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.disabled?"activated":"deactivated", src, src.disabled?"Disable":"Enable")
t += text("Uses Left: [uses]. <A href='?src=\ref[src];toggleUse=1'>Activate the dispenser?</A><br>\n")
user << browse(t, "window=computer;size=575x450")
onclose(user, "computer")
return
/obj/machinery/ai_slipper/Topic(href, href_list)
..()
if (src.locked)
if (!istype(usr, /mob/living/silicon))
usr << "Control panel is locked!"
return
if (href_list["toggleOn"])
src.disabled = !src.disabled
if (href_list["toggleUse"])
if(cooldown_on || disabled)
return
else
new /obj/effects/foam(src.loc)
src.uses--
cooldown_on = 1
cooldown_time = world.timeofday + 100
slip_process()
return
src.attack_hand(usr)
return
/obj/machinery/ai_slipper/proc/slip_process()
while(cooldown_time - world.timeofday > 0)
var/ticksleft = cooldown_time - world.timeofday
if(ticksleft > 1e5)
cooldown_time = world.timeofday + 10 // midnight rollover
cooldown_timeleft = (ticksleft / 10)
sleep(5)
if (uses <= 0)
return
if (uses >= 0)
cooldown_on = 0
return

View File

@@ -45,6 +45,17 @@
<h4>Changelog</h4>
<h5Tuesday, November 16, 00:20 GMT</h5>
<ul>
<li><b>Cruazy Guest's map is now live.</b></li>
<li>Entire station has been rearranged.</li>
<li>Prison Station added, with Prison Shuttle to transport to and from.</li>
<li>New Job: Warden. Distributes security items.</li>
<li>The new map is still in testing, so please report any bugs or suggestions you have to the forums.</li>
<li>Code for AI liquid dispensers (cleaning grenades in the AI core) is in, but not placed on map yet. Player opinions wanted.</li>
</ul>
<h5Sunday, November 14, 18:05</h5>
<ul>
<li>Major food/drink code overhaul. Food items heal for more but not instantly. Poison, Drug, and "Heat" effects from food items are also non-instant.

File diff suppressed because it is too large Load Diff