Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+9 -9
View File
@@ -42,7 +42,7 @@
new /obj/item/weapon/ore/diamond(src)
if(21 to 25)
for(var/i in 1 to 5)
new /obj/item/weapon/poster/contraband(src)
new /obj/item/weapon/poster/random_contraband(src)
if(26 to 30)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/glass/beaker/noreact(src)
@@ -154,7 +154,7 @@
/obj/structure/closet/crate/secure/loot/attack_hand(mob/user)
if(locked)
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
to_chat(user, "<span class='notice'>The crate is locked with a Deca-code lock.</span>")
var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text
if(user.canUseTopic(src, 1))
var/list/sanitised = list()
@@ -166,14 +166,14 @@
if(sanitised[i] == sanitised[j])
sanitycheck = null //if a digit is repeated, reject the input
if (input == code)
user << "<span class='notice'>The crate unlocks!</span>"
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
locked = 0
cut_overlays()
add_overlay("securecrateg")
else if (input == null || sanitycheck == null || length(input) != codelen)
user << "<span class='notice'>You leave the crate alone.</span>"
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
else
user << "<span class='warning'>A red light flashes.</span>"
to_chat(user, "<span class='warning'>A red light flashes.</span>")
lastattempt = input
attempts--
if(attempts == 0)
@@ -192,11 +192,11 @@
boom(user)
return
else if(istype(W, /obj/item/device/multitool))
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
to_chat(user, "<span class='notice'>DECA-CODE LOCK REPORT:</span>")
if(attempts == 1)
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
to_chat(user, "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>")
else
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
to_chat(user, "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>")
if(lastattempt != null)
var/list/guess = list()
var/list/answer = list()
@@ -213,7 +213,7 @@
++bulls
--cows
user << "<span class='notice'>Last code attempt, [lastattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
to_chat(user, "<span class='notice'>Last code attempt, [lastattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>")
return
return ..()
+27 -25
View File
@@ -19,7 +19,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/launch_warning = TRUE
var/list/turrets = list() //List of connected turrets
req_one_access = list(access_cargo, access_construction, access_heads)
req_one_access = list(access_cargo, access_construction, access_heads, access_research)
var/possible_destinations
clockwork = TRUE
var/obj/item/device/gps/internal/base/locator
@@ -82,12 +82,12 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
usr.set_machine(src)
add_fingerprint(usr)
if(!allowed(usr))
usr << "<span class='danger'>Access denied.</span>"
to_chat(usr, "<span class='danger'>Access denied.</span>")
return
if(href_list["move"])
if(z != ZLEVEL_STATION && shuttleId == "colony_drop")
usr << "<span class='warning'>You can't move the base again!</span>"
to_chat(usr, "<span class='warning'>You can't move the base again!</span>")
return
var/shuttle_error = SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)
if(launch_warning)
@@ -104,11 +104,11 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/turf/LZ = safepick(Z_TURFS(ZLEVEL_MINING)) //Pick a random mining Z-level turf
if(!istype(LZ, /turf/closed/mineral) && !istype(LZ, /turf/open/floor/plating/asteroid))
//Find a suitable mining turf. Reduces chance of landing in a bad area
usr << "<span class='warning'>Landing zone scan failed. Please try again.</span>"
to_chat(usr, "<span class='warning'>Landing zone scan failed. Please try again.</span>")
updateUsrDialog()
return
if(set_landing_zone(LZ, usr) != ZONE_SET)
usr << "<span class='warning'>Landing zone unsuitable. Please recalculate.</span>"
to_chat(usr, "<span class='warning'>Landing zone unsuitable. Please recalculate.</span>")
updateUsrDialog()
return
@@ -143,7 +143,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
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>"
to_chat(user, "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>")
return
if(!no_restrictions)
if(T.z != ZLEVEL_MINING)
@@ -171,7 +171,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
//Serves as a nice mechanic to people get ready for the launch.
minor_announce("Auxiliary base landing zone coordinates locked in for [A]. Launch command now available!")
user << "<span class='notice'>Landing zone set.</span>"
to_chat(user, "<span class='notice'>Landing zone set.</span>")
return ZONE_SET
@@ -190,7 +190,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(setting)
return
user << "<span class='notice'>You begin setting the landing zone parameters...</span>"
to_chat(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
@@ -204,14 +204,14 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
AB = A
break
if(!AB)
user << "<span class='warning'>No auxillary base console detected.</span>"
to_chat(user, "<span class='warning'>No auxillary base console detected.</span>")
return
switch(AB.set_landing_zone(T, user, no_restrictions))
if(BAD_ZLEVEL)
user << "<span class='warning'>This uplink can only be used in a designed mining zone.</span>"
to_chat(user, "<span class='warning'>This uplink can only be used in a designed mining zone.</span>")
if(BAD_AREA)
user << "<span class='warning'>Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.</span>"
to_chat(user, "<span class='warning'>Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.</span>")
if(ZONE_SET)
qdel(src)
@@ -258,11 +258,11 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
/obj/structure/mining_shuttle_beacon/attack_hand(mob/user)
if(anchored)
user << "<span class='warning'>Landing zone already set.</span>"
to_chat(user, "<span class='warning'>Landing zone already set.</span>")
return
if(anti_spam_cd)
user << "<span class='warning'>[src] is currently recalibrating. Please wait.</span>"
to_chat(user, "<span class='warning'>[src] is currently recalibrating. Please wait.</span>")
return
anti_spam_cd = 1
@@ -271,16 +271,18 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
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>"
to_chat(user, "<span class='warning'>This device is only to be used in a mining zone.</span>")
return
var/obj/machinery/computer/auxillary_base/aux_base_console
for(var/obj/machinery/computer/auxillary_base/ABC in machines)
if(get_dist(landing_spot, ABC) <= console_range)
aux_base_console = ABC
break
if(!aux_base_console) //Needs to be near the base to serve as its dock and configure it to control the mining shuttle.
to_chat(user, "<span class='warning'>The auxillary base's console must be within [console_range] meters in order to interface.</span>")
return
var/obj/machinery/computer/auxillary_base/aux_base_console = locate(/obj/machinery/computer/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")
@@ -300,7 +302,7 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
break
if(!Mport)
user << "<span class='warning'>This station is not equipped with an approprite mining shuttle. Please contact Nanotrasen Support.</span>"
to_chat(user, "<span class='warning'>This station is not equipped with an approprite mining shuttle. Please contact Nanotrasen Support.</span>")
return
var/obj/docking_port/mobile/mining_shuttle
@@ -314,26 +316,26 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
break
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>"
to_chat(user, "<span class='warning'>No mining shuttle signal detected. Please contact Nanotrasen Support.</span>")
SSshuttle.stationary.Remove(Mport)
qdel(Mport)
return
for(var/L in landing_turfs) //You land NEAR the base, not IN it.
if(istype(get_area(L), /area/shuttle/auxillary_base))
user << "<span class='warning'>The mining shuttle must not land within the mining base itself.</span>"
to_chat(user, "<span class='warning'>The mining shuttle must not land within the mining base itself.</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>"
to_chat(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>"
to_chat(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(loc, 'sound/machines/ping.ogg', 50, 0)
+20 -24
View File
@@ -6,9 +6,9 @@
icon_state = "construction_drone"
var/area/starting_area
mob/camera/aiEye/remote/base_construction/New(loc)
starting_area = get_area(loc)
/mob/camera/aiEye/remote/base_construction/Initialize()
..()
starting_area = get_area(loc)
/mob/camera/aiEye/remote/base_construction/setLoc(var/t)
var/area/curr_area = get_area(t)
@@ -24,15 +24,7 @@ mob/camera/aiEye/remote/base_construction/New(loc)
name = "internal RCD"
max_matter = 600 //Bigger container and faster speeds due to being specialized and stationary.
no_ammo_message = "<span class='warning'>Internal matter exhausted. Please add additional materials.</span>"
walldelay = 10
grilledelay = 5
windowdelay = 5
airlockdelay = 20
decongirderdelay = 10
deconwalldelay = 20
deconfloordelay = 30
deconwindowdelay = 20
deconairlockdelay = 20
delay_mod = 0.5
/obj/machinery/computer/camera_advanced/base_construction
name = "base contruction console"
@@ -54,6 +46,8 @@ mob/camera/aiEye/remote/base_construction/New(loc)
icon_screen = "mining"
icon_keyboard = "rd_key"
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/camera_advanced/base_construction/New()
..()
RCD = new /obj/item/weapon/rcd/internal(src)
@@ -68,11 +62,13 @@ mob/camera/aiEye/remote/base_construction/New(loc)
/obj/machinery/computer/camera_advanced/base_construction/CreateEye()
var/spawn_spot
if(!found_aux_console)
found_aux_console = locate(/obj/machinery/computer/auxillary_base) in machines
for(var/obj/machinery/computer/auxillary_base/ABC in machines)
if(istype(get_area(ABC), /area/shuttle/auxillary_base))
found_aux_console = ABC
break
if(found_aux_console)
spawn_spot = found_aux_console
if(found_aux_console)
spawn_spot = found_aux_console
else
spawn_spot = src
@@ -129,12 +125,12 @@ mob/camera/aiEye/remote/base_construction/New(loc)
var/area/build_area = get_area(build_target)
if(!istype(build_area, /area/shuttle/auxillary_base))
owner << "<span class='warning'>You can only build within the mining base!</span>"
to_chat(owner, "<span class='warning'>You can only build within the mining base!</span>")
return FALSE
if(build_target.z != ZLEVEL_STATION)
owner << "<span class='warning'>The mining base has launched and can no longer be modified.</span>"
to_chat(owner, "<span class='warning'>The mining base has launched and can no longer be modified.</span>")
return FALSE
return TRUE
@@ -200,7 +196,7 @@ mob/camera/aiEye/remote/base_construction/New(loc)
var/list/buildlist = list("Walls and Floors" = 1,"Airlocks" = 2,"Deconstruction" = 3,"Windows and Grilles" = 4)
var/buildmode = input("Set construction mode.", "Base Console", null) in buildlist
B.RCD.mode = buildlist[buildmode]
owner << "Build mode is now [buildmode]."
to_chat(owner, "Build mode is now [buildmode].")
/datum/action/innate/aux_base/airlock_type
name = "Select Airlock Type"
@@ -233,19 +229,19 @@ datum/action/innate/aux_base/place_fan/Activate()
var/turf/fan_turf = get_turf(remote_eye)
if(!B.fans_remaining)
owner << "<span class='warning'>[B] is out of fans!</span>"
to_chat(owner, "<span class='warning'>[B] is out of fans!</span>")
return
if(!check_spot())
return
if(fan_turf.density)
owner << "<span class='warning'>Fans may only be placed on a floor.</span>"
to_chat(owner, "<span class='warning'>Fans may only be placed on a floor.</span>")
return
new /obj/structure/fans/tiny(fan_turf)
B.fans_remaining--
owner << "<span class='notice'>Tiny fan placed. [B.fans_remaining] remaining.</span>"
to_chat(owner, "<span class='notice'>Tiny fan placed. [B.fans_remaining] remaining.</span>")
playsound(fan_turf, 'sound/machines/click.ogg', 50, 1)
datum/action/innate/aux_base/install_turret
@@ -260,13 +256,13 @@ datum/action/innate/aux_base/install_turret/Activate()
return
if(!B.turret_stock)
owner << "<span class='warning'>Unable to construct additional turrets.</span>"
to_chat(owner, "<span class='warning'>Unable to construct additional turrets.</span>")
return
var/turf/turret_turf = get_turf(remote_eye)
if(is_blocked_turf(turret_turf))
owner << "<span class='warning'>Location is obtructed by something. Please clear the location and try again.</span>"
to_chat(owner, "<span class='warning'>Location is obtructed by something. Please clear the location and try again.</span>")
return
var/obj/machinery/porta_turret/aux_base/T = new /obj/machinery/porta_turret/aux_base(turret_turf)
@@ -274,5 +270,5 @@ datum/action/innate/aux_base/install_turret/Activate()
B.found_aux_console.turrets += T //Add new turret to the console's control
B.turret_stock--
owner << "<span class='notice'>Turret installation complete!</span>"
to_chat(owner, "<span class='notice'>Turret installation complete!</span>")
playsound(turret_turf, 'sound/items/drill_use.ogg', 65, 1)
+14 -22
View File
@@ -74,7 +74,7 @@
/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user)
var/turf/device_turf = get_turf(user)
if(!device_turf||device_turf.z==2||device_turf.z>=7)
user << "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>"
to_chat(user, "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>")
return FALSE
return TRUE
@@ -104,7 +104,7 @@
var/list/L = get_destinations(user)
if(!L.len)
user << "<span class='notice'>The [src.name] found no beacons in the world to anchor a wormhole to.</span>"
to_chat(user, "<span class='notice'>The [src.name] found no beacons in the world to anchor a wormhole to.</span>")
return
var/chosen_beacon = pick(L)
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100)
@@ -129,11 +129,11 @@
/obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user)
if(user.get_item_by_slot(slot_belt) == src)
user << "Your [src] activates, saving you from the chasm!</span>"
to_chat(user, "Your [src] activates, saving you from the chasm!</span>")
feedback_add_details("jaunter","C") // chasm automatic activation
activate(user)
else
user << "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.</span>"
to_chat(user, "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.</span>")
/obj/effect/portal/wormhole/jaunt_tunnel
@@ -203,10 +203,10 @@
/obj/item/weapon/resonator/attack_self(mob/user)
if(burst_time == 50)
burst_time = 30
user << "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>"
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>")
else
burst_time = 50
user << "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>"
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>")
/obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
@@ -262,7 +262,7 @@
for(var/mob/living/L in T)
if(creator)
add_logs(creator, L, "used a resonator field on", "resonator")
L << "<span class='userdanger'>[src] ruptured with you in it!</span>"
to_chat(L, "<span class='userdanger'>[src] ruptured with you in it!</span>")
L.apply_damage(resonance_damage, BRUTE)
qdel(src)
@@ -303,7 +303,7 @@
if(istype(target, /mob/living/simple_animal))
var/mob/living/simple_animal/M = target
if(M.sentience_type != revive_type)
user << "<span class='info'>[src] does not work on this sort of creature.</span>"
to_chat(user, "<span class='info'>[src] does not work on this sort of creature.</span>")
return
if(M.stat == DEAD)
M.faction = list("neutral")
@@ -325,10 +325,10 @@
icon_state = "lazarus_empty"
return
else
user << "<span class='info'>[src] is only effective on the dead.</span>"
to_chat(user, "<span class='info'>[src] is only effective on the dead.</span>")
return
else
user << "<span class='info'>[src] is only effective on lesser beings.</span>"
to_chat(user, "<span class='info'>[src] is only effective on lesser beings.</span>")
return
/obj/item/weapon/lazarus_injector/emp_act()
@@ -338,9 +338,9 @@
/obj/item/weapon/lazarus_injector/examine(mob/user)
..()
if(!loaded)
user << "<span class='info'>[src] is empty.</span>"
to_chat(user, "<span class='info'>[src] is empty.</span>")
if(malfunctioning)
user << "<span class='info'>The display on [src] seems to be flickering.</span>"
to_chat(user, "<span class='info'>The display on [src] seems to be flickering.</span>")
/**********************Mining Scanners**********************/
@@ -480,11 +480,11 @@
/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/organ/M, mob/user)
var/obj/item/organ/hivelord_core/C = M
if(!istype(C, /obj/item/organ/hivelord_core))
user << "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>"
to_chat(user, "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>")
return ..()
C.preserved()
user << "<span class='notice'>You inject the [M] with the stabilizer. It will no longer go inert.</span>"
to_chat(user, "<span class='notice'>You inject the [M] with the stabilizer. It will no longer go inert.</span>")
qdel(src)
/*********************Mining Hammer****************/
@@ -586,11 +586,3 @@
charged = 1
icon_state = "mining_hammer1"
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
/obj/item/weapon/twohanded/required/mining_hammer/pickup(mob/user)
..()
user.AddLuminosity(luminosity)
/obj/item/weapon/twohanded/required/mining_hammer/dropped(mob/user)
..()
user.AddLuminosity(-luminosity)
+6 -6
View File
@@ -24,7 +24,7 @@ var/list/total_extraction_beacons = list()
possible_beacons += EP
if(!possible_beacons.len)
user << "There are no extraction beacons in existence!"
to_chat(user, "There are no extraction beacons in existence!")
return
else
@@ -38,12 +38,12 @@ var/list/total_extraction_beacons = list()
/obj/item/weapon/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
if(!beacon)
user << "[src] is not linked to a beacon, and cannot be used."
to_chat(user, "[src] is not linked to a beacon, and cannot be used.")
return
if(!can_use_indoors)
var/area/area = get_area(A)
if(!area.outdoors)
user << "[src] can only be used on things that are outdoors!"
to_chat(user, "[src] can only be used on things that are outdoors!")
return
if(!flag)
return
@@ -51,15 +51,15 @@ var/list/total_extraction_beacons = list()
return
else
if(!safe_for_living_creatures && check_for_living_mobs(A))
user << "[src] is not safe for use with living creatures, they wouldn't survive the trip back!"
to_chat(user, "[src] is not safe for use with living creatures, they wouldn't survive the trip back!")
return
if(A.loc == user) // no extracting stuff you're holding
return
if(A.anchored)
return
user << "<span class='notice'>You start attaching the pack to [A]...</span>"
to_chat(user, "<span class='notice'>You start attaching the pack to [A]...</span>")
if(do_after(user,50,target=A))
user << "<span class='notice'>You attach the pack to [A] and activate it.</span>"
to_chat(user, "<span class='notice'>You attach the pack to [A] and activate it.</span>")
if(loc == user || istype(user.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = user.back
if(B.can_be_inserted(src,stop_messages = 1))
@@ -18,10 +18,10 @@
if(href_list["move"])
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
usr << "<span class='warning'>Cannot locate shuttle!</span>"
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
usr << "<span class='warning'>Shuttle is already at the outpost!</span>"
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
return 0
..()
+14 -14
View File
@@ -28,10 +28,10 @@
return
I.forceMove(src)
inserted_id = I
user << "<span class='notice'>You insert [I].</span>"
to_chat(user, "<span class='notice'>You insert [I].</span>")
return
else
user << "<span class='notice'>There's an ID inserted already.</span>"
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
return ..()
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
@@ -90,23 +90,23 @@
if("claim_points")
inserted_id.points += stacking_machine.points
stacking_machine.points = 0
usr << "Points transferred."
to_chat(usr, "Points transferred.")
if("move_shuttle")
if(!alone_in_area(get_area(src), usr))
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
to_chat(usr, "<span class='warning'>Prisoners are only allowed to be released while alone.</span>")
else
switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home"))
if(1)
usr << "<span class='notice'>Shuttle not found</span>"
to_chat(usr, "<span class='notice'>Shuttle not found</span>")
if(2)
usr << "<span class='notice'>Shuttle already at station</span>"
to_chat(usr, "<span class='notice'>Shuttle already at station</span>")
if(3)
usr << "<span class='notice'>No permission to dock could be granted.</span>"
to_chat(usr, "<span class='notice'>No permission to dock could be granted.</span>")
else
if(!emagged)
Radio.set_frequency(SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", SEC_FREQ)
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
if(emagged)
@@ -123,7 +123,7 @@
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
if(!emagged)
emagged = 1
user << "<span class='warning'>PZZTTPFFFT</span>"
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
/**********************Prisoner Collection Unit**************************/
@@ -158,11 +158,11 @@
if(istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id/prisoner))
var/obj/item/weapon/card/id/prisoner/prisoner_id = I
user << "<span class='notice'><B>ID: [prisoner_id.registered_name]</B></span>"
user << "<span class='notice'>Points Collected:[prisoner_id.points]</span>"
user << "<span class='notice'>Point Quota: [prisoner_id.goal]</span>"
user << "<span class='notice'>Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.</span>"
to_chat(user, "<span class='notice'><B>ID: [prisoner_id.registered_name]</B></span>")
to_chat(user, "<span class='notice'>Points Collected:[prisoner_id.points]</span>")
to_chat(user, "<span class='notice'>Point Quota: [prisoner_id.goal]</span>")
to_chat(user, "<span class='notice'>Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.</span>")
else
user << "<span class='warning'>Error: Invalid ID</span>"
to_chat(user, "<span class='warning'>Error: Invalid ID</span>")
else
return ..()
+1 -1
View File
@@ -39,7 +39,7 @@
msg = harvest_message_low
else if(rand_harvested == harvest_amount_high)
msg = harvest_message_high
user << "<span class='notice'>[msg]</span>"
to_chat(user, "<span class='notice'>[msg]</span>")
for(var/i in 1 to rand_harvested)
new harvest(get_turf(src))
icon_state = "[base_icon]p"
@@ -80,24 +80,24 @@
/obj/item/device/wisp_lantern/attack_self(mob/user)
if(!wisp)
user << "<span class='warning'>The wisp has gone missing!</span>"
to_chat(user, "<span class='warning'>The wisp has gone missing!</span>")
return
if(wisp.loc == src)
user << "<span class='notice'>You release the wisp. It begins to bob around your head.</span>"
to_chat(user, "<span class='notice'>You release the wisp. It begins to bob around your head.</span>")
user.sight |= SEE_MOBS
icon_state = "lantern"
wisp.orbit(user, 20)
feedback_add_details("wisp_lantern","F") // freed
else
user << "<span class='notice'>You return the wisp to the lantern.</span>"
to_chat(user, "<span class='notice'>You return the wisp to the lantern.</span>")
if(wisp.orbiting)
var/atom/A = wisp.orbiting.orbiting
if(isliving(A))
var/mob/living/M = A
M.sight &= ~SEE_MOBS
M << "<span class='notice'>Your vision returns to normal.</span>"
to_chat(M, "<span class='notice'>Your vision returns to normal.</span>")
wisp.stop_orbit()
wisp.loc = src
@@ -137,7 +137,7 @@
/obj/item/device/warp_cube/attack_self(mob/user)
if(!linked)
user << "[src] fizzles uselessly."
to_chat(user, "[src] fizzles uselessly.")
return
new /obj/effect/particle_effect/smoke(user.loc)
user.forceMove(get_turf(linked))
@@ -389,7 +389,7 @@
icon_state = "ship_bottle"
/obj/item/ship_in_a_bottle/attack_self(mob/user)
user << "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out."
to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.")
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
new /obj/vehicle/lavaboat/dragon(get_turf(src))
qdel(src)
@@ -430,10 +430,10 @@
if(iscarbon(M) && M.stat != DEAD)
if(!ishumanbasic(M) || reac_volume < 5) // implying xenohumans are holy
if(method == INGEST && show_message)
M << "<span class='notice'><i>You feel nothing but a terrible aftertaste.</i></span>"
to_chat(M, "<span class='notice'><i>You feel nothing but a terrible aftertaste.</i></span>")
return ..()
M << "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>"
to_chat(M, "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>")
M.set_species(/datum/species/angel)
playsound(M.loc, 'sound/items/poster_ripped.ogg', 50, 1, -1)
M.adjustBruteLoss(20)
@@ -490,7 +490,7 @@
/obj/item/weapon/melee/ghost_sword/Destroy()
for(var/mob/dead/observer/G in spirits)
G.invisibility = initial(G.invisibility)
G.invisibility = observer_default_invisibility
spirits.Cut()
STOP_PROCESSING(SSobj, src)
poi_list -= src
@@ -498,9 +498,9 @@
/obj/item/weapon/melee/ghost_sword/attack_self(mob/user)
if(summon_cooldown > world.time)
user << "You just recently called out for aid. You don't want to annoy the spirits."
to_chat(user, "You just recently called out for aid. You don't want to annoy the spirits.")
return
user << "You call out for aid, attempting to summon spirits to your side."
to_chat(user, "You call out for aid, attempting to summon spirits to your side.")
notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!",
enter_link="<a href=?src=\ref[src];orbit=1>(Click to help)</a>",
@@ -537,7 +537,7 @@
current_spirits |= G
for(var/mob/dead/observer/G in spirits - current_spirits)
G.invisibility = initial(G.invisibility)
G.invisibility = observer_default_invisibility
spirits = current_spirits
@@ -574,20 +574,20 @@
switch(random)
if(1)
user << "<span class='danger'>Your appearence morphs to that of a very small humanoid ash dragon! You get to look like a freak without the cool abilities.</span>"
to_chat(user, "<span class='danger'>Your appearence morphs to that of a very small humanoid ash dragon! You get to look like a freak without the cool abilities.</span>")
H.dna.features = list("mcolor" = "A02720", "tail_lizard" = "Dark Tiger", "tail_human" = "None", "snout" = "Sharp", "horns" = "Curled", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "Long", "body_markings" = "Dark Tiger Body", "legs" = "Digitigrade Legs")
H.eye_color = "fee5a3"
H.set_species(/datum/species/lizard)
if(2)
user << "<span class='danger'>Your flesh begins to melt! Miraculously, you seem fine otherwise.</span>"
to_chat(user, "<span class='danger'>Your flesh begins to melt! Miraculously, you seem fine otherwise.</span>")
H.set_species(/datum/species/skeleton)
if(3)
user << "<span class='danger'>Power courses through you! You can now shift your form at will."
to_chat(user, "<span class='danger'>Power courses through you! You can now shift your form at will.")
if(user.mind)
var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/D = new
user.mind.AddSpell(D)
if(4)
user << "<span class='danger'>You feel like you could walk straight through lava now.</span>"
to_chat(user, "<span class='danger'>You feel like you could walk straight through lava now.</span>")
H.weather_immunities |= "lava"
playsound(user.loc,'sound/items/drink.ogg', rand(10,50), 1)
@@ -692,7 +692,7 @@
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(H)
B.mineEffect(H)
user << "<span class='notice'>You shatter the bottle!</span>"
to_chat(user, "<span class='notice'>You shatter the bottle!</span>")
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
qdel(src)
@@ -725,11 +725,11 @@
var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in player_list
if(!(isliving(choice)))
user << "[choice] is already dead!"
to_chat(user, "[choice] is already dead!")
used = FALSE
return
if(choice == user)
user << "You feel like writing your own name into a cursed death warrant would be unwise."
to_chat(user, "You feel like writing your own name into a cursed death warrant would be unwise.")
used = FALSE
return
else
@@ -741,7 +741,7 @@
var/datum/objective/survive/survive = new
survive.owner = L.mind
L.mind.objectives += survive
L << "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>"
to_chat(L, "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>")
L.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(L)
@@ -750,7 +750,7 @@
for(var/mob/living/carbon/human/H in player_list)
if(H == L)
continue
H << "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!</span>"
to_chat(H, "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!</span>")
H.put_in_hands_or_del(new /obj/item/weapon/kitchen/knife/butcher(H))
qdel(src)
@@ -783,7 +783,7 @@
/obj/item/weapon/hierophant_club/examine(mob/user)
..()
user << "<span class='hierophant_warning'>The[beacon ? " beacon is not currently":"re is a beacon"] attached.</span>"
to_chat(user, "<span class='hierophant_warning'>The[beacon ? " beacon is not currently":"re is a beacon"] attached.</span>")
/obj/item/weapon/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
..()
@@ -809,7 +809,7 @@
INVOKE_ASYNC(src, .proc/cardinal_blasts, T, user) //otherwise, just do cardinal blast
add_logs(user, target, "fired cardinal blast at", src)
else
user << "<span class='warning'>That target is out of range!</span>" //too far away
to_chat(user, "<span class='warning'>That target is out of range!</span>" )
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
@@ -842,12 +842,12 @@
/obj/item/weapon/hierophant_club/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_unfriendly_fire)) //toggle friendly fire...
friendly_fire_check = !friendly_fire_check
user << "<span class='warning'>You toggle friendly fire [friendly_fire_check ? "off":"on"]!</span>"
to_chat(user, "<span class='warning'>You toggle friendly fire [friendly_fire_check ? "off":"on"]!</span>")
return
if(timer > world.time)
return
if(!user.is_holding(src)) //you need to hold the staff to teleport
user << "<span class='warning'>You need to hold the club in your hands to [beacon ? "teleport with it":"detach the beacon"]!</span>"
to_chat(user, "<span class='warning'>You need to hold the club in your hands to [beacon ? "teleport with it":"detach the beacon"]!</span>")
return
if(!beacon || QDELETED(beacon))
if(isturf(user.loc))
@@ -868,16 +868,16 @@
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
else
user << "<span class='warning'>You need to be on solid ground to detach the beacon!</span>"
to_chat(user, "<span class='warning'>You need to be on solid ground to detach the beacon!</span>")
return
if(get_dist(user, beacon) <= 2) //beacon too close abort
user << "<span class='warning'>You are too close to the beacon to teleport to it!</span>"
to_chat(user, "<span class='warning'>You are too close to the beacon to teleport to it!</span>")
return
if(is_blocked_turf(get_turf(beacon), TRUE))
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
return
if(!isturf(user.loc))
user << "<span class='warning'>You don't have enough space to teleport from here!</span>"
to_chat(user, "<span class='warning'>You don't have enough space to teleport from here!</span>")
return
teleporting = TRUE //start channel
user.update_action_buttons_icon()
@@ -892,7 +892,7 @@
var/turf/source = get_turf(user)
if(is_blocked_turf(T, TRUE))
teleporting = FALSE
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
user.update_action_buttons_icon()
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
@@ -913,7 +913,7 @@
return
if(is_blocked_turf(T, TRUE))
teleporting = FALSE
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
user.update_action_buttons_icon()
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
+4 -4
View File
@@ -22,7 +22,7 @@
/obj/structure/stacklifter/attack_hand(mob/user as mob)
if(in_use)
user << "It's already in use - wait a bit."
to_chat(user, "It's already in use - wait a bit.")
return
else
in_use = 1
@@ -48,7 +48,7 @@
user.pixel_y = 0
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnesslifter"
user << finishmessage
to_chat(user, finishmessage)
/obj/structure/weightlifter
name = "Weight Machine"
@@ -60,7 +60,7 @@
/obj/structure/weightlifter/attack_hand(mob/user as mob)
if(in_use)
user << "It's already in use - wait a bit."
to_chat(user, "It's already in use - wait a bit.")
return
else
in_use = 1
@@ -94,4 +94,4 @@
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnessweight"
cut_overlay(W)
user << "[finishmessage]"
to_chat(user, "[finishmessage]")
+122 -101
View File
@@ -11,20 +11,23 @@
input_dir = NORTH
output_dir = SOUTH
req_access = list(access_mineral_storeroom)
var/req_access_reclaim = access_mining_station
var/stk_types = list()
var/stk_amt = list()
var/stack_list[0] //Key: Type. Value: Instance of type.
var/stack_list = list() //Key: Type. Value: Instance of type.
var/obj/item/weapon/card/id/inserted_id
var/points = 0
var/ore_pickup_rate = 15
var/sheet_per_ore = 1
var/point_upgrade = 1
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("titanium" = 30), ("uranium" = 30), ("diamond" = 50), ("bluespace crystal" = 50), ("bananium" = 60))
var/list/ore_values = list("sand" = 1, "iron" = 1, "plasma" = 15, "silver" = 16, "gold" = 18, "titanium" = 30, "uranium" = 30, "diamond" = 50, "bluespace crystal" = 50, "bananium" = 60)
speed_process = 1
var/message_sent = FALSE
var/list/ore_buffer = list()
/obj/machinery/mineral/ore_redemption/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/ore_redemption(null)
var/obj/item/weapon/circuitboard/machine/ore_redemption/B = new
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/ore_redemption
@@ -55,51 +58,72 @@
/obj/machinery/mineral/ore_redemption/proc/process_sheet(obj/item/weapon/ore/O)
var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O)
if(processed_sheet)
if(!(processed_sheet in stack_list)) //It's the first of this sheet added
var/obj/item/stack/sheet/s = new processed_sheet(src,0)
var/obj/item/stack/sheet/s
if(!stack_list[processed_sheet])
s = new processed_sheet(src, FALSE)
s.amount = 0
stack_list[processed_sheet] = s
var/obj/item/stack/sheet/storage = stack_list[processed_sheet]
storage.amount += sheet_per_ore //Stack the sheets
O.loc = null //Let the old sheet...
s = stack_list[processed_sheet]
s.amount += sheet_per_ore //Stack the sheets
ore_buffer -= O
qdel(O) //... garbage collect
/obj/machinery/mineral/ore_redemption/proc/process_ores(list/ores_to_process)
var/current_amount = 0
for(var/ore in ores_to_process)
if(current_amount >= ore_pickup_rate)
break
process_sheet(ore)
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
if(z != ZLEVEL_STATION || !LAZYLEN(stack_list))
return
message_sent = TRUE
var/area/A = get_area(src)
var/msg = "Now available in [A]:<br>"
for(var/s in stack_list)
var/obj/item/stack/sheet/sheet = stack_list[s]
msg += "[capitalize(sheet.name)]: [sheet.amount] sheets<br>"
for(var/obj/machinery/requests_console/D in allConsoles)
if(D.receive_ore_updates)
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
/obj/machinery/mineral/ore_redemption/process()
if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals
var/turf/T = get_step(src, input_dir)
var/i = 0
if(T)
for(var/obj/item/weapon/ore/O in T)
if (i >= ore_pickup_rate)
break
else if (!O || !O.refined_type)
continue
else
process_sheet(O)
i++
else
var/obj/structure/ore_box/B = locate() in T
if(B)
for(var/obj/item/weapon/ore/O in B.contents)
if (i >= ore_pickup_rate)
break
else if (!O || !O.refined_type)
continue
else
process_sheet(O)
i++
if(i > 0 && z == ZLEVEL_STATION)
var/area/orm_area = get_area(src)
var/msg = "Now available in [orm_area.map_name]:"
for(var/s in stack_list) // Making an announcement for cargo
var/obj/item/stack/sheet/mats = stack_list[s]
msg += "\n[capitalize(mats.name)]: [mats.amount] sheets"
for(var/obj/machinery/requests_console/D in allConsoles)
if(D.department == "Science" || D.department == "Robotics" || D.department == "Research Director's Desk" || D.department == "Chemistry" || D.department == "Bar")
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
if(panel_open || !powered())
return
var/atom/input = get_step(src, input_dir)
var/obj/structure/ore_box/OB = locate() in input
if(OB)
input = OB
for(var/obj/item/weapon/ore/O in input)
if(QDELETED(O))
continue
ore_buffer |= O
O.forceMove(src)
CHECK_TICK
if(LAZYLEN(ore_buffer))
message_sent = FALSE
process_ores(ore_buffer)
else if(!message_sent)
send_console_message()
/obj/machinery/mineral/ore_redemption/attackby(obj/item/weapon/W, mob/user, params)
if (!powered())
if(exchange_parts(user, W))
return
if(default_pry_open(W))
return
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
if(default_deconstruction_crowbar(W))
return
if(!powered())
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = user.get_active_held_item()
@@ -110,18 +134,11 @@
inserted_id = I
interact(user)
return
if(exchange_parts(user, W))
return
if(default_pry_open(W))
return
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
if(default_deconstruction_crowbar(W))
if(istype(W, /obj/item/device/multitool) && panel_open)
input_dir = turn(input_dir, -90)
output_dir = turn(output_dir, -90)
to_chat(user, "<span class='notice'>You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].</span>")
return
return ..()
@@ -130,7 +147,7 @@
empty_content()
/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(obj/item/weapon/ore/O)
if(O.refined_type)
if(O && O.refined_type)
var/obj/item/stack/sheet/M = O.refined_type
points += O.points * point_upgrade
return M
@@ -143,24 +160,19 @@
interact(user)
/obj/machinery/mineral/ore_redemption/interact(mob/user)
var/obj/item/stack/sheet/s
var/dat
var/dat = "This machine only accepts ore. Gibtonite and Slag are not accepted.<br><br>"
dat += "Current unclaimed points: [points]<br>"
dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.<br><br>")
dat += text("Current unclaimed points: [points]<br>")
if(istype(inserted_id))
dat += text("You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
dat += text("<A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
if(inserted_id)
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];eject_id=1'>Eject ID.</A><br>"
dat += "<A href='?src=\ref[src];claim=1'>Claim points.</A><br><br>"
else
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
dat += "No ID inserted. <A href='?src=\ref[src];insert_id=1'>Insert ID.</A><br><br>"
for(var/O in stack_list)
s = stack_list[O]
if(s.amount > 0)
if(O == stack_list[1])
dat += "<br>" //just looks nicer
dat += text("[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
var/obj/item/stack/sheet/s = stack_list[O]
if(s.amount)
dat += "[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>"
var/obj/item/stack/sheet/metalstack
if(/obj/item/stack/sheet/metal in stack_list)
@@ -175,10 +187,10 @@
titaniumstack = stack_list[/obj/item/stack/sheet/mineral/titanium]
if(metalstack && plasmastack && min(metalstack.amount, plasmastack.amount))
dat += text("Plasteel Alloy (Metal + Plasma): <A href='?src=\ref[src];alloytype1=/obj/item/stack/sheet/metal;alloytype2=/obj/item/stack/sheet/mineral/plasma;alloytypeout=/obj/item/stack/sheet/plasteel'>Smelt</A><BR>")
dat += "Plasteel Alloy (Metal + Plasma): <A href='?src=\ref[src];alloytype1=/obj/item/stack/sheet/metal;alloytype2=/obj/item/stack/sheet/mineral/plasma;alloytypeout=/obj/item/stack/sheet/plasteel'>Smelt</A><BR>"
if(titaniumstack && plasmastack && min(titaniumstack.amount, plasmastack.amount))
dat += text("Plastitanium Alloy (Titanium + Plasma): <A href='?src=\ref[src];alloytype1=/obj/item/stack/sheet/mineral/titanium;alloytype2=/obj/item/stack/sheet/mineral/plasma;alloytypeout=/obj/item/stack/sheet/mineral/plastitanium'>Smelt</A><BR>")
dat += text("<br><div class='statusDisplay'><b>Mineral Value List:</b><BR>[get_ore_values()]</div>")
dat += "Plastitanium Alloy (Titanium + Plasma): <A href='?src=\ref[src];alloytype1=/obj/item/stack/sheet/mineral/titanium;alloytype2=/obj/item/stack/sheet/mineral/plasma;alloytypeout=/obj/item/stack/sheet/mineral/plastitanium'>Smelt</A><BR>"
dat += "<br><div class='statusDisplay'><b>Mineral Value List:</b><BR>[get_ore_values()]</div>"
var/datum/browser/popup = new(user, "console_stacking_machine", "Ore Redemption Machine", 400, 500)
popup.set_content(dat)
@@ -196,58 +208,67 @@
/obj/machinery/mineral/ore_redemption/Topic(href, href_list)
if(..())
return
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
inserted_id.loc = loc
inserted_id.verb_pickup()
inserted_id = null
if(href_list["choice"] == "claim")
if(access_mining_station in inserted_id.access)
inserted_id.mining_points += points
points = 0
else
usr << "<span class='warning'>Required access not found.</span>"
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_held_item()
if(istype(I))
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "<span class='warning'>No valid ID.</span>"
if(href_list["eject_id"])
usr.put_in_hands(inserted_id)
inserted_id = null
if(href_list["claim"])
if(inserted_id)
if(req_access_reclaim in inserted_id.access)
inserted_id.mining_points += points
points = 0
else
to_chat(usr, "<span class='warning'>Required access not found.</span>")
else if(href_list["insert_id"])
var/obj/item/weapon/card/id/I = usr.get_active_held_item()
if(istype(I))
if(!usr.drop_item())
return
I.forceMove(src)
inserted_id = I
else
to_chat(usr, "<span class='warning'>Not a valid ID!</span>")
if(href_list["release"])
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user.
if(!(text2path(href_list["release"]) in stack_list)) return
if(!(text2path(href_list["release"]) in stack_list))
return
var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type()
var/desired = input("How much?", "How much to eject?", 1) as num
var/obj/item/stack/sheet/out = new inp.type(src,merge=FALSE)
var/desired = input("How many sheets?", "How many sheets to eject?", 1) as null|num
out.amount = round(min(desired,50,inp.amount))
if(out.amount >= 1)
if(out.amount)
inp.amount -= out.amount
unload_mineral(out)
if(inp.amount < 1)
stack_list -= text2path(href_list["release"])
qdel(inp)
else
usr << "<span class='warning'>Required access not found.</span>"
to_chat(usr, "<span class='warning'>Required access not found.</span>")
if(href_list["alloytype1"] && href_list["alloytype2"] && href_list["alloytypeout"])
var/alloytype1 = text2path(href_list["alloytype1"])
var/alloytype2 = text2path(href_list["alloytype2"])
var/alloytypeout = text2path(href_list["alloytypeout"])
if(check_access(inserted_id) || allowed(usr))
if(!(alloytype1 in stack_list)) return
if(!(alloytype2 in stack_list)) return
if(!(alloytype1 in stack_list))
return
if(!(alloytype2 in stack_list))
return
var/obj/item/stack/sheet/stack1 = stack_list[alloytype1]
var/obj/item/stack/sheet/stack2 = stack_list[alloytype2]
var/desired = input("How much?", "How much would you like to smelt?", 1) as num
var/desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
var/obj/item/stack/sheet/alloyout = new alloytypeout
alloyout.amount = round(min(desired,50,stack1.amount,stack2.amount))
if(alloyout.amount >= 1)
stack1.amount -= alloyout.amount
stack2.amount -= alloyout.amount
unload_mineral(alloyout)
if(stack1.amount < 1)
stack_list -= stack1
qdel(stack1)
if(stack2.amount < 1)
stack_list -= stack2
qdel(stack2)
else
usr << "<span class='warning'>Required access not found.</span>"
to_chat(usr, "<span class='warning'>Required access not found.</span>")
updateUsrDialog()
return
@@ -266,7 +287,7 @@
while(s.amount > s.max_amount)
new s.type(loc,s.max_amount)
s.use(s.max_amount)
s.loc = loc
s.forceMove(get_turf(src))
s.layer = initial(s.layer)
s.plane = initial(s.plane)
@@ -279,4 +300,4 @@
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-off"
return
return
+6 -5
View File
@@ -126,7 +126,7 @@
return
I.loc = src
inserted_id = I
else usr << "<span class='danger'>No valid ID.</span>"
else to_chat(usr, "<span class='danger'>No valid ID.</span>")
if(href_list["purchase"])
if(istype(inserted_id))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
@@ -209,6 +209,7 @@
..()
desc += "\nIt seems a few selections have been added."
prize_list += list(
new /datum/data/mining_equipment("Extra Id", /obj/item/weapon/card/id/mining, 250),
new /datum/data/mining_equipment("Science Goggles", /obj/item/clothing/glasses/science, 250),
new /datum/data/mining_equipment("Monkey Cube", /obj/item/weapon/reagent_containers/food/snacks/monkeycube, 300),
new /datum/data/mining_equipment("Toolbelt", /obj/item/weapon/storage/belt/utility, 350),
@@ -252,15 +253,15 @@
if(points)
var/obj/item/weapon/card/id/C = I
C.mining_points += points
user << "<span class='info'>You transfer [points] points to [C].</span>"
to_chat(user, "<span class='info'>You transfer [points] points to [C].</span>")
points = 0
else
user << "<span class='info'>There's no points left on [src].</span>"
to_chat(user, "<span class='info'>There's no points left on [src].</span>")
..()
/obj/item/weapon/card/mining_point_card/examine(mob/user)
..()
user << "There's [points] point\s on the card."
to_chat(user, "There's [points] point\s on the card.")
///Conscript kit
/obj/item/weapon/card/mining_access_card
@@ -275,7 +276,7 @@
I.access |= access_mining_station
I.access |= access_mineral_storeroom
I.access |= access_cargo
user << "You upgrade [I] with mining access."
to_chat(user, "You upgrade [I] with mining access.")
qdel(src)
..()
+11 -5
View File
@@ -10,7 +10,7 @@
/obj/effect/light_emitter/New()
..()
SetLuminosity(set_luminosity, set_cap)
set_light(set_luminosity, set_cap)
/**********************Miner Lockers**************************/
@@ -69,7 +69,7 @@
/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>"
to_chat(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
..()
@@ -198,7 +198,7 @@
/obj/item/weapon/emptysandbag/attackby(obj/item/W, mob/user, params)
if(istype(W,/obj/item/weapon/ore/glass))
user << "<span class='notice'>You fill the sandbag.</span>"
to_chat(user, "<span class='notice'>You fill the sandbag.</span>")
var/obj/item/stack/sheet/mineral/sandbags/I = new /obj/item/stack/sheet/mineral/sandbags
qdel(src)
user.put_in_hands(I)
@@ -248,8 +248,8 @@
/obj/item/weapon/survivalcapsule/examine(mob/user)
. = ..()
get_template()
user << "This capsule has the [template.name] stored."
user << template.description
to_chat(user, "This capsule has the [template.name] stored.")
to_chat(user, template.description)
/obj/item/weapon/survivalcapsule/attack_self()
// Can't grab when capsule is New() because templates aren't loaded then
@@ -454,6 +454,12 @@
. = ..()
T.air_update_turf(1)
//Inivisible, indestructible fans
/obj/structure/fans/tiny/invisible
name = "air flow blocker"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
invisibility = INVISIBILITY_ABSTRACT
//Signs
/obj/structure/sign/mining
+19 -19
View File
@@ -5,7 +5,7 @@
/mob/living/simple_animal/hostile/mining_drone
name = "nanotrasen minebot"
desc = "The instructions printed on the side read: This is a small robot used to support miners, can be set to search and collect loose ore, or to help fend off wildlife. A mining scanner can instruct it to drop loose ore. Field repairs can be done with a welder."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "mining_drone"
icon_living = "mining_drone"
status_flags = CANSTUN|CANWEAKEN|CANPUSH
@@ -48,7 +48,7 @@
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
/mob/living/simple_animal/hostile/mining_drone/New()
/mob/living/simple_animal/hostile/mining_drone/Initialize()
..()
toggle_light_action = new()
toggle_light_action.Grant(src)
@@ -70,17 +70,17 @@
var/obj/item/weapon/weldingtool/W = I
if(W.welding && !stat)
if(AIStatus != AI_OFF && AIStatus != AI_IDLE)
user << "<span class='info'>[src] is moving around too much to repair!</span>"
to_chat(user, "<span class='info'>[src] is moving around too much to repair!</span>")
return
if(maxHealth == health)
user << "<span class='info'>[src] is at full integrity.</span>"
to_chat(user, "<span class='info'>[src] is at full integrity.</span>")
else
if(W.remove_fuel(0, user))
adjustBruteLoss(-10)
user << "<span class='info'>You repair some of the armor on [src].</span>"
to_chat(user, "<span class='info'>You repair some of the armor on [src].</span>")
return
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner))
user << "<span class='info'>You instruct [src] to drop any collected ore.</span>"
to_chat(user, "<span class='info'>You instruct [src] to drop any collected ore.</span>")
DropOre()
return
..()
@@ -98,9 +98,9 @@
toggle_mode()
switch(mode)
if(MINEDRONE_COLLECT)
M << "<span class='info'>[src] has been set to search and store loose ore.</span>"
to_chat(M, "<span class='info'>[src] has been set to search and store loose ore.</span>")
if(MINEDRONE_ATTACK)
M << "<span class='info'>[src] has been set to attack hostile wildlife.</span>"
to_chat(M, "<span class='info'>[src] has been set to attack hostile wildlife.</span>")
return
..()
@@ -113,7 +113,7 @@
minimum_distance = 1
retreat_distance = null
icon_state = "mining_drone"
src << "<span class='info'>You are set to collect mode. You can now collect loose ore.</span>"
to_chat(src, "<span class='info'>You are set to collect mode. You can now collect loose ore.</span>")
/mob/living/simple_animal/hostile/mining_drone/proc/SetOffenseBehavior()
mode = MINEDRONE_ATTACK
@@ -124,7 +124,7 @@
retreat_distance = 1
minimum_distance = 2
icon_state = "mining_drone_offense"
src << "<span class='info'>You are set to attack mode. You can now attack from range.</span>"
to_chat(src, "<span class='info'>You are set to attack mode. You can now attack from range.</span>")
/mob/living/simple_animal/hostile/mining_drone/AttackingTarget()
if(istype(target, /obj/item/weapon/ore) && mode == MINEDRONE_COLLECT)
@@ -145,10 +145,10 @@
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1)
if(!contents.len)
if(message)
src << "<span class='notice'>You attempt to dump your stored ore, but you have none.</span>"
to_chat(src, "<span class='notice'>You attempt to dump your stored ore, but you have none.</span>")
return
if(message)
src << "<span class='notice'>You dump your stored ore.</span>"
to_chat(src, "<span class='notice'>You dump your stored ore.</span>")
for(var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
@@ -183,11 +183,11 @@
var/mob/living/simple_animal/hostile/mining_drone/user = owner
if(user.light_on)
user.AddLuminosity(-6)
user.set_light(0)
else
user.AddLuminosity(6)
user.set_light(6)
user.light_on = !user.light_on
user << "<span class='notice'>You toggle your light [user.light_on ? "on" : "off"].</span>"
to_chat(user, "<span class='notice'>You toggle your light [user.light_on ? "on" : "off"].</span>")
/datum/action/innate/minedrone/toggle_meson_vision
name = "Toggle Meson Vision"
@@ -203,7 +203,7 @@
user.sight |= SEE_TURFS
user.see_invisible = SEE_INVISIBLE_MINIMUM
user << "<span class='notice'>You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].</span>"
to_chat(user, "<span class='notice'>You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].</span>")
/datum/action/innate/minedrone/toggle_mode
name = "Toggle Mode"
@@ -239,7 +239,7 @@
/obj/item/device/mine_bot_ugprade/proc/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
if(M.melee_damage_upper != initial(M.melee_damage_upper))
user << "[src] already has a combat upgrade installed!"
to_chat(user, "[src] already has a combat upgrade installed!")
return
M.melee_damage_lower = 22
M.melee_damage_upper = 22
@@ -252,7 +252,7 @@
/obj/item/device/mine_bot_ugprade/health/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
if(M.maxHealth != initial(M.maxHealth))
user << "[src] already has a reinforced chassis!"
to_chat(user, "[src] already has a reinforced chassis!")
return
M.maxHealth = 170
qdel(src)
@@ -266,7 +266,7 @@
/obj/item/device/mine_bot_ugprade/cooldown/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
name = "minebot cooldown upgrade"
if(M.ranged_cooldown_time != initial(M.ranged_cooldown_time))
user << "[src] already has a decreased weapon cooldown!"
to_chat(user, "[src] already has a decreased weapon cooldown!")
return
M.ranged_cooldown_time = 10
qdel(src)
+1 -1
View File
@@ -68,7 +68,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(processing==1)
usr << "<span class='notice'>The machine is processing.</span>"
to_chat(usr, "<span class='notice'>The machine is processing.</span>")
return
if(href_list["choose"])
if(materials.materials[href_list["choose"]])
+10 -10
View File
@@ -14,7 +14,7 @@
new refined_type(get_turf(src.loc))
qdel(src)
else if(W.isOn())
user << "<span class='info'>Not enough fuel to smelt [src].</span>"
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
..()
/obj/item/weapon/ore/Crossed(atom/movable/AM)
@@ -73,7 +73,7 @@
w_class = WEIGHT_CLASS_TINY
/obj/item/weapon/ore/glass/attack_self(mob/living/user)
user << "<span class='notice'>You use the sand to make sandstone.</span>"
to_chat(user, "<span class='notice'>You use the sand to make sandstone.</span>")
var/sandAmt = 1
for(var/obj/item/weapon/ore/glass/G in user.loc) // The sand on the floor
sandAmt += 1
@@ -107,7 +107,7 @@
C.adjust_blurriness(6)
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
C.confused += 5
C << "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>"
to_chat(C, "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>")
qdel(src)
/obj/item/weapon/ore/glass/basalt
@@ -126,7 +126,7 @@
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
if(W.welding)
user << "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>"
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
else
..()
@@ -309,7 +309,7 @@
/obj/item/weapon/coin/examine(mob/user)
..()
if(value)
user << "<span class='info'>It's worth [value] credit\s.</span>"
to_chat(user, "<span class='info'>It's worth [value] credit\s.</span>")
/obj/item/weapon/coin/gold
cmineral = "gold"
@@ -386,15 +386,15 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(string_attached)
user << "<span class='warning'>There already is a string attached to this coin!</span>"
to_chat(user, "<span class='warning'>There already is a string attached to this coin!</span>")
return
if (CC.use(1))
add_overlay(image('icons/obj/economy.dmi',"coin_string_overlay"))
string_attached = 1
user << "<span class='notice'>You attach a string to the coin.</span>"
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
else
user << "<span class='warning'>You need one length of cable to attach a string to the coin!</span>"
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin!</span>")
return
else if(istype(W,/obj/item/weapon/wirecutters))
@@ -407,13 +407,13 @@
CC.update_icon()
overlays = list()
string_attached = null
user << "<span class='notice'>You detach the string from the coin.</span>"
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
else ..()
/obj/item/weapon/coin/attack_self(mob/user)
if(cooldown < world.time - 15)
if(string_attached) //does the coin have a wire attached
user << "<span class='warning'>The coin won't flip very well with something attached!</span>" //Tell user it will not flip
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
return //do not flip the coin
var/coinflip = pick(sideslist)
cooldown = world.time
+2 -2
View File
@@ -18,7 +18,7 @@
var/obj/item/weapon/storage/S = W
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
user << "<span class='notice'>You empty the ore in [S] into \the [src].</span>"
to_chat(user, "<span class='notice'>You empty the ore in [S] into \the [src].</span>")
else if(istype(W, /obj/item/weapon/crowbar))
playsound(loc, W.usesound, 50, 1)
var/obj/item/weapon/crowbar/C = W
@@ -61,7 +61,7 @@
src.add_fingerprint(usr)
if(href_list["removeall"])
dump_box_contents()
usr << "<span class='notice'>You empty the box.</span>"
to_chat(usr, "<span class='notice'>You empty the box.</span>")
updateUsrDialog()