diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 62a0fb4710c..33edf53016b 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -1,29 +1,32 @@ -#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day - -//Security levels -#define SEC_LEVEL_GREEN 0 -#define SEC_LEVEL_BLUE 1 -#define SEC_LEVEL_RED 2 -#define SEC_LEVEL_DELTA 3 - -//some arbitrary defines to be used by self-pruning global lists. (see master_controller) -#define PROCESS_KILL 26 //Used to trigger removal from a processing list - -#define MANIFEST_ERROR_NAME 1 -#define MANIFEST_ERROR_COUNT 2 -#define MANIFEST_ERROR_ITEM 4 - -#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level - - - -//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12. -#define HUD_STYLE_STANDARD 1 -#define HUD_STYLE_REDUCED 2 -#define HUD_STYLE_NOHUD 3 - - -#define HUD_VERSIONS 3 //used in show_hud() -//1 = standard hud -//2 = reduced hud (just hands and intent switcher) -//3 = no hud (for screenshots) +#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day + +//Security levels +#define SEC_LEVEL_GREEN 0 +#define SEC_LEVEL_BLUE 1 +#define SEC_LEVEL_RED 2 +#define SEC_LEVEL_DELTA 3 + +//some arbitrary defines to be used by self-pruning global lists. (see master_controller) +#define PROCESS_KILL 26 //Used to trigger removal from a processing list + +#define MANIFEST_ERROR_NAME 1 +#define MANIFEST_ERROR_COUNT 2 +#define MANIFEST_ERROR_ITEM 4 + +#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level + + + +//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12. +#define HUD_STYLE_STANDARD 1 +#define HUD_STYLE_REDUCED 2 +#define HUD_STYLE_NOHUD 3 + + +#define HUD_VERSIONS 3 //used in show_hud() +//1 = standard hud +//2 = reduced hud (just hands and intent switcher) +//3 = no hud (for screenshots) + +#define MINERAL_MATERIAL_AMOUNT 2000 +//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index f26c2414ee0..65ccd1411cf 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -133,12 +133,12 @@ var/global/list/autolathe_recipes_hidden = list( \ if (panel_open) if(istype(O, /obj/item/weapon/crowbar)) - if(m_amount >= 3750) + if(m_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc) - G.amount = round(m_amount / 3750) - if(g_amount >= 3750) + G.amount = round(m_amount / MINERAL_MATERIAL_AMOUNT) + if(g_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc) - G.amount = round(g_amount / 3750) + G.amount = round(g_amount / MINERAL_MATERIAL_AMOUNT) default_deconstruction_crowbar(O) return 1 else diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index ff201432fc4..32efc75734d 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -6,8 +6,8 @@ w_class = 2 anchored = 0 - m_amt = 700 - g_amt = 300 + m_amt = 400 + g_amt = 250 // Motion, EMP-Proof, X-Ray var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index e6cbd3b75d2..afaca2f0e76 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -1,1030 +1,1030 @@ -//############################################## -//################### NEWSCASTERS BE HERE! #### -//###-Agouri################################### - -/datum/feed_message - var/author ="" - var/body ="" - //var/parent_channel - var/backup_body ="" - var/backup_author ="" - var/is_admin_message = 0 - var/icon/img = null - var/time_stamp = "" - -/datum/feed_channel - var/channel_name="" - var/list/datum/feed_message/messages = list() - //var/message_count = 0 - var/locked=0 - var/author="" - var/backup_author="" - var/censored=0 - var/is_admin_channel=0 - //var/page = null //For newspapers - -/datum/feed_message/proc/clear() - src.author = "" - src.body = "" - src.backup_body = "" - src.backup_author = "" - src.img = null - -/datum/feed_channel/proc/clear() - src.channel_name = "" - src.messages = list() - src.locked = 0 - src.author = "" - src.backup_author = "" - src.censored = 0 - src.is_admin_channel = 0 - -/datum/feed_network - var/list/datum/feed_channel/network_channels = list() - var/datum/feed_message/wanted_issue - -/datum/feed_network/New() - CreateFeedChannel("Central Command", "Centcom Official", 1) - -/datum/feed_network/proc/CreateFeedChannel(var/channel_name, var/author, var/locked, var/adminChannel = 0) - var/datum/feed_channel/newChannel = new /datum/feed_channel - newChannel.channel_name = channel_name - newChannel.author = author - newChannel.locked = locked - newChannel.is_admin_channel = adminChannel - network_channels += newChannel - -/datum/feed_network/proc/SubmitArticle(var/msg, var/author, var/channel_name, var/obj/item/weapon/photo/photo, var/adminMessage = 0) - var/datum/feed_message/newMsg = new /datum/feed_message - newMsg.author = author - newMsg.body = msg - newMsg.time_stamp = "[worldtime2text()]" - newMsg.is_admin_message = adminMessage - if(photo) - newMsg.img = photo.img - for(var/datum/feed_channel/FC in network_channels) - if(FC.channel_name == channel_name) - FC.messages += newMsg //Adding message to the network's appropriate feed_channel - break - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(channel_name) - - -var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list. - -var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence. - - -/obj/item/newscaster_frame - name = "newscaster frame" - desc = "Used to build newscasters, just secure to the wall." - icon_state = "newscaster" - item_state = "syringe_kit" - m_amt = 25000 - g_amt = 15000 - -/obj/item/newscaster_frame/proc/try_build(turf/on_wall) - if (get_dist(on_wall,usr)>1) - return - var/ndir = get_dir(usr,on_wall) - if (!(ndir in cardinal)) - return - var/turf/loc = get_turf(usr) - var/area/A = loc.loc - if (!istype(loc, /turf/simulated/floor)) - usr << "Newscaster cannot be placed on this spot." - return - if (A.requires_power == 0 || A.name == "Space") - usr << "Newscaster cannot be placed in this area." - return - for(var/obj/machinery/newscaster/T in loc) - usr << "There is another newscaster here." - return - var/obj/machinery/newscaster/N = new(loc) - N.pixel_y -= (loc.y - on_wall.y) * 32 - N.pixel_x -= (loc.x - on_wall.x) * 32 - qdel(src) - - - - -/obj/machinery/newscaster - name = "newscaster" - desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!" - icon = 'icons/obj/terminals.dmi' - icon_state = "newscaster_normal" - var/isbroken = 0 //1 if someone banged it with something heavy - var/ispowered = 1 //starts powered, changes with power_change() - //var/list/datum/feed_channel/channel_list = list() //This list will contain the names of the feed channels. Each name will refer to a data region where the messages of the feed channels are stored. - //OBSOLETE: We're now using a global news network - var/screen = 0 - // 0 = welcome screen - main menu - // 1 = view feed channels - // 2 = create feed channel - // 3 = create feed story - // 4 = feed story submited sucessfully - // 5 = feed channel created successfully - // 6 = ERROR: Cannot create feed story - // 7 = ERROR: Cannot create feed channel - // 8 = print newspaper - // 9 = viewing channel feeds - // 10 = censor feed story - // 11 = censor feed channel - //Holy shit this is outdated, made this when I was still starting newscasters :3 - var/paper_remaining = 0 - var/securityCaster = 0 - // 0 = Caster cannot be used to issue wanted posters - // 1 = the opposite - var/unit_no = 0 //Each newscaster has a unit number - //var/datum/feed_message/wanted //We're gonna use a feed_message to store data of the wanted person because fields are similar - //var/wanted_issue = 0 //OBSOLETE - // 0 = there's no WANTED issued, we don't need a special icon_state - // 1 = Guess what. - var/alert_delay = 500 - var/alert = 0 - // 0 = there hasn't been a news/wanted update in the last alert_delay - // 1 = there has - var/scanned_user = "Unknown" //Will contain the name of the person who currently uses the newscaster - var/msg = ""; //Feed message - var/obj/item/weapon/photo/photo = null - var/channel_name = ""; //the feed channel which will be receiving the feed, or being created - var/c_locked=0; //Will our new channel be locked to public submissions? - var/hitstaken = 0 //Death at 3 hits from an item with force>=15 - var/datum/feed_channel/viewing_channel = null - luminosity = 0 - anchored = 1 - - -/obj/machinery/newscaster/security_unit //Security unit - name = "security newscaster" - securityCaster = 1 - -/obj/machinery/newscaster/New() - allCasters += src - src.paper_remaining = 15 - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - src.unit_no++ - src.update_icon() //for any custom ones on the map... - ..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that - -/obj/machinery/newscaster/Destroy() - allCasters -= src - ..() - -/obj/machinery/newscaster/update_icon() - if(!ispowered || isbroken) - icon_state = "newscaster_off" - if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite. - src.overlays.Cut() - src.overlays += image(src.icon, "crack3") - return - - src.overlays.Cut() //reset overlays - - if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message - icon_state = "newscaster_wanted" - return - - if(alert) //new message alert overlay - src.overlays += "newscaster_alert" - - if(hitstaken > 0) //Cosmetic damage overlay - src.overlays += image(src.icon, "crack[hitstaken]") - - icon_state = "newscaster_normal" - return - -/obj/machinery/newscaster/power_change() - if(isbroken) //Broken shit can't be powered. - return - if( src.powered() ) - src.ispowered = 1 - stat &= ~NOPOWER - src.update_icon() - else - spawn(rand(0, 15)) - src.ispowered = 0 - stat |= NOPOWER - src.update_icon() - - -/obj/machinery/newscaster/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - src.isbroken=1 - if(prob(50)) - qdel(src) - else - src.update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in. - return - else - if(prob(50)) - src.isbroken=1 - src.update_icon() - return - return - -/obj/machinery/newscaster/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ - if(!src.ispowered || src.isbroken) - return - if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) - var/mob/living/human_or_robot_user = user - var/dat - - src.scan_user(human_or_robot_user) //Newscaster scans you - - switch(screen) - if(0) - dat += "Welcome to Newscasting Unit #[src.unit_no].
Interface & News networks Operational." - dat += "
Property of Nanotransen Inc" - if(news_network.wanted_issue) - dat+= "
Read Wanted Issue" - dat+= "

Create Feed Channel" - dat+= "
View Feed Channels" - dat+= "
Submit new Feed story" - dat+= "
Print newspaper" - dat+= "
Re-scan User" - dat+= "

Exit" - if(src.securityCaster) - var/wanted_already = 0 - if(news_network.wanted_issue) - wanted_already = 1 - - dat+="
Feed Security functions:
" - dat+="
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue" - dat+="
Censor Feed Stories" - dat+="
Mark Feed Channel with Nanotrasen D-Notice" - dat+="

The newscaster recognises you as: [src.scanned_user]" - if(1) - dat+= "Station Feed Channels
" - if( isemptylist(news_network.network_channels) ) - dat+="No active channels found..." - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - if(CHANNEL.is_admin_channel) - dat+="[CHANNEL.channel_name]
" - else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - /*for(var/datum/feed_channel/CHANNEL in src.channel_list) - dat+="[CHANNEL.channel_name]:
\[created by: [CHANNEL.author]\]

" - if( isemptylist(CHANNEL.messages) ) - dat+="No feed messages found in channel...

" - else - for(var/datum/feed_message/MESSAGE in CHANNEL.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
"*/ - - dat+="

Refresh" - dat+="
Back" - if(2) - dat+="Creating new Feed Channel..." - dat+="
Channel Name: [src.channel_name]
" - dat+="Channel Author: [src.scanned_user]
" - dat+="Will Accept Public Feeds: [(src.c_locked) ? ("NO") : ("YES")]

" - dat+="
Submit

Cancel
" - if(3) - dat+="Creating new Feed Message..." - dat+="
Receiving Channel: [src.channel_name]
" //MARK - dat+="Message Author: [src.scanned_user]
" - dat+="Message Body: [src.msg]
" - dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]
" - dat+="
Submit

Cancel
" - if(4) - dat+="Feed story successfully submitted to [src.channel_name].

" - dat+="
Return
" - if(5) - dat+="Feed Channel [src.channel_name] created successfully.

" - dat+="
Return
" - if(6) - dat+="ERROR: Could not submit Feed story to Network.

" - if(src.channel_name=="") - dat+="•Invalid receiving channel name.
" - if(src.scanned_user=="Unknown") - dat+="•Channel author unverified.
" - if(src.msg == "" || src.msg == "\[REDACTED\]") - dat+="•Invalid message body.
" - - dat+="
Return
" - if(7) - dat+="ERROR: Could not submit Feed Channel to Network.

" - //var/list/existing_channels = list() //Let's get dem existing channels - OBSOLETE - var/list/existing_authors = list() - for(var/datum/feed_channel/FC in news_network.network_channels) - //existing_channels += FC.channel_name //OBSOLETE - if(FC.author == "\[REDACTED\]") - existing_authors += FC.backup_author - else - existing_authors += FC.author - if(src.scanned_user in existing_authors) - dat+="•There already exists a Feed channel under your name.
" - if(src.channel_name=="" || src.channel_name == "\[REDACTED\]") - dat+="•Invalid channel name.
" - var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == src.channel_name) - check = 1 - break - if(check) - dat+="•Channel name already in use.
" - if(src.scanned_user=="Unknown") - dat+="•Channel author unverified.
" - dat+="
Return
" - if(8) - var/total_num=length(news_network.network_channels) - var/active_num=total_num - var/message_num=0 - for(var/datum/feed_channel/FC in news_network.network_channels) - if(!FC.censored) - message_num += length(FC.messages) //Dont forget, datum/feed_channel's var messages is a list of datum/feed_message - else - active_num-- - dat+="Network currently serves a total of [total_num] Feed channels, [active_num] of which are active, and a total of [message_num] Feed Stories." //TODO: CONTINUE - dat+="

Liquid Paper remaining: [(src.paper_remaining) *100 ] cm^3" - dat+="

Print Paper" - dat+="
Cancel" - if(9) - dat+="[src.viewing_channel.channel_name]: \[created by: [src.viewing_channel.author]\]
" - if(src.viewing_channel.censored) - dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" - dat+="No further feed story additions are allowed while the D-Notice is in effect.

" - else - if( isemptylist(src.viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - var/i = 0 - for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) - i++ - dat+="-[MESSAGE.body]
" - if(MESSAGE.img) - usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png") - dat+="

" - dat+="\[Story by [MESSAGE.author] \] - ([MESSAGE.time_stamp])
" - dat+="

