Files
CHOMPStation2/code/game/turfs/space/space.dm
johnsonmt88@gmail.com c7947ef236 File restructuring: ohgodihopenothingbroke edition.
All /world/ stuff that I've found is now in code/world.dm instead of being scattered throughout the code in 6-7 files.

*****IMPORTANT*****
This means that hub.dm is now part of world.dm. Server hosts using the hub will likely have to redo the hub/password variables!

Again, that stuff is now located in code/world.dm
*******************

The tester list has been removed as it is not in use.

/code/defines
- Moved atom.dm code into /code/game/atom.dm and atom_movable.dm
- Moved hub.dm code into /code/world.dm
- Moved the /defines/tanning into objects/item/sheets/leather.dm
- Moved /defines/area/ into game/area/
- Moved turf.dm code into the code/game/turfs folder and divided it up into meaningful places

A lot of the files in /code/game were placed in new areas since they really didn't have a reason to be there.
- algorithm.dm: 
- - The world stuff is in world.dm. 
- - countJob() and AutoUpdateTK() were removed entirely (unused).
- - AutoUpdateAI() is now in /mob/living/silicon/ai.dm

- atom_procs.dm was split into atom.dm and atom_movable.dm

- cellautomata.dm
- - World stuff was moved into world.dm
- - Atom stuff was moved into atom.dm and atom_movable.dm
- - Atom verbs were moved into code/game/verbs/atom_verbs.dm

- chemistry.dm
- - Beaker box code was moved into storage/misc.dm
- - The trash can and 'alechemy' paper were removed. (unused)

- Landmarks.dm was moved into /objects/effects/landmarks.dm

- prisonshuttle.dm, specops_shuttle.dm, syndicate_shuttle.dm and syndicate_specops_shuttle.dm have been moved into game/machinery/computer/

- status.dm and topic.dm code were moved into world.dm

- step_triggers.dm are now in objects/effects/step_triggers.dm

- throwing.dm was split into appropriate files (carbon mob code, atom_movable.dm, ect)

- vote.dm is now in code/datums

/code/game/asteroid was split up.
- turf.dm was moved into game/turfs/simulated/asteroid.dm
- artifacts were split up
- - Wish granter is now in game/machinery
- - The stealth box is gone (unused)
- - The list of 'space suprises' was moved into astroid.dm
- asteroid.dm, being the only file left, was moved into /code/game


and finally...
modules/mob/organs files are now in code/datums/organs

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4659 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-08 22:11:02 +00:00

228 lines
6.0 KiB
Plaintext

/turf/space
icon = 'icons/turf/space.dmi'
name = "\proper space"
icon_state = "placeholder"
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
/turf/space/New()
if(!istype(src, /turf/space/transit))
icon_state = "[pick(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)]"
/turf/space/attack_paw(mob/user as mob)
return src.attack_hand(user)
/turf/space/attack_hand(mob/user as mob)
if ((user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
var/atom/movable/t = M.pulling
M.stop_pulling()
step(user.pulling, get_dir(user.pulling.loc, src))
M.start_pulling(t)
else
step(user.pulling, get_dir(user.pulling.loc, src))
return
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/rods))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
return
var/obj/item/stack/rods/R = C
user << "\blue Constructing support lattice ..."
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
R.use(1)
return
if (istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/plasteel/S = C
del(L)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
return
else
user << "\red The plating is going to need some support."
return
// Ported from unstable r355
/turf/space/Entered(atom/movable/A as mob|obj)
..()
if ((!(A) || src != A.loc)) return
inertial_drift(A)
if(ticker && ticker.mode)
// Okay, so let's make it so that people can travel z levels but not nuke disks!
// if(ticker.mode.name == "nuclear emergency") return
if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1))
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level.
del(A) //The disk's Del() proc ensures a new one is created
return
if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(A, /mob/living))
var/mob/living/MM = A
if(MM.client)
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
return
var/move_to_z_str = pickweight(accessable_z_levels)
var/move_to_z = text2num(move_to_z_str)
if(!move_to_z)
return
A.z = move_to_z
if(src.x <= TRANSITIONEDGE)
A.x = world.maxx - TRANSITIONEDGE - 2
A.y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
else if (A.x >= (world.maxx - TRANSITIONEDGE - 1))
A.x = TRANSITIONEDGE + 1
A.y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
else if (src.y <= TRANSITIONEDGE)
A.y = world.maxy - TRANSITIONEDGE -2
A.x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
else if (A.y >= (world.maxy - TRANSITIONEDGE - 1))
A.y = TRANSITIONEDGE + 1
A.x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
var/cur_y
var/next_x
var/next_y
var/target_z
var/list/y_arr
if(src.x <= 1)
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (--cur_x||global_map.len)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = world.maxx - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.x >= world.maxx)
if(istype(A, /obj/effect/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (++cur_x > global_map.len ? 1 : cur_x)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y <= 1)
if(istype(A, /obj/effect/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (--cur_y||y_arr.len)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = world.maxy - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y >= world.maxy)
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (++cur_y > y_arr.len ? 1 : cur_y)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
return