Skip to content

Commit

Permalink
Reactivates Away Gate (#528)
Browse files Browse the repository at this point in the history
* Added stomach.ogg and stomach tiles for later

* Updated some gateway maps, added new (unfinished) one

* Snowfield progress

* This map is pretty much done!

* Return of the Gateway Maps

* Optimization of various shit.

* Copies a small fix from Polaris

PolarisSS13/Polaris#2414

* Changed vore mob knockdown chance. Map fixes.

* Datraen corrects outstanding issues with away missions, separates certain parts of code into their own procs. (#532)

* Final commit.

- Tried to fix vore mobs not attacking prey once they are disabled.
- Various map fixes to be consistent with fixed gateway setup.
- Gave Markov bad grammar.
- Fixed polar bears not dying.
- Modernized all gateway maps except the clown temple which is still
broken.
  • Loading branch information
SpadesNeil committed Sep 6, 2016
1 parent 0f967f4 commit 4db23be
Show file tree
Hide file tree
Showing 24 changed files with 1,693 additions and 1,663 deletions.
3 changes: 0 additions & 3 deletions code/controllers/master_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ datum/controller/game_controller/New()
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag

spawn(20)
createRandomZlevel()

setup_objects()
setupgenetics()
SetupXenoarch()
Expand Down
58 changes: 58 additions & 0 deletions code/game/area/Away Mission areas.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/area/awaymission
name = "\improper Unknown Location"
icon_state = "away"
var/list/valid_spawn_turfs = list()
var/list/valid_mobs = list()
var/list/valid_flora = list()
var/mobcountmax = 0
var/floracountmax = 0

/area/awaymission/proc/EvalValidSpawnTurfs()
//Adds turfs to the valid)turfs list, used for spawning.
for(var/turf/simulated/floor/F in src)
valid_spawn_turfs |= F
for(var/turf/unsimulated/floor/F in src)
valid_spawn_turfs |= F

/area/awaymission/initialize()
..()
sleep(180)
EvalValidSpawnTurfs()

if(!valid_spawn_turfs.len)
world.log << "Error! [src] does not have any turfs!"
return TRUE

//Handles random mob placement for mobcountmax, as defined/randomized in initialize of each individual area.
spawn_mob_on_turf()

//Handles random flora placement for floracountmax, as defined/randomized in initialize of each individual area.
spawn_flora_on_turf()

world << "Away mission spawning done."

/area/awaymission/proc/spawn_mob_on_turf()
if(!valid_mobs.len)
world.log << "[src] does not have a set valid mobs list!"
return TRUE

var/mob/M
var/turf/Turf
for(var/mobscount = 0 to mobcountmax)
M = pick(valid_mobs)
Turf = pick(valid_spawn_turfs)
valid_spawn_turfs -= Turf
new M(Turf)

/area/awaymission/proc/spawn_flora_on_turf()
if(!valid_flora.len)
world.log << "[src] does not have a set valid flora list!"
return TRUE

var/obj/F
var/turf/Turf
for(var/floracount = 0 to floracountmax)
F = pick(valid_flora)
Turf = pick(valid_spawn_turfs)
valid_spawn_turfs -= Turf
new F(Turf)
7 changes: 6 additions & 1 deletion code/game/area/Space Station 13 areas_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@
flags = RAD_SHIELDED

/area/crew_quarters/sleep/vistor_room_12
flags = RAD_SHIELDED
flags = RAD_SHIELDED

/area/teleporter/departing
name = "\improper Long-Range Teleporter"
icon_state = "teleporter"
music = "signal"
2 changes: 1 addition & 1 deletion code/game/turfs/flooring/flooring_premade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
#define FOOTSTEP_SPRITE_AMT 2

/turf/snow/Entered(atom/A)
if(ismob(A))
if(isliving(A))
var/mdir = "[A.dir]"
if(crossed_dirs[mdir])
crossed_dirs[mdir] = min(crossed_dirs[mdir] + 1, FOOTSTEP_SPRITE_AMT)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/hostile/vore/bear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
faction = "russian"

/mob/living/simple_animal/hostile/vore/bear/brown
name = "space bear"
name = "brown bear"
desc = "RawrRawr!!"
icon_state = "brownbear"
icon_living = "brownbear"
Expand Down
8 changes: 5 additions & 3 deletions code/modules/mob/living/simple_animal/hostile/vore/vore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ Don't use ranged mobs for vore mobs.
return

// Is our target edible and standing up?
if(!target_mob.lying && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
if(prob(10))
if(target_mob.canmove && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
if(prob(50))
target_mob.Weaken(5)
target_mob.visible_message("<span class='danger'>\the [src] pounces on \the [target_mob]!</span>!")
animal_nom(target_mob)
LoseTarget()
return
else
..()

if(target_mob.lying && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
if(!target_mob.canmove && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
if(!capacity || (target_mob.size_multiplier + fullness) <= capacity)
stance = HOSTILE_STANCE_EATING
stop_automated_movement = 1
Expand Down
3 changes: 3 additions & 0 deletions code/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ var/global/datum/global_init/init = new ()
// Create robolimbs for chargen.
populate_robolimb_list()

//Must be done now, otherwise ZAS zones and lighting overlays need to be recreated.
createRandomZlevel()

processScheduler = new
master_controller = new /datum/controller/game_controller()
spawn(1)
Expand Down
Binary file added icons/turf/stomach.dmi
Binary file not shown.
196 changes: 0 additions & 196 deletions maps/RandomZLevels/backup/example.dmm

This file was deleted.

453 changes: 0 additions & 453 deletions maps/RandomZLevels/backup/labyrinth.dmm

This file was deleted.

66 changes: 54 additions & 12 deletions maps/RandomZLevels/beach.dm
Original file line number Diff line number Diff line change
@@ -1,19 +1,61 @@
/obj/effect/spawner/beach // Hacky as all hell and causes slow round loads BUT IT FUCKING WORKS NOW, DOESN'T IT? -Ace
// -- Turfs -- //

/turf/simulated/floor/beach/coastwater
name = "Water"
icon_state = "water"

/turf/simulated/floor/beach/coastwater/New()
..()
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water","layer"=MOB_LAYER+0.1)


// -- Areas -- //

/area/awaymission/beach
base_turf = /turf/simulated/floor/beach/sand
valid_mobs = list(/mob/living/simple_animal/crab)
valid_flora = list(/obj/effect/overlay/palmtree_r,/obj/effect/overlay/palmtree_l, /obj/effect/overlay/palmtree_r,/obj/effect/overlay/palmtree_l, /obj/effect/overlay/coconut)

/area/awaymission/beachexit // This serves only to stop the sound spam of the beach before leaving. Maybe.
icon_state = "red"
base_turf = /turf/simulated/floor/beach/sand
luminosity = 1
lighting_use_dynamic = 0
requires_power = 0

/area/awaymission/beach/coast
icon_state = "blue2"
base_turf = /turf/simulated/floor/beach/coastline

/area/awaymission/beach/water
icon_state = "bluenew"
base_turf = /turf/simulated/floor/beach/coastwater

/area/awaymission/beach/jungle
icon_state = "green"
mobcountmax = 10
floracountmax = 5000

// -- Items -- //

/*/obj/effect/spawner/beach // Hacky as all hell and causes slow round loads BUT IT FUCKING WORKS NOW, DOESN'T IT? -Ace
icon = 'icons/misc/beach.dmi'
icon_state = "coconuts"
New()
var/palmchance = rand(1,100)
if(palmchance >= 1 && palmchance <= 10)
new /obj/effect/overlay/palmtree_r(get_turf(src))
if(palmchance >= 11 && palmchance <= 20)
new /obj/effect/overlay/palmtree_l(get_turf(src))
if(palmchance >= 21 && palmchance <= 25)
new /obj/effect/overlay/coconut(get_turf(src))
if(palmchance == 100) // Tourists like to litter. :(
var/trash = pick(/obj/item/trash/raisins, /obj/item/trash/candy, /obj/item/trash/cheesie, /obj/item/trash/chips,
switch(rand(1,100)) // It's written fucky so it's more efficient, trying the most likely options first to cause less lag hopefully.
if(26 to 99)
qdel(src)
if(1 to 10)
new /obj/effect/overlay/palmtree_r(get_turf(src))
if(11 to 20)
new /obj/effect/overlay/palmtree_l(get_turf(src))
if(21 to 25)
new /obj/effect/overlay/coconut(get_turf(src))
if(100)
var/trash = pick(/obj/item/trash/raisins, /obj/item/trash/candy, /obj/item/trash/cheesie, /obj/item/trash/chips,
/obj/item/trash/popcorn, /obj/item/trash/sosjerky, /obj/item/trash/syndi_cakes, /obj/item/trash/plate,
/obj/item/trash/pistachios, /obj/item/trash/semki, /obj/item/trash/tray, /obj/item/trash/liquidfood,
/obj/item/trash/tastybread, /obj/item/trash/snack_bowl, /mob/living/simple_animal/crab)
new trash(get_turf(src))
qdel(src)
new trash(get_turf(src))
qdel(src)*/

0 comments on commit 4db23be

Please sign in to comment.