Refresh" - dat+="
Back" - if(10) - dat+="Nanotrasen Feed Censorship Tool
" - dat+="NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.
" - dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.
" - dat+="
Select Feed channel to get Stories from:
" - if(isemptylist(news_network.network_channels)) - dat+="No feed channels found active...
" - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - dat+="
Cancel" - if(11) - dat+="Nanotrasen D-Notice Handler
" - dat+="A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's" - dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed" - dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.
" - if(isemptylist(news_network.network_channels)) - dat+="No feed channels found active...
" - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - - dat+="
Back" - if(12) - dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
" - dat+="[(src.viewing_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
" - - - if( isemptylist(src.viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" - dat+="[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
" - dat+="
Back" - if(13) - dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
" - dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
" - if(src.viewing_channel.censored) - dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" - dat+="No further feed story additions are allowed while the D-Notice is in effect.

" - else - if( isemptylist(src.viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" - - dat+="
Back" - if(14) - dat+="Wanted Issue Handler:" - var/wanted_already = 0 - var/end_param = 1 - if(news_network.wanted_issue) - wanted_already = 1 - end_param = 2 - - if(wanted_already) - dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below.
" - dat+="
" - dat+="Criminal Name: [src.channel_name]
" - dat+="Description: [src.msg]
" - dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]
" - if(wanted_already) - dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author]
" - else - dat+="Wanted Issue will be created under prosecutor: [src.scanned_user]
" - dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]" - if(wanted_already) - dat+="
Take down Issue" - dat+="
Cancel" - if(15) - dat+="Wanted issue for [src.channel_name] is now in Network Circulation.

" - dat+="
Return
" - if(16) - dat+="ERROR: Wanted Issue rejected by Network.

" - if(src.channel_name=="" || src.channel_name == "\[REDACTED\]") - dat+="•Invalid name for person wanted.
" - if(src.scanned_user=="Unknown") - dat+="•Issue author unverified.
" - if(src.msg == "" || src.msg == "\[REDACTED\]") - dat+="•Invalid description.
" - dat+="
Return
" - if(17) - dat+="Wanted Issue successfully deleted from Circulation
" - dat+="
Return
" - if(18) - if(news_network.wanted_issue) - dat+="-- STATIONWIDE WANTED ISSUE --
\[Submitted by: [news_network.wanted_issue.backup_author]\]
" - dat+="Criminal: [news_network.wanted_issue.author]
" - dat+="Description: [news_network.wanted_issue.body]
" - dat+="Photo:: " - if(news_network.wanted_issue.img) - usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png") - dat+="
" - else - dat+="None" - else - dat+="No current wanted issue found.

" - dat+="

Back
" - if(19) - dat+="Wanted issue for [src.channel_name] successfully edited.

" - dat+="
Return
" - if(20) - dat+="Printing successful. Please receive your newspaper from the bottom of the machine.

" - dat+="Return" - if(21) - dat+="Unable to print newspaper. Insufficient paper. Please notify maintenance personnel to refill machine storage.

" - dat+="Return" - else - dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" - - //human_or_robot_user << browse(dat, "window=newscaster_main;size=400x600") - //onclose(human_or_robot_user, "newscaster_main") - - var/datum/browser/popup = new(human_or_robot_user, "newscaster_main", "Newscaster Unit #[src.unit_no]", 400, 600) - popup.set_content(dat) - popup.set_title_image(human_or_robot_user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - -/obj/machinery/newscaster/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) - if(href_list["set_channel_name"]) - src.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "")) - while (findtext(src.channel_name," ") == 1) - src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) - src.updateUsrDialog() - //src.update_icon() - - else if(href_list["set_channel_lock"]) - src.c_locked = !src.c_locked - src.updateUsrDialog() - //src.update_icon() - - else if(href_list["submit_new_channel"]) - var/list/existing_authors = list() - for(var/datum/feed_channel/FC in news_network.network_channels) - //existing_channels += FC.channel_name - if(FC.author == "\[REDACTED\]") - existing_authors += FC.backup_author - else - existing_authors +=FC.author - var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == src.channel_name) - check = 1 - break - if(src.channel_name == "" || src.channel_name == "\[REDACTED\]" || src.scanned_user == "Unknown" || check || (src.scanned_user in existing_authors) ) - src.screen=7 - else - var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") - if(choice=="Confirm") - news_network.CreateFeedChannel(src.channel_name, src.scanned_user, c_locked) - feedback_inc("newscaster_channels",1) - src.screen=5 - src.updateUsrDialog() - //src.update_icon() - - else if(href_list["set_channel_receiving"]) - //var/list/datum/feed_channel/available_channels = list() - var/list/available_channels = list() - for(var/datum/feed_channel/F in news_network.network_channels) - if( (!F.locked || F.author == scanned_user) && !F.censored) - available_channels += F.channel_name - src.channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels - src.updateUsrDialog() - - else if(href_list["set_new_message"]) - src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", "")) - while (findtext(src.msg," ") == 1) - src.msg = copytext(src.msg,2,lentext(src.msg)+1) - src.updateUsrDialog() - - else if(href_list["set_attachment"]) - AttachPhoto(usr) - src.updateUsrDialog() - - else if(href_list["submit_new_message"]) - if(src.msg =="" || src.msg=="\[REDACTED\]" || src.scanned_user == "Unknown" || src.channel_name == "" ) - src.screen=6 - else - news_network.SubmitArticle(msg, scanned_user, channel_name, photo) - feedback_inc("newscaster_stories",1) - src.screen=4 - src.updateUsrDialog() - - else if(href_list["create_channel"]) - src.screen=2 - src.updateUsrDialog() - - else if(href_list["create_feed_story"]) - src.screen=3 - src.updateUsrDialog() - - else if(href_list["menu_paper"]) - src.screen=8 - src.updateUsrDialog() - else if(href_list["print_paper"]) - if(!src.paper_remaining) - src.screen=21 - else - src.print_paper() - src.screen = 20 - src.updateUsrDialog() - - else if(href_list["menu_censor_story"]) - src.screen=10 - src.updateUsrDialog() - - else if(href_list["menu_censor_channel"]) - src.screen=11 - src.updateUsrDialog() - - else if(href_list["menu_wanted"]) - var/already_wanted = 0 - if(news_network.wanted_issue) - already_wanted = 1 - - if(already_wanted) - src.channel_name = news_network.wanted_issue.author - src.msg = news_network.wanted_issue.body - src.screen = 14 - src.updateUsrDialog() - - else if(href_list["set_wanted_name"]) - src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", "")) - while (findtext(src.channel_name," ") == 1) - src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) - src.updateUsrDialog() - - else if(href_list["set_wanted_desc"]) - src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "")) - while (findtext(src.msg," ") == 1) - src.msg = copytext(src.msg,2,lentext(src.msg)+1) - src.updateUsrDialog() - - else if(href_list["submit_wanted"]) - var/input_param = text2num(href_list["submit_wanted"]) - if(src.msg == "" || src.channel_name == "" || src.scanned_user == "Unknown") - src.screen = 16 - else - var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") - if(choice=="Confirm") - if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below - var/datum/feed_message/WANTED = new /datum/feed_message - WANTED.author = src.channel_name - WANTED.body = src.msg - WANTED.backup_author = src.scanned_user //I know, a bit wacky - if(photo) - WANTED.img = photo.img - news_network.wanted_issue = WANTED - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert() - NEWSCASTER.update_icon() - src.screen = 15 - else - if(news_network.wanted_issue.is_admin_message) - alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok") - return - news_network.wanted_issue.author = src.channel_name - news_network.wanted_issue.body = src.msg - news_network.wanted_issue.backup_author = src.scanned_user - if(photo) - news_network.wanted_issue.img = photo.img - src.screen = 19 - - src.updateUsrDialog() - - else if(href_list["cancel_wanted"]) - if(news_network.wanted_issue.is_admin_message) - alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok") - return - var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") - if(choice=="Confirm") - news_network.wanted_issue = null - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.update_icon() - src.screen=17 - src.updateUsrDialog() - - else if(href_list["view_wanted"]) - src.screen=18 - src.updateUsrDialog() - else if(href_list["censor_channel_author"]) - var/datum/feed_channel/FC = locate(href_list["censor_channel_author"]) - if(FC.is_admin_channel) - alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") - return - if(FC.author != "\[REDACTED\]") - FC.backup_author = FC.author - FC.author = "\[REDACTED\]" - else - FC.author = FC.backup_author - src.updateUsrDialog() - - else if(href_list["censor_channel_story_author"]) - var/datum/feed_message/MSG = locate(href_list["censor_channel_story_author"]) - if(MSG.is_admin_message) - alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok") - return - if(MSG.author != "\[REDACTED\]") - MSG.backup_author = MSG.author - MSG.author = "\[REDACTED\]" - else - MSG.author = MSG.backup_author - src.updateUsrDialog() - - else if(href_list["censor_channel_story_body"]) - var/datum/feed_message/MSG = locate(href_list["censor_channel_story_body"]) - if(MSG.is_admin_message) - alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") - return - if(MSG.body != "\[REDACTED\]") - MSG.backup_body = MSG.body - MSG.body = "\[REDACTED\]" - else - MSG.body = MSG.backup_body - src.updateUsrDialog() - - else if(href_list["pick_d_notice"]) - var/datum/feed_channel/FC = locate(href_list["pick_d_notice"]) - src.viewing_channel = FC - src.screen=13 - src.updateUsrDialog() - - else if(href_list["toggle_d_notice"]) - var/datum/feed_channel/FC = locate(href_list["toggle_d_notice"]) - if(FC.is_admin_channel) - alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok") - return - FC.censored = !FC.censored - src.updateUsrDialog() - - else if(href_list["view"]) - src.screen=1 - src.updateUsrDialog() - - else if(href_list["setScreen"]) //Brings us to the main menu and resets all fields~ - src.screen = text2num(href_list["setScreen"]) - if (src.screen == 0) - src.scanned_user = "Unknown"; - msg = ""; - src.c_locked=0; - channel_name=""; - src.viewing_channel = null - src.updateUsrDialog() - - else if(href_list["show_channel"]) - var/datum/feed_channel/FC = locate(href_list["show_channel"]) - src.viewing_channel = FC - src.screen = 9 - src.updateUsrDialog() - - else if(href_list["pick_censor_channel"]) - var/datum/feed_channel/FC = locate(href_list["pick_censor_channel"]) - src.viewing_channel = FC - src.screen = 12 - src.updateUsrDialog() - - else if(href_list["refresh"]) - src.updateUsrDialog() - - -/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob) - -/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages - if(src.screen == 4 || src.screen == 5) - if( istype(I, /obj/item/device/pda) ) - var/obj/item/device/pda/P = I - if(P.id) - src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" - src.screen=2 - else - var/obj/item/weapon/card/id/T = I - src.scanned_user = text("[T.registered_name] ([T.assignment])") - src.screen=2*/ //Obsolete after autorecognition - - if(istype(I, /obj/item/weapon/wrench)) - user << "Now [anchored ? "un" : ""]securing [name]" - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 60)) - new /obj/item/newscaster_frame(loc) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - qdel(src) - return - - if (src.isbroken) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) - for (var/mob/O in hearers(5, src.loc)) - O.show_message("[user.name] further abuses the shattered [src.name].") - else - if(istype(I, /obj/item/weapon) ) - var/obj/item/weapon/W = I - if(W.force <15) - for (var/mob/O in hearers(5, src.loc)) - O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." ) - playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1) - else - src.hitstaken++ - if(src.hitstaken==3) - for (var/mob/O in hearers(5, src.loc)) - O.show_message("[user.name] smashes the [src.name]!" ) - src.isbroken=1 - playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1) - else - for (var/mob/O in hearers(5, src.loc)) - O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" ) - playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1) - else - user << "This does nothing." - src.update_icon() - - -/obj/machinery/newscaster/attack_paw(mob/user as mob) - user << "The newscaster controls are far too complicated for your tiny brain!" - return - -/obj/machinery/newscaster/proc/AttachPhoto(mob/user as mob) - if(photo) - photo.loc = src.loc - user.put_in_inactive_hand(photo) - photo = null - if(istype(user.get_active_hand(), /obj/item/weapon/photo)) - photo = user.get_active_hand() - user.drop_item() - photo.loc = src - if(istype(usr,/mob/living/silicon/ai)) - var/list/nametemp = list() - var/find - var/datum/picture/selection - var/mob/living/silicon/ai/tempAI = user - if(tempAI.aicamera.aipictures.len == 0) - usr << "No images saved" - return - for(var/datum/picture/t in tempAI.aicamera.aipictures) - nametemp += t.fields["name"] - find = input("Select image (numbered in order taken)") in nametemp - var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() - for(var/datum/picture/q in tempAI.aicamera.aipictures) - if(q.fields["name"] == find) - selection = q - break // just in case some AI decides to take 10 thousand pictures in a round - P.icon = selection.fields["icon"] - P.img = selection.fields["img"] - P.desc = selection.fields["desc"] - photo = P - - - - - -//######################################################################################################################## -//###################################### NEWSPAPER! ###################################################################### -//######################################################################################################################## - -/obj/item/weapon/newspaper - name = "newspaper" - desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations." - icon = 'icons/obj/bureaucracy.dmi' - icon_state = "newspaper" - w_class = 2 //Let's make it fit in trashbags! - attack_verb = list("bapped") - var/screen = 0 - var/pages = 0 - var/curr_page = 0 - var/list/datum/feed_channel/news_content = list() - var/datum/feed_message/important_message = null - var/scribble="" - var/scribble_page = null - -/*obj/item/weapon/newspaper/attack_hand(mob/user as mob) - ..() - world << "derp"*/ - -obj/item/weapon/newspaper/attack_self(mob/user as mob) - if(ishuman(user)) - var/mob/living/carbon/human/human_user = user - var/dat - src.pages = 0 - switch(screen) - if(0) //Cover - dat+="
The Griffon
" - dat+="
Nanotrasen-standard newspaper, for use on Nanotrasen© Space Facilities

" - if(isemptylist(src.news_content)) - if(src.important_message) - dat+="Contents:
" - else - dat+="Other than the title, the rest of the newspaper is unprinted..." - else - dat+="Contents:
" - if(scribble_page==curr_page) - dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" - dat+= "
Next Page
Done reading
" - if(1) // X channel pages inbetween. - for(var/datum/feed_channel/NP in src.news_content) - src.pages++ //Let's get it right again. - var/datum/feed_channel/C = src.news_content[src.curr_page] - dat+="[C.channel_name] \[created by: [C.author]\]

" - if(C.censored) - dat+="This channel was deemed dangerous to the general welfare of the station and therefore marked with a D-Notice. Its contents were not transferred to the newspaper at the time of printing." - else - if(isemptylist(C.messages)) - dat+="No Feed stories stem from this channel..." - else - dat+="" - if(scribble_page==curr_page) - dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" - dat+= "

Previous Page
Next Page
" - if(2) //Last page - for(var/datum/feed_channel/NP in src.news_content) - src.pages++ - if(src.important_message!=null) - dat+="
Wanted Issue:


" - dat+="Criminal name: [important_message.author]
" - dat+="Description: [important_message.body]
" - dat+="Photo:: " - if(important_message.img) - user << browse_rsc(important_message.img, "tmp_photow.png") - dat+="
" - else - dat+="None" - else - dat+="Apart from some uninteresting Classified ads, there's nothing on this page..." - if(scribble_page==curr_page) - dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" - dat+= "
Previous Page
" - else - dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" - - dat+="

[src.curr_page+1]
" - human_user << browse(dat, "window=newspaper_main;size=300x400") - onclose(human_user, "newspaper_main") - else - user << "The paper is full of intelligible symbols!" - - -obj/item/weapon/newspaper/Topic(href, href_list) - var/mob/living/U = usr - ..() - if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) )) - U.set_machine(src) - if(href_list["next_page"]) - if(curr_page==src.pages+1) - return //Don't need that at all, but anyway. - if(src.curr_page == src.pages) //We're at the middle, get to the end - src.screen = 2 - else - if(curr_page == 0) //We're at the start, get to the middle - src.screen=1 - src.curr_page++ - playsound(src.loc, "pageturn", 50, 1) - - else if(href_list["prev_page"]) - if(curr_page == 0) - return - if(curr_page == 1) - src.screen = 0 - - else - if(curr_page == src.pages+1) //we're at the end, let's go back to the middle. - src.screen = 1 - src.curr_page-- - playsound(src.loc, "pageturn", 50, 1) - - if (istype(src.loc, /mob)) - src.attack_self(src.loc) - - -obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/pen)) - if(src.scribble_page == src.curr_page) - user << "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?" - else - var/s = strip_html( input(user, "Write something", "Newspaper", "") ) - s = copytext(sanitize(s), 1, MAX_MESSAGE_LEN) - if (!s) - return - if (!in_range(src, usr) && src.loc != usr) - return - src.scribble_page = src.curr_page - src.scribble = s - src.attack_self(user) - return - - -////////////////////////////////////helper procs - - -/obj/machinery/newscaster/proc/scan_user(mob/living/user as mob) - if(istype(user,/mob/living/carbon/human)) //User is a human - var/mob/living/carbon/human/human_user = user - if(human_user.wear_id) //Newscaster scans you - if(istype(human_user.wear_id, /obj/item/device/pda) ) //autorecognition, woo! - var/obj/item/device/pda/P = human_user.wear_id - if(P.id) - src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" - else - src.scanned_user = "Unknown" - else if(istype(human_user.wear_id, /obj/item/weapon/card/id) ) - var/obj/item/weapon/card/id/ID = human_user.wear_id - src.scanned_user ="[ID.registered_name] ([ID.assignment])" - else - src.scanned_user ="Unknown" - else - src.scanned_user ="Unknown" - else - var/mob/living/silicon/ai_user = user - src.scanned_user = "[ai_user.name] ([ai_user.job])" - - -/obj/machinery/newscaster/proc/print_paper() - feedback_inc("newscaster_newspapers_printed",1) - var/obj/item/weapon/newspaper/NEWSPAPER = new /obj/item/weapon/newspaper - for(var/datum/feed_channel/FC in news_network.network_channels) - NEWSPAPER.news_content += FC - if(news_network.wanted_issue) - NEWSPAPER.important_message = news_network.wanted_issue - NEWSPAPER.loc = get_turf(src) - src.paper_remaining-- - return - -//Removed for now so these aren't even checked every tick. Left this here in-case Agouri needs it later. -///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not -// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list. - -/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile. - var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ - if(channel) - for(var/mob/O in hearers(world.view-1, T)) - O.show_message("[src.name] beeps, \"Breaking news from [channel]!\"",2) - src.alert = 1 - src.update_icon() - spawn(300) - src.alert = 0 - src.update_icon() - playsound(src.loc, 'sound/machines/twobeep.ogg', 75, 1) - else - for(var/mob/O in hearers(world.view-1, T)) - O.show_message("[src.name] beeps, \"Attention! Wanted issue distributed!\"",2) - playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1) +//############################################## +//################### NEWSCASTERS BE HERE! #### +//###-Agouri################################### + +/datum/feed_message + var/author ="" + var/body ="" + //var/parent_channel + var/backup_body ="" + var/backup_author ="" + var/is_admin_message = 0 + var/icon/img = null + var/time_stamp = "" + +/datum/feed_channel + var/channel_name="" + var/list/datum/feed_message/messages = list() + //var/message_count = 0 + var/locked=0 + var/author="" + var/backup_author="" + var/censored=0 + var/is_admin_channel=0 + //var/page = null //For newspapers + +/datum/feed_message/proc/clear() + src.author = "" + src.body = "" + src.backup_body = "" + src.backup_author = "" + src.img = null + +/datum/feed_channel/proc/clear() + src.channel_name = "" + src.messages = list() + src.locked = 0 + src.author = "" + src.backup_author = "" + src.censored = 0 + src.is_admin_channel = 0 + +/datum/feed_network + var/list/datum/feed_channel/network_channels = list() + var/datum/feed_message/wanted_issue + +/datum/feed_network/New() + CreateFeedChannel("Central Command", "Centcom Official", 1) + +/datum/feed_network/proc/CreateFeedChannel(var/channel_name, var/author, var/locked, var/adminChannel = 0) + var/datum/feed_channel/newChannel = new /datum/feed_channel + newChannel.channel_name = channel_name + newChannel.author = author + newChannel.locked = locked + newChannel.is_admin_channel = adminChannel + network_channels += newChannel + +/datum/feed_network/proc/SubmitArticle(var/msg, var/author, var/channel_name, var/obj/item/weapon/photo/photo, var/adminMessage = 0) + var/datum/feed_message/newMsg = new /datum/feed_message + newMsg.author = author + newMsg.body = msg + newMsg.time_stamp = "[worldtime2text()]" + newMsg.is_admin_message = adminMessage + if(photo) + newMsg.img = photo.img + for(var/datum/feed_channel/FC in network_channels) + if(FC.channel_name == channel_name) + FC.messages += newMsg //Adding message to the network's appropriate feed_channel + break + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.newsAlert(channel_name) + + +var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list. + +var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence. + + +/obj/item/newscaster_frame + name = "newscaster frame" + desc = "Used to build newscasters, just secure to the wall." + icon_state = "newscaster" + item_state = "syringe_kit" + m_amt = 14000 + g_amt = 8000 + +/obj/item/newscaster_frame/proc/try_build(turf/on_wall) + if (get_dist(on_wall,usr)>1) + return + var/ndir = get_dir(usr,on_wall) + if (!(ndir in cardinal)) + return + var/turf/loc = get_turf(usr) + var/area/A = loc.loc + if (!istype(loc, /turf/simulated/floor)) + usr << "Newscaster cannot be placed on this spot." + return + if (A.requires_power == 0 || A.name == "Space") + usr << "Newscaster cannot be placed in this area." + return + for(var/obj/machinery/newscaster/T in loc) + usr << "There is another newscaster here." + return + var/obj/machinery/newscaster/N = new(loc) + N.pixel_y -= (loc.y - on_wall.y) * 32 + N.pixel_x -= (loc.x - on_wall.x) * 32 + qdel(src) + + + + +/obj/machinery/newscaster + name = "newscaster" + desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!" + icon = 'icons/obj/terminals.dmi' + icon_state = "newscaster_normal" + var/isbroken = 0 //1 if someone banged it with something heavy + var/ispowered = 1 //starts powered, changes with power_change() + //var/list/datum/feed_channel/channel_list = list() //This list will contain the names of the feed channels. Each name will refer to a data region where the messages of the feed channels are stored. + //OBSOLETE: We're now using a global news network + var/screen = 0 + // 0 = welcome screen - main menu + // 1 = view feed channels + // 2 = create feed channel + // 3 = create feed story + // 4 = feed story submited sucessfully + // 5 = feed channel created successfully + // 6 = ERROR: Cannot create feed story + // 7 = ERROR: Cannot create feed channel + // 8 = print newspaper + // 9 = viewing channel feeds + // 10 = censor feed story + // 11 = censor feed channel + //Holy shit this is outdated, made this when I was still starting newscasters :3 + var/paper_remaining = 0 + var/securityCaster = 0 + // 0 = Caster cannot be used to issue wanted posters + // 1 = the opposite + var/unit_no = 0 //Each newscaster has a unit number + //var/datum/feed_message/wanted //We're gonna use a feed_message to store data of the wanted person because fields are similar + //var/wanted_issue = 0 //OBSOLETE + // 0 = there's no WANTED issued, we don't need a special icon_state + // 1 = Guess what. + var/alert_delay = 500 + var/alert = 0 + // 0 = there hasn't been a news/wanted update in the last alert_delay + // 1 = there has + var/scanned_user = "Unknown" //Will contain the name of the person who currently uses the newscaster + var/msg = ""; //Feed message + var/obj/item/weapon/photo/photo = null + var/channel_name = ""; //the feed channel which will be receiving the feed, or being created + var/c_locked=0; //Will our new channel be locked to public submissions? + var/hitstaken = 0 //Death at 3 hits from an item with force>=15 + var/datum/feed_channel/viewing_channel = null + luminosity = 0 + anchored = 1 + + +/obj/machinery/newscaster/security_unit //Security unit + name = "security newscaster" + securityCaster = 1 + +/obj/machinery/newscaster/New() + allCasters += src + src.paper_remaining = 15 + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + src.unit_no++ + src.update_icon() //for any custom ones on the map... + ..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that + +/obj/machinery/newscaster/Destroy() + allCasters -= src + ..() + +/obj/machinery/newscaster/update_icon() + if(!ispowered || isbroken) + icon_state = "newscaster_off" + if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite. + src.overlays.Cut() + src.overlays += image(src.icon, "crack3") + return + + src.overlays.Cut() //reset overlays + + if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message + icon_state = "newscaster_wanted" + return + + if(alert) //new message alert overlay + src.overlays += "newscaster_alert" + + if(hitstaken > 0) //Cosmetic damage overlay + src.overlays += image(src.icon, "crack[hitstaken]") + + icon_state = "newscaster_normal" + return + +/obj/machinery/newscaster/power_change() + if(isbroken) //Broken shit can't be powered. + return + if( src.powered() ) + src.ispowered = 1 + stat &= ~NOPOWER + src.update_icon() + else + spawn(rand(0, 15)) + src.ispowered = 0 + stat |= NOPOWER + src.update_icon() + + +/obj/machinery/newscaster/ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + src.isbroken=1 + if(prob(50)) + qdel(src) + else + src.update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in. + return + else + if(prob(50)) + src.isbroken=1 + src.update_icon() + return + return + +/obj/machinery/newscaster/attack_ai(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ + if(!src.ispowered || src.isbroken) + return + if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) + var/mob/living/human_or_robot_user = user + var/dat + + src.scan_user(human_or_robot_user) //Newscaster scans you + + switch(screen) + if(0) + dat += "Welcome to Newscasting Unit #[src.unit_no].
Interface & News networks Operational." + dat += "
Property of Nanotransen Inc" + if(news_network.wanted_issue) + dat+= "
Read Wanted Issue" + dat+= "

Create Feed Channel" + dat+= "
View Feed Channels" + dat+= "
Submit new Feed story" + dat+= "
Print newspaper" + dat+= "
Re-scan User" + dat+= "

Exit" + if(src.securityCaster) + var/wanted_already = 0 + if(news_network.wanted_issue) + wanted_already = 1 + + dat+="
Feed Security functions:
" + dat+="
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue" + dat+="
Censor Feed Stories" + dat+="
Mark Feed Channel with Nanotrasen D-Notice" + dat+="

The newscaster recognises you as: [src.scanned_user]" + if(1) + dat+= "Station Feed Channels
" + if( isemptylist(news_network.network_channels) ) + dat+="No active channels found..." + else + for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + if(CHANNEL.is_admin_channel) + dat+="[CHANNEL.channel_name]
" + else + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + /*for(var/datum/feed_channel/CHANNEL in src.channel_list) + dat+="[CHANNEL.channel_name]:
\[created by: [CHANNEL.author]\]

" + if( isemptylist(CHANNEL.messages) ) + dat+="No feed messages found in channel...

" + else + for(var/datum/feed_message/MESSAGE in CHANNEL.messages) + dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
"*/ + + dat+="

Refresh" + dat+="
Back" + if(2) + dat+="Creating new Feed Channel..." + dat+="
Channel Name: [src.channel_name]
" + dat+="Channel Author: [src.scanned_user]
" + dat+="Will Accept Public Feeds: [(src.c_locked) ? ("NO") : ("YES")]

" + dat+="
Submit

Cancel
" + if(3) + dat+="Creating new Feed Message..." + dat+="
Receiving Channel: [src.channel_name]
" //MARK + dat+="Message Author: [src.scanned_user]
" + dat+="Message Body: [src.msg]
" + dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]
" + dat+="
Submit

Cancel
" + if(4) + dat+="Feed story successfully submitted to [src.channel_name].

" + dat+="
Return
" + if(5) + dat+="Feed Channel [src.channel_name] created successfully.

" + dat+="
Return
" + if(6) + dat+="ERROR: Could not submit Feed story to Network.

" + if(src.channel_name=="") + dat+="•Invalid receiving channel name.
" + if(src.scanned_user=="Unknown") + dat+="•Channel author unverified.
" + if(src.msg == "" || src.msg == "\[REDACTED\]") + dat+="•Invalid message body.
" + + dat+="
Return
" + if(7) + dat+="ERROR: Could not submit Feed Channel to Network.

" + //var/list/existing_channels = list() //Let's get dem existing channels - OBSOLETE + var/list/existing_authors = list() + for(var/datum/feed_channel/FC in news_network.network_channels) + //existing_channels += FC.channel_name //OBSOLETE + if(FC.author == "\[REDACTED\]") + existing_authors += FC.backup_author + else + existing_authors += FC.author + if(src.scanned_user in existing_authors) + dat+="•There already exists a Feed channel under your name.
" + if(src.channel_name=="" || src.channel_name == "\[REDACTED\]") + dat+="•Invalid channel name.
" + var/check = 0 + for(var/datum/feed_channel/FC in news_network.network_channels) + if(FC.channel_name == src.channel_name) + check = 1 + break + if(check) + dat+="•Channel name already in use.
" + if(src.scanned_user=="Unknown") + dat+="•Channel author unverified.
" + dat+="
Return
" + if(8) + var/total_num=length(news_network.network_channels) + var/active_num=total_num + var/message_num=0 + for(var/datum/feed_channel/FC in news_network.network_channels) + if(!FC.censored) + message_num += length(FC.messages) //Dont forget, datum/feed_channel's var messages is a list of datum/feed_message + else + active_num-- + dat+="Network currently serves a total of [total_num] Feed channels, [active_num] of which are active, and a total of [message_num] Feed Stories." //TODO: CONTINUE + dat+="

Liquid Paper remaining: [(src.paper_remaining) *100 ] cm^3" + dat+="

Print Paper" + dat+="
Cancel" + if(9) + dat+="[src.viewing_channel.channel_name]: \[created by: [src.viewing_channel.author]\]
" + if(src.viewing_channel.censored) + dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" + dat+="No further feed story additions are allowed while the D-Notice is in effect.


" + else + if( isemptylist(src.viewing_channel.messages) ) + dat+="No feed messages found in channel...
" + else + var/i = 0 + for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) + i++ + dat+="-[MESSAGE.body]
" + if(MESSAGE.img) + usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png") + dat+="

" + dat+="\[Story by [MESSAGE.author] \] - ([MESSAGE.time_stamp])
" + dat+="

