mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
- Added ladders with godawful sprites. Started work on elevators with, you guessed it, godawful sprites.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@408 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -691,3 +691,29 @@
|
||||
var/gibtime = 40 // Time from starting until meat appears
|
||||
var/mob/occupant // Mob who has been put inside
|
||||
|
||||
/obj/machinery/travel
|
||||
name = "travel thingie"
|
||||
desc = "it is used for travel idunno"
|
||||
icon = 'travel.dmi'
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
//note - didn't use a single loc list just because it's easier to edit via adminmagics if this is done this way
|
||||
var/z_connect[world.maxz] //the z position of the tiles it connects to
|
||||
var/x_connect[world.maxx] //the x position of the tiles it connects to
|
||||
var/y_connect[world.maxy] //the y position of the tiles it connects to
|
||||
|
||||
/obj/machinery/travel/ladder
|
||||
icon_state = "ladder_up"
|
||||
name = "ladder"
|
||||
desc = "It is a ladder."
|
||||
var/connected = 0
|
||||
|
||||
/obj/machinery/travel/elevator
|
||||
icon_state = "elevator_closed"
|
||||
name = "elevator"
|
||||
desc = "It is an elevator. The display shows \"1\"."
|
||||
|
||||
var/current_floor = 1 //current floor the elevator is on. do NOT confuse with current z-level of the elevator
|
||||
var/list/elevators_connected = list() //list of elevators it is connected to
|
||||
var/list/floors = list() //dependant on the number of elevators, converts z-levels to floors, basically
|
||||
90
code/game/machinery/travel.dm
Normal file
90
code/game/machinery/travel.dm
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
/obj/machinery/travel
|
||||
name = "travel thingie"
|
||||
desc = "it is used for travel idunno"
|
||||
icon = 'travel.dmi'
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
//note - didn't use a single loc list just because it's easier to edit via adminmagics if this is done this way
|
||||
var/list/z_connect = list() //the z position of the tiles it connects to
|
||||
var/list/x_connect = list() //the x position of the tiles it connects to
|
||||
var/list/y_connect = list() //the y position of the tiles it connects to
|
||||
|
||||
/obj/machinery/travel/ladder
|
||||
icon_state = "ladder_up"
|
||||
name = "ladder"
|
||||
desc = "It is a ladder."
|
||||
|
||||
/obj/machinery/travel/elevator
|
||||
icon_state = "elevator_closed"
|
||||
name = "elevator"
|
||||
desc = "It is an elevator. The display shows \"1\"."
|
||||
|
||||
var/current_floor = 1 //current floor the elevator is on. do NOT confuse with current z-level of the elevator
|
||||
var/list/elevators_connected = list() //list of elevators it is connected to
|
||||
var/list/floors = list() //dependant on the number of elevators, converts z-levels to floors, basically
|
||||
*/
|
||||
|
||||
/obj/machinery/travel/ladder/New()
|
||||
for(var/i=src.z,i<=world.maxz,i++)
|
||||
var/isladder = 0
|
||||
for(var/obj/machinery/travel/ladder/L in locate(src.x,src.y,i))
|
||||
if(L==src)
|
||||
continue
|
||||
src.x_connect[i] = L.x
|
||||
src.y_connect[i] = L.y
|
||||
src.z_connect[i] = L.z
|
||||
L.icon_state = "ladder_down"
|
||||
L.x_connect[src.z] = src.x
|
||||
L.y_connect[src.z] = src.y
|
||||
L.z_connect[src.z] = src.z
|
||||
isladder = 1
|
||||
L.connected = src.z
|
||||
if(isladder)
|
||||
src.connected = i
|
||||
break
|
||||
if(!src.connected)
|
||||
for(var/i=1,i<=src.z,i++)
|
||||
var/isladder = 0
|
||||
for(var/obj/machinery/travel/ladder/L in locate(src.x,src.y,i))
|
||||
if(L==src)
|
||||
continue
|
||||
src.x_connect[i] = L.x
|
||||
src.y_connect[i] = L.y
|
||||
src.z_connect[i] = L.z
|
||||
src.icon_state = "ladder_down"
|
||||
L.x_connect[src.z] = src.x
|
||||
L.y_connect[src.z] = src.y
|
||||
L.z_connect[src.z] = src.z
|
||||
isladder = 1
|
||||
L.connected = src.z
|
||||
if(isladder)
|
||||
src.connected = i
|
||||
break
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/travel/ladder/attack_hand(mob/user as mob)
|
||||
if(!src.connected)
|
||||
return
|
||||
user.x = src.x_connect[src.connected]
|
||||
user.y = src.y_connect[src.connected]
|
||||
user.z = src.z_connect[src.connected]
|
||||
|
||||
/*
|
||||
/obj/machinery/travel/elevator/proc/check_connect()
|
||||
for(var/i=1,i<=world.maxz,i++)
|
||||
var/iselevator = 0
|
||||
for(var/obj/machinery/travel/elevator/E in src.x,src.y,i)
|
||||
src.elevators_connected[i] = E
|
||||
src.x_connect[i] = E.x
|
||||
src.y_connect[i] = E.y
|
||||
src.z_connect[i] = E.z
|
||||
iselevator = 1
|
||||
if(!iselevator)
|
||||
src.elevators_connected[i] = null
|
||||
src.x_connect[i] = null
|
||||
src.y_connect[i] = null
|
||||
src.z_connect[i] = null
|
||||
*/
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
if(istype(src,/turf/simulated/wall/r_wall))
|
||||
src.icon_state = "rwall[junction]"
|
||||
else
|
||||
else if(istype(src,/turf/simulated/wall) || istype(src,/obj/falsewall))
|
||||
src.icon_state = "wall[junction]"
|
||||
|
||||
/* When we have animations for different directions of falsewalls, then it'd be needed. Not now.
|
||||
|
||||
@@ -344,6 +344,7 @@
|
||||
#include "code\game\machinery\spaceheater.dm"
|
||||
#include "code\game\machinery\status_display.dm"
|
||||
#include "code\game\machinery\teleporter.dm"
|
||||
#include "code\game\machinery\travel.dm"
|
||||
#include "code\game\machinery\turrets.dm"
|
||||
#include "code\game\machinery\vending.dm"
|
||||
#include "code\game\machinery\atmoalter\canister.dm"
|
||||
|
||||
BIN
icons/obj/travel.dmi
Normal file
BIN
icons/obj/travel.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 450 B |
Reference in New Issue
Block a user