Files
CHOMPStation2/code/game/mecha/mecha_control_console.dm
petethegoat@gmail.com 11b17c4442 Committing suomynonAyletamitlU's storage item standardisation commit: http://forums.nanotrasen.com/viewtopic.php?f=16&t=11746
Standardization of the object tree and some modified functionality.
Moved a lot of storage/*_kit and similar boxes to storage/box/* ; most of these can now be found in boxes.dm. First aid kits remain a separate item type.
Replacement Light boxes pick up lights (for example broken ones) when used on them
Moved weapon/secstorage to storage/secure
Moved plant bags, ore satchel, trash bag, and sheet snatcher to storage/bag, in bags.dm
Fixed reagent_containers and snacks to pass through attackby() so the use_to_pickup code works. This affects plant bags, trash bags, and pill bottles.
Dice packs are now pill bottles, and all pill bottles can pick up dice.
Added error handling to uplink/generate_menu() so that one mistyped string doesn't bork the whole syndie uplink menu, since strings cannot be type-checked at compile time.
Cigarette packs and crayon boxes are now storage/fancy, however they retain existing update_icon() code.
Added a comment to storage.dm so that future people know where to look for use_to_pickup and allow_quick_gather code.

Updated all maps.

I've tried to test this thoroughly but I wouldn't be surprised if there were a few lingering issues. Try not to panic if you encounter any.

Full (i think) list of changed paths:
/obj/item/weapon/storage/flashbang_kit	> /obj/item/weapon/storage/box/flashbangs
/obj/item/weapon/storage/body_bag_box	> /obj/item/weapon/storage/box/bodybags
/obj/item/weapon/storage/chemimp_kit	> /obj/item/weapon/storage/box/chemimp
/obj/item/weapon/storage/trackimp_kit	> /obj/item/weapon/storage/box/trackimp
/obj/item/weapon/storage/seccart_kit	> /obj/item/weapon/storage/box/seccarts
/obj/item/weapon/storage/handcuff_kit	> /obj/item/weapon/storage/box/handcuffs
/obj/item/weapon/cigpacket		> /obj/item/weapon/storage/fancy/cigarettes
/obj/item/weapon/storage/mousetraps	> /obj/item/weapon/storage/box/mousetraps
/obj/item/weapon/storage/PDAbox		> /obj/item/weapon/storage/box/PDAs
/obj/item/weapon/storage/id_kit		> /obj/item/weapon/storage/box/ids
/obj/item/weapon/storage/lightbox/mixed	> /obj/item/weapon/storage/box/lights/mixed
/obj/item/weapon/storage/donkpocket_kit	> /obj/item/weapon/storage/box/donkpockets
/obj/item/weapon/storage/beakerbox	> /obj/item/weapon/storage/box/beakers
/obj/item/weapon/storage/syringes	> /obj/item/weapon/storage/box/syringes
/obj/item/weapon/storage/gl_kit		> /obj/item/weapon/storage/box/rxglasses
/obj/item/weapon/storage/diskbox	> /obj/item/weapon/storage/box/disks
/obj/item/weapon/storage/stma_kit	> /obj/item/weapon/storage/box/masks
/obj/item/weapon/storage/lglo_kit	> /obj/item/weapon/storage/box/gloves
/obj/item/weapon/storage/lightbox/bulbs	> /obj/item/weapon/storage/box/lights/bulbs
/obj/item/weapon/plantbag		> /obj/item/weapon/storage/bag/plants
/obj/item/weapon/storage/satchel	> /obj/item/weapon/storage/bag/ore
/obj/item/weapon/trashbag		> /obj/item/weapon/storage/bag/trash

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5494 316c924e-a436-60f5-8080-3fe189b3f50e
2013-01-08 19:11:56 +00:00

132 lines
3.9 KiB
Plaintext

/obj/machinery/computer/mecha
name = "Exosuit Control"
icon = 'icons/obj/computer.dmi'
icon_state = "mecha"
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/mecha_control"
var/list/located = list()
var/screen = 0
var/stored_data
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return src.attack_hand(user)
attack_hand(var/mob/user as mob)
if(..())
return
user.set_machine(src)
var/dat = "<html><head><title>[src.name]</title><style>h3 {margin: 0px; padding: 0px;}</style></head><body>"
if(screen == 0)
dat += "<h3>Tracking beacons data</h3>"
for(var/obj/item/mecha_parts/mecha_tracking/TR in world)
var/answer = TR.get_mecha_info()
if(answer)
dat += {"<hr>[answer]<br/>
<a href='?src=\ref[src];send_message=\ref[TR]'>Send message</a><br/>
<a href='?src=\ref[src];get_log=\ref[TR]'>Show exosuit log</a> | <a style='color: #f00;' href='?src=\ref[src];shock=\ref[TR]'>(EMP pulse)</a><br>"}
if(screen==1)
dat += "<h3>Log contents</h3>"
dat += "<a href='?src=\ref[src];return=1'>Return</a><hr>"
dat += "[stored_data]"
dat += "<A href='?src=\ref[src];refresh=1'>(Refresh)</A><BR>"
dat += "</body></html>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
Topic(href, href_list)
if(..())
return
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
if(href_list["send_message"])
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message")
var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text)
var/obj/mecha/M = MT.in_mecha()
if(trim(message) && M)
M.occupant_message(message)
return
if(href_list["shock"])
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("shock")
MT.shock()
if(href_list["get_log"])
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("get_log")
stored_data = MT.get_mecha_log()
screen = 1
if(href_list["return"])
screen = 0
src.updateUsrDialog()
return
/obj/item/mecha_parts/mecha_tracking
name = "Exosuit tracking beacon"
desc = "Device used to transmit exosuit data."
icon = 'icons/obj/device.dmi'
icon_state = "motion2"
origin_tech = "programming=2;magnets=2"
construction_time = 50
construction_cost = list("metal"=500)
proc/get_mecha_info()
if(!in_mecha())
return 0
var/obj/mecha/M = src.loc
var/cell_charge = M.get_charge()
var/answer = {"<b>Name:</b> [M.name]<br>
<b>Integrity:</b> [M.health/initial(M.health)*100]%<br>
<b>Cell charge:</b> [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"]<br>
<b>Airtank:</b> [M.return_pressure()]kPa<br>
<b>Pilot:</b> [M.occupant||"None"]<br>
<b>Location:</b> [get_area(M)||"Unknown"]<br>
<b>Active equipment:</b> [M.selected||"None"]"}
if(istype(M, /obj/mecha/working/ripley))
var/obj/mecha/working/ripley/RM = M
answer += "<b>Used cargo space:</b> [RM.cargo.len/RM.cargo_capacity*100]%<br>"
return answer
emp_act()
del src
return
ex_act()
del src
return
proc/in_mecha()
if(istype(src.loc, /obj/mecha))
return src.loc
return 0
proc/shock()
var/obj/mecha/M = in_mecha()
if(M)
M.emp_act(2)
del(src)
proc/get_mecha_log()
if(!src.in_mecha())
return 0
var/obj/mecha/M = src.loc
return M.get_log_html()
/obj/item/weapon/storage/box/mechabeacons
name = "Exosuit Tracking Beacons"
New()
..()
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)
new /obj/item/mecha_parts/mecha_tracking(src)