Refresh" + dat+="
Back" + if(10) + dat+="Nanotrasen Feed Censorship Tool
" + dat+="NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.
" + dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.
" + dat+="
Select Feed channel to get Stories from:
" + if(isemptylist(news_network.network_channels)) + dat+="No feed channels found active...
" + else + for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="
Cancel" + if(11) + dat+="Nanotrasen D-Notice Handler
" + dat+="A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's" + dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed" + dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.
" + if(isemptylist(news_network.network_channels)) + dat+="No feed channels found active...
" + else + for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + + dat+="
Back" + if(12) + dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
" + dat+="[(src.viewing_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
" + + + if( isemptylist(src.viewing_channel.messages) ) + dat+="No feed messages found in channel...
" + else + for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) + dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" + dat+="[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
" + dat+="
Back" + if(13) + dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
" + dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
" + if(src.viewing_channel.censored) + dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" + dat+="No further feed story additions are allowed while the D-Notice is in effect.

" + else + if( isemptylist(src.viewing_channel.messages) ) + dat+="No feed messages found in channel...
" + else + for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) + dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" + + dat+="
Back" + if(14) + dat+="Wanted Issue Handler:" + var/wanted_already = 0 + var/end_param = 1 + if(news_network.wanted_issue) + wanted_already = 1 + end_param = 2 + + if(wanted_already) + dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below.
" + dat+="
" + dat+="Criminal Name: [src.channel_name]
" + dat+="Description: [src.msg]
" + dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]
" + if(wanted_already) + dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author]
" + else + dat+="Wanted Issue will be created under prosecutor: [src.scanned_user]
" + dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]" + if(wanted_already) + dat+="
Take down Issue" + dat+="
Cancel" + if(15) + dat+="Wanted issue for [src.channel_name] is now in Network Circulation.

" + dat+="
Return
" + if(16) + dat+="ERROR: Wanted Issue rejected by Network.

" + if(src.channel_name=="" || src.channel_name == "\[REDACTED\]") + dat+="•Invalid name for person wanted.
" + if(src.scanned_user=="Unknown") + dat+="•Issue author unverified.
" + if(src.msg == "" || src.msg == "\[REDACTED\]") + dat+="•Invalid description.
" + dat+="
Return
" + if(17) + dat+="Wanted Issue successfully deleted from Circulation
" + dat+="
Return
" + if(18) + if(news_network.wanted_issue) + dat+="-- STATIONWIDE WANTED ISSUE --
\[Submitted by: [news_network.wanted_issue.backup_author]\]
" + dat+="Criminal: [news_network.wanted_issue.author]
" + dat+="Description: [news_network.wanted_issue.body]
" + dat+="Photo:: " + if(news_network.wanted_issue.img) + usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png") + dat+="
" + else + dat+="None" + else + dat+="No current wanted issue found.

" + dat+="

Back
" + if(19) + dat+="Wanted issue for [src.channel_name] successfully edited.

" + dat+="
Return
" + if(20) + dat+="Printing successful. Please receive your newspaper from the bottom of the machine.

" + dat+="Return" + if(21) + dat+="Unable to print newspaper. Insufficient paper. Please notify maintenance personnel to refill machine storage.

" + dat+="Return" + else + dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" + + //human_or_robot_user << browse(dat, "window=newscaster_main;size=400x600") + //onclose(human_or_robot_user, "newscaster_main") + + var/datum/browser/popup = new(human_or_robot_user, "newscaster_main", "Newscaster Unit #[src.unit_no]", 400, 600) + popup.set_content(dat) + popup.set_title_image(human_or_robot_user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + +/obj/machinery/newscaster/Topic(href, href_list) + if(..()) + return + if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + usr.set_machine(src) + if(href_list["set_channel_name"]) + src.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "")) + while (findtext(src.channel_name," ") == 1) + src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) + src.updateUsrDialog() + //src.update_icon() + + else if(href_list["set_channel_lock"]) + src.c_locked = !src.c_locked + src.updateUsrDialog() + //src.update_icon() + + else if(href_list["submit_new_channel"]) + var/list/existing_authors = list() + for(var/datum/feed_channel/FC in news_network.network_channels) + //existing_channels += FC.channel_name + if(FC.author == "\[REDACTED\]") + existing_authors += FC.backup_author + else + existing_authors +=FC.author + var/check = 0 + for(var/datum/feed_channel/FC in news_network.network_channels) + if(FC.channel_name == src.channel_name) + check = 1 + break + if(src.channel_name == "" || src.channel_name == "\[REDACTED\]" || src.scanned_user == "Unknown" || check || (src.scanned_user in existing_authors) ) + src.screen=7 + else + var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") + if(choice=="Confirm") + news_network.CreateFeedChannel(src.channel_name, src.scanned_user, c_locked) + feedback_inc("newscaster_channels",1) + src.screen=5 + src.updateUsrDialog() + //src.update_icon() + + else if(href_list["set_channel_receiving"]) + //var/list/datum/feed_channel/available_channels = list() + var/list/available_channels = list() + for(var/datum/feed_channel/F in news_network.network_channels) + if( (!F.locked || F.author == scanned_user) && !F.censored) + available_channels += F.channel_name + src.channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels + src.updateUsrDialog() + + else if(href_list["set_new_message"]) + src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", "")) + while (findtext(src.msg," ") == 1) + src.msg = copytext(src.msg,2,lentext(src.msg)+1) + src.updateUsrDialog() + + else if(href_list["set_attachment"]) + AttachPhoto(usr) + src.updateUsrDialog() + + else if(href_list["submit_new_message"]) + if(src.msg =="" || src.msg=="\[REDACTED\]" || src.scanned_user == "Unknown" || src.channel_name == "" ) + src.screen=6 + else + news_network.SubmitArticle(msg, scanned_user, channel_name, photo) + feedback_inc("newscaster_stories",1) + src.screen=4 + src.updateUsrDialog() + + else if(href_list["create_channel"]) + src.screen=2 + src.updateUsrDialog() + + else if(href_list["create_feed_story"]) + src.screen=3 + src.updateUsrDialog() + + else if(href_list["menu_paper"]) + src.screen=8 + src.updateUsrDialog() + else if(href_list["print_paper"]) + if(!src.paper_remaining) + src.screen=21 + else + src.print_paper() + src.screen = 20 + src.updateUsrDialog() + + else if(href_list["menu_censor_story"]) + src.screen=10 + src.updateUsrDialog() + + else if(href_list["menu_censor_channel"]) + src.screen=11 + src.updateUsrDialog() + + else if(href_list["menu_wanted"]) + var/already_wanted = 0 + if(news_network.wanted_issue) + already_wanted = 1 + + if(already_wanted) + src.channel_name = news_network.wanted_issue.author + src.msg = news_network.wanted_issue.body + src.screen = 14 + src.updateUsrDialog() + + else if(href_list["set_wanted_name"]) + src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", "")) + while (findtext(src.channel_name," ") == 1) + src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) + src.updateUsrDialog() + + else if(href_list["set_wanted_desc"]) + src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "")) + while (findtext(src.msg," ") == 1) + src.msg = copytext(src.msg,2,lentext(src.msg)+1) + src.updateUsrDialog() + + else if(href_list["submit_wanted"]) + var/input_param = text2num(href_list["submit_wanted"]) + if(src.msg == "" || src.channel_name == "" || src.scanned_user == "Unknown") + src.screen = 16 + else + var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") + if(choice=="Confirm") + if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below + var/datum/feed_message/WANTED = new /datum/feed_message + WANTED.author = src.channel_name + WANTED.body = src.msg + WANTED.backup_author = src.scanned_user //I know, a bit wacky + if(photo) + WANTED.img = photo.img + news_network.wanted_issue = WANTED + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.newsAlert() + NEWSCASTER.update_icon() + src.screen = 15 + else + if(news_network.wanted_issue.is_admin_message) + alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok") + return + news_network.wanted_issue.author = src.channel_name + news_network.wanted_issue.body = src.msg + news_network.wanted_issue.backup_author = src.scanned_user + if(photo) + news_network.wanted_issue.img = photo.img + src.screen = 19 + + src.updateUsrDialog() + + else if(href_list["cancel_wanted"]) + if(news_network.wanted_issue.is_admin_message) + alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok") + return + var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") + if(choice=="Confirm") + news_network.wanted_issue = null + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.update_icon() + src.screen=17 + src.updateUsrDialog() + + else if(href_list["view_wanted"]) + src.screen=18 + src.updateUsrDialog() + else if(href_list["censor_channel_author"]) + var/datum/feed_channel/FC = locate(href_list["censor_channel_author"]) + if(FC.is_admin_channel) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") + return + if(FC.author != "\[REDACTED\]") + FC.backup_author = FC.author + FC.author = "\[REDACTED\]" + else + FC.author = FC.backup_author + src.updateUsrDialog() + + else if(href_list["censor_channel_story_author"]) + var/datum/feed_message/MSG = locate(href_list["censor_channel_story_author"]) + if(MSG.is_admin_message) + alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok") + return + if(MSG.author != "\[REDACTED\]") + MSG.backup_author = MSG.author + MSG.author = "\[REDACTED\]" + else + MSG.author = MSG.backup_author + src.updateUsrDialog() + + else if(href_list["censor_channel_story_body"]) + var/datum/feed_message/MSG = locate(href_list["censor_channel_story_body"]) + if(MSG.is_admin_message) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") + return + if(MSG.body != "\[REDACTED\]") + MSG.backup_body = MSG.body + MSG.body = "\[REDACTED\]" + else + MSG.body = MSG.backup_body + src.updateUsrDialog() + + else if(href_list["pick_d_notice"]) + var/datum/feed_channel/FC = locate(href_list["pick_d_notice"]) + src.viewing_channel = FC + src.screen=13 + src.updateUsrDialog() + + else if(href_list["toggle_d_notice"]) + var/datum/feed_channel/FC = locate(href_list["toggle_d_notice"]) + if(FC.is_admin_channel) + alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok") + return + FC.censored = !FC.censored + src.updateUsrDialog() + + else if(href_list["view"]) + src.screen=1 + src.updateUsrDialog() + + else if(href_list["setScreen"]) //Brings us to the main menu and resets all fields~ + src.screen = text2num(href_list["setScreen"]) + if (src.screen == 0) + src.scanned_user = "Unknown"; + msg = ""; + src.c_locked=0; + channel_name=""; + src.viewing_channel = null + src.updateUsrDialog() + + else if(href_list["show_channel"]) + var/datum/feed_channel/FC = locate(href_list["show_channel"]) + src.viewing_channel = FC + src.screen = 9 + src.updateUsrDialog() + + else if(href_list["pick_censor_channel"]) + var/datum/feed_channel/FC = locate(href_list["pick_censor_channel"]) + src.viewing_channel = FC + src.screen = 12 + src.updateUsrDialog() + + else if(href_list["refresh"]) + src.updateUsrDialog() + + +/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob) + +/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages + if(src.screen == 4 || src.screen == 5) + if( istype(I, /obj/item/device/pda) ) + var/obj/item/device/pda/P = I + if(P.id) + src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" + src.screen=2 + else + var/obj/item/weapon/card/id/T = I + src.scanned_user = text("[T.registered_name] ([T.assignment])") + src.screen=2*/ //Obsolete after autorecognition + + if(istype(I, /obj/item/weapon/wrench)) + user << "Now [anchored ? "un" : ""]securing [name]" + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + if(do_after(user, 60)) + new /obj/item/newscaster_frame(loc) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + qdel(src) + return + + if (src.isbroken) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) + for (var/mob/O in hearers(5, src.loc)) + O.show_message("[user.name] further abuses the shattered [src.name].") + else + if(istype(I, /obj/item/weapon) ) + var/obj/item/weapon/W = I + if(W.force <15) + for (var/mob/O in hearers(5, src.loc)) + O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." ) + playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1) + else + src.hitstaken++ + if(src.hitstaken==3) + for (var/mob/O in hearers(5, src.loc)) + O.show_message("[user.name] smashes the [src.name]!" ) + src.isbroken=1 + playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1) + else + for (var/mob/O in hearers(5, src.loc)) + O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" ) + playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1) + else + user << "This does nothing." + src.update_icon() + + +/obj/machinery/newscaster/attack_paw(mob/user as mob) + user << "The newscaster controls are far too complicated for your tiny brain!" + return + +/obj/machinery/newscaster/proc/AttachPhoto(mob/user as mob) + if(photo) + photo.loc = src.loc + user.put_in_inactive_hand(photo) + photo = null + if(istype(user.get_active_hand(), /obj/item/weapon/photo)) + photo = user.get_active_hand() + user.drop_item() + photo.loc = src + if(istype(usr,/mob/living/silicon/ai)) + var/list/nametemp = list() + var/find + var/datum/picture/selection + var/mob/living/silicon/ai/tempAI = user + if(tempAI.aicamera.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in tempAI.aicamera.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() + for(var/datum/picture/q in tempAI.aicamera.aipictures) + if(q.fields["name"] == find) + selection = q + break // just in case some AI decides to take 10 thousand pictures in a round + P.icon = selection.fields["icon"] + P.img = selection.fields["img"] + P.desc = selection.fields["desc"] + photo = P + + + + + +//######################################################################################################################## +//###################################### NEWSPAPER! ###################################################################### +//######################################################################################################################## + +/obj/item/weapon/newspaper + name = "newspaper" + desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations." + icon = 'icons/obj/bureaucracy.dmi' + icon_state = "newspaper" + w_class = 2 //Let's make it fit in trashbags! + attack_verb = list("bapped") + var/screen = 0 + var/pages = 0 + var/curr_page = 0 + var/list/datum/feed_channel/news_content = list() + var/datum/feed_message/important_message = null + var/scribble="" + var/scribble_page = null + +/*obj/item/weapon/newspaper/attack_hand(mob/user as mob) + ..() + world << "derp"*/ + +obj/item/weapon/newspaper/attack_self(mob/user as mob) + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + var/dat + src.pages = 0 + switch(screen) + if(0) //Cover + dat+="
The Griffon
" + dat+="
Nanotrasen-standard newspaper, for use on Nanotrasen© Space Facilities

" + if(isemptylist(src.news_content)) + if(src.important_message) + dat+="Contents:
" + else + dat+="Other than the title, the rest of the newspaper is unprinted..." + else + dat+="Contents:
" + if(scribble_page==curr_page) + dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" + dat+= "
Next Page
Done reading
" + if(1) // X channel pages inbetween. + for(var/datum/feed_channel/NP in src.news_content) + src.pages++ //Let's get it right again. + var/datum/feed_channel/C = src.news_content[src.curr_page] + dat+="[C.channel_name] \[created by: [C.author]\]

" + if(C.censored) + dat+="This channel was deemed dangerous to the general welfare of the station and therefore marked with a D-Notice. Its contents were not transferred to the newspaper at the time of printing." + else + if(isemptylist(C.messages)) + dat+="No Feed stories stem from this channel..." + else + dat+="" + if(scribble_page==curr_page) + dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" + dat+= "

Previous Page
Next Page
" + if(2) //Last page + for(var/datum/feed_channel/NP in src.news_content) + src.pages++ + if(src.important_message!=null) + dat+="
Wanted Issue:


" + dat+="Criminal name: [important_message.author]
" + dat+="Description: [important_message.body]
" + dat+="Photo:: " + if(important_message.img) + user << browse_rsc(important_message.img, "tmp_photow.png") + dat+="
" + else + dat+="None" + else + dat+="Apart from some uninteresting Classified ads, there's nothing on this page..." + if(scribble_page==curr_page) + dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\"" + dat+= "
Previous Page
" + else + dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" + + dat+="

[src.curr_page+1]
" + human_user << browse(dat, "window=newspaper_main;size=300x400") + onclose(human_user, "newspaper_main") + else + user << "The paper is full of intelligible symbols!" + + +obj/item/weapon/newspaper/Topic(href, href_list) + var/mob/living/U = usr + ..() + if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) )) + U.set_machine(src) + if(href_list["next_page"]) + if(curr_page==src.pages+1) + return //Don't need that at all, but anyway. + if(src.curr_page == src.pages) //We're at the middle, get to the end + src.screen = 2 + else + if(curr_page == 0) //We're at the start, get to the middle + src.screen=1 + src.curr_page++ + playsound(src.loc, "pageturn", 50, 1) + + else if(href_list["prev_page"]) + if(curr_page == 0) + return + if(curr_page == 1) + src.screen = 0 + + else + if(curr_page == src.pages+1) //we're at the end, let's go back to the middle. + src.screen = 1 + src.curr_page-- + playsound(src.loc, "pageturn", 50, 1) + + if (istype(src.loc, /mob)) + src.attack_self(src.loc) + + +obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/pen)) + if(src.scribble_page == src.curr_page) + user << "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?" + else + var/s = strip_html( input(user, "Write something", "Newspaper", "") ) + s = copytext(sanitize(s), 1, MAX_MESSAGE_LEN) + if (!s) + return + if (!in_range(src, usr) && src.loc != usr) + return + src.scribble_page = src.curr_page + src.scribble = s + src.attack_self(user) + return + + +////////////////////////////////////helper procs + + +/obj/machinery/newscaster/proc/scan_user(mob/living/user as mob) + if(istype(user,/mob/living/carbon/human)) //User is a human + var/mob/living/carbon/human/human_user = user + if(human_user.wear_id) //Newscaster scans you + if(istype(human_user.wear_id, /obj/item/device/pda) ) //autorecognition, woo! + var/obj/item/device/pda/P = human_user.wear_id + if(P.id) + src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" + else + src.scanned_user = "Unknown" + else if(istype(human_user.wear_id, /obj/item/weapon/card/id) ) + var/obj/item/weapon/card/id/ID = human_user.wear_id + src.scanned_user ="[ID.registered_name] ([ID.assignment])" + else + src.scanned_user ="Unknown" + else + src.scanned_user ="Unknown" + else + var/mob/living/silicon/ai_user = user + src.scanned_user = "[ai_user.name] ([ai_user.job])" + + +/obj/machinery/newscaster/proc/print_paper() + feedback_inc("newscaster_newspapers_printed",1) + var/obj/item/weapon/newspaper/NEWSPAPER = new /obj/item/weapon/newspaper + for(var/datum/feed_channel/FC in news_network.network_channels) + NEWSPAPER.news_content += FC + if(news_network.wanted_issue) + NEWSPAPER.important_message = news_network.wanted_issue + NEWSPAPER.loc = get_turf(src) + src.paper_remaining-- + return + +//Removed for now so these aren't even checked every tick. Left this here in-case Agouri needs it later. +///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not +// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list. + +/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile. + var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ + if(channel) + for(var/mob/O in hearers(world.view-1, T)) + O.show_message("[src.name] beeps, \"Breaking news from [channel]!\"",2) + src.alert = 1 + src.update_icon() + spawn(300) + src.alert = 0 + src.update_icon() + playsound(src.loc, 'sound/machines/twobeep.ogg', 75, 1) + else + for(var/mob/O in hearers(world.view-1, T)) + O.show_message("[src.name] beeps, \"Attention! Wanted issue distributed!\"",2) + playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1) return \ No newline at end of file diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm index 0505105dc51..8ab48a31a60 100644 --- a/code/game/machinery/robot_fabricator.dm +++ b/code/game/machinery/robot_fabricator.dm @@ -90,37 +90,37 @@ Please wait until completion...
if (1) build_type = "/obj/item/robot_parts/l_arm" build_time = 200 - build_cost = 25000 + build_cost = 10000 if (2) build_type = "/obj/item/robot_parts/r_arm" build_time = 200 - build_cost = 25000 + build_cost = 10000 if (3) build_type = "/obj/item/robot_parts/l_leg" build_time = 200 - build_cost = 25000 + build_cost = 10000 if (4) build_type = "/obj/item/robot_parts/r_leg" build_time = 200 - build_cost = 25000 + build_cost = 10000 if (5) build_type = "/obj/item/robot_parts/chest" build_time = 350 - build_cost = 50000 + build_cost = 40000 if (6) build_type = "/obj/item/robot_parts/head" build_time = 350 - build_cost = 50000 + build_cost = 5000 if (7) build_type = "/obj/item/robot_parts/robot_suit" build_time = 600 - build_cost = 75000 + build_cost = 15000 var/building = text2path(build_type) if (!isnull(building)) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index fbebfee58a5..d7c7771f4cc 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -695,10 +695,10 @@ return 0 var/result = 0 var/obj/item/stack/sheet/res = new type(src) - var/total_amount = round(resources[mat_string]/res.perunit) - res.amount = min(total_amount,amount) + var/total_amount = round(resources[mat_string]/MINERAL_MATERIAL_AMOUNT) + res.amount = min(total_amount,res.max_amount) if(res.amount>0) - resources[mat_string] -= res.amount*res.perunit + resources[mat_string] -= res.amount*MINERAL_MATERIAL_AMOUNT res.Move(src.loc) result = res.amount else @@ -713,34 +713,48 @@ if(exchange_parts(user, W)) return - default_deconstruction_crowbar(W) - - if (panel_open) + if(panel_open) if(istype(W, /obj/item/weapon/crowbar)) - if(src.resources["metal"] >= 3750) + while(src.resources["metal"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc) - G.amount = round(src.resources["metal"] / G.perunit) - if(src.resources["glass"] >= 3750) + var/sheet_conversion = round(src.resources["metal"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["metal"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["glass"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc) - G.amount = round(src.resources["glass"] / G.perunit) - if(src.resources["plasma"] >= 2000) + var/sheet_conversion = round(src.resources["glass"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["glass"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["plasma"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc) - G.amount = round(src.resources["plasma"] / G.perunit) - if(src.resources["silver"] >= 2000) + var/sheet_conversion = round(src.resources["plasma"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["plasma"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["silver"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc) - G.amount = round(src.resources["silver"] / G.perunit) - if(src.resources["gold"] >= 2000) + var/sheet_conversion = round(src.resources["silver"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["silver"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["gold"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc) - G.amount = round(src.resources["gold"] / G.perunit) - if(src.resources["uranium"] >= 2000) + var/sheet_conversion = round(src.resources["gold"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["gold"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["uranium"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc) - G.amount = round(src.resources["uranium"] / G.perunit) - if(src.resources["diamond"] >= 2000) + var/sheet_conversion = round(src.resources["uranium"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["uranium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["diamond"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc) - G.amount = round(src.resources["diamond"] / G.perunit) - if(src.resources["bananium"] >= 2000) + var/sheet_conversion = round(src.resources["diamond"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["diamond"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) + while(src.resources["bananium"] >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc) - G.amount = round(src.resources["bananium"] / G.perunit) + var/sheet_conversion = round(src.resources["bananium"] / MINERAL_MATERIAL_AMOUNT) + G.amount = min(sheet_conversion, G.max_amount) + src.resources["bananium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT) default_deconstruction_crowbar(W) return 1 else @@ -776,12 +790,11 @@ return var/obj/item/stack/sheet/stack = W var/sname = "[stack.name]" - var/amnt = stack.perunit if(src.resources[material] < res_max_amount) var/count = 0 src.overlays += "fab-load-[material]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey while(src.resources[material] < res_max_amount && stack && stack.amount > 0) - src.resources[material] += amnt + src.resources[material] += MINERAL_MATERIAL_AMOUNT stack.use(1) count++ sleep(10) diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index cd93bdcbf85..0df7703bcc5 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -42,7 +42,7 @@ icon_state = "ripley_harness" origin_tech = "programming=2;materials=2;biotech=2;engineering=2" construction_time = 200 - construction_cost = list("metal"=40000,"glass"=15000) + construction_cost = list("metal"=20000,"glass"=7500) /obj/item/mecha_parts/part/ripley_left_arm name = "\improper Ripley left arm" @@ -50,7 +50,7 @@ icon_state = "ripley_l_arm" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 150 - construction_cost = list("metal"=25000) + construction_cost = list("metal"=15000) /obj/item/mecha_parts/part/ripley_right_arm name = "\improper Ripley right arm" @@ -58,7 +58,7 @@ icon_state = "ripley_r_arm" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 150 - construction_cost = list("metal"=25000) + construction_cost = list("metal"=15000) /obj/item/mecha_parts/part/ripley_left_leg name = "\improper Ripley left leg" @@ -66,7 +66,7 @@ icon_state = "ripley_l_leg" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 150 - construction_cost = list("metal"=30000) + construction_cost = list("metal"=15000) /obj/item/mecha_parts/part/ripley_right_leg name = "\improper Ripley right leg" @@ -74,14 +74,12 @@ icon_state = "ripley_r_leg" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 150 - construction_cost = list("metal"=30000) + construction_cost = list("metal"=15000) ///////// Gygax /obj/item/mecha_parts/chassis/gygax name = "\improper Gygax chassis" - construction_cost = list("metal"=25000) - New() ..() construct = new /datum/construction/mecha/gygax_chassis(src) @@ -92,7 +90,7 @@ icon_state = "gygax_harness" origin_tech = "programming=2;materials=2;biotech=3;engineering=3" construction_time = 300 - construction_cost = list("metal"=50000,"glass"=20000) + construction_cost = list("metal"=20000,"glass"=10000,"diamond"=2000) /obj/item/mecha_parts/part/gygax_head name = "\improper Gygax head" @@ -100,7 +98,7 @@ icon_state = "gygax_head" origin_tech = "programming=2;materials=2;magnets=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=20000,"glass"=10000) + construction_cost = list("metal"=10000,"glass"=5000, "diamond"=2000) /obj/item/mecha_parts/part/gygax_left_arm name = "\improper Gygax left arm" @@ -108,7 +106,7 @@ icon_state = "gygax_l_arm" origin_tech = "programming=2;materials=2;engineering=3" construction_time = 200 - construction_cost = list("metal"=30000) + construction_cost = list("metal"=15000, "diamond"=1000) /obj/item/mecha_parts/part/gygax_right_arm name = "\improper Gygax right arm" @@ -116,7 +114,7 @@ icon_state = "gygax_r_arm" origin_tech = "programming=2;materials=2;engineering=3" construction_time = 200 - construction_cost = list("metal"=30000) + construction_cost = list("metal"=15000, "diamond"=1000) /obj/item/mecha_parts/part/gygax_left_leg name = "\improper Gygax left leg" @@ -124,7 +122,7 @@ icon_state = "gygax_l_leg" origin_tech = "programming=2;materials=2;engineering=3" construction_time = 200 - construction_cost = list("metal"=35000) + construction_cost = list("metal"=15000, "diamond"=2000) /obj/item/mecha_parts/part/gygax_right_leg name = "\improper Gygax right leg" @@ -132,7 +130,7 @@ icon_state = "gygax_r_leg" origin_tech = "programming=2;materials=2;engineering=3" construction_time = 200 - construction_cost = list("metal"=35000) + construction_cost = list("metal"=15000, "diamond"=2000) /obj/item/mecha_parts/part/gygax_armour gender = PLURAL @@ -141,7 +139,7 @@ icon_state = "gygax_armour" origin_tech = "materials=6;combat=4;engineering=5" construction_time = 600 - construction_cost = list("metal"=50000,"diamond"=10000) + construction_cost = list("metal"=25000,"diamond"=10000) //////////// Durand @@ -160,7 +158,7 @@ icon_state = "durand_harness" origin_tech = "programming=2;materials=3;biotech=3;engineering=3" construction_time = 300 - construction_cost = list("metal"=55000,"glass"=20000,"silver"=10000) + construction_cost = list("metal"=25000,"glass"=10000,"silver"=10000) /obj/item/mecha_parts/part/durand_head name = "\improper Durand head" @@ -168,7 +166,7 @@ icon_state = "durand_head" origin_tech = "programming=2;materials=3;magnets=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=25000,"glass"=10000,"silver"=3000) + construction_cost = list("metal"=10000,"glass"=15000,"silver"=2000) /obj/item/mecha_parts/part/durand_left_arm name = "\improper Durand left arm" @@ -176,7 +174,7 @@ icon_state = "durand_l_arm" origin_tech = "programming=2;materials=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=35000,"silver"=3000) + construction_cost = list("metal"=10000,"silver"=4000) /obj/item/mecha_parts/part/durand_right_arm name = "\improper Durand right arm" @@ -184,7 +182,7 @@ icon_state = "durand_r_arm" origin_tech = "programming=2;materials=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=35000,"silver"=3000) + construction_cost = list("metal"=10000,"silver"=4000) /obj/item/mecha_parts/part/durand_left_leg name = "\improper Durand left leg" @@ -192,7 +190,7 @@ icon_state = "durand_l_leg" origin_tech = "programming=2;materials=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=40000,"silver"=3000) + construction_cost = list("metal"=15000,"silver"=4000) /obj/item/mecha_parts/part/durand_right_leg name = "\improper Durand right leg" @@ -200,7 +198,7 @@ icon_state = "durand_r_leg" origin_tech = "programming=2;materials=3;engineering=3" construction_time = 200 - construction_cost = list("metal"=40000,"silver"=3000) + construction_cost = list("metal"=15000,"silver"=4000) /obj/item/mecha_parts/part/durand_armour gender = PLURAL @@ -209,9 +207,7 @@ icon_state = "durand_armour" origin_tech = "materials=5;combat=4;engineering=5" construction_time = 600 - construction_cost = list("metal"=50000,"uranium"=10000) - - + construction_cost = list("metal"=50000,"uranium"=30000) ////////// Firefighter @@ -257,28 +253,28 @@ desc = "A torso part of H.O.N.K. Contains chuckle unit, bananium core and honk support systems." icon_state = "honker_harness" construction_time = 300 - construction_cost = list("metal"=35000,"glass"=10000,"bananium"=10000) + construction_cost = list("metal"=20000,"glass"=10000,"bananium"=10000) /obj/item/mecha_parts/part/honker_head name = "\improper H.O.N.K head" desc = "A H.O.N.K head. Appears to lack a face plate." icon_state = "honker_head" construction_time = 200 - construction_cost = list("metal"=15000,"glass"=5000,"bananium"=5000) + construction_cost = list("metal"=10000,"glass"=5000,"bananium"=5000) /obj/item/mecha_parts/part/honker_left_arm name = "\improper H.O.N.K left arm" desc = "A H.O.N.K left arm. With unique sockets that accept odd weaponry designed by clown scientists." icon_state = "honker_l_arm" construction_time = 200 - construction_cost = list("metal"=20000,"bananium"=5000) + construction_cost = list("metal"=15000,"bananium"=5000) /obj/item/mecha_parts/part/honker_right_arm name = "\improper H.O.N.K right arm" desc = "A H.O.N.K right arm. With unique sockets that accept odd weaponry designed by clown scientists." icon_state = "honker_r_arm" construction_time = 200 - construction_cost = list("metal"=20000,"bananium"=5000) + construction_cost = list("metal"=15000,"bananium"=5000) /obj/item/mecha_parts/part/honker_left_leg name = "\improper H.O.N.K left leg" @@ -362,7 +358,7 @@ desc = "An Odysseus head. Contains an integrated medical HUD scanner." icon_state = "odysseus_head" construction_time = 100 - construction_cost = list("metal"=2000,"glass"=10000) + construction_cost = list("metal"=6000,"glass"=10000) origin_tech = "programming=3;materials=2" /obj/item/mecha_parts/part/odysseus_torso @@ -371,7 +367,7 @@ icon_state = "odysseus_torso" origin_tech = "programming=2;materials=2;biotech=2;engineering=2" construction_time = 180 - construction_cost = list("metal"=25000) + construction_cost = list("metal"=12000) /obj/item/mecha_parts/part/odysseus_left_arm name = "\improper Odysseus left arm" @@ -379,7 +375,7 @@ icon_state = "odysseus_l_arm" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 120 - construction_cost = list("metal"=10000) + construction_cost = list("metal"=6000) /obj/item/mecha_parts/part/odysseus_right_arm name = "\improper Odysseus right arm" @@ -387,7 +383,7 @@ icon_state = "odysseus_r_arm" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 120 - construction_cost = list("metal"=10000) + construction_cost = list("metal"=6000) /obj/item/mecha_parts/part/odysseus_left_leg name = "\improper Odysseus left leg" @@ -395,7 +391,7 @@ icon_state = "odysseus_l_leg" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 130 - construction_cost = list("metal"=15000) + construction_cost = list("metal"=7000) /obj/item/mecha_parts/part/odysseus_right_leg name = "\improper Odysseus right leg" @@ -403,7 +399,7 @@ icon_state = "odysseus_r_leg" origin_tech = "programming=2;materials=2;engineering=2" construction_time = 130 - construction_cost = list("metal"=15000) + construction_cost = list("metal"=7000) /*/obj/item/mecha_parts/part/odysseus_armour name="Odysseus Carapace" diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 9c4bf498c73..958933a4e82 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -13,28 +13,28 @@ desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_arm" construction_time = 200 - construction_cost = list("metal"=18000) + construction_cost = list("metal"=10000) /obj/item/robot_parts/r_arm name = "cyborg right arm" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_arm" construction_time = 200 - construction_cost = list("metal"=18000) + construction_cost = list("metal"=10000) /obj/item/robot_parts/l_leg name = "cyborg left leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_leg" construction_time = 200 - construction_cost = list("metal"=15000) + construction_cost = list("metal"=10000) /obj/item/robot_parts/r_leg name = "cyborg right leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_leg" construction_time = 200 - construction_cost = list("metal"=15000) + construction_cost = list("metal"=10000) /obj/item/robot_parts/chest name = "cyborg torso" @@ -50,7 +50,7 @@ desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals." icon_state = "head" construction_time = 350 - construction_cost = list("metal"=25000) + construction_cost = list("metal"=5000) var/obj/item/device/flash/flash1 = null var/obj/item/device/flash/flash2 = null @@ -59,7 +59,7 @@ desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors." icon_state = "robo_suit" construction_time = 500 - construction_cost = list("metal"=50000) + construction_cost = list("metal"=15000) var/obj/item/robot_parts/l_arm/l_arm = null var/obj/item/robot_parts/r_arm/r_arm = null var/obj/item/robot_parts/l_leg/l_leg = null diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index e94d3d800ef..47d017a5c22 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -9,7 +9,7 @@ throwforce = 10.0 throw_speed = 3 throw_range = 7 - m_amt = 1875 + m_amt = 1000 max_amount = 60 attack_verb = list("hit", "bludgeoned", "whacked") hitsound = 'sound/weapons/grenadelaunch.ogg' diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index de97b6a8962..7b09833e591 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -13,7 +13,7 @@ desc = "HOLY SHEET! That is a lot of glass." singular_name = "glass sheet" icon_state = "sheet-glass" - g_amt = 3750 + g_amt = MINERAL_MATERIAL_AMOUNT origin_tech = "materials=1" @@ -120,8 +120,8 @@ desc = "Glass which seems to have rods or something stuck in them." singular_name = "reinforced glass sheet" icon_state = "sheet-rglass" - g_amt = 3750 - m_amt = 1875 + g_amt = MINERAL_MATERIAL_AMOUNT + m_amt = 1000 origin_tech = "materials=2" /obj/item/stack/sheet/rglass/cyborg @@ -246,7 +246,7 @@ force = 5.0 throwforce = 10.0 item_state = "shard-glass" - g_amt = 3750 + g_amt = MINERAL_MATERIAL_AMOUNT attack_verb = list("stabbed", "slashed", "sliced", "cut") hitsound = 'sound/weapons/bladeslice.ogg' diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 8d34a8f5301..b6f782ad1fa 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -56,7 +56,6 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \ w_class = 3.0 throw_range = 3 origin_tech = "materials=6" - perunit = 3750 sheettype = "diamond" var/global/list/datum/stack_recipe/diamond_recipes = list ( \ @@ -82,7 +81,6 @@ var/global/list/datum/stack_recipe/diamond_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=5" - perunit = 2000 sheettype = "uranium" var/global/list/datum/stack_recipe/uranium_recipes = list ( \ @@ -108,7 +106,6 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "plasmatech=2;materials=2" - perunit = 2000 sheettype = "plasma" var/global/list/datum/stack_recipe/plasma_recipes = list ( \ @@ -134,7 +131,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=4" - perunit = 2000 sheettype = "gold" var/global/list/datum/stack_recipe/gold_recipes = list ( \ @@ -160,7 +156,6 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=3" - perunit = 2000 sheettype = "silver" var/global/list/datum/stack_recipe/silver_recipes = list ( \ @@ -186,7 +181,6 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=4" - perunit = 2000 sheettype = "clown" /obj/item/stack/sheet/mineral/clown/New(var/loc, var/amount=null) @@ -210,7 +204,6 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=5" - perunit = 1000 /* * Adamantine @@ -225,7 +218,6 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=4" - perunit = 2000 /* * Mythril @@ -239,5 +231,4 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \ w_class = 3.0 throw_speed = 1 throw_range = 3 - origin_tech = "materials=4" - perunit = 2000 \ No newline at end of file + origin_tech = "materials=4" \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 41290985303..774f723db8f 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -1,147 +1,147 @@ -/* Diffrent misc types of sheets - * Contains: - * Metal - * Plasteel - * Wood - * Cloth - * Cardboard - */ - -/* - * Metal - */ -var/global/list/datum/stack_recipe/metal_recipes = list ( \ - new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("swivel chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ - new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \ - new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \ - new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \ - null, \ - new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ - new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \ - new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \ - null, \ - new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \ - new/datum/stack_recipe("air alarm frame", /obj/item/alarm_frame, 2), \ - new/datum/stack_recipe("fire alarm frame", /obj/item/firealarm_frame, 2), \ - null, \ - new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \ -) - -/obj/item/stack/sheet/metal - name = "metal" - desc = "Sheets made out of metal." - singular_name = "metal sheet" - icon_state = "sheet-metal" - m_amt = 3750 - throwforce = 10.0 - flags = CONDUCT - origin_tech = "materials=1" - -/obj/item/stack/sheet/metal/cyborg - m_amt = 0 - -/obj/item/stack/sheet/metal/New(var/loc, var/amount=null) - recipes = metal_recipes - return ..() - - -/* - * Plasteel - */ -var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ - new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ - ) - -/obj/item/stack/sheet/plasteel - name = "plasteel" - singular_name = "plasteel sheet" - desc = "This sheet is an alloy of iron and plasma." - icon_state = "sheet-plasteel" - item_state = "sheet-metal" - m_amt = 7500 - throwforce = 10.0 - flags = CONDUCT - origin_tech = "materials=2" - -/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null) - recipes = plasteel_recipes - return ..() - -/* - * Wood - */ -var/global/list/datum/stack_recipe/wood_recipes = list ( \ - new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ - new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \ - new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \ - ) - -/obj/item/stack/sheet/mineral/wood - name = "wooden plank" - desc = "One can only guess that this is a bunch of wood." - singular_name = "wood plank" - icon_state = "sheet-wood" - icon = 'icons/obj/items.dmi' - origin_tech = "materials=1;biotech=1" - sheettype = "wood" - -/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null) - recipes = wood_recipes - return ..() - -/* - * Cloth - */ -/obj/item/stack/sheet/cloth - name = "cloth" - desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits." - singular_name = "cloth roll" - icon_state = "sheet-cloth" - origin_tech = "materials=2" - -/* - * Cardboard - */ -var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ - new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \ - new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \ - new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \ - new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \ - new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ - new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ - new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ - new/datum/stack_recipe("folder", /obj/item/weapon/folder), \ -) - -/obj/item/stack/sheet/cardboard //BubbleWrap - name = "cardboard" - desc = "Large sheets of card, like boxes folded flat." - singular_name = "cardboard sheet" - icon_state = "sheet-card" - origin_tech = "materials=1" - -/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) - recipes = cardboard_recipes +/* Diffrent misc types of sheets + * Contains: + * Metal + * Plasteel + * Wood + * Cloth + * Cardboard + */ + +/* + * Metal + */ +var/global/list/datum/stack_recipe/metal_recipes = list ( \ + new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("swivel chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ + new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \ + new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \ + new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \ + null, \ + new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ + new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \ + new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \ + null, \ + new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \ + new/datum/stack_recipe("air alarm frame", /obj/item/alarm_frame, 2), \ + new/datum/stack_recipe("fire alarm frame", /obj/item/firealarm_frame, 2), \ + null, \ + new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \ +) + +/obj/item/stack/sheet/metal + name = "metal" + desc = "Sheets made out of metal." + singular_name = "metal sheet" + icon_state = "sheet-metal" + m_amt = MINERAL_MATERIAL_AMOUNT + throwforce = 10.0 + flags = CONDUCT + origin_tech = "materials=1" + +/obj/item/stack/sheet/metal/cyborg + m_amt = 0 + +/obj/item/stack/sheet/metal/New(var/loc, var/amount=null) + recipes = metal_recipes + return ..() + + +/* + * Plasteel + */ +var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ + new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ + ) + +/obj/item/stack/sheet/plasteel + name = "plasteel" + singular_name = "plasteel sheet" + desc = "This sheet is an alloy of iron and plasma." + icon_state = "sheet-plasteel" + item_state = "sheet-metal" + m_amt = 6000 + throwforce = 10.0 + flags = CONDUCT + origin_tech = "materials=2" + +/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null) + recipes = plasteel_recipes + return ..() + +/* + * Wood + */ +var/global/list/datum/stack_recipe/wood_recipes = list ( \ + new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ + new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ + new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \ + new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \ + ) + +/obj/item/stack/sheet/mineral/wood + name = "wooden plank" + desc = "One can only guess that this is a bunch of wood." + singular_name = "wood plank" + icon_state = "sheet-wood" + icon = 'icons/obj/items.dmi' + origin_tech = "materials=1;biotech=1" + sheettype = "wood" + +/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null) + recipes = wood_recipes + return ..() + +/* + * Cloth + */ +/obj/item/stack/sheet/cloth + name = "cloth" + desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits." + singular_name = "cloth roll" + icon_state = "sheet-cloth" + origin_tech = "materials=2" + +/* + * Cardboard + */ +var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ + new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \ + new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \ + new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \ + new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \ + new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ + new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ + new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ + new/datum/stack_recipe("folder", /obj/item/weapon/folder), \ +) + +/obj/item/stack/sheet/cardboard //BubbleWrap + name = "cardboard" + desc = "Large sheets of card, like boxes folded flat." + singular_name = "cardboard sheet" + icon_state = "sheet-card" + origin_tech = "materials=1" + +/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) + recipes = cardboard_recipes return ..() \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 6a55c3629c0..34522d2ec59 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -7,7 +7,7 @@ throw_speed = 1 throw_range = 3 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") - var/perunit = 3750 + var/perunit = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 0780d2fc443..91f49882640 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -18,7 +18,7 @@ RCD throw_speed = 3 throw_range = 5 w_class = 3.0 - m_amt = 50000 + m_amt = 30000 origin_tech = "engineering=4;materials=2" var/datum/effect/effect/system/spark_spread/spark_system var/matter = 0 @@ -260,5 +260,5 @@ RCD density = 0 anchored = 0.0 origin_tech = "materials=2" - m_amt = 30000 - g_amt = 15000 \ No newline at end of file + m_amt = 16000 + g_amt = 8000 diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index f4467c80ed2..924c0fa7864 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -79,7 +79,7 @@ /obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob) if (!ticker) user << "You can't buckle anyone in before the game starts." - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) + if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) || M.anchored) return if (istype(M, /mob/living/carbon/slime)) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index cd5b0ee2d3f..f421cc7c033 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -3,8 +3,8 @@ desc = "Used to remotely activate devices." icon_state = "signaller" item_state = "signaler" - m_amt = 1000 - g_amt = 200 + m_amt = 400 + g_amt = 120 origin_tech = "magnets=1" wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 4b7841ce32b..653e21fd811 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -17,8 +17,8 @@ icon_state = "welding" flags = HEADCOVERSEYES | HEADCOVERSMOUTH item_state = "welding" - m_amt = 3000 - g_amt = 1000 + m_amt = 1750 + g_amt = 400 // var/up = 0 flash_protect = 2 tint = 2 diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 6e18fa19247..f86ed7fce72 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -1,675 +1,695 @@ -/**********************Ore Redemption Unit**************************/ -//Turns all the various mining machines into a single unit to speed up mining and establish a point system - -/obj/machinery/mineral/ore_redemption - name = "ore redemption machine" - desc = "A machine that accepts ore and instantly transforms it into workable material sheets, but cannot produce alloys such as Plasteel. Points for ore are generated based on type and can be redeemed at a mining equipment locker." - icon = 'icons/obj/machines/mining_machines.dmi' - icon_state = "ore_redemption" - density = 1 - anchored = 1.0 - input_dir = WEST - output_dir = SOUTH - req_access = list(access_mineral_storeroom) - var/stk_types = list() - var/stk_amt = list() - var/stack_list[0] //Key: Type. Value: Instance of type. - var/obj/item/weapon/card/id/inserted_id - var/points = 0 - var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40)) - -/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) - s.amount = 0 - stack_list[processed_sheet] = s - var/obj/item/stack/sheet/storage = stack_list[processed_sheet] - storage.amount += 1 //Stack the sheets - O.loc = null //Let the old sheet garbage collect - -/obj/machinery/mineral/ore_redemption/process() - var/turf/T = get_turf(get_step(src, input_dir)) - var/i - if(T) - if(locate(/obj/item/weapon/ore) in T) - for (i = 0; i < 10; i++) - var/obj/item/weapon/ore/O = locate() in T - if(O) - process_sheet(O) - else - break - else - var/obj/structure/ore_box/B = locate() in T - if(B) - for (i = 0; i < 10; i++) - var/obj/item/weapon/ore/O = locate() in B.contents - if(O) - process_sheet(O) - else - break - -/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user) - if(istype(W,/obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/I = usr.get_active_hand() - if(istype(I) && !istype(inserted_id)) - usr.drop_item() - I.loc = src - inserted_id = I - interact(user) - -/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O) - if(O.refined_type) - var/obj/item/stack/sheet/M = O.refined_type - points += O.points - return M - qdel(O)//No refined type? Purge it. - return - -/obj/machinery/mineral/ore_redemption/attack_hand(user as mob) - if(..()) - return - interact(user) - -/obj/machinery/mineral/ore_redemption/interact(mob/user) - var/obj/item/stack/sheet/s - var/dat - - dat += text("Ore Redemption Machine

") - dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.

") - dat += text("Current unclaimed points: [points]
") - - if(istype(inserted_id)) - dat += text("You have [inserted_id.mining_points] mining points collected. Eject ID.
") - dat += text("Claim points.
") - else - dat += text("No ID inserted. Insert ID.
") - - for(var/O in stack_list) - s = stack_list[O] - if(s.amount > 0) - dat += text("[capitalize(s.name)]: [s.amount] Release
") - - dat += text("
Mineral Value List:
[get_ore_values()]") - - user << browse("[dat]", "window=console_stacking_machine") - - return - -/obj/machinery/mineral/ore_redemption/proc/get_ore_values() - var/dat = "" - for(var/ore in ore_values) - var/value = ore_values[ore] - dat += "" - dat += "
[capitalize(ore)][value]
" - return dat - -/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 << "Required access not found." - else if(href_list["choice"] == "insert") - var/obj/item/weapon/card/id/I = usr.get_active_hand() - if(istype(I)) - usr.drop_item() - I.loc = src - inserted_id = I - else usr << "No valid ID." - if(href_list["release"] && istype(inserted_id)) - if(check_access(inserted_id)) - 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 - out.amount = min(desired,50,inp.amount) - if(out.amount >= 1) - inp.amount -= out.amount - unload_mineral(out) - else - usr << "Required access not found." - updateUsrDialog() - return - -/obj/machinery/mineral/ore_redemption/ex_act() - return //So some chucklefuck doesn't ruin miners reward with an explosion - -/**********************Mining Equipment Locker**************************/ - -/obj/machinery/mineral/equipment_locker - name = "mining equipment locker" - desc = "An equipment locker for miners, points collected at an ore redemption machine can be spent here." - icon = 'icons/obj/machines/mining_machines.dmi' - icon_state = "mining" - density = 1 - anchored = 1.0 - var/obj/item/weapon/card/id/inserted_id - var/list/prize_list = list( - new /datum/data/mining_equipment("Chili", /obj/item/weapon/reagent_containers/food/snacks/hotchili, 100), - new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 100), - new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 150), - new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 150), - new /datum/data/mining_equipment("Stimulant pills", /obj/item/weapon/storage/pill_bottle/stimulant, 350), - new /datum/data/mining_equipment("Alien toy", /obj/item/clothing/mask/facehugger/toy, 250), - new /datum/data/mining_equipment("Laser pointer", /obj/item/device/laser_pointer, 500), - new /datum/data/mining_equipment("Point card", /obj/item/weapon/card/mining_point_card, 500), - new /datum/data/mining_equipment("Lazarus injector", /obj/item/weapon/lazarus_injector, 1000), - new /datum/data/mining_equipment("Space cash", /obj/item/weapon/spacecash/c1000, 5000), - new /datum/data/mining_equipment("Sonic jackhammer", /obj/item/weapon/pickaxe/jackhammer, 500), - new /datum/data/mining_equipment("Mining drone", /mob/living/simple_animal/hostile/mining_drone/, 500), - new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 200), - new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 750), - new /datum/data/mining_equipment("Kinetic accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 1000), - new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000), - ) - -/datum/data/mining_equipment/ - var/equipment_name = "generic" - var/equipment_path = null - var/cost = 0 - -/datum/data/mining_equipment/New(name, path, cost) - src.equipment_name = name - src.equipment_path = path - src.cost = cost - -/obj/machinery/mineral/equipment_locker/attack_hand(user as mob) - if(..()) - return - interact(user) - -/obj/machinery/mineral/equipment_locker/interact(mob/user) - var/dat - dat += text("Mining Equipment Locker

") - - if(istype(inserted_id)) - dat += "You have [inserted_id.mining_points] mining points collected. Eject ID.
" - else - dat += "No ID inserted. Insert ID.
" - - dat += "
Equipment point cost list:
" - for(var/datum/data/mining_equipment/prize in prize_list) - dat += "" - dat += "
[prize.equipment_name][prize.cost]Purchase
" - - user << browse("[dat]", "window=mining_equipment_locker") - return - -/obj/machinery/mineral/equipment_locker/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 - else if(href_list["choice"] == "insert") - var/obj/item/weapon/card/id/I = usr.get_active_hand() - if(istype(I)) - usr.drop_item() - I.loc = src - inserted_id = I - else usr << "\red No valid ID." - if(href_list["purchase"]) - if(istype(inserted_id)) - var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) - if (!prize || !(prize in prize_list)) - return - if(prize.cost > inserted_id.mining_points) - else - inserted_id.mining_points -= prize.cost - new prize.equipment_path(src.loc) - updateUsrDialog() - return - -/obj/machinery/mineral/equipment_locker/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/mining_voucher)) - RedeemVoucher(I, user) - return - if(istype(I,/obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/C = usr.get_active_hand() - if(istype(C) && !istype(inserted_id)) - usr.drop_item() - C.loc = src - inserted_id = C - interact(user) - return - ..() - -/obj/machinery/mineral/equipment_locker/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer) - var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Resonator", "Kinetic Accelerator", "Mining Drone") - if(!selection || !Adjacent(redeemer) || voucher.gc_destroyed || voucher.loc != redeemer) - return - switch(selection) - if("Resonator") - new /obj/item/weapon/resonator(src.loc) - if("Kinetic Accelerator") - new /obj/item/weapon/gun/energy/kinetic_accelerator(src.loc) - if("Mining Drone") - new /mob/living/simple_animal/hostile/mining_drone(src.loc) - new /obj/item/weapon/weldingtool/hugetank(src.loc) - qdel(voucher) - -/obj/machinery/mineral/equipment_locker/ex_act() - return - -/**********************Mining Equipment Locker Items**************************/ - -/**********************Mining Equipment Voucher**********************/ - -/obj/item/weapon/mining_voucher - name = "mining voucher" - desc = "A token to redeem a piece of equipment. Use it on a mining equipment locker." - icon = 'icons/obj/items.dmi' - icon_state = "mining_voucher" - w_class = 1 - -/**********************Mining Point Card**********************/ - -/obj/item/weapon/card/mining_point_card - name = "mining point card" - desc = "A small card preloaded with mining points. Swipe your ID card over it to transfer the points, then discard." - icon_state = "data" - var/points = 500 - -/obj/item/weapon/card/mining_point_card/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/card/id)) - if(points) - var/obj/item/weapon/card/id/C = I - C.mining_points += points - user << "You transfer [points] points to [C]." - points = 0 - else - user << "There's no points left on [src]." - ..() - -/obj/item/weapon/card/mining_point_card/examine() - ..() - usr << "There's [points] points on the card." - -/**********************Jaunter**********************/ - -/obj/item/device/wormhole_jaunter - name = "wormhole jaunter" - desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least." - icon = 'icons/obj/items.dmi' - icon_state = "Jaunter" - item_state = "electronic" - throwforce = 0 - w_class = 2.0 - throw_speed = 3 - throw_range = 5 - origin_tech = "bluespace=2" - -/obj/item/device/wormhole_jaunter/attack_self(mob/user as mob) - var/turf/device_turf = get_turf(user) - if(!device_turf||device_turf.z==2||device_turf.z>=7) - user << "You're having difficulties getting the [src.name] to work." - return - else - user.visible_message("[user.name] activates the [src.name]!") - var/list/L = list() - for(var/obj/item/device/radio/beacon/B in world) - var/turf/T = get_turf(B) - if(T.z == 1) - L += B - if(!L.len) - user << "The [src.name] failed to create a wormhole." - 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) - J.target = chosen_beacon - try_move_adjacent(J) - playsound(src,'sound/effects/sparks4.ogg',50,1) - qdel(src) - -/obj/effect/portal/wormhole/jaunt_tunnel - name = "jaunt tunnel" - icon = 'icons/effects/effects.dmi' - icon_state = "bhole3" - desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon." - -/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M) - if(istype(M, /obj/effect)) - return - if(istype(M, /atom/movable)) - if(do_teleport(M, target, 6)) - if(isliving(M)) - var/mob/living/L = M - L.Weaken(3) - if(ishuman(L)) - shake_camera(L, 20, 1) - spawn(20) - if(L) - L.visible_message("[L.name] vomits from travelling through the [src.name]!") - L.nutrition -= 20 - L.adjustToxLoss(-3) - var/turf/T = get_turf(L) - T.add_vomit_floor(L) - playsound(L, 'sound/effects/splat.ogg', 50, 1) - -/**********************Resonator**********************/ - -/obj/item/weapon/resonator - name = "resonator" - icon = 'icons/obj/items.dmi' - icon_state = "resonator" - item_state = "resonator" - desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in a vaccuum." - w_class = 3 - force = 10 - throwforce = 10 - var/cooldown = 0 - -/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator) - if(cooldown <= 0) - playsound(src,'sound/effects/stealthoff.ogg',50,1) - var/obj/effect/resonance/R = new /obj/effect/resonance(get_turf(target)) - R.creator = creator - cooldown = 1 - spawn(20) - cooldown = 0 - -/obj/item/weapon/resonator/attack_self(mob/user as mob) - CreateResonance(src, user) - ..() - -/obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag) - if(target in user.contents) - return - if(proximity_flag) - CreateResonance(target, user) - -/obj/effect/resonance - name = "resonance field" - desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures." - icon = 'icons/effects/effects.dmi' - icon_state = "shield1" - layer = 4.1 - mouse_opacity = 0 - var/resonance_damage = 20 - var/creator = null - -/obj/effect/resonance/New() - var/turf/proj_turf = get_turf(src) - if(!istype(proj_turf)) - return - if(istype(proj_turf, /turf/simulated/mineral)) - var/turf/simulated/mineral/M = proj_turf - playsound(src,'sound/effects/sparks4.ogg',50,1) - M.gets_drilled() - spawn(5) - qdel(src) - else - var/datum/gas_mixture/environment = proj_turf.return_air() - var/pressure = environment.return_pressure() - if(pressure < 50) - name = "strong resonance field" - resonance_damage = 45 - spawn(50) - playsound(src,'sound/effects/sparks4.ogg',50,1) - if(creator) - for(var/mob/living/L in src.loc) - add_logs(creator, L, "used a resonator field on", object="resonator") - L << "The [src.name] ruptured with you in it!" - L.adjustBruteLoss(resonance_damage) - else - for(var/mob/living/L in src.loc) - L << "The [src.name] ruptured with you in it!" - L.adjustBruteLoss(resonance_damage) - qdel(src) - -/**********************Facehugger toy**********************/ - -/obj/item/clothing/mask/facehugger/toy - desc = "A toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something." - throwforce = 0 - sterile = 1 - tint = 3 //Makes it feel more authentic when it latches on - -/obj/item/clothing/mask/facehugger/toy/examine()//So that giant red text about probisci doesn't show up. - if(desc) - usr << desc - -/obj/item/clothing/mask/facehugger/toy/Die() - return - -/**********************Mining drone**********************/ - -/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_state = "mining_drone" - icon_living = "mining_drone" - status_flags = CANSTUN|CANWEAKEN|CANPUSH - stop_automated_movement_when_pulled = 1 - mouse_opacity = 1 - faction = "neutral" - a_intent = "harm" - min_oxy = 0 - max_oxy = 0 - min_tox = 0 - max_tox = 0 - min_co2 = 0 - max_co2 = 0 - min_n2 = 0 - max_n2 = 0 - minbodytemp = 0 - wander = 0 - idle_vision_range = 5 - move_to_delay = 10 - retreat_distance = 1 - minimum_distance = 2 - health = 125 - maxHealth = 125 - melee_damage_lower = 15 - melee_damage_upper = 15 - environment_smash = 0 - attacktext = "drills" - attack_sound = 'sound/weapons/circsawhit.ogg' - ranged = 1 - ranged_message = "shoots" - ranged_cooldown_cap = 3 - projectiletype = /obj/item/projectile/kinetic - projectilesound = 'sound/weapons/Gunshot4.ogg' - wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver, - /obj/item/weapon/ore/plasma, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/iron, - /obj/item/weapon/ore/clown) - -/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/W = I - if(W.welding && !stat) - if(stance != HOSTILE_STANCE_IDLE) - user << "[src] is moving around too much to repair!" - return - if(maxHealth == health) - user << "[src] is at full integrity." - else - health += 10 - user << "You repair some of the armor on [src]." - return - if(istype(I, /obj/item/device/mining_scanner)) - user << "You instruct [src] to drop any collected ore." - DropOre() - return - ..() - -/mob/living/simple_animal/hostile/mining_drone/Die() - ..() - visible_message("[src] is destroyed!") - new /obj/effect/decal/cleanable/robot_debris(src.loc) - DropOre() - qdel(src) - return - -/mob/living/simple_animal/hostile/mining_drone/New() - ..() - SetCollectBehavior() - -/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M) - if(M.a_intent == "help") - switch(search_objects) - if(0) - SetCollectBehavior() - M << "[src] has been set to search and store loose ore." - if(2) - SetOffenseBehavior() - M << "[src] has been set to attack hostile wildlife." - return - ..() - -/mob/living/simple_animal/hostile/mining_drone/proc/SetCollectBehavior() - idle_vision_range = 9 - search_objects = 2 - wander = 1 - ranged = 0 - minimum_distance = 1 - retreat_distance = null - icon_state = "mining_drone" - -/mob/living/simple_animal/hostile/mining_drone/proc/SetOffenseBehavior() - idle_vision_range = 7 - search_objects = 0 - wander = 0 - ranged = 1 - retreat_distance = 1 - minimum_distance = 2 - icon_state = "mining_drone_offense" - -/mob/living/simple_animal/hostile/mining_drone/AttackingTarget() - if(istype(target, /obj/item/weapon/ore)) - CollectOre() - return - ..() - -/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre() - var/obj/item/weapon/ore/O - for(O in src.loc) - O.loc = src - for(var/dir in alldirs) - var/turf/T = get_step(src,dir) - for(O in T) - O.loc = src - return - -/mob/living/simple_animal/hostile/mining_drone/proc/DropOre() - if(!contents.len) - return - for(var/obj/item/weapon/ore/O in contents) - contents -= O - O.loc = src.loc - return - -/mob/living/simple_animal/hostile/mining_drone/adjustBruteLoss() - if(search_objects) - SetOffenseBehavior() - ..() - -/**********************Lazarus Injector**********************/ - -/obj/item/weapon/lazarus_injector - name = "lazarus injector" - desc = "An injector with a cocktail of nanomachines and chemicals, this device can seemingly raise animals from the dead, making them become friendly to the user. Unfortunately, the process is useless on higher forms of life and incredibly costly, so these were hidden in storage until an executive thought they'd be great motivation for some of their employees." - icon = 'icons/obj/syringe.dmi' - icon_state = "lazarus_hypo" - item_state = "hypo" - throwforce = 0 - w_class = 2.0 - throw_speed = 3 - throw_range = 5 - var/loaded = 1 - -/obj/item/weapon/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag) - if(!loaded) - return - if(istype(target, /mob/living) && proximity_flag) - if(istype(target, /mob/living/simple_animal)) - var/mob/living/simple_animal/M = target - if(M.stat == DEAD) - M.faction = "lazarus" - M.revive() - if(istype(target, /mob/living/simple_animal/hostile)) - var/mob/living/simple_animal/hostile/H = M - H.friends += user - H.attack_same = 1 //No invincible army of completely loyal mobs - log_game("[user] has revived hostile mob [target] with a lazarus injector") - loaded = 0 - user.visible_message("[user] injects [M] with [src], reviving it.") - playsound(src,'sound/effects/refill.ogg',50,1) - icon_state = "lazarus_empty" - return - else - user << "[src] is only effective on the dead." - return - else - user << "[src] is only effective on lesser beings." - return - -/obj/item/weapon/lazarus_injector/examine() - ..() - if(!loaded) - usr << "[src] is empty." - -/**********************Mining Scanner**********************/ -/obj/item/device/mining_scanner - desc = "A scanner that checks surrounding rock for useful minerals, it can also be used to stop gibtonite detonations. Requires you to wear mesons to work properly." - name = "mining scanner" - icon_state = "mining" - item_state = "analyzer" - w_class = 2.0 - flags = CONDUCT - slot_flags = SLOT_BELT - var/cooldown = 0 - -/obj/item/device/mining_scanner/attack_self(mob/user) - if(!user.client) - return - if(!cooldown) - cooldown = 1 - spawn(40) - cooldown = 0 - var/client/C = user.client - var/list/L = list() - var/turf/simulated/mineral/M - for(M in range(7, user)) - if(M.scan_state) - L += M - if(!L.len) - user << "[src] reports that nothing was detected nearby." - return - else - for(M in L) - var/turf/T = get_turf(M) - var/image/I = image('icons/turf/walls.dmi', loc = T, icon_state = M.scan_state, layer = 18) - C.images += I - spawn(30) - if(C) - C.images -= I - -/**********************Xeno Warning Sign**********************/ -/obj/structure/sign/xeno_warning_mining - name = "DANGEROUS ALIEN LIFE" - desc = "A sign that warns would be travellers of hostile alien life in the vicinity." - icon = 'icons/obj/mining.dmi' - icon_state = "xeno_warning" - -/**********************Mining Jetpack**********************/ -/obj/item/weapon/tank/jetpack/carbondioxide/mining - name = "mining jetpack" - icon_state = "jetpack-mining" - item_state = "jetpack-mining" - desc = "A tank of compressed carbon dioxide for miners to use as propulsion in local space. Should not be used for internals." +/**********************Ore Redemption Unit**************************/ +//Turns all the various mining machines into a single unit to speed up mining and establish a point system + +/obj/machinery/mineral/ore_redemption + name = "ore redemption machine" + desc = "A machine that accepts ore and instantly transforms it into workable material sheets, but cannot produce alloys such as Plasteel. Points for ore are generated based on type and can be redeemed at a mining equipment locker." + icon = 'icons/obj/machines/mining_machines.dmi' + icon_state = "ore_redemption" + density = 1 + anchored = 1.0 + input_dir = WEST + output_dir = SOUTH + req_access = list(access_mineral_storeroom) + var/stk_types = list() + var/stk_amt = list() + var/stack_list[0] //Key: Type. Value: Instance of type. + var/obj/item/weapon/card/id/inserted_id + var/points = 0 + var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40)) + +/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) + s.amount = 0 + stack_list[processed_sheet] = s + var/obj/item/stack/sheet/storage = stack_list[processed_sheet] + storage.amount += 1 //Stack the sheets + O.loc = null //Let the old sheet garbage collect + +/obj/machinery/mineral/ore_redemption/process() + var/turf/T = get_turf(get_step(src, input_dir)) + var/i + if(T) + if(locate(/obj/item/weapon/ore) in T) + for (i = 0; i < 10; i++) + var/obj/item/weapon/ore/O = locate() in T + if(O) + process_sheet(O) + else + break + else + var/obj/structure/ore_box/B = locate() in T + if(B) + for (i = 0; i < 10; i++) + var/obj/item/weapon/ore/O = locate() in B.contents + if(O) + process_sheet(O) + else + break + +/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user) + if(istype(W,/obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/I = usr.get_active_hand() + if(istype(I) && !istype(inserted_id)) + usr.drop_item() + I.loc = src + inserted_id = I + interact(user) + +/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O) + if(O.refined_type) + var/obj/item/stack/sheet/M = O.refined_type + points += O.points + return M + qdel(O)//No refined type? Purge it. + return + +/obj/machinery/mineral/ore_redemption/attack_hand(user as mob) + if(..()) + return + interact(user) + +/obj/machinery/mineral/ore_redemption/interact(mob/user) + var/obj/item/stack/sheet/s + var/dat + + dat += text("Ore Redemption Machine

") + dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.

") + dat += text("Current unclaimed points: [points]
") + + if(istype(inserted_id)) + dat += text("You have [inserted_id.mining_points] mining points collected. Eject ID.
") + dat += text("Claim points.
") + else + dat += text("No ID inserted. Insert ID.
") + + for(var/O in stack_list) + s = stack_list[O] + if(s.amount > 0) + dat += text("[capitalize(s.name)]: [s.amount] Release
") + + dat += text("
Mineral Value List:
[get_ore_values()]") + + user << browse("[dat]", "window=console_stacking_machine") + + return + +/obj/machinery/mineral/ore_redemption/proc/get_ore_values() + var/dat = "" + for(var/ore in ore_values) + var/value = ore_values[ore] + dat += "" + dat += "
[capitalize(ore)][value]
" + return dat + +/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 << "Required access not found." + else if(href_list["choice"] == "insert") + var/obj/item/weapon/card/id/I = usr.get_active_hand() + if(istype(I)) + usr.drop_item() + I.loc = src + inserted_id = I + else usr << "No valid ID." + if(href_list["release"] && istype(inserted_id)) + if(check_access(inserted_id)) + 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 + out.amount = min(desired,50,inp.amount) + if(out.amount >= 1) + inp.amount -= out.amount + unload_mineral(out) + else + usr << "Required access not found." + updateUsrDialog() + return + +/obj/machinery/mineral/ore_redemption/ex_act() + return //So some chucklefuck doesn't ruin miners reward with an explosion + +/**********************Mining Equipment Locker**************************/ + +/obj/machinery/mineral/equipment_locker + name = "mining equipment locker" + desc = "An equipment locker for miners, points collected at an ore redemption machine can be spent here." + icon = 'icons/obj/machines/mining_machines.dmi' + icon_state = "mining" + density = 1 + anchored = 1.0 + var/obj/item/weapon/card/id/inserted_id + var/list/prize_list = list( + new /datum/data/mining_equipment("Chili", /obj/item/weapon/reagent_containers/food/snacks/hotchili, 100), + new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 100), + new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 150), + new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 150), + new /datum/data/mining_equipment("Stimulant pills", /obj/item/weapon/storage/pill_bottle/stimulant, 350), + new /datum/data/mining_equipment("Alien toy", /obj/item/clothing/mask/facehugger/toy, 250), + new /datum/data/mining_equipment("Laser pointer", /obj/item/device/laser_pointer, 500), + new /datum/data/mining_equipment("Point card", /obj/item/weapon/card/mining_point_card, 500), + new /datum/data/mining_equipment("Lazarus injector", /obj/item/weapon/lazarus_injector, 1000), + new /datum/data/mining_equipment("Space cash", /obj/item/weapon/spacecash/c1000, 5000), + new /datum/data/mining_equipment("Sonic jackhammer", /obj/item/weapon/pickaxe/jackhammer, 500), + new /datum/data/mining_equipment("Mining drone", /mob/living/simple_animal/hostile/mining_drone/, 500), + new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 200), + new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 750), + new /datum/data/mining_equipment("Kinetic accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 1000), + new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000), + ) + +/datum/data/mining_equipment/ + var/equipment_name = "generic" + var/equipment_path = null + var/cost = 0 + +/datum/data/mining_equipment/New(name, path, cost) + src.equipment_name = name + src.equipment_path = path + src.cost = cost + +/obj/machinery/mineral/equipment_locker/attack_hand(user as mob) + if(..()) + return + interact(user) + +/obj/machinery/mineral/equipment_locker/interact(mob/user) + var/dat + dat += text("Mining Equipment Locker

") + + if(istype(inserted_id)) + dat += "You have [inserted_id.mining_points] mining points collected. Eject ID.
" + else + dat += "No ID inserted. Insert ID.
" + + dat += "
Equipment point cost list:
" + for(var/datum/data/mining_equipment/prize in prize_list) + dat += "" + dat += "
[prize.equipment_name][prize.cost]Purchase
" + + user << browse("[dat]", "window=mining_equipment_locker") + return + +/obj/machinery/mineral/equipment_locker/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 + else if(href_list["choice"] == "insert") + var/obj/item/weapon/card/id/I = usr.get_active_hand() + if(istype(I)) + usr.drop_item() + I.loc = src + inserted_id = I + else usr << "\red No valid ID." + if(href_list["purchase"]) + if(istype(inserted_id)) + var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) + if (!prize || !(prize in prize_list)) + return + if(prize.cost > inserted_id.mining_points) + else + inserted_id.mining_points -= prize.cost + new prize.equipment_path(src.loc) + updateUsrDialog() + return + +/obj/machinery/mineral/equipment_locker/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/weapon/mining_voucher)) + RedeemVoucher(I, user) + return + if(istype(I,/obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/C = usr.get_active_hand() + if(istype(C) && !istype(inserted_id)) + usr.drop_item() + C.loc = src + inserted_id = C + interact(user) + return + ..() + +/obj/machinery/mineral/equipment_locker/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer) + var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Resonator", "Kinetic Accelerator", "Mining Drone") + if(!selection || !Adjacent(redeemer) || voucher.gc_destroyed || voucher.loc != redeemer) + return + switch(selection) + if("Resonator") + new /obj/item/weapon/resonator(src.loc) + if("Kinetic Accelerator") + new /obj/item/weapon/gun/energy/kinetic_accelerator(src.loc) + if("Mining Drone") + new /mob/living/simple_animal/hostile/mining_drone(src.loc) + new /obj/item/weapon/weldingtool/hugetank(src.loc) + qdel(voucher) + +/obj/machinery/mineral/equipment_locker/ex_act() + return + +/**********************Mining Equipment Locker Items**************************/ + +/**********************Mining Equipment Voucher**********************/ + +/obj/item/weapon/mining_voucher + name = "mining voucher" + desc = "A token to redeem a piece of equipment. Use it on a mining equipment locker." + icon = 'icons/obj/items.dmi' + icon_state = "mining_voucher" + w_class = 1 + +/**********************Mining Point Card**********************/ + +/obj/item/weapon/card/mining_point_card + name = "mining point card" + desc = "A small card preloaded with mining points. Swipe your ID card over it to transfer the points, then discard." + icon_state = "data" + var/points = 500 + +/obj/item/weapon/card/mining_point_card/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/weapon/card/id)) + if(points) + var/obj/item/weapon/card/id/C = I + C.mining_points += points + user << "You transfer [points] points to [C]." + points = 0 + else + user << "There's no points left on [src]." + ..() + +/obj/item/weapon/card/mining_point_card/examine() + ..() + usr << "There's [points] points on the card." + +/**********************Jaunter**********************/ + +/obj/item/device/wormhole_jaunter + name = "wormhole jaunter" + desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least." + icon = 'icons/obj/items.dmi' + icon_state = "Jaunter" + item_state = "electronic" + throwforce = 0 + w_class = 2.0 + throw_speed = 3 + throw_range = 5 + origin_tech = "bluespace=2" + +/obj/item/device/wormhole_jaunter/attack_self(mob/user as mob) + var/turf/device_turf = get_turf(user) + if(!device_turf||device_turf.z==2||device_turf.z>=7) + user << "You're having difficulties getting the [src.name] to work." + return + else + user.visible_message("[user.name] activates the [src.name]!") + var/list/L = list() + for(var/obj/item/device/radio/beacon/B in world) + var/turf/T = get_turf(B) + if(T.z == 1) + L += B + if(!L.len) + user << "The [src.name] failed to create a wormhole." + 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) + J.target = chosen_beacon + try_move_adjacent(J) + playsound(src,'sound/effects/sparks4.ogg',50,1) + qdel(src) + +/obj/effect/portal/wormhole/jaunt_tunnel + name = "jaunt tunnel" + icon = 'icons/effects/effects.dmi' + icon_state = "bhole3" + desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon." + +/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M) + if(istype(M, /obj/effect)) + return + if(istype(M, /atom/movable)) + if(do_teleport(M, target, 6)) + if(isliving(M)) + var/mob/living/L = M + L.Weaken(3) + if(ishuman(L)) + shake_camera(L, 20, 1) + spawn(20) + if(L) + L.visible_message("[L.name] vomits from travelling through the [src.name]!") + L.nutrition -= 20 + L.adjustToxLoss(-3) + var/turf/T = get_turf(L) + T.add_vomit_floor(L) + playsound(L, 'sound/effects/splat.ogg', 50, 1) + +/**********************Resonator**********************/ + +/obj/item/weapon/resonator + name = "resonator" + icon = 'icons/obj/items.dmi' + icon_state = "resonator" + item_state = "resonator" + desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in a vaccuum." + w_class = 3 + force = 10 + throwforce = 10 + var/cooldown = 0 + +/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator) + if(cooldown <= 0) + playsound(src,'sound/effects/stealthoff.ogg',50,1) + var/obj/effect/resonance/R = new /obj/effect/resonance(get_turf(target)) + R.creator = creator + cooldown = 1 + spawn(20) + cooldown = 0 + +/obj/item/weapon/resonator/attack_self(mob/user as mob) + CreateResonance(src, user) + ..() + +/obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag) + if(target in user.contents) + return + if(proximity_flag) + CreateResonance(target, user) + +/obj/effect/resonance + name = "resonance field" + desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures." + icon = 'icons/effects/effects.dmi' + icon_state = "shield1" + layer = 4.1 + mouse_opacity = 0 + var/resonance_damage = 20 + var/creator = null + +/obj/effect/resonance/New() + var/turf/proj_turf = get_turf(src) + if(!istype(proj_turf)) + return + if(istype(proj_turf, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = proj_turf + playsound(src,'sound/effects/sparks4.ogg',50,1) + M.gets_drilled() + spawn(5) + qdel(src) + else + var/datum/gas_mixture/environment = proj_turf.return_air() + var/pressure = environment.return_pressure() + if(pressure < 50) + name = "strong resonance field" + resonance_damage = 45 + spawn(50) + playsound(src,'sound/effects/sparks4.ogg',50,1) + if(creator) + for(var/mob/living/L in src.loc) + add_logs(creator, L, "used a resonator field on", object="resonator") + L << "The [src.name] ruptured with you in it!" + L.adjustBruteLoss(resonance_damage) + else + for(var/mob/living/L in src.loc) + L << "The [src.name] ruptured with you in it!" + L.adjustBruteLoss(resonance_damage) + qdel(src) + +/**********************Facehugger toy**********************/ + +/obj/item/clothing/mask/facehugger/toy + desc = "A toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something." + throwforce = 0 + sterile = 1 + tint = 3 //Makes it feel more authentic when it latches on + +/obj/item/clothing/mask/facehugger/toy/examine()//So that giant red text about probisci doesn't show up. + if(desc) + usr << desc + +/obj/item/clothing/mask/facehugger/toy/Die() + return + +/**********************Mining drone**********************/ + +/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_state = "mining_drone" + icon_living = "mining_drone" + status_flags = CANSTUN|CANWEAKEN|CANPUSH + stop_automated_movement_when_pulled = 1 + mouse_opacity = 1 + faction = "neutral" + a_intent = "harm" + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + minbodytemp = 0 + wander = 0 + idle_vision_range = 5 + move_to_delay = 10 + retreat_distance = 1 + minimum_distance = 2 + health = 125 + maxHealth = 125 + melee_damage_lower = 15 + melee_damage_upper = 15 + environment_smash = 0 + attacktext = "drills" + attack_sound = 'sound/weapons/circsawhit.ogg' + ranged = 1 + ranged_message = "shoots" + ranged_cooldown_cap = 3 + projectiletype = /obj/item/projectile/kinetic + projectilesound = 'sound/weapons/Gunshot4.ogg' + wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver, + /obj/item/weapon/ore/plasma, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/iron, + /obj/item/weapon/ore/clown) + +/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/W = I + if(W.welding && !stat) + if(stance != HOSTILE_STANCE_IDLE) + user << "[src] is moving around too much to repair!" + return + if(maxHealth == health) + user << "[src] is at full integrity." + else + health += 10 + user << "You repair some of the armor on [src]." + return + if(istype(I, /obj/item/device/mining_scanner)) + user << "You instruct [src] to drop any collected ore." + DropOre() + return + ..() + +/mob/living/simple_animal/hostile/mining_drone/Die() + ..() + visible_message("[src] is destroyed!") + new /obj/effect/decal/cleanable/robot_debris(src.loc) + DropOre() + qdel(src) + return + +/mob/living/simple_animal/hostile/mining_drone/New() + ..() + SetCollectBehavior() + +/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M) + if(M.a_intent == "help") + switch(search_objects) + if(0) + SetCollectBehavior() + M << "[src] has been set to search and store loose ore." + if(2) + SetOffenseBehavior() + M << "[src] has been set to attack hostile wildlife." + return + ..() + +/mob/living/simple_animal/hostile/mining_drone/proc/SetCollectBehavior() + idle_vision_range = 9 + search_objects = 2 + wander = 1 + ranged = 0 + minimum_distance = 1 + retreat_distance = null + icon_state = "mining_drone" + +/mob/living/simple_animal/hostile/mining_drone/proc/SetOffenseBehavior() + idle_vision_range = 7 + search_objects = 0 + wander = 0 + ranged = 1 + retreat_distance = 1 + minimum_distance = 2 + icon_state = "mining_drone_offense" + +/mob/living/simple_animal/hostile/mining_drone/AttackingTarget() + if(istype(target, /obj/item/weapon/ore)) + CollectOre() + return + ..() + +/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre() + var/obj/item/weapon/ore/O + for(O in src.loc) + O.loc = src + for(var/dir in alldirs) + var/turf/T = get_step(src,dir) + for(O in T) + O.loc = src + return + +/mob/living/simple_animal/hostile/mining_drone/proc/DropOre() + if(!contents.len) + return + for(var/obj/item/weapon/ore/O in contents) + contents -= O + O.loc = src.loc + return + +/mob/living/simple_animal/hostile/mining_drone/adjustBruteLoss() + if(search_objects) + SetOffenseBehavior() + ..() + +/**********************Lazarus Injector**********************/ + +/obj/item/weapon/lazarus_injector + name = "lazarus injector" + desc = "An injector with a cocktail of nanomachines and chemicals, this device can seemingly raise animals from the dead, making them become friendly to the user. Unfortunately, the process is useless on higher forms of life and incredibly costly, so these were hidden in storage until an executive thought they'd be great motivation for some of their employees." + icon = 'icons/obj/syringe.dmi' + icon_state = "lazarus_hypo" + item_state = "hypo" + throwforce = 0 + w_class = 2.0 + throw_speed = 3 + throw_range = 5 + var/loaded = 1 + var/malfunctioning = 0 + +/obj/item/weapon/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag) + if(!loaded) + return + if(istype(target, /mob/living) && proximity_flag) + if(istype(target, /mob/living/simple_animal)) + var/mob/living/simple_animal/M = target + if(M.stat == DEAD) + M.faction = "neutral" + M.revive() + if(istype(target, /mob/living/simple_animal/hostile)) + var/mob/living/simple_animal/hostile/H = M + if(malfunctioning) + M.faction = "lazarus" + H.friends += user + H.attack_same = 1 + log_game("[user] has revived hostile mob [target] with a malfunctioning lazarus injector") + else + H.attack_same = 0 + loaded = 0 + user.visible_message("[user] injects [M] with [src], reviving it.") + playsound(src,'sound/effects/refill.ogg',50,1) + icon_state = "lazarus_empty" + return + else + user << "[src] is only effective on the dead." + return + else + user << "[src] is only effective on lesser beings." + return + +/obj/item/weapon/lazarus_injector/emp_act() + if(!malfunctioning) + malfunctioning = 1 + +/obj/item/weapon/lazarus_injector/examine() + ..() + if(!loaded) + usr << "[src] is empty." + if(malfunctioning) + usr << "The display on [src] seems to be flickering." + +/**********************Mining Scanner**********************/ +/obj/item/device/mining_scanner + desc = "A scanner that checks surrounding rock for useful minerals, it can also be used to stop gibtonite detonations. Requires you to wear mesons to work properly." + name = "mining scanner" + icon_state = "mining" + item_state = "analyzer" + w_class = 2.0 + flags = CONDUCT + slot_flags = SLOT_BELT + var/cooldown = 0 + +/obj/item/device/mining_scanner/attack_self(mob/user) + if(!user.client) + return + if(!cooldown) + cooldown = 1 + spawn(40) + cooldown = 0 + var/client/C = user.client + var/list/L = list() + var/turf/simulated/mineral/M + for(M in range(7, user)) + if(M.scan_state) + L += M + if(!L.len) + user << "[src] reports that nothing was detected nearby." + return + else + for(M in L) + var/turf/T = get_turf(M) + var/image/I = image('icons/turf/walls.dmi', loc = T, icon_state = M.scan_state, layer = 18) + C.images += I + spawn(30) + if(C) + C.images -= I + +//Debug item to identify all ore spread quickly +/obj/item/device/mining_scanner/admin + +/obj/item/device/mining_scanner/admin/attack_self(mob/user) + for(var/turf/simulated/mineral/M in world) + if(M.scan_state) + M.icon_state = M.scan_state + del(src) + +/**********************Xeno Warning Sign**********************/ +/obj/structure/sign/xeno_warning_mining + name = "DANGEROUS ALIEN LIFE" + desc = "A sign that warns would be travellers of hostile alien life in the vicinity." + icon = 'icons/obj/mining.dmi' + icon_state = "xeno_warning" + +/**********************Mining Jetpack**********************/ +/obj/item/weapon/tank/jetpack/carbondioxide/mining + name = "mining jetpack" + icon_state = "jetpack-mining" + item_state = "jetpack-mining" + desc = "A tank of compressed carbon dioxide for miners to use as propulsion in local space. Should not be used for internals." diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index f34344dabb0..846ec298675 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -11,7 +11,7 @@ blocks_air = 1 temperature = TCMB var/mineralName = "" - var/mineralAmt = 0 + var/mineralAmt = 3 var/spread = 0 //will the seam spread? var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles var/last_act = 0 @@ -109,7 +109,7 @@ /turf/simulated/mineral/random/high_chance icon_state = "rock_highchance" mineralChance = 25 - mineralSpawnChanceList = list("Uranium" = 10, "Iron" = 30, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Plasma" = 10) + mineralSpawnChanceList = list("Uranium" = 35, "Diamond" = 10, "Gold" = 35, "Silver" = 35, "Plasma" = 35, "Iron" = 50) /turf/simulated/mineral/random/high_chance/New() icon_state = "rock" @@ -127,8 +127,7 @@ /turf/simulated/mineral/uranium name = "Uranium deposit" mineralName = "Uranium" - mineralAmt = 5 - spreadChance = 0 + spreadChance = 5 spread = 1 hidden = 1 scan_state = "rock_Uranium" @@ -137,7 +136,6 @@ name = "Iron deposit" icon_state = "rock_Iron" mineralName = "Iron" - mineralAmt = 5 spreadChance = 20 spread = 1 hidden = 0 @@ -145,7 +143,6 @@ /turf/simulated/mineral/diamond name = "Diamond deposit" mineralName = "Diamond" - mineralAmt = 5 spreadChance = 0 spread = 1 hidden = 1 @@ -154,8 +151,7 @@ /turf/simulated/mineral/gold name = "Gold deposit" mineralName = "Gold" - mineralAmt = 5 - spreadChance = 0 + spreadChance = 5 spread = 1 hidden = 1 scan_state = "rock_Gold" @@ -163,8 +159,7 @@ /turf/simulated/mineral/silver name = "Silver deposit" mineralName = "Silver" - mineralAmt = 5 - spreadChance = 0 + spreadChance = 5 spread = 1 hidden = 1 scan_state = "rock_Silver" @@ -173,8 +168,7 @@ name = "Plasma deposit" icon_state = "rock_Plasma" mineralName = "Plasma" - mineralAmt = 5 - spreadChance = 0 + spreadChance = 5 spread = 1 hidden = 1 scan_state = "rock_Plasma" diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index c12e2d994d6..48c101d41be 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -21,7 +21,7 @@ name = "Uranium ore" icon_state = "Uranium ore" origin_tech = "materials=5" - points = 20 + points = 18 refined_type = /obj/item/stack/sheet/mineral/uranium /obj/item/weapon/ore/iron @@ -52,7 +52,7 @@ name = "Plasma ore" icon_state = "Plasma ore" origin_tech = "materials=2" - points = 40 + points = 36 refined_type = /obj/item/stack/sheet/mineral/plasma /obj/item/weapon/ore/plasma/attackby(obj/item/I as obj, mob/user as mob) @@ -68,28 +68,28 @@ name = "Silver ore" icon_state = "Silver ore" origin_tech = "materials=3" - points = 20 + points = 18 refined_type = /obj/item/stack/sheet/mineral/silver /obj/item/weapon/ore/gold name = "Gold ore" icon_state = "Gold ore" origin_tech = "materials=4" - points = 20 + points = 18 refined_type = /obj/item/stack/sheet/mineral/gold /obj/item/weapon/ore/diamond name = "Diamond ore" icon_state = "Diamond ore" origin_tech = "materials=6" - points = 40 + points = 36 refined_type = /obj/item/stack/sheet/mineral/diamond /obj/item/weapon/ore/clown name = "Bananium ore" icon_state = "Clown ore" origin_tech = "materials=4" - points = 30 + points = 27 refined_type = /obj/item/stack/sheet/mineral/clown /obj/item/weapon/ore/slag diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1f8c48fdb40..3e0316e0491 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -279,7 +279,6 @@ ExtinguishMob() fire_stacks = 0 suiciding = 0 - buckled = initial(src.buckled) if(iscarbon(src)) var/mob/living/carbon/C = src C.handcuffed = initial(C.handcuffed) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 7e02ad289ce..a6e715b7763 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -1,422 +1,433 @@ -/mob/living/simple_animal/hostile/asteroid/ - vision_range = 2 - min_oxy = 0 - max_oxy = 0 - min_tox = 0 - max_tox = 0 - min_co2 = 0 - max_co2 = 0 - min_n2 = 0 - max_n2 = 0 - unsuitable_atoms_damage = 15 - faction = "mining" - environment_smash = 2 - minbodytemp = 0 - heat_damage_per_tick = 20 - response_help = "pokes" - response_disarm = "shoves" - response_harm = "strikes" - status_flags = 0 - a_intent = "harm" - var/throw_message = "bounces off of" - var/icon_aggro = null // for swapping to when we get aggressive - -/mob/living/simple_animal/hostile/asteroid/Aggro() - ..() - icon_state = icon_aggro - -/mob/living/simple_animal/hostile/asteroid/LoseAggro() - ..() - icon_state = icon_living - -/mob/living/simple_animal/hostile/asteroid/bullet_act(var/obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills - if(!stat) - Aggro() - if(P.damage < 30) - P.damage = (P.damage / 3) - visible_message("[P] has a reduced effect on [src]!") - ..() - -/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy - if(istype(AM, /obj/item)) - var/obj/item/T = AM - if(!stat) - Aggro() - if(T.throwforce <= 20) - visible_message("The [T.name] [src.throw_message] [src.name]!") - return - ..() - -/mob/living/simple_animal/hostile/asteroid/basilisk - name = "basilisk" - desc = "A territorial beast, covered in a thick shell that absorbs energy. Its stare causes victims to freeze from the inside." - icon = 'icons/mob/animal.dmi' - icon_state = "Basilisk" - icon_living = "Basilisk" - icon_aggro = "Basilisk_alert" - icon_dead = "Basilisk_dead" - icon_gib = "syndicate_gib" - move_to_delay = 20 - projectiletype = /obj/item/projectile/temp/basilisk - projectilesound = 'sound/weapons/pierce.ogg' - ranged = 1 - ranged_message = "stares" - ranged_cooldown_cap = 20 - throw_message = "does nothing against the hard shell of" - vision_range = 2 - speed = 3 - maxHealth = 200 - health = 200 - harm_intent_damage = 5 - melee_damage_lower = 12 - melee_damage_upper = 12 - attacktext = "bites into" - a_intent = "harm" - attack_sound = 'sound/weapons/bladeslice.ogg' - ranged_cooldown_cap = 4 - aggro_vision_range = 9 - idle_vision_range = 2 - -/obj/item/projectile/temp/basilisk - name = "freezing blast" - icon_state = "ice_2" - damage = 0 - damage_type = BURN - nodamage = 1 - flag = "energy" - temperature = 50 - -/mob/living/simple_animal/hostile/asteroid/basilisk/GiveTarget(var/new_target) - target = new_target - if(target != null) - Aggro() - stance = HOSTILE_STANCE_ATTACK - if(isliving(target)) - var/mob/living/L = target - if(L.bodytemperature > 261) - L.bodytemperature = 261 - visible_message("The [src.name]'s stare chills [L.name] to the bone!") - return - -/mob/living/simple_animal/hostile/asteroid/basilisk/ex_act(severity) - switch(severity) - if(1.0) - gib() - if(2.0) - adjustBruteLoss(140) - if(3.0) - adjustBruteLoss(110) - -/mob/living/simple_animal/hostile/asteroid/basilisk/Die() - var/counter - for(counter=0, counter<2, counter++) - var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc) - D.layer = 4.1 - ..() - -/mob/living/simple_animal/hostile/asteroid/goldgrub - name = "goldgrub" - desc = "A worm that grows fat from eating everything in its sight. Seems to enjoy precious metals and other shiny things, hence the name." - icon = 'icons/mob/animal.dmi' - icon_state = "Goldgrub" - icon_living = "Goldgrub" - icon_aggro = "Goldgrub_alert" - icon_dead = "Goldgrub_dead" - icon_gib = "syndicate_gib" - vision_range = 2 - aggro_vision_range = 9 - idle_vision_range = 2 - move_to_delay = 5 - friendly = "harmlessly rolls into" - maxHealth = 45 - health = 45 - harm_intent_damage = 5 - melee_damage_lower = 0 - melee_damage_upper = 0 - attacktext = "barrels into" - a_intent = "help" - throw_message = "sinks in slowly, before being pushed out of " - status_flags = CANPUSH - search_objects = 1 - wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver, - /obj/item/weapon/ore/uranium) - - var/list/ore_types_eaten = list() - var/alerted = 0 - var/ore_eaten = 1 - var/chase_time = 100 - -/mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(var/new_target) - target = new_target - if(target != null) - if(istype(target, /obj/item/weapon/ore)) - visible_message("The [src.name] looks at [target.name] with hungry eyes.") - stance = HOSTILE_STANCE_ATTACK - return - if(isliving(target)) - Aggro() - stance = HOSTILE_STANCE_ATTACK - visible_message("The [src.name] tries to flee from [target.name]!") - retreat_distance = 10 - minimum_distance = 10 - Burrow() - return - return - -/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget() - if(istype(target, /obj/item/weapon/ore)) - EatOre(target) - return - ..() - -/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/EatOre(var/atom/targeted_ore) - for(var/obj/item/weapon/ore/O in targeted_ore.loc) - ore_eaten++ - if(!(O.type in ore_types_eaten)) - ore_types_eaten += O.type - qdel(O) - if(ore_eaten > 5)//Limit the scope of the reward you can get, or else things might get silly - ore_eaten = 5 - visible_message("The ore was swallowed whole!") - -/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time - if(!alerted) - alerted = 1 - spawn(chase_time) - if(alerted) - visible_message("The [src.name] buries into the ground, vanishing from sight!") - qdel(src) - -/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Reward() - if(!ore_eaten || ore_types_eaten.len == 0) - return - visible_message("[src] spits up the contents of its stomach before dying!") - var/counter - for(var/R in ore_types_eaten) - for(counter=0, counter < ore_eaten, counter++) - new R(src.loc) - ore_types_eaten.Cut() - ore_eaten = 0 - - -/mob/living/simple_animal/hostile/asteroid/goldgrub/bullet_act(var/obj/item/projectile/P) - visible_message("The [P.name] was repelled by [src.name]'s girth!") - return - -/mob/living/simple_animal/hostile/asteroid/goldgrub/Die() - alerted = 0 - Reward() - ..() - -/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage) - idle_vision_range = 9 - ..() - -/mob/living/simple_animal/hostile/asteroid/hivelord - name = "hivelord" - desc = "A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original." - icon = 'icons/mob/animal.dmi' - icon_state = "Hivelord" - icon_living = "Hivelord" - icon_aggro = "Hivelord_alert" - icon_dead = "Hivelord_dead" - icon_gib = "syndicate_gib" - mouse_opacity = 2 - move_to_delay = 14 - ranged = 1 - vision_range = 5 - aggro_vision_range = 9 - idle_vision_range = 5 - speed = 3 - maxHealth = 75 - health = 75 - harm_intent_damage = 5 - melee_damage_lower = 0 - melee_damage_upper = 0 - attacktext = "lashes out at" - throw_message = "falls right through the strange body of the" - ranged_cooldown = 0 - ranged_cooldown_cap = 0 - environment_smash = 0 - retreat_distance = 3 - minimum_distance = 3 - pass_flags = PASSTABLE - -/mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(var/the_target) - var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/A = new /mob/living/simple_animal/hostile/asteroid/hivelordbrood(src.loc) - A.GiveTarget(target) - A.friends = friends - A.faction = faction - return - -/mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget() - OpenFire() - -/mob/living/simple_animal/hostile/asteroid/hivelord/Die() - new /obj/item/asteroid/hivelord_core(src.loc) - mouse_opacity = 1 - ..() - -/obj/item/asteroid/hivelord_core - name = "hivelord remains" - desc = "All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating." - icon = 'icons/obj/food.dmi' - icon_state = "boiledrorocore" - var/inert = 0 - -/obj/item/asteroid/hivelord_core/New() - spawn(1200) - inert = 1 - desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested." - -/obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(inert) - user << "[src] have become inert, its healing properties are no more." - return - else - if(H.stat == DEAD) - user << "[src] are useless on the dead." - return - if(H != user) - H.visible_message("[user] forces [H] to eat [src]... they quickly regenerate all injuries!") - else - user << "You chomp into [src], barely managing to hold it down, but feel amazingly refreshed in mere moments." - playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) - H.revive() - qdel(src) - ..() - -/mob/living/simple_animal/hostile/asteroid/hivelordbrood - name = "hivelord brood" - desc = "A fragment of the original Hivelord, rallying behind its original. One isn't much of a threat, but..." - icon = 'icons/mob/animal.dmi' - icon_state = "Hivelordbrood" - icon_living = "Hivelordbrood" - icon_aggro = "Hivelordbrood" - icon_dead = "Hivelordbrood" - icon_gib = "syndicate_gib" - mouse_opacity = 2 - move_to_delay = 1 - friendly = "buzzes near" - vision_range = 10 - speed = 3 - maxHealth = 1 - health = 1 - harm_intent_damage = 5 - melee_damage_lower = 2 - melee_damage_upper = 2 - attacktext = "slashes" - throw_message = "falls right through the strange body of the" - environment_smash = 0 - pass_flags = PASSTABLE - -/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New() - ..() - spawn(100) - qdel(src) - -/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Die() - qdel(src) - -/mob/living/simple_animal/hostile/asteroid/goliath - name = "goliath" - desc = "A massive beast that uses long tentacles to ensare its prey, threatening them is not advised under any conditions." - icon = 'icons/mob/animal.dmi' - icon_state = "Goliath" - icon_living = "Goliath" - icon_aggro = "Goliath_alert" - icon_dead = "Goliath_dead" - icon_gib = "syndicate_gib" - attack_sound = 'sound/weapons/punch4.ogg' - mouse_opacity = 2 - move_to_delay = 40 - ranged = 1 - ranged_cooldown_cap = 8 - friendly = "wails at" - vision_range = 4 - speed = 3 - maxHealth = 300 - health = 300 - harm_intent_damage = 0 - melee_damage_lower = 25 - melee_damage_upper = 25 - attacktext = "pulverizes" - throw_message = "does nothing to the rocky hide of the" - aggro_vision_range = 9 - idle_vision_range = 5 - -/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire() - visible_message("The [src.name] digs its tentacles under [target.name]!") - var/tturf = get_turf(target) - new /obj/effect/goliath_tentacle/original(tturf) - ranged_cooldown = ranged_cooldown_cap - return - -/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(var/damage) - ranged_cooldown-- - ..() - -/obj/effect/goliath_tentacle/ - name = "Goliath tentacle" - icon = 'icons/mob/animal.dmi' - icon_state = "Goliath_tentacle" - -/obj/effect/goliath_tentacle/New() - var/turftype = get_turf(src) - if(istype(turftype, /turf/simulated/mineral)) - var/turf/simulated/mineral/M = turftype - M.gets_drilled() - spawn(20) - Trip() - -/obj/effect/goliath_tentacle/original - -/obj/effect/goliath_tentacle/original/New() - var/list/directions = cardinal.Copy() - var/counter - for(counter = 1, counter <= 3, counter++) - var/spawndir = pick(directions) - directions -= spawndir - var/turf/T = get_step(src,spawndir) - new /obj/effect/goliath_tentacle(T) - ..() - -/obj/effect/goliath_tentacle/proc/Trip() - for(var/mob/living/M in src.loc) - M.Weaken(5) - visible_message("The [src.name] knocks [M.name] down!") - qdel(src) - -/obj/effect/goliath_tentacle/Crossed(AM as mob|obj) - if(isliving(AM)) - Trip() - return - ..() - -/mob/living/simple_animal/hostile/asteroid/goliath/Die() - var/obj/item/asteroid/goliath_hide/G = new /obj/item/asteroid/goliath_hide(src.loc) - G.layer = 4.1 - ..() - -/obj/item/asteroid/goliath_hide - name = "goliath hide plates" - desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna." - icon = 'icons/obj/items.dmi' - icon_state = "goliath_hide" - w_class = 3 - layer = 4 - -/obj/item/asteroid/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) - if(proximity_flag) - if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining)) - var/obj/item/clothing/C = target - var/current_armor = C.armor - if(current_armor.["melee"] < 90) - current_armor.["melee"] = min(current_armor.["melee"] + 10, 90) - user << "You strengthen [target], improving its resistance against melee attacks." - qdel(src) - else - user << "You can't improve [C] any further." - return +/mob/living/simple_animal/hostile/asteroid/ + vision_range = 2 + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + unsuitable_atoms_damage = 15 + faction = "mining" + environment_smash = 2 + minbodytemp = 0 + heat_damage_per_tick = 20 + response_help = "pokes" + response_disarm = "shoves" + response_harm = "strikes" + status_flags = 0 + a_intent = "harm" + var/throw_message = "bounces off of" + var/icon_aggro = null // for swapping to when we get aggressive + +/mob/living/simple_animal/hostile/asteroid/Aggro() + ..() + icon_state = icon_aggro + +/mob/living/simple_animal/hostile/asteroid/LoseAggro() + ..() + icon_state = icon_living + +/mob/living/simple_animal/hostile/asteroid/bullet_act(var/obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills + if(!stat) + Aggro() + if(P.damage < 30 && P.damage_type != BRUTE) + P.damage = (P.damage / 3) + visible_message("[P] has a reduced effect on [src]!") + ..() + +/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy + if(istype(AM, /obj/item)) + var/obj/item/T = AM + if(!stat) + Aggro() + if(T.throwforce <= 20) + visible_message("The [T.name] [src.throw_message] [src.name]!") + return + ..() + +/mob/living/simple_animal/hostile/asteroid/basilisk + name = "basilisk" + desc = "A territorial beast, covered in a thick shell that absorbs energy. Its stare causes victims to freeze from the inside." + icon = 'icons/mob/animal.dmi' + icon_state = "Basilisk" + icon_living = "Basilisk" + icon_aggro = "Basilisk_alert" + icon_dead = "Basilisk_dead" + icon_gib = "syndicate_gib" + move_to_delay = 20 + projectiletype = /obj/item/projectile/temp/basilisk + projectilesound = 'sound/weapons/pierce.ogg' + ranged = 1 + ranged_message = "stares" + ranged_cooldown_cap = 20 + throw_message = "does nothing against the hard shell of" + vision_range = 2 + speed = 3 + maxHealth = 200 + health = 200 + harm_intent_damage = 5 + melee_damage_lower = 12 + melee_damage_upper = 12 + attacktext = "bites into" + a_intent = "harm" + attack_sound = 'sound/weapons/bladeslice.ogg' + ranged_cooldown_cap = 4 + aggro_vision_range = 9 + idle_vision_range = 2 + turns_per_move = 5 + +/obj/item/projectile/temp/basilisk + name = "freezing blast" + icon_state = "ice_2" + damage = 0 + damage_type = BURN + nodamage = 1 + flag = "energy" + temperature = 50 + +/mob/living/simple_animal/hostile/asteroid/basilisk/GiveTarget(var/new_target) + target = new_target + if(target != null) + Aggro() + stance = HOSTILE_STANCE_ATTACK + if(isliving(target)) + var/mob/living/L = target + if(L.bodytemperature > 261) + L.bodytemperature = 261 + visible_message("The [src.name]'s stare chills [L.name] to the bone!") + return + +/mob/living/simple_animal/hostile/asteroid/basilisk/ex_act(severity) + switch(severity) + if(1.0) + gib() + if(2.0) + adjustBruteLoss(140) + if(3.0) + adjustBruteLoss(110) + +/mob/living/simple_animal/hostile/asteroid/basilisk/Die() + var/counter + for(counter=0, counter<2, counter++) + var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc) + D.layer = 4.1 + ..() + +/mob/living/simple_animal/hostile/asteroid/goldgrub + name = "goldgrub" + desc = "A worm that grows fat from eating everything in its sight. Seems to enjoy precious metals and other shiny things, hence the name." + icon = 'icons/mob/animal.dmi' + icon_state = "Goldgrub" + icon_living = "Goldgrub" + icon_aggro = "Goldgrub_alert" + icon_dead = "Goldgrub_dead" + icon_gib = "syndicate_gib" + vision_range = 2 + aggro_vision_range = 9 + idle_vision_range = 2 + move_to_delay = 5 + friendly = "harmlessly rolls into" + maxHealth = 45 + health = 45 + harm_intent_damage = 5 + melee_damage_lower = 0 + melee_damage_upper = 0 + attacktext = "barrels into" + a_intent = "help" + throw_message = "sinks in slowly, before being pushed out of " + status_flags = CANPUSH + search_objects = 1 + wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver, + /obj/item/weapon/ore/uranium) + + var/list/ore_types_eaten = list() + var/alerted = 0 + var/ore_eaten = 1 + var/chase_time = 100 + +/mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(var/new_target) + target = new_target + if(target != null) + if(istype(target, /obj/item/weapon/ore)) + visible_message("The [src.name] looks at [target.name] with hungry eyes.") + stance = HOSTILE_STANCE_ATTACK + return + if(isliving(target)) + Aggro() + stance = HOSTILE_STANCE_ATTACK + visible_message("The [src.name] tries to flee from [target.name]!") + retreat_distance = 10 + minimum_distance = 10 + Burrow() + return + return + +/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget() + if(istype(target, /obj/item/weapon/ore)) + EatOre(target) + return + ..() + +/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/EatOre(var/atom/targeted_ore) + for(var/obj/item/weapon/ore/O in targeted_ore.loc) + ore_eaten++ + if(!(O.type in ore_types_eaten)) + ore_types_eaten += O.type + qdel(O) + if(ore_eaten > 5)//Limit the scope of the reward you can get, or else things might get silly + ore_eaten = 5 + visible_message("The ore was swallowed whole!") + +/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time + if(!alerted) + alerted = 1 + spawn(chase_time) + if(alerted) + visible_message("The [src.name] buries into the ground, vanishing from sight!") + qdel(src) + +/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Reward() + if(!ore_eaten || ore_types_eaten.len == 0) + return + visible_message("[src] spits up the contents of its stomach before dying!") + var/counter + for(var/R in ore_types_eaten) + for(counter=0, counter < ore_eaten, counter++) + new R(src.loc) + ore_types_eaten.Cut() + ore_eaten = 0 + + +/mob/living/simple_animal/hostile/asteroid/goldgrub/bullet_act(var/obj/item/projectile/P) + visible_message("The [P.name] was repelled by [src.name]'s girth!") + return + +/mob/living/simple_animal/hostile/asteroid/goldgrub/Die() + alerted = 0 + Reward() + ..() + +/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage) + idle_vision_range = 9 + ..() + +/mob/living/simple_animal/hostile/asteroid/hivelord + name = "hivelord" + desc = "A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original." + icon = 'icons/mob/animal.dmi' + icon_state = "Hivelord" + icon_living = "Hivelord" + icon_aggro = "Hivelord_alert" + icon_dead = "Hivelord_dead" + icon_gib = "syndicate_gib" + mouse_opacity = 2 + move_to_delay = 14 + ranged = 1 + vision_range = 5 + aggro_vision_range = 9 + idle_vision_range = 5 + speed = 3 + maxHealth = 75 + health = 75 + harm_intent_damage = 5 + melee_damage_lower = 0 + melee_damage_upper = 0 + attacktext = "lashes out at" + throw_message = "falls right through the strange body of the" + ranged_cooldown = 0 + ranged_cooldown_cap = 0 + environment_smash = 0 + retreat_distance = 3 + minimum_distance = 3 + pass_flags = PASSTABLE + +/mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(var/the_target) + var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/A = new /mob/living/simple_animal/hostile/asteroid/hivelordbrood(src.loc) + A.GiveTarget(target) + A.friends = friends + A.faction = faction + return + +/mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget() + OpenFire() + +/mob/living/simple_animal/hostile/asteroid/hivelord/Die() + new /obj/item/asteroid/hivelord_core(src.loc) + mouse_opacity = 1 + ..() + +/obj/item/asteroid/hivelord_core + name = "hivelord remains" + desc = "All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating." + icon = 'icons/obj/food.dmi' + icon_state = "boiledrorocore" + var/inert = 0 + +/obj/item/asteroid/hivelord_core/New() + spawn(1200) + inert = 1 + desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested." + +/obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(inert) + user << "[src] have become inert, its healing properties are no more." + return + else + if(H.stat == DEAD) + user << "[src] are useless on the dead." + return + if(H != user) + H.visible_message("[user] forces [H] to eat [src]... they quickly regenerate all injuries!") + else + user << "You chomp into [src], barely managing to hold it down, but feel amazingly refreshed in mere moments." + playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + H.revive() + qdel(src) + ..() + +/mob/living/simple_animal/hostile/asteroid/hivelordbrood + name = "hivelord brood" + desc = "A fragment of the original Hivelord, rallying behind its original. One isn't much of a threat, but..." + icon = 'icons/mob/animal.dmi' + icon_state = "Hivelordbrood" + icon_living = "Hivelordbrood" + icon_aggro = "Hivelordbrood" + icon_dead = "Hivelordbrood" + icon_gib = "syndicate_gib" + mouse_opacity = 2 + move_to_delay = 1 + friendly = "buzzes near" + vision_range = 10 + speed = 3 + maxHealth = 1 + health = 1 + harm_intent_damage = 5 + melee_damage_lower = 2 + melee_damage_upper = 2 + attacktext = "slashes" + throw_message = "falls right through the strange body of the" + environment_smash = 0 + pass_flags = PASSTABLE + +/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New() + ..() + spawn(100) + qdel(src) + +/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Die() + qdel(src) + +/mob/living/simple_animal/hostile/asteroid/goliath + name = "goliath" + desc = "A massive beast that uses long tentacles to ensare its prey, threatening them is not advised under any conditions." + icon = 'icons/mob/animal.dmi' + icon_state = "Goliath" + icon_living = "Goliath" + icon_aggro = "Goliath_alert" + icon_dead = "Goliath_dead" + icon_gib = "syndicate_gib" + attack_sound = 'sound/weapons/punch4.ogg' + mouse_opacity = 2 + move_to_delay = 40 + ranged = 1 + ranged_cooldown_cap = 8 + friendly = "wails at" + vision_range = 4 + speed = 3 + maxHealth = 300 + health = 300 + harm_intent_damage = 0 + melee_damage_lower = 25 + melee_damage_upper = 25 + attacktext = "pulverizes" + throw_message = "does nothing to the rocky hide of the" + aggro_vision_range = 9 + idle_vision_range = 5 + anchored = 1 //Stays anchored until death as to be unpullable + +/mob/living/simple_animal/hostile/asteroid/goliath/revive() + anchored = 1 + ..() + +/mob/living/simple_animal/hostile/asteroid/goliath/Die() + anchored = 0 + ..() + +/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire() + var/tturf = get_turf(target) + if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen + visible_message("The [src.name] digs its tentacles under [target.name]!") + new /obj/effect/goliath_tentacle/original(tturf) + ranged_cooldown = ranged_cooldown_cap + return + +/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(var/damage) + ranged_cooldown-- + ..() + +/obj/effect/goliath_tentacle/ + name = "Goliath tentacle" + icon = 'icons/mob/animal.dmi' + icon_state = "Goliath_tentacle" + +/obj/effect/goliath_tentacle/New() + var/turftype = get_turf(src) + if(istype(turftype, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = turftype + M.gets_drilled() + spawn(20) + Trip() + +/obj/effect/goliath_tentacle/original + +/obj/effect/goliath_tentacle/original/New() + var/list/directions = cardinal.Copy() + var/counter + for(counter = 1, counter <= 3, counter++) + var/spawndir = pick(directions) + directions -= spawndir + var/turf/T = get_step(src,spawndir) + new /obj/effect/goliath_tentacle(T) + ..() + +/obj/effect/goliath_tentacle/proc/Trip() + for(var/mob/living/M in src.loc) + M.Weaken(5) + visible_message("The [src.name] knocks [M.name] down!") + qdel(src) + +/obj/effect/goliath_tentacle/Crossed(AM as mob|obj) + if(isliving(AM)) + Trip() + return + ..() + +/mob/living/simple_animal/hostile/asteroid/goliath/Die() + var/obj/item/asteroid/goliath_hide/G = new /obj/item/asteroid/goliath_hide(src.loc) + G.layer = 4.1 + ..() + +/obj/item/asteroid/goliath_hide + name = "goliath hide plates" + desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna." + icon = 'icons/obj/items.dmi' + icon_state = "goliath_hide" + w_class = 3 + layer = 4 + +/obj/item/asteroid/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) + if(proximity_flag) + if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining)) + var/obj/item/clothing/C = target + var/current_armor = C.armor + if(current_armor.["melee"] < 80) + current_armor.["melee"] = min(current_armor.["melee"] + 10, 80) + user << "You strengthen [target], improving its resistance against melee attacks." + qdel(src) + else + user << "You can't improve [C] any further." + return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index faee3b2378c..204b66bd922 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -662,10 +662,10 @@ var/list/slot_equipment_priority = list( \ canmove = 1 if(buckled) lying = 90 * bed + anchored = buckled else if((ko || resting) && !lying) fall(ko) - anchored = buckled canmove = !(ko || resting || stunned || buckled) density = !lying update_transform() diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index edfca4eed66..be9f64f54f7 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -44,7 +44,7 @@ flags = CONDUCT slot_flags = SLOT_BELT item_state = "syringe_kit" - m_amt = 50000 + m_amt = 30000 throwforce = 2 w_class = 1.0 throw_speed = 3 diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index dfd1e60856d..af0743fe06c 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -56,7 +56,7 @@ icon_state = "blshell" caliber = "shotgun" projectile_type = /obj/item/projectile/bullet - m_amt = 12500 + m_amt = 4000 /obj/item/ammo_casing/shotgun/buckshot @@ -73,7 +73,7 @@ desc = "A weak beanbag shell." icon_state = "bshell" projectile_type = /obj/item/projectile/bullet/weakbullet - m_amt = 500 + m_amt = 250 /obj/item/ammo_casing/shotgun/stunshell @@ -81,7 +81,7 @@ desc = "A stunning shell." icon_state = "stunshell" projectile_type = /obj/item/projectile/bullet/stunshot - m_amt = 2500 + m_amt = 200 /obj/item/ammo_casing/shotgun/incendiary @@ -89,7 +89,6 @@ desc = "An incendiary shell" icon_state = "ishell" projectile_type = /obj/item/projectile/bullet/incendiary/shell - m_amt = 12500 /obj/item/ammo_casing/shotgun/dart @@ -97,7 +96,6 @@ desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical." icon_state = "cshell" projectile_type = /obj/item/projectile/bullet/dart - m_amt = 12500 /obj/item/ammo_casing/shotgun/dart/New() ..() diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index d676bbc87bf..98e6210c366 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -145,7 +145,7 @@ name = "large beaker" desc = "A large beaker. Can hold up to 100 units." icon_state = "beakerlarge" - g_amt = 5000 + g_amt = 2500 volume = 100 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index b7aeb221939..5e126658836 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -8,15 +8,15 @@ For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent, you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum), they are simply references used as part of a "has materials?" type proc. They all start with a $ to denote that they aren't reagents. -The currently supporting non-reagent materials: -- $metal (/obj/item/stack/metal). One sheet = 3750 units. -- $glass (/obj/item/stack/glass). One sheet = 3750 units. -- $plasma (/obj/item/stack/plasma). One sheet = 3750 units. -- $silver (/obj/item/stack/silver). One sheet = 3750 units. -- $gold (/obj/item/stack/gold). One sheet = 3750 units. -- $uranium (/obj/item/stack/uranium). One sheet = 3750 units. -- $diamond (/obj/item/stack/diamond). One sheet = 3750 units. -- $clown (/obj/item/stack/clown). One sheet = 3750 units. ("Bananium") +The currently supporting non-reagent materials. All material amounts are set as the define MINERAL_MATERIAL_AMOUNT, which defaults to 2000 +- $metal (/obj/item/stack/metal). +- $glass (/obj/item/stack/glass). +- $plasma (/obj/item/stack/plasma). +- $silver (/obj/item/stack/silver). +- $gold (/obj/item/stack/gold). +- $uranium (/obj/item/stack/uranium). +- $diamond (/obj/item/stack/diamond). +- $clown (/obj/item/stack/clown). (Insert new ones here) Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials. @@ -72,7 +72,7 @@ datum/design/seccamera id = "seccamera" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/security datum/design/aicore @@ -81,7 +81,7 @@ datum/design/aicore id = "aicore" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/aicore datum/design/aiupload @@ -90,7 +90,7 @@ datum/design/aiupload id = "aiupload" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/aiupload datum/design/borgupload @@ -99,7 +99,7 @@ datum/design/borgupload id = "borgupload" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/borgupload datum/design/med_data @@ -108,7 +108,7 @@ datum/design/med_data id = "med_data" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/med_data datum/design/operating @@ -117,7 +117,7 @@ datum/design/operating id = "operating" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/operating datum/design/pandemic @@ -126,7 +126,7 @@ datum/design/pandemic id = "pandemic" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/pandemic datum/design/scan_console @@ -135,7 +135,7 @@ datum/design/scan_console id = "scan_console" req_tech = list("programming" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/scan_consolenew datum/design/comconsole @@ -144,7 +144,7 @@ datum/design/comconsole id = "comconsole" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/communications datum/design/idcardconsole @@ -153,7 +153,7 @@ datum/design/idcardconsole id = "idcardconsole" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/card datum/design/crewconsole @@ -162,7 +162,7 @@ datum/design/crewconsole id = "crewconsole" req_tech = list("programming" = 3, "magnets" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/crew datum/design/teleconsole @@ -171,7 +171,7 @@ datum/design/teleconsole id = "teleconsole" req_tech = list("programming" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/teleporter datum/design/secdata @@ -180,7 +180,7 @@ datum/design/secdata id = "secdata" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/secure_data datum/design/atmosalerts @@ -189,7 +189,7 @@ datum/design/atmosalerts id = "atmosalerts" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/atmos_alert datum/design/air_management @@ -198,7 +198,7 @@ datum/design/air_management id = "air_management" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/air_management datum/design/robocontrol @@ -207,7 +207,7 @@ datum/design/robocontrol id = "robocontrol" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/robotics datum/design/clonecontrol @@ -216,7 +216,7 @@ datum/design/clonecontrol id = "clonecontrol" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/cloning datum/design/clonepod @@ -225,7 +225,7 @@ datum/design/clonepod id = "clonepod" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/clonepod datum/design/clonescanner @@ -234,7 +234,7 @@ datum/design/clonescanner id = "clonescanner" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/clonescanner datum/design/arcadebattle @@ -243,7 +243,7 @@ datum/design/arcadebattle id = "arcademachine" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/arcade/battle datum/design/orion_trail @@ -252,7 +252,7 @@ datum/design/orion_trail id = "arcademachine" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/arcade/orion_trail datum/design/powermonitor @@ -261,7 +261,7 @@ datum/design/powermonitor id = "powermonitor" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/powermonitor datum/design/solarcontrol @@ -270,7 +270,7 @@ datum/design/solarcontrol id = "solarcontrol" req_tech = list("programming" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/solar_control datum/design/prisonmanage @@ -279,7 +279,7 @@ datum/design/prisonmanage id = "prisonmanage" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/prisoner datum/design/mechacontrol @@ -288,7 +288,7 @@ datum/design/mechacontrol id = "mechacontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha_control datum/design/mechapower @@ -297,7 +297,7 @@ datum/design/mechapower id = "mechapower" req_tech = list("programming" = 2, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mech_bay_power_console datum/design/rdconsole @@ -306,7 +306,7 @@ datum/design/rdconsole id = "rdconsole" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/rdconsole datum/design/ordercomp @@ -315,7 +315,7 @@ datum/design/ordercomp id = "ordercomp" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/ordercomp datum/design/supplycomp @@ -324,7 +324,7 @@ datum/design/supplycomp id = "supplycomp" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/supplycomp datum/design/mining @@ -333,7 +333,7 @@ datum/design/mining id = "mining" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mining datum/design/comm_monitor @@ -342,7 +342,7 @@ datum/design/comm_monitor id = "comm_monitor" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/comm_monitor datum/design/comm_server @@ -351,7 +351,7 @@ datum/design/comm_server id = "comm_server" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/comm_server datum/design/message_monitor @@ -360,7 +360,7 @@ datum/design/message_monitor id = "message_monitor" req_tech = list("programming" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/message_monitor datum/design/comm_traffic @@ -369,7 +369,7 @@ datum/design/comm_traffic id = "comm_traffic" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/comm_traffic datum/design/telesci_console @@ -378,7 +378,7 @@ datum/design/telesci_console id = "telesci_console" req_tech = list("programming" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telesci_console datum/design/aifixer @@ -387,7 +387,7 @@ datum/design/aifixer id = "aifixer" req_tech = list("programming" = 3, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/aifixer /////////////////////////////////// @@ -399,7 +399,7 @@ datum/design/safeguard_module id = "safeguard_module" req_tech = list("programming" = 3, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/supplied/safeguard datum/design/onehuman_module @@ -408,7 +408,7 @@ datum/design/onehuman_module id = "onehuman_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/zeroth/oneHuman datum/design/protectstation_module @@ -417,7 +417,7 @@ datum/design/protectstation_module id = "protectstation_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/supplied/protectStation /*datum/design/notele_module @@ -426,7 +426,7 @@ datum/design/protectstation_module id = "notele_module" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/teleporterOffline"*/ datum/design/quarantine_module @@ -435,7 +435,7 @@ datum/design/quarantine_module id = "quarantine_module" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/supplied/quarantine datum/design/oxygen_module @@ -444,7 +444,7 @@ datum/design/oxygen_module id = "oxygen_module" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/supplied/oxygen datum/design/freeform_module @@ -453,7 +453,7 @@ datum/design/freeform_module id = "freeform_module" req_tech = list("programming" = 4, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/supplied/freeform datum/design/reset_module @@ -462,7 +462,7 @@ datum/design/reset_module id = "reset_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$gold" = 100) build_path = /obj/item/weapon/aiModule/reset datum/design/purge_module @@ -471,7 +471,7 @@ datum/design/purge_module id = "purge_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/reset/purge datum/design/freeformcore_module @@ -480,7 +480,7 @@ datum/design/freeformcore_module id = "freeformcore_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/freeformcore datum/design/asimov @@ -489,7 +489,7 @@ datum/design/asimov id = "asimov_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/full/asimov datum/design/paladin_module @@ -498,7 +498,7 @@ datum/design/paladin_module id = "paladin_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/full/paladin datum/design/tyrant_module @@ -507,7 +507,7 @@ datum/design/tyrant_module id = "tyrant_module" req_tech = list("programming" = 4, "syndicate" = 2, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/full/tyrant datum/design/corporate_module @@ -516,7 +516,7 @@ datum/design/corporate_module id = "corporate_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/full/corp datum/design/custom_module @@ -525,7 +525,7 @@ datum/design/custom_module id = "custom_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list("$glass" = 1000, "sacid" = 20, "$diamond" = 100) build_path = /obj/item/weapon/aiModule/core/full/custom @@ -538,7 +538,7 @@ datum/design/subspace_receiver id = "s-receiver" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/receiver datum/design/telecomms_bus @@ -547,7 +547,7 @@ datum/design/telecomms_bus id = "s-bus" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/bus datum/design/telecomms_hub @@ -556,7 +556,7 @@ datum/design/telecomms_hub id = "s-hub" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/hub datum/design/telecomms_relay @@ -565,7 +565,7 @@ datum/design/telecomms_relay id = "s-relay" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/relay datum/design/telecomms_processor @@ -574,7 +574,7 @@ datum/design/telecomms_processor id = "s-processor" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/processor datum/design/telecomms_server @@ -583,7 +583,7 @@ datum/design/telecomms_server id = "s-server" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/server datum/design/subspace_broadcaster @@ -592,7 +592,7 @@ datum/design/subspace_broadcaster id = "s-broadcaster" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telecomms/broadcaster /////////////////////////////////// @@ -627,7 +627,7 @@ datum/design/ripley_main id = "ripley_main" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/ripley/main datum/design/ripley_peri @@ -636,7 +636,7 @@ datum/design/ripley_peri id = "ripley_peri" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/ripley/peripherals datum/design/odysseus_main @@ -645,7 +645,7 @@ datum/design/odysseus_main id = "odysseus_main" req_tech = list("programming" = 3,"biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/odysseus/main datum/design/odysseus_peri @@ -654,7 +654,7 @@ datum/design/odysseus_peri id = "odysseus_peri" req_tech = list("programming" = 3,"biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/odysseus/peripherals datum/design/gygax_main @@ -663,7 +663,7 @@ datum/design/gygax_main id = "gygax_main" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/gygax/main datum/design/gygax_peri @@ -672,7 +672,7 @@ datum/design/gygax_peri id = "gygax_peri" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/gygax/peripherals datum/design/gygax_targ @@ -681,7 +681,7 @@ datum/design/gygax_targ id = "gygax_targ" req_tech = list("programming" = 4, "combat" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/gygax/targeting datum/design/durand_main @@ -690,7 +690,7 @@ datum/design/durand_main id = "durand_main" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/durand/main datum/design/durand_peri @@ -699,7 +699,7 @@ datum/design/durand_peri id = "durand_peri" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/durand/peripherals datum/design/durand_targ @@ -708,7 +708,7 @@ datum/design/durand_targ id = "durand_targ" req_tech = list("programming" = 4, "combat" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/durand/targeting datum/design/honker_main @@ -717,7 +717,7 @@ datum/design/honker_main id = "honker_main" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/honker/main datum/design/honker_peri @@ -726,7 +726,7 @@ datum/design/honker_peri id = "honker_peri" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/honker/peripherals datum/design/honker_targ @@ -735,7 +735,7 @@ datum/design/honker_targ id = "honker_targ" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mecha/honker/targeting //////////////////////////////////////// @@ -941,7 +941,7 @@ datum/design/tech_disk datum/design/RPED name = "Rapid Part Exchange Device" - desc = "Special mechanical module made to store, sort, and apply standart machine parts." + desc = "Special mechanical module made to store, sort, and apply standard machine parts." id = "rped" req_tech = list("engineering" = 3, "materials" = 3) @@ -1228,7 +1228,7 @@ datum/design/smes id = "smes" req_tech = list("programming" = 4, "power" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/smes datum/design/turbine_computer @@ -1237,7 +1237,7 @@ datum/design/turbine_computer id = "power_turbine_console" req_tech = list("programming" = 4, "power" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/turbine_computer datum/design/power_compressor @@ -1246,7 +1246,7 @@ datum/design/power_compressor id = "power_compressor" req_tech = list("programming" = 4, "power" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/power_compressor datum/design/power_turbine @@ -1255,7 +1255,7 @@ datum/design/power_turbine id = "power_turbine" req_tech = list("programming" = 4, "power" = 4, "engineering" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/power_turbine datum/design/teleport_station @@ -1264,7 +1264,7 @@ datum/design/teleport_station id = "tele_station" req_tech = list("programming" = 4, "bluespace" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/teleporter_station datum/design/teleport_hub @@ -1273,7 +1273,7 @@ datum/design/teleport_hub id = "tele_hub" req_tech = list("programming" = 3, "bluespace" = 5, "materials" = 4, "engineering" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/teleporter_hub datum/design/telepad @@ -1282,7 +1282,7 @@ datum/design/telepad id = "telepad" req_tech = list("programming" = 4, "bluespace" = 4, "materials" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/telesci_pad datum/design/sleeper @@ -1291,7 +1291,7 @@ datum/design/sleeper id = "sleeper" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/sleeper datum/design/cryotube @@ -1300,7 +1300,7 @@ datum/design/cryotube id = "cryotube" req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/cryo_tube datum/design/thermomachine @@ -1309,7 +1309,7 @@ datum/design/thermomachine id = "thermomachine" req_tech = list("programming" = 3, "plasmatech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/thermomachine datum/design/biogenerator @@ -1318,7 +1318,7 @@ datum/design/biogenerator id = "biogenerator" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/biogenerator datum/design/hydroponics @@ -1327,7 +1327,7 @@ datum/design/hydroponics id = "hydro_tray" req_tech = list("programming" = 1, "biotech" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/hydroponics datum/design/microwave @@ -1336,7 +1336,7 @@ datum/design/microwave id = "microwave" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/microwave datum/design/chem_dispenser @@ -1345,7 +1345,7 @@ datum/design/chem_dispenser id = "chem_dispenser" req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 4, "materials" = 4, "plasmatech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/chem_dispenser datum/design/destructive_analyzer @@ -1354,7 +1354,7 @@ datum/design/destructive_analyzer id = "destructive_analyzer" req_tech = list("programming" = 2, "magnets" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/destructive_analyzer datum/design/protolathe @@ -1363,7 +1363,7 @@ datum/design/protolathe id = "protolathe" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/protolathe datum/design/circuit_imprinter @@ -1372,7 +1372,7 @@ datum/design/circuit_imprinter id = "circuit_imprinter" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/circuit_imprinter datum/design/autolathe @@ -1381,7 +1381,7 @@ datum/design/autolathe id = "autolathe" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/autolathe datum/design/rdservercontrol @@ -1390,7 +1390,7 @@ datum/design/rdservercontrol id = "rdservercontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/rdservercontrol datum/design/rdserver @@ -1399,7 +1399,7 @@ datum/design/rdserver id = "rdserver" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/rdserver datum/design/mechfab @@ -1408,7 +1408,7 @@ datum/design/mechfab id = "mechfab" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mechfab @@ -1418,7 +1418,7 @@ datum/design/cyborgrecharger id = "cyborgrecharger" req_tech = list("powerstorage" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/cyborgrecharger datum/design/mech_recharger @@ -1427,7 +1427,7 @@ datum/design/mech_recharger id = "mech_recharger" req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/mech_recharger datum/design/vendor @@ -1436,7 +1436,7 @@ datum/design/vendor id = "vendor" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/vendor @@ -1451,7 +1451,7 @@ datum/design/pacman req_tech = list("programming" = 3, "plasmatech" = 3, "powerstorage" = 3, "engineering" = 3) build_type = IMPRINTER reliability = 79 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/pacman datum/design/superpacman @@ -1461,7 +1461,7 @@ datum/design/superpacman req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4) build_type = IMPRINTER reliability = 76 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/pacman/super datum/design/mrspacman @@ -1471,7 +1471,7 @@ datum/design/mrspacman req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 5) build_type = IMPRINTER reliability = 74 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/pacman/mrs @@ -1564,7 +1564,7 @@ datum/design/nuclear_gun id = "nuclear_gun" req_tech = list("combat" = 3, "materials" = 5, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 500) + materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 2000) reliability = 76 build_path = /obj/item/weapon/gun/energy/gun/nuclear locked = 1 @@ -1585,7 +1585,7 @@ datum/design/lasercannon id = "lasercannon" req_tech = list("combat" = 4, "materials" = 3, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$metal" = 10000, "$glass" = 1000, "$diamond" = 2000) + materials = list("$metal" = 10000, "$glass" = 2000, "$diamond" = 2000) build_path = /obj/item/weapon/gun/energy/lasercannon locked = 1 @@ -1692,7 +1692,7 @@ datum/design/ammo_9mm id = "ammo_9mm" req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE - materials = list("$metal" = 3750, "$silver" = 100) + materials = list("$metal" = 2000) build_path = /obj/item/ammo_box/c9mm datum/design/mag_smg @@ -1701,7 +1701,7 @@ datum/design/mag_smg id = "mag_smg" req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE - materials = list("$metal" = 3750, "$silver" = 100) + materials = list("$metal" = 2000) build_path = /obj/item/ammo_box/magazine/msmg9mm datum/design/stunshell @@ -1710,7 +1710,7 @@ datum/design/stunshell id = "stunshell" req_tech = list("combat" = 3, "materials" = 3) build_type = PROTOLATHE - materials = list("$metal" = 4000) + materials = list("$metal" = 200) build_path = /obj/item/ammo_casing/shotgun/stunshell ///////////////////////////////////////// @@ -1875,7 +1875,7 @@ datum/design/welding_mask id = "weldingmask" req_tech = list("materials" = 2, "engineering" = 2) build_type = PROTOLATHE - materials = list("$metal" = 4000, "$glass" = 2000) + materials = list("$metal" = 4000, "$glass" = 1000) build_path = /obj/item/clothing/mask/gas/welding datum/design/mesons @@ -1904,7 +1904,7 @@ datum/design/night_vision_goggles build_type = PROTOLATHE materials = list("$metal" = 100, "$glass" = 100, "$uranium" = 1000) build_path = /obj/item/clothing/glasses/night - + datum/design/magboots name = "Magnetic Boots" desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle." diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 33509b2847c..4e2273b02b1 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -51,8 +51,8 @@ Note: Must be placed west/left of and R&D console to function. max_material_storage = T * 75000 T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) - T += M.rating - efficiency_coeff = T-1 + T += (M.rating/3) + efficiency_coeff = max(T, 1) /obj/machinery/r_n_d/protolathe/proc/check_mat(datum/design/being_built, var/M) switch(M) @@ -92,31 +92,31 @@ Note: Must be placed west/left of and R&D console to function. if(istype(O, /obj/item/weapon/crowbar)) for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) reagents.trans_to(G, G.reagents.maximum_volume) - if(m_amount >= 3750) + if(m_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc) G.amount = round(m_amount / G.perunit) - if(g_amount >= 3750) + if(g_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc) G.amount = round(g_amount / G.perunit) - if(plasma_amount >= 2000) + if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc) G.amount = round(plasma_amount / G.perunit) - if(silver_amount >= 2000) + if(silver_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc) G.amount = round(silver_amount / G.perunit) - if(gold_amount >= 2000) + if(gold_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc) G.amount = round(gold_amount / G.perunit) - if(uranium_amount >= 2000) + if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc) G.amount = round(uranium_amount / G.perunit) - if(diamond_amount >= 2000) + if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc) G.amount = round(diamond_amount / G.perunit) - if(clown_amount >= 2000) + if(clown_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc) G.amount = round(clown_amount / G.perunit) - if(adamantine_amount >= 2000) + if(adamantine_amount >= MINERAL_MATERIAL_AMOUNT) var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine(src.loc) G.amount = round(adamantine_amount / G.perunit) default_deconstruction_crowbar(O) @@ -156,27 +156,27 @@ Note: Must be placed west/left of and R&D console to function. icon_state = "protolathe" busy = 1 - use_power(max(1000, (3750*amount/10))) + use_power(max(1000, (MINERAL_MATERIAL_AMOUNT*amount/10))) user << "You add [amount] sheets to the [src.name]." icon_state = "protolathe" if(istype(stack, /obj/item/stack/sheet/metal)) - m_amount += amount * 3750 + m_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/glass)) - g_amount += amount * 3750 + g_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/gold)) - gold_amount += amount * 2000 + gold_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/silver)) - silver_amount += amount * 2000 + silver_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/plasma)) - plasma_amount += amount * 2000 + plasma_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/uranium)) - uranium_amount += amount * 2000 + uranium_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/diamond)) - diamond_amount += amount * 2000 + diamond_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/clown)) - clown_amount += amount * 2000 + clown_amount += amount * MINERAL_MATERIAL_AMOUNT else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine)) - adamantine_amount += amount * 2000 + adamantine_amount += amount * MINERAL_MATERIAL_AMOUNT stack.use(amount) busy = 0 src.updateUsrDialog() diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index f0b26de217c..ebcc675cf43 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -3,8 +3,8 @@ desc = "Retracts stuff." icon = 'icons/obj/surgery.dmi' icon_state = "retractor" - m_amt = 10000 - g_amt = 5000 + m_amt = 6000 + g_amt = 3000 flags = CONDUCT w_class = 1.0 origin_tech = "materials=1;biotech=1" @@ -28,8 +28,8 @@ desc = "This stops bleeding." icon = 'icons/obj/surgery.dmi' icon_state = "cautery" - m_amt = 5000 - g_amt = 2500 + m_amt = 2500 + g_amt = 750 flags = CONDUCT w_class = 1.0 origin_tech = "materials=1;biotech=1" @@ -42,8 +42,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "drill" hitsound = 'sound/weapons/circsawhit.ogg' - m_amt = 15000 - g_amt = 10000 + m_amt = 10000 + g_amt = 6000 flags = CONDUCT force = 15.0 w_class = 3.0 @@ -67,8 +67,8 @@ throwforce = 5.0 throw_speed = 3 throw_range = 5 - m_amt = 10000 - g_amt = 5000 + m_amt = 4000 + g_amt = 1000 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") hitsound = 'sound/weapons/bladeslice.ogg' @@ -93,8 +93,8 @@ throwforce = 9.0 throw_speed = 2 throw_range = 5 - m_amt = 20000 - g_amt = 10000 + m_amt = 10000 + g_amt = 6000 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "sawed", "cut")