Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+192 -248
View File
@@ -2,15 +2,10 @@
//this item is intended to give the effect of entering the mine, so that light gradually fades
/obj/effect/light_emitter
name = "Light emitter"
name = "Light-emtter"
anchored = 1
invisibility = 101
var/set_luminosity = 8
var/set_cap = 0
/obj/effect/light_emitter/New()
..()
SetLuminosity(set_luminosity, set_cap)
unacidable = 1
luminosity = 8
/**********************Miner Lockers**************************/
@@ -23,7 +18,7 @@
contents = list()
new /obj/item/weapon/storage/backpack/dufflebag(src)
new /obj/item/weapon/storage/backpack/explorer(src)
new /obj/item/weapon/storage/backpack/satchel/explorer(src)
new /obj/item/weapon/storage/backpack/satchel_explorer(src)
new /obj/item/clothing/under/rank/miner/lavaland(src)
new /obj/item/clothing/under/rank/miner/lavaland(src)
new /obj/item/clothing/under/rank/miner/lavaland(src)
@@ -46,14 +41,11 @@
new /obj/item/weapon/shovel(src)
new /obj/item/weapon/pickaxe/mini(src)
new /obj/item/device/radio/headset/headset_cargo/mining(src)
new /obj/item/device/flashlight/seclite(src)
new /obj/item/weapon/storage/bag/plants(src)
new /obj/item/weapon/storage/bag/ore(src)
new /obj/item/device/t_scanner/adv_mining_scanner/lesser(src)
new /obj/item/weapon/storage/bag/ore(src)
new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/weapon/survivalcapsule(src)
new /obj/item/device/assault_pod/mining(src)
/**********************Shuttle Computer**************************/
@@ -63,16 +55,9 @@
desc = "Used to call and send the mining shuttle."
circuit = /obj/item/weapon/circuitboard/computer/mining_shuttle
shuttleId = "mining"
possible_destinations = "mining_home;mining_away;landing_zone_dock"
possible_destinations = "mining_home;mining_away"
no_destination_swap = 1
var/global/list/dumb_rev_heads = list()
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
if(user.z == ZLEVEL_STATION && user.mind && (user.mind in ticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads))
user << "<span class='warning'>You get a feeling that leaving the station might be a REALLY dumb idea...</span>"
dumb_rev_heads += user.mind
return
..()
light_color = LIGHT_COLOR_CYAN
/*********************Pickaxe & Drills**************************/
@@ -85,7 +70,7 @@
force = 15
throwforce = 10
item_state = "pickaxe"
w_class = WEIGHT_CLASS_BULKY
w_class = 4
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
var/digspeed = 40
var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg')
@@ -99,7 +84,7 @@
force = 10
throwforce = 7
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_NORMAL
w_class = 3
materials = list(MAT_METAL=1000)
/obj/item/weapon/pickaxe/proc/playDigSound()
@@ -174,7 +159,7 @@
var/digspeed = 20
throwforce = 4
item_state = "shovel"
w_class = WEIGHT_CLASS_NORMAL
w_class = 3
materials = list(MAT_METAL=50)
origin_tech = "materials=2;engineering=2"
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
@@ -187,14 +172,14 @@
item_state = "spade"
force = 5
throwforce = 7
w_class = WEIGHT_CLASS_SMALL
w_class = 2
/obj/item/weapon/emptysandbag
name = "empty sandbag"
desc = "A bag to be filled with sand."
icon = 'icons/obj/items.dmi'
icon_state = "sandbag"
w_class = WEIGHT_CLASS_TINY
w_class = 1
/obj/item/weapon/emptysandbag/attackby(obj/item/W, mob/user, params)
if(istype(W,/obj/item/weapon/ore/glass))
@@ -229,7 +214,7 @@
desc = "An emergency shelter stored within a pocket of bluespace."
icon_state = "capsule"
icon = 'icons/obj/mining.dmi'
w_class = WEIGHT_CLASS_TINY
w_class = 1
origin_tech = "engineering=3;bluespace=3"
var/template_id = "shelter_alpha"
var/datum/map_template/shelter/template
@@ -288,11 +273,42 @@
PoolOrNew(/obj/effect/particle_effect/smoke, get_turf(src))
qdel(src)
//Pod turfs and objects
//Floors
/turf/open/floor/pod
name = "pod floor"
icon_state = "podfloor"
icon_regular_floor = "podfloor"
floor_tile = /obj/item/stack/tile/pod
/turf/open/floor/pod/light
icon_state = "podfloor_light"
icon_regular_floor = "podfloor_light"
floor_tile = /obj/item/stack/tile/pod/light
/turf/open/floor/pod/dark
icon_state = "podfloor_dark"
icon_regular_floor = "podfloor_dark"
floor_tile = /obj/item/stack/tile/pod/dark
//Walls
/turf/closed/wall/shuttle/survival
name = "pod wall"
desc = "An easily-compressable wall used for temporary shelter."
icon = 'icons/turf/walls/survival_pod_walls.dmi'
icon_state = "smooth"
walltype = "shuttle"
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
canSmoothWith = list(/turf/closed/wall/shuttle/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod, /obj/structure/shuttle/engine)
/turf/closed/wall/shuttle/survival/nodiagonal
smooth = SMOOTH_MORE
/turf/closed/wall/shuttle/survival/pod
canSmoothWith = list(/turf/closed/wall/shuttle/survival, /obj/machinery/door/airlock, /obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/shuttle, /obj/structure/shuttle/engine)
//Window
/obj/structure/window/shuttle/survival_pod
name = "pod window"
@@ -358,10 +374,10 @@
/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, W.usesound, 50, 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the gps.</span>", \
"<span class='notice'>You start to disassemble the gps...</span>", "You hear clanking and banging noises.")
if(do_after(user, 20*W.toolspeed, target = src))
if(do_after(user, 20/W.toolspeed, target = src))
new /obj/item/device/gps(src.loc)
qdel(src)
return ..()
@@ -421,20 +437,18 @@
var/arbitraryatmosblockingvar = TRUE
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 5
CanAtmosPass = ATMOS_PASS_NO
/obj/structure/fans/deconstruct()
if(!(flags & NODECONSTRUCT))
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
qdel(src)
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
..()
/obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, W.usesound, 50, 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the fan.</span>", \
"<span class='notice'>You start to disassemble the fan...</span>", "You hear clanking and banging noises.")
if(do_after(user, 20*W.toolspeed, target = src))
if(do_after(user, 20/W.toolspeed, target = src))
deconstruct()
return ..()
@@ -451,10 +465,12 @@
air_update_turf(1)
/obj/structure/fans/Destroy()
var/turf/T = loc
. = ..()
T.air_update_turf(1)
arbitraryatmosblockingvar = FALSE
air_update_turf(1)
return ..()
/obj/structure/fans/CanAtmosPass(turf/T)
return !arbitraryatmosblockingvar
//Signs
/obj/structure/sign/mining
@@ -478,221 +494,149 @@
layer = BELOW_MOB_LAYER
density = 0
///Mining Base////
//////////////////////
////MOTION TRACKER////
//////////////////////
/area/shuttle/auxillary_base
name = "Auxillary Base"
luminosity = 0 //Lighting gets lost when it lands anyway
/obj/item/device/t_scanner/motionTracker
name = "motion tracker"
icon = 'icons/obj/mining.dmi'
icon_state = "tracker"
desc = "A nifty handheld motion tracker. Requires meson scanners to function properly."
flags = CONDUCT
slot_flags = SLOT_BELT
var/cooldown = 35
var/on_cooldown = 0
var/range = 7
var/meson = FALSE
var/obj/item/weapon/stock_parts/cell/cell = new
var/cellcharge
var/cellmaxcharge
var/soundDetect = 'sound/effects/trackFull.ogg'
var/soundNoDetect = 'sound/effects/trackHalf.ogg'
var/soundToggle = 'sound/effects/switch.ogg'
var/powerReq = 10
origin_tech = "engineering=3;magnets=4"
/obj/machinery/computer/shuttle/auxillary_base
name = "auxillary base management console"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
shuttleId = "colony_drop"
desc = "Allows a deployable expedition base to be dropped from the station to a designated mining location. It can also \
interface with the mining shuttle at the landing site if a mobile beacon is also deployed."
var/launch_warning = TRUE
/obj/item/device/t_scanner/motionTracker/New()
cellcharge = cell.charge
cellmaxcharge = cell.maxcharge
updateicon()
req_one_access = list(access_cargo, access_construction, access_heads)
possible_destinations = null
clockwork = TRUE
var/obj/item/device/gps/internal/base/locator
/obj/machinery/computer/shuttle/auxillary_base/New(location, obj/item/weapon/circuitboard/computer/shuttle/C)
..()
locator = new /obj/item/device/gps/internal/base(src)
/obj/machinery/computer/shuttle/auxillary_base/Topic(href, href_list)
if(href_list["move"])
if(z != ZLEVEL_STATION && shuttleId == "colony_drop")
usr << "<span class='warning'>You can't move the base again!</span>"
return 0
if(launch_warning)
say("<span class='danger'>Launch sequence activated! Prepare for drop!</span>")
playsound(loc, 'sound/machines/warning-buzzer.ogg', 70, 0)
launch_warning = FALSE
..()
/obj/machinery/computer/shuttle/auxillary_base/onShuttleMove(turf/T1, rotation)
..()
if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery
feedback_add_details("colonies_dropped", "[x]|[y]|[z]") //Number of times a base has been dropped!
/obj/machinery/computer/shuttle/auxillary_base/proc/set_mining_mode()
if(z == ZLEVEL_MINING) //The console switches to controlling the mining shuttle once landed.
req_access = list()
shuttleId = "mining" //The base can only be dropped once, so this gives the console a new purpose.
possible_destinations = "mining_home;mining_away;landing_zone_dock"
/obj/item/device/assault_pod/mining
name = "Landing Field Designator"
icon_state = "gangtool-purple"
item_state = "electronic"
icon = 'icons/obj/device.dmi'
desc = "Deploy to designate the landing zone of the auxillary base."
w_class = WEIGHT_CLASS_SMALL
shuttle_id = "colony_drop"
var/setting = FALSE
var/no_restrictions = FALSE //Badmin variable to let you drop the colony ANYWHERE.
/obj/item/device/assault_pod/mining/attack_self(mob/living/user)
if(setting)
/obj/item/device/t_scanner/motionTracker/process()
updateicon()
if(!on || !cell)
on = 0
SSobj.processing.Remove(src)
return
var/turf/T = get_turf(user)
var/obj/docking_port/mobile/auxillary_base/base_dock = locate(/obj/docking_port/mobile/auxillary_base) in SSshuttle.mobile
if(!base_dock) //Not all maps have an Aux base. This object is useless in that case.
user << "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>"
if(cell.charge > powerReq)
scan()
cell.charge -= powerReq
if(cell.charge < powerReq)
playsound(get_turf(src),'sound/machines/twobeep.ogg', 15, 0 , -5)
on = 0
SSobj.processing.Remove(src)
if(cell.charge <= 0)//In the event we have negative energy, somehow.
cell.charge = 0
updateicon()
cellcharge = cell.charge
cellmaxcharge = cell.maxcharge
cell.updateicon()
/obj/item/device/t_scanner/motionTracker/attack_self(mob/user)
add_fingerprint(usr)
updateicon()
if(!cell)
user << text("<span class='warning'>[src] has no power supply.</span>")
return
if(!no_restrictions)
if(T.z != ZLEVEL_MINING)
user << "Wouldn't do much good dropping a mining base away from the mining area!"
playsound(get_turf(src), soundToggle, 100, 0, -5)
if(cell.charge < powerReq)
user << text("<span class='warning'>The power light on [src] flashes.</span>")
return
else if(cell.charge > powerReq)
on = !on
if(on)
user << text("<span class='notice'>You turn on [src].</span>")
SSobj.processing |= src
if(!on)
user << text("<span class='notice'>You turn off [src].</span>")
/obj/item/device/t_scanner/motionTracker/proc/updateicon()
if(cell && cellcharge)
if(cell && cell.charge < (cell.maxcharge/5))
icon_state = "trackerLow"
else if(cell && cell.charge < (cell.maxcharge/2))
icon_state = "trackerHalf"
else if(cell && cell.charge > (cell.maxcharge/2))
icon_state = "trackerFull"
if(!cellcharge || !cell || cellcharge < powerReq)
icon_state = "trackerEmpty"
..()
/obj/item/device/t_scanner/motionTracker/scan(mob/living/carbon/user)
if(!on_cooldown)
on_cooldown = 1
spawn(cooldown)
on_cooldown = 0
var/turf/t = get_turf(src)
var/list/mobs = recursive_mob_check(t, 1,0,0)
if(!mobs.len)
return
var/colony_radius = max(width, height)*0.5
var/list/area_counter = get_areas_in_range(colony_radius, T)
if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one
user << "Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one."
return
user << "<span class='notice'>You begin setting the landing zone parameters...</span>"
setting = TRUE
if(!do_after(user, 50, target = user)) //You get a few seconds to cancel if you do not want to drop there.
setting = FALSE
return
var/area/A = get_area(T)
var/obj/docking_port/stationary/landing_zone = new /obj/docking_port/stationary(T)
landing_zone.id = "colony_drop(\ref[src])"
landing_zone.name = "Landing Zone ([T.x], [T.y])"
landing_zone.dwidth = base_dock.dwidth
landing_zone.dheight = base_dock.dheight
landing_zone.width = base_dock.width
landing_zone.height = base_dock.height
landing_zone.setDir(base_dock.dir)
landing_zone.turf_type = T.type
landing_zone.area_type = A.type
for(var/obj/machinery/computer/shuttle/S in machines)
if(S.shuttleId == shuttle_id)
S.possible_destinations += "[landing_zone.id];"
//Serves as a nice mechanic to people get ready for the launch.
minor_announce("Auxiliary base landing zone coordinates locked in for [get_area(user)]. Launch command now available!")
user << "<span class='notice'>Landing zone set.</span>"
qdel(src)
/obj/item/device/assault_pod/mining/unrestricted
name = "omni-locational landing field designator"
desc = "Allows the deployment of the mining base ANYWHERE. Use with caution."
no_restrictions = TRUE
motionTrackScan(mobs, range)
/obj/docking_port/mobile/auxillary_base
name = "auxillary base"
id = "colony_drop"
//Reminder to map-makers to set these values equal to the size of your base.
dheight = 4
dwidth = 4
width = 9
height = 9
var/anti_spam_cd = 0
/obj/item/device/t_scanner/motionTracker/proc/motionTrackScan(var/list/mobs, var/range)
var/mobsfar = 0
for(var/turf/T in range(7, get_turf(src)) )
for(var/mob/O in T.contents)
var/mob/living/L = locate() in T
if(L && (get_turf(L) != get_turf(src)) && !L.stat)
flick_blip(O.loc)
mobsfar = 1
if(mobsfar)
playsound(get_turf(src),'sound/effects/trackFull.ogg', 15, 0, -5)
if(!mobsfar)
playsound(get_turf(src),'sound/effects/trackHalf.ogg', 10, 0, -5)
/obj/structure/mining_shuttle_beacon
name = "mining shuttle beacon"
desc = "A bluespace beacon calibrated to mark a landing spot for the mining shuttle when deployed near the auxillary mining base."
anchored = 0
density = 0
var/shuttle_ID = "landing_zone_dock"
icon = 'icons/obj/objects.dmi'
icon_state = "miningbeacon"
var/obj/docking_port/stationary/Mport //Linked docking port for the mining shuttle
pressure_resistance = 200 //So it does not get blown into lava.
var/anti_spam_cd = 0 //The linking process might be a bit intensive, so this here to prevent over use.
var/console_range = 15 //Wifi range of the beacon to find the aux base console
/obj/item/device/t_scanner/motionTracker/proc/flick_blip(turf/T)
var/image/B = image('icons/obj/mining.dmi', T, icon_state = "blip")
var/list/nearby = list()
for(var/mob/M in viewers(T))
if(M.client)
nearby |= M.client
flick_overlay(B,nearby, 8)
/obj/structure/mining_shuttle_beacon/attack_hand(mob/user)
if(anchored)
user << "<span class='warning'>Landing zone already set.</span>"
return
/obj/item/device/t_scanner/motionTracker/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver) && cell)
user << text("<span class='notice'>You detach [cell] from [src].</span>")
cell.loc = get_turf(src)
cell = null
cellcharge = 0
cellmaxcharge = 0
if(on)
on = 0
updateicon()
cell.updateicon()
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(cell)
user << text("<span class='notice'>[src] already has a power supply installed.</span>")
else
if(!user.drop_item())//This is dumb. You should be able to move a held object without having to drop it.
return
I.loc = src
cell = I
user.visible_message(\
"[user.name] has inserted the power cell into [src.name].",\
"<span class='notice'>You install [cell.name] into [src]</span>")
cellcharge = cell.charge
cellmaxcharge = cell.maxcharge
updateicon()
else
..()
if(anti_spam_cd)
user << "<span class='warning'>[src] is currently recalibrating. Please wait.</span>"
return
anti_spam_cd = 1
addtimer(src, "clear_cooldown", 100)
var/turf/landing_spot = get_turf(src)
if(landing_spot.z != ZLEVEL_MINING)
user << "<span class='warning'>This device is only to be used in a mining zone.</span>"
return
var/obj/machinery/computer/shuttle/auxillary_base/aux_base_console = locate(/obj/machinery/computer/shuttle/auxillary_base) in machines
if(!aux_base_console || get_dist(landing_spot, aux_base_console) > console_range)
user << "<span class='warning'>The auxillary base's console must be within [console_range] meters in order to interface.</span>"
return //Needs to be near the base to serve as its dock and configure it to control the mining shuttle.
//Mining shuttles may not be created equal, so we find the map's shuttle dock and size accordingly.
for(var/S in SSshuttle.stationary)
var/obj/docking_port/stationary/SM = S //SM is declared outside so it can be checked for null
if(SM.id == "mining_home" || SM.id == "mining_away")
var/area/A = get_area(landing_spot)
Mport = new(landing_spot)
Mport.id = "landing_zone_dock"
Mport.name = "auxillary base landing site"
Mport.dwidth = SM.dwidth
Mport.dheight = SM.dheight
Mport.width = SM.width
Mport.height = SM.height
Mport.setDir(dir)
Mport.turf_type = landing_spot.type
Mport.area_type = A.type
break
if(!Mport)
user << "<span class='warning'>This station is not equipped with an approprite mining shuttle. Please contact Nanotrasen Support.</span>"
return
var/search_radius = max(Mport.width, Mport.height)*0.5
var/list/landing_areas = get_areas_in_range(search_radius, landing_spot)
for(var/area/shuttle/auxillary_base/AB in landing_areas) //You land NEAR the base, not IN it.
user << "<span class='warning'>The mining shuttle must not land within the mining base itself.</span>"
SSshuttle.stationary.Remove(Mport)
qdel(Mport)
return
var/obj/docking_port/mobile/mining_shuttle
for(var/S in SSshuttle.mobile)
var/obj/docking_port/mobile/MS = S
if(MS.id != "mining")
continue
mining_shuttle = MS
if(!mining_shuttle) //Not having a mining shuttle is a map issue
user << "<span class='warning'>No mining shuttle signal detected. Please contact Nanotrasen Support.</span>"
SSshuttle.stationary.Remove(Mport)
qdel(Mport)
return
if(!mining_shuttle.canDock(Mport))
user << "<span class='warning'>Unable to secure a valid docking zone. Please try again in an open area near, but not within the aux. mining base.</span>"
SSshuttle.stationary.Remove(Mport)
qdel(Mport)
return
aux_base_console.set_mining_mode() //Lets the colony park the shuttle there, now that it has a dock.
user << "<span class='notice'>Mining shuttle calibration successful! Shuttle interface available at base console.</span>"
anchored = 1 //Locks in place to mark the landing zone.
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
/obj/structure/mining_shuttle_beacon/proc/clear_cooldown()
anti_spam_cd = 0
/obj/structure/mining_shuttle_beacon/attack_robot(mob/user)
return (attack_hand(user)) //So borgies can help
/obj/item/device/t_scanner/motionTracker/examine(mob/user)
..()
if(cell)
user << text("<span class='notice'>[src] has [cellcharge]/[cellmaxcharge] charge remaining.</span>")
else
user << text("<span class='notice'>[src] has no power supply installed.</span>")