Photocopiers work properly with photos once again.

Updated gateways a bit, they use a few less globals now.

Added some new snow icons.
Added a wip away mission.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5122 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-11-19 16:28:52 +00:00
parent 30357d18ce
commit 3847c3d638
5 changed files with 284 additions and 30 deletions

View File

@@ -7,11 +7,13 @@
anchored = 1
var/active = 0
/obj/machinery/gateway/initialize()
update_icon()
if(dir == 2)
density = 0
/obj/machinery/gateway/update_icon()
if(active)
icon_state = "on"
@@ -32,11 +34,12 @@
var/wait = 0 //this just grabs world.time at world start
var/obj/machinery/gateway/centeraway/awaygate = null //inb4 this doesnt work at all
/obj/machinery/gateway/centerstation/initialize()
update_icon()
returndestination = get_step(loc, SOUTH)
wait = world.time + config.gateway_delay //+ thirty minutes default
awaygate = locate(/obj/machinery/gateway/centeraway, world)
awaygate = locate(/obj/machinery/gateway/centeraway)
/obj/machinery/gateway/centerstation/update_icon()
if(active)
@@ -45,6 +48,7 @@
icon_state = "offcenter"
obj/machinery/gateway/centerstation/process()
if(stat & (NOPOWER))
if(active) toggleoff()
@@ -53,6 +57,7 @@ obj/machinery/gateway/centerstation/process()
if(active)
use_power(5000)
/obj/machinery/gateway/centerstation/proc/detect()
linked = list() //clear the list
var/turf/T = loc
@@ -72,18 +77,18 @@ obj/machinery/gateway/centerstation/process()
if(linked.len == 8)
ready = 1
/obj/machinery/gateway/centerstation/proc/toggleon(mob/user as mob)
if(!ready) return
if(linked.len != 8) return
if(!powered()) return
if(awaygate == null)
if(!ready) return
if(linked.len != 8) return
if(!powered()) return
if(!awaygate)
user << "<span class='notice'>Error: No destination found.</span>"
return
if(world.time < wait)
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
return
for(var/obj/machinery/gateway/G in linked)
G.active = 1
G.update_icon()
@@ -91,6 +96,7 @@ obj/machinery/gateway/centerstation/process()
update_icon()
density = 0
/obj/machinery/gateway/centerstation/proc/toggleoff()
for(var/obj/machinery/gateway/G in linked)
G.active = 0
@@ -99,6 +105,7 @@ obj/machinery/gateway/centerstation/process()
update_icon()
density = 1
/obj/machinery/gateway/centerstation/attack_hand(mob/user as mob)
if(!ready)
detect()
@@ -109,15 +116,13 @@ obj/machinery/gateway/centerstation/process()
toggleoff()
//okay, here's the good teleporting stuff
/obj/machinery/gateway/centerstation/HasEntered(mob/user as mob)
if(!ready) return
if(!active) return
if(awaygate == null) return
if(!ready) return
if(!active) return
if(!awaygate) return
if(awaygate.calibrated)
calibrateddestination = get_step(awaygate.loc, SOUTH)
user.loc = calibrateddestination
user.loc = get_step(awaygate.loc, SOUTH)
return
else
var/obj/effect/landmark/dest = pick(awaydestinations)
@@ -128,8 +133,10 @@ obj/machinery/gateway/centerstation/process()
return
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool))
user << "\black The gate is already calibrated, there is no work for you to do here."
return
/////////////////////////////////////Away////////////////////////
@@ -141,12 +148,12 @@ obj/machinery/gateway/centerstation/process()
var/calibrated = 1
var/list/linked = list() //a list of the connected gateway chunks
var/ready = 0
var/stationgate = null
var/obj/machinery/gateway/centeraway/stationgate = null
/obj/machinery/gateway/centeraway/initialize()
update_icon()
calibrateddestination = get_step(loc, SOUTH)
stationgate = locate(/obj/machinery/gateway/centerstation, world)
stationgate = locate(/obj/machinery/gateway/centerstation)
/obj/machinery/gateway/centeraway/update_icon()
@@ -176,11 +183,10 @@ obj/machinery/gateway/centerstation/process()
ready = 1
/obj/machinery/gateway/centeraway/proc/toggleon(mob/user as mob)
if(!ready) return
if(linked.len != 8) return
if(stationgate == null)
if(!ready) return
if(linked.len != 8) return
if(!stationgate)
user << "<span class='notice'>Error: No destination found.</span>"
return
@@ -191,6 +197,7 @@ obj/machinery/gateway/centerstation/process()
update_icon()
density = 0
/obj/machinery/gateway/centeraway/proc/toggleoff()
for(var/obj/machinery/gateway/G in linked)
G.active = 0
@@ -200,7 +207,6 @@ obj/machinery/gateway/centerstation/process()
density = 1
/obj/machinery/gateway/centeraway/attack_hand(mob/user as mob)
if(!ready)
detect()
@@ -210,19 +216,20 @@ obj/machinery/gateway/centerstation/process()
return
toggleoff()
/obj/machinery/gateway/centeraway/HasEntered(mob/user as mob)
if(!ready) return
if(!active) return
user.loc = returndestination
if(!ready) return
if(!active) return
user.loc = get_step(stationgate.loc, SOUTH)
user.dir = SOUTH
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool))
if(calibrated == 1)
if(calibrated)
user << "\black The gate is already calibrated, there is no work for you to do here."
return
else
user << "\blue <b>Recalibration successful!</b>: \black The gates systems have been fine tuned, travel to the gate will now be on target."
user << "\blue <b>Recalibration successful!</b>: \black This gates systems have been fine tuned, travel to this gate will now be on target."
calibrated = 1
return

View File

@@ -68,13 +68,18 @@
if(toner > 0)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
var/icon/img = icon(photocopy.img)
if(toner > 10) //plenty of toner, go straight greyscale
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
else //not much toner left, lighten the photo
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.icon = I
p.img = img
p.name = photocopy.name
p.desc = photocopy.desc
p.scribble = photocopy.scribble
toner -= 5 //photos use a lot of ink!
sleep(15)
else