Just dorf things

This commit is contained in:
D3athrow
2015-02-27 22:16:43 -06:00
parent 9ccbb3cd3c
commit f992f0afba
6 changed files with 61 additions and 41 deletions

View File

@@ -90,9 +90,13 @@ datum/controller/game_controller/proc/setup()
setup_economy() setup_economy()
SetupXenoarch() SetupXenoarch()
cachedamageicons() cachedamageicons()
if(map && map.dorf)
mining_surprises = typesof(/mining_surprise/dorf) - /mining_surprise/dorf
for(var/i=0, i<max_secret_rooms, i++) for(var/i=0, i<max_secret_rooms, i++)
make_mining_asteroid_secret() if(map && map.dorf)
make_dorf_secret()
else
make_mining_asteroid_secret()
//if(config.socket_talk) //if(config.socket_talk)
// keepalive() // keepalive()

View File

@@ -319,6 +319,8 @@ Class Procs:
..() ..()
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return 1 return 1
if(href_list["close"])
return
var/ghost_flags=0 var/ghost_flags=0
if(ghost_write) if(ghost_write)
ghost_flags |= PERMIT_ALL ghost_flags |= PERMIT_ALL

View File

@@ -15,6 +15,15 @@
var/recharge_time=600 // 60s var/recharge_time=600 // 60s
var/locked_to_zlevel = 0 // Whether to lock the spawned MoMMIs to the z-level var/locked_to_zlevel = 0 // Whether to lock the spawned MoMMIs to the z-level
/obj/machinery/mommi_spawner/dorf
machine_flags = WRENCHMOVE
desc = "A large pad mounted to the ground with large bolts."
/obj/machinery/mommi_spawner/dorf/attack_ghost(var/mob/dead/observer/user)
if(stat & NOPOWER|BROKEN)
return
..()
/obj/machinery/mommi_spawner/power_change() /obj/machinery/mommi_spawner/power_change()
if (powered()) if (powered())
stat &= ~NOPOWER stat &= ~NOPOWER
@@ -79,51 +88,52 @@
makeMoMMI(user) makeMoMMI(user)
/obj/machinery/mommi_spawner/attackby(var/obj/item/O as obj, var/mob/user as mob) /obj/machinery/mommi_spawner/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/device/mmi)) if(!..())
var/obj/item/device/mmi/mmi = O if(istype(O,/obj/item/device/mmi))
if(building) var/obj/item/device/mmi/mmi = O
user << "\red \The [src] is busy building something already." if(building)
return 1 user << "\red \The [src] is busy building something already."
if(!mmi.brainmob) return 1
user << "\red \The [mmi] appears to be devoid of any soul." if(!mmi.brainmob)
return 1 user << "\red \The [mmi] appears to be devoid of any soul."
if(!mmi.brainmob.key) return 1
var/ghost_can_reenter = 0 if(!mmi.brainmob.key)
if(mmi.brainmob.mind) var/ghost_can_reenter = 0
for(var/mob/dead/observer/G in player_list) if(mmi.brainmob.mind)
if(G.can_reenter_corpse && G.mind == mmi.brainmob.mind) for(var/mob/dead/observer/G in player_list)
ghost_can_reenter = 1 if(G.can_reenter_corpse && G.mind == mmi.brainmob.mind)
break ghost_can_reenter = 1
if(!ghost_can_reenter) break
user << "<span class='notice'>\The [src] indicates that their mind is completely unresponsive; there's no point.</span>" if(!ghost_can_reenter)
user << "<span class='notice'>\The [src] indicates that their mind is completely unresponsive; there's no point.</span>"
return TRUE
if(mmi.brainmob.stat == DEAD)
user << "\red Yeah, good idea. Give something deader than the pizza in your fridge legs. Mom would be so proud."
return TRUE return TRUE
if(mmi.brainmob.stat == DEAD) if(mmi.brainmob.mind in ticker.mode.head_revolutionaries)
user << "\red Yeah, good idea. Give something deader than the pizza in your fridge legs. Mom would be so proud." user << "\red \The [src]'s firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept \the [mmi]."
return TRUE return TRUE
if(mmi.brainmob.mind in ticker.mode.head_revolutionaries) if(jobban_isbanned(mmi.brainmob, "Cyborg"))
user << "\red \The [src]'s firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept \the [mmi]." user << "\red \The [src] lets out an annoyed buzz and rejects \the [mmi]."
return TRUE return TRUE
if(jobban_isbanned(mmi.brainmob, "Cyborg")) if(metal < metalPerMoMMI)
user << "\red \The [src] lets out an annoyed buzz and rejects \the [mmi]." user << "\red \The [src] doesn't have enough metal to complete this task."
return TRUE return TRUE
if(metal < metalPerMoMMI) building=1
user << "\red \The [src] doesn't have enough metal to complete this task." update_icon()
user.drop_item()
mmi.icon = null
mmi.invisibility = 101
mmi.loc=src
spawn(50)
makeMoMMI(mmi.brainmob)
return TRUE return TRUE
building=1
update_icon()
user.drop_item()
mmi.icon = null
mmi.invisibility = 101
mmi.loc=src
spawn(50)
makeMoMMI(mmi.brainmob)
return TRUE
/obj/machinery/mommi_spawner/proc/makeMoMMI(var/mob/user) /obj/machinery/mommi_spawner/proc/makeMoMMI(var/mob/user)
var/turf/T = get_turf(src) var/turf/T = get_turf(src)

View File

@@ -2,7 +2,7 @@ var/list/event_last_fired = list()
//Always triggers an event when called, dynamically chooses events based on job population //Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event() /proc/spawn_dynamic_event()
if(!config.allow_random_events) if(!config.allow_random_events || map && map.dorf)
return return
var/minutes_passed = world.time/600 var/minutes_passed = world.time/600

View File

@@ -3,6 +3,7 @@
#define TURF_FLOOR 0 #define TURF_FLOOR 0
#define TURF_WALL 1 #define TURF_WALL 1
var/global/list/mining_surprises = typesof(/mining_surprise)-/mining_surprise var/global/list/mining_surprises = typesof(/mining_surprise)-/mining_surprise
/surprise_turf_info /surprise_turf_info

View File

@@ -26,6 +26,9 @@
//nanoui stuff //nanoui stuff
var/map_dir = "" var/map_dir = ""
//Fuck the preprocessor
var/dorf = 0
/datum/map/New() /datum/map/New()
. = ..() . = ..()
src.zLevels = src.loadZLevels(src.zLevels) src.zLevels = src.loadZLevels(src.zLevels)