diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm index 60c5dd5b99..2c06ae236a 100644 --- a/code/controllers/subsystem/research.dm +++ b/code/controllers/subsystem/research.dm @@ -26,6 +26,13 @@ SUBSYSTEM_DEF(research) var/list/techweb_nodes_hidden = list() //Node ids that should be hidden by default. var/list/techweb_nodes_experimental = list() //Node ids that are exclusive to the BEPIS. + //SKYRAT CHANGE + //PROBLEM COMPUTER CHARGES + var/problem_computer_max_charges = 5 + var/problem_computer_charges = 5 + var/problem_computer_charge_time = 90 SECONDS + var/problem_computer_next_charge_time = 0 + var/list/techweb_point_items = list( //path = list(point type = value) /obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 10000), // - Slime Extracts! - Basics diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 767ef17637..699659dc74 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -58,6 +58,14 @@ SUBSYSTEM_DEF(shuttle) var/realtimeofstart = 0 + //SKYRAT CHANGE + //PROBLEM COMPUTER CHARGES + var/problem_computer_max_charges = 5 + var/problem_computer_charges = 5 + var/problem_computer_charge_time = 90 SECONDS + var/problem_computer_next_charge_time = 0 + //END SKYRAT CHANGE + /datum/controller/subsystem/shuttle/Initialize(timeofday) ordernum = rand(1, 9000) diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index 7f8872ca74..6c3289aa60 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -16,7 +16,6 @@ active_power_usage = 100 armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70) - // The message server itself. /obj/machinery/telecomms/message_server icon = 'icons/obj/machines/research.dmi' @@ -27,6 +26,8 @@ use_power = IDLE_POWER_USE idle_power_usage = 10 active_power_usage = 100 + // SKYRAT EDIT: Adds a circuit for the message server. + circuit = /obj/item/circuitboard/machine/telecomms/message_server id = "Messaging Server" network = "tcommsat" diff --git a/sandcode/code/game/machinery/autodoc.dm b/sandcode/code/game/machinery/autodoc.dm new file mode 100644 index 0000000000..2181c5c673 --- /dev/null +++ b/sandcode/code/game/machinery/autodoc.dm @@ -0,0 +1,167 @@ +/obj/machinery/autodoc + name = "autodoc" + desc = "An advanced machine used for inserting organs and implants into the occupant." + density = TRUE + state_open = FALSE + icon = 'sandcode/icons/obj/machines/autodoc.dmi' + icon_state = "autodoc_machine" + verb_say = "states" + idle_power_usage = 50 + circuit = /obj/item/circuitboard/machine/autodoc + var/obj/item/organ/storedorgan + var/organ_type = /obj/item/organ + var/processing = FALSE + var/surgerytime = 300 + +/obj/machinery/autodoc/Initialize() + . = ..() + update_icon() + +/obj/machinery/autodoc/RefreshParts() + var/max_time = 350 + for(var/obj/item/stock_parts/L in component_parts) + max_time -= (L.rating*10) + surgerytime = max(max_time,10) + +/obj/machinery/autodoc/examine(mob/user) + . = ..() + if((obj_flags & EMAGGED) && panel_open) + . += "[src]'s surgery protocols have been corrupted!" + if(processing) + . += "[src] is currently inserting [storedorgan] into [occupant]." + else if(storedorgan) + . += "[src] is prepared to insert [storedorgan]." + +/obj/machinery/autodoc/close_machine(mob/user) + ..() + playsound(src, 'sound/machines/click.ogg', 50) + if(occupant) + if(!iscarbon(occupant)) + occupant.forceMove(drop_location()) + occupant = null + return + to_chat(occupant, "You enter [src]") + + dosurgery() + +/obj/machinery/autodoc/proc/dosurgery() + if(!storedorgan && !(obj_flags & EMAGGED)) + to_chat(occupant, "[src] currently has no implant stored.") + return + + occupant.visible_message("[occupant] presses a button on [src], and you hear a mechanical noise.", "You feel a sharp sting as [src] starts inserting the organ into your body.") + playsound(get_turf(occupant), 'sound/weapons/circsawhit.ogg', 50, 1) + processing = TRUE + update_icon() + var/mob/living/carbon/C = occupant + if(obj_flags & EMAGGED) + + for(var/obj/item/bodypart/BP in reverseList(C.bodyparts)) //Chest and head are first in bodyparts, so we invert it to make them suffer more + C.emote("scream") + if(!HAS_TRAIT(C, TRAIT_NODISMEMBER)) + BP.dismember() + else + C.apply_damage(40, BRUTE, BP) + sleep(5) //2 seconds to get outta there before dying + if(!processing) + return + + occupant.visible_message("[src] dismembers [occupant]!", "[src] saws up your body!") + + else + sleep(surgerytime) + if(!processing) + return + var/obj/item/organ/currentorgan = C.getorganslot(storedorgan.slot) + if(currentorgan) + currentorgan.Remove(C) + currentorgan.forceMove(get_turf(src)) + storedorgan.Insert(occupant)//insert stored organ into the user + storedorgan = null + occupant.visible_message("[src] completes the surgery procedure", "[src] inserts the organ into your body.") + playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, 0) + processing = FALSE + open_machine() + +/obj/machinery/autodoc/open_machine(mob/user) + if(processing) + occupant.visible_message("[user] cancels [src]'s procedure", "[src] stops inserting the organ into your body.") + processing = FALSE + if(occupant) + occupant.forceMove(drop_location()) + occupant = null + ..(FALSE) + +/obj/machinery/autodoc/interact(mob/user) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + + if(state_open) + close_machine() + return + + open_machine() + +/obj/machinery/autodoc/attackby(obj/item/I, mob/user, params) + if(istype(I, organ_type)) + if(storedorgan) + to_chat(user, "[src] already has an implant stored.") + return + if(!user.transferItemToLoc(I, src)) + return + storedorgan = I + I.forceMove(src) + to_chat(user, "You insert the [I] into [src].") + else + return ..() + +/obj/machinery/autodoc/screwdriver_act(mob/living/user, obj/item/I) + . = TRUE + if(..()) + return + if(occupant) + to_chat(user, "[src] is currently occupied!") + return + if(state_open) + to_chat(user, "[src] must be closed to [panel_open ? "close" : "open"] its maintenance hatch!") + return + if(default_deconstruction_screwdriver(user, icon_state, icon_state, I)) + if(storedorgan) + storedorgan.forceMove(drop_location()) + storedorgan = null + update_icon() + return + return FALSE + +/obj/machinery/autodoc/crowbar_act(mob/living/user, obj/item/I) + if(default_deconstruction_crowbar(I)) + return TRUE + + +/obj/machinery/autodoc/update_icon() + overlays.Cut() + if(!state_open) + if(processing) + overlays += "[icon_state]_door_on" + overlays += "[icon_state]_stack" + overlays += "[icon_state]_smoke" + overlays += "[icon_state]_green" + else + overlays += "[icon_state]_door_off" + if(occupant) + if(powered(EQUIP)) + overlays += "[icon_state]_stack" + overlays += "[icon_state]_yellow" + else + overlays += "[icon_state]_red" + else if(powered(EQUIP)) + overlays += "[icon_state]_red" + if(panel_open) + overlays += "[icon_state]_panel" + +/obj/machinery/autodoc/emag_act(mob/user) + if(obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + to_chat(user, "You reprogram [src]'s surgery procedures.") diff --git a/sandcode/code/game/machinery/computer/arcade/tetris.dm b/sandcode/code/game/machinery/computer/arcade/tetris.dm new file mode 100644 index 0000000000..d8cd865b13 --- /dev/null +++ b/sandcode/code/game/machinery/computer/arcade/tetris.dm @@ -0,0 +1,98 @@ +#define REWARD_DIVISOR 1000 +// At the end of the game, the thing yields tetris_score/REWARD_DIVISOR prize tickets. Adjust accordingly. + +/obj/machinery/computer/arcade/tetris + name = "T.E.T.R.I.S." + desc = "The pinnacle of human technology." + icon = 'icons/obj/computer.dmi' + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/tetris + light_color = LIGHT_COLOR_GREEN + +/obj/machinery/computer/arcade/tetris/Topic(href, href_list) + if(..()) + return 1 + else + usr.set_machine(src) + if(href_list["tetrisScore"]) + var/temp_score = text2num(href_list["tetrisScore"]) + say("YOUR SCORE: [temp_score]!") + var/reward = round(temp_score/REWARD_DIVISOR) + prizevend(usr, reward) + return + +/obj/machinery/computer/arcade/tetris/attack_ai(user as mob) + return src.attack_hand(user) + +/obj/machinery/computer/arcade/tetris/attack_hand(mob/user as mob) + if(..()) + return + add_fingerprint(user) + + if(stat & (BROKEN|NOPOWER)) + return + + if(user.client) + var/datum/asset/simple/C = new/datum/asset/simple/tetris() + send_asset_list(user.client, C.assets) + + var/dat = {" + + + + + + + Telemetry Enhanced Testing and Research Informatic Simulator + + + + + + +
+
+ + +
+ +     +
+ + + + + + + + + + + + +
 
 
Score:
Level:
Lines:
+
+ +
+
+ + + "} + user << browse(dat, "window=tetris;size=435x550") + user.set_machine(src) + onclose(user, "tetris") diff --git a/sandcode/code/game/machinery/cryptominers.dm b/sandcode/code/game/machinery/cryptominers.dm new file mode 100644 index 0000000000..d2c1868ca5 --- /dev/null +++ b/sandcode/code/game/machinery/cryptominers.dm @@ -0,0 +1,146 @@ +/obj/machinery/cryptominer + name = "cryptocurrency miner" + desc = "This handy-dandy machine will produce credits for your enjoyment." + icon = 'sandcode/icons/obj/machines/cryptominer.dmi' + icon_state = "off" + density = TRUE + use_power = IDLE_POWER_USE + idle_power_usage = 20 + active_power_usage = 200 + circuit = /obj/item/circuitboard/machine/cryptominer + var/mining = FALSE + var/miningtime = 3000 + var/miningpoints = 50 + var/mintemp = TCRYO // 225K equals approximately -55F or -48C + var/midtemp = T0C // 273K equals 32F or 0C + var/maxtemp = 500 // 500K equals approximately 440F or 226C + var/heatingPower = 40000 + +/obj/machinery/cryptominer/update_icon() + . = ..() + if(!is_operational()) + icon_state = "off" + else if(mining) + icon_state = "loop" + else + icon_state = "on" + +/obj/machinery/cryptominer/Destroy() + STOP_PROCESSING(SSmachines,src) + return ..() + +/obj/machinery/cryptominer/deconstruct() + STOP_PROCESSING(SSmachines,src) + return ..() + +/obj/machinery/cryptominer/attackby(obj/item/W, mob/user, params) + if(default_deconstruction_screwdriver(user, icon_state, icon_state, W)) + return + if(default_deconstruction_crowbar(W)) + return + if(default_unfasten_wrench(user, W)) + return + +/obj/machinery/cryptominer/process() + var/turf/T = get_turf(src) + if(!T) + return + var/datum/gas_mixture/env = T.return_air() + if(!env) + return + if(!mining) + return + if(env.return_temperature() >= maxtemp) + if(mining) + playsound(loc, 'sound/machines/beep.ogg', 50, TRUE, -1) + set_mining(FALSE) + return + if(env.return_temperature() <= maxtemp && env.return_temperature() >= midtemp) + if(mining) + produce_points(0.20) + produce_heat() + return + if(env.return_temperature() <= midtemp && env.return_temperature() >= mintemp) + if(mining) + produce_points(1) + produce_heat() + return + if(env.return_temperature() <= mintemp) + if(mining) + produce_points(3) + produce_heat() + return + +/obj/machinery/cryptominer/proc/produce_points(number) + playsound(loc, 'sound/machines/ping.ogg', 50, TRUE, -1) + var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) + if(D) + D.adjust_money(FLOOR(miningpoints * number,1)) + +/obj/machinery/cryptominer/proc/produce_heat() + atmos_spawn_air("co2=10;TEMP=2000") + +/obj/machinery/cryptominer/attack_hand(mob/living/user) + . = ..() + if(!is_operational()) + to_chat(user, "[src] has to be on to do this!") + return FALSE + if(mining) + set_mining(FALSE) + visible_message("[src] slowly comes to a halt.", + "You turn off [src].", + runechat_popup = TRUE) + return + set_mining(TRUE) + +/obj/machinery/cryptominer/proc/set_mining(new_value) + if(new_value == mining) + return //No changes + mining = new_value + if(mining) + START_PROCESSING(SSmachines, src) + else + STOP_PROCESSING(SSmachines, src) + update_icon() + + +/obj/machinery/cryptominer/syndie + name = "syndicate cryptocurrency miner" + desc = "This handy-dandy machine will produce credits for your enjoyment. It lasts a little longer." + icon_state = "off_syndie" + density = TRUE + use_power = IDLE_POWER_USE + idle_power_usage = 10 + active_power_usage = 100 + circuit = /obj/item/circuitboard/machine/cryptominer/syndie + miningtime = 6000 + miningpoints = 100 + +/obj/machinery/cryptominer/syndie/update_icon() + . = ..() + if(!is_operational()) + icon_state = "off_syndie" + else if(mining) + icon_state = "loop_syndie" + else + icon_state = "on_syndie" + +/obj/machinery/cryptominer/nanotrasen + name = "nanotrasen cryptocurrency miner" + desc = "This handy-dandy machine will produce credits for your enjoyment. This doesn't turn off easily." + icon_state = "off_nano" + density = TRUE + use_power = IDLE_POWER_USE + idle_power_usage = 1 + active_power_usage = 1 + miningtime = 600000 + miningpoints = 1000 + +/obj/machinery/cryptominer/nanotrasen/update_icon() + . = ..() + if(!is_operational()) + icon_state = "off_nano" + else if(mining) + icon_state = "loop_nano" + else + icon_state = "on_nano" diff --git a/sandcode/code/game/mecha/mecha_construction_paths.dm b/sandcode/code/game/mecha/mecha_construction_paths.dm new file mode 100644 index 0000000000..27c260fd02 --- /dev/null +++ b/sandcode/code/game/mecha/mecha_construction_paths.dm @@ -0,0 +1,142 @@ +//Power armor: now actually built! +/datum/component/construction/unordered/mecha_chassis/powerarmor + result = /datum/component/construction/mecha/powerarmor + steps = list( + /obj/item/mecha_parts/part/powerarmor_torso, + /obj/item/mecha_parts/part/powerarmor_helmet, + /obj/item/mecha_parts/part/powerarmor_left_arm, + /obj/item/mecha_parts/part/powerarmor_right_arm, + /obj/item/mecha_parts/part/powerarmor_left_leg, + /obj/item/mecha_parts/part/powerarmor_right_leg + ) + +/datum/component/construction/mecha/powerarmor/update_parent(step_index) + ..() + var/atom/parent_atom = parent + parent_atom.icon = 'sandcode/icons/mecha/mech_construction.dmi' + +/datum/component/construction/mecha/powerarmor/spawn_result() + if(!result) + return + new result(drop_location()) + SSblackbox.record_feedback("tally", "mechas_created", 1, "Power Armor") + QDEL_NULL(parent) + +/datum/component/construction/mecha/powerarmor + result = /obj/item/clothing/suit/space/hardsuit/powerarmor + base_icon = "powerarmor" + steps = list( + //1 + list( + "key" = TOOL_WRENCH, + "desc" = "The parts are disconnected." + ), + + //2 + list( + "key" = TOOL_WELDER, + "back_key" = TOOL_WRENCH, + "desc" = "The parts are wrenched." + ), + + //3 + list( + "key" = /obj/item/stack/sheet/bluespace_crystal, + "amount" = 5, + "back_key" = TOOL_WELDER, + "desc" = "The parts are welded onto the chassis." + ), + + //4 + list( + "key" = TOOL_WRENCH, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The bluespace crystals are slotted." + ), + + //5 + list( + "key" = /obj/item/stock_parts/capacitor/quadratic, + "action" = ITEM_MOVE_INSIDE, + "back_key" = TOOL_WRENCH, + "desc" = "The bluespace crystals are secured." + ), + + //6 + list( + "key" = TOOL_WRENCH, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The capacitor is slotted." + ), + + //7 + list( + "key" = /obj/item/stack/cable_coil, + "amount" = 10, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The capacitor is secured." + ), + + //8 + list( + "key" = TOOL_SCREWDRIVER, + "back_key" = TOOL_WIRECUTTER, + "desc" = "The chassis is wired." + ), + + //9 + list( + "key" = TOOL_WELDER, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The wiring is linked to the limbs." + ), + ) + +/datum/component/construction/mecha/powerarmor/custom_action(obj/item/I, mob/living/user, diff) + if(!..()) + return FALSE + + switch(index) + if(1) + user.visible_message("[user] wrenches [parent]'s parts.", "You wrench [parent]'s parts.") + if(2) + if(diff==FORWARD) + user.visible_message("[user] welds [parent]'s parts.", "You weld [parent]'s parts") + else + user.visible_message("[user] unwrenches [parent]'s parts.", "You unwrench [parent]'s parts.") + if(3) + if(diff==FORWARD) + user.visible_message("[user] slots bluespace crystals onto [parent].", "You slot the bluespace crystals onto [parent].") + else + user.visible_message("[user] unwelds [parent]'s parts.", "You unweld [parent]'s parts.") + if(4) + if(diff==FORWARD) + user.visible_message("[user] secures the [parent]'s bluespace crystal slots.", "You secure the [parent]'s bluespace crystal slots") + else + user.visible_message("[user] removes the bluespace crystals from [parent].", "You remove [parent]'s bluespace crystals.") + if(5) + if(diff==FORWARD) + user.visible_message("[user] slots the capacitor onto [parent].", "You slot the capacitor onto [parent].") + else + user.visible_message("[user] unsecures the bluespace crystal slots from [parent].", "You unsecure [parent]'s bluespace crystal slots.") + if(6) + if(diff==FORWARD) + user.visible_message("[user] secures [parent]'s capacitor.", "You secure [parent]'s capacitor.") + else + user.visible_message("[user] removes the [parent]'s capacitor.", "You remove the [parent]'s capacitor.") + if(7) + if(diff==FORWARD) + user.visible_message("[user] wires the [parent].", "You wire the [parent].") + else + user.visible_message("[user] unsecures [parent]'s capacitor.", "You unsecure [parent]'s capacitor.") + if(8) + if(diff==FORWARD) + user.visible_message("[user] links [parent]'s wires to the limbs.", "You link [parent]'s wires to the limbs.") + else + user.visible_message("[user] snips off [parent]'s wires.", "You snip off [parent]'s wires.") + if(9) + if(diff==FORWARD) + user.visible_message("[user] welds [parent]'s external armor layer.", "You weld [parent]'s external armor layer.") + else + user.visible_message("[user] unlinks [parent]'s wires from the limbs.", "You unlink [parent]'s wires from the limbs.") + return TRUE diff --git a/sandcode/code/game/mecha/mecha_parts.dm b/sandcode/code/game/mecha/mecha_parts.dm new file mode 100644 index 0000000000..b7268ca489 --- /dev/null +++ b/sandcode/code/game/mecha/mecha_parts.dm @@ -0,0 +1,55 @@ +////////////////////////////// +//////Custom Mech Parts ////// +////////////////////////////// + +///////// Power Armor (Not actually a mech but meh) + +/obj/item/mecha_parts/chassis/powerarmor + name = "\improper Power Armor Chassis" + desc = "A heavy steel frame, utilized in the construction of a suit of powered armor." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_skeleton" + w_class = WEIGHT_CLASS_HUGE + construct_type = /datum/component/construction/unordered/mecha_chassis/powerarmor + +/obj/item/mecha_parts/part/powerarmor_torso + name = "\improper Power Armor Torso" + desc = "A torso comprised of advanced components, armored with flexible plasteel sheets." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_chest" + w_class = WEIGHT_CLASS_HUGE + +/obj/item/mecha_parts/part/powerarmor_left_arm + name = "\improper Power Armor Left Arm" + desc = "A powered arm component, armored with plasteel and strengthened with integrated pseudometallic bio-enhancing servos." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_arm_L" + w_class = WEIGHT_CLASS_HUGE + +/obj/item/mecha_parts/part/powerarmor_right_arm + name = "\improper Power Armor Right Arm" + desc = "A powered arm component, armored with plasteel and strengthened with integrated pseudometallic bio-enhancing servos." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_arm_R" + w_class = WEIGHT_CLASS_HUGE + +/obj/item/mecha_parts/part/powerarmor_left_leg + name = "\improper Power Armor Left Leg" + desc = "A powered leg component, armored with plasteel and enhanced with integrated kinetic-absorbing materials to give a minor spring in the user's step." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_leg_L" + w_class = WEIGHT_CLASS_HUGE + +/obj/item/mecha_parts/part/powerarmor_right_leg + name = "\improper Power Armor Right Leg" + desc = "A powered leg component, armored with plasteel and enhanced with integrated kinetic-absorbing materials to give a minor spring in the user's step." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_leg_R" + w_class = WEIGHT_CLASS_HUGE + +/obj/item/mecha_parts/part/powerarmor_helmet + name = "\improper Power Armor Helmet" + desc = "An advanced, head-covering helmet desinged to offer maximum comfort and protection. Must be installed into a proper suit of Power Armor in order to be used, as it is quite heavy." + icon = 'sandcode/icons/mecha/mech_construct.dmi' + icon_state = "pwrarmor_helmet" + w_class = WEIGHT_CLASS_HUGE diff --git a/sandcode/code/game/objects/items/circuitboards/computer_circuitboards.dm b/sandcode/code/game/objects/items/circuitboards/computer_circuitboards.dm index 364109b094..5dc568dca9 100644 --- a/sandcode/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/sandcode/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -1,3 +1,7 @@ /obj/item/circuitboard/computer/telesci_console name = "Telescience Control Console (Computer Board)" - build_path = /obj/machinery/computer/telescience \ No newline at end of file + build_path = /obj/machinery/computer/telescience + +/obj/item/circuitboard/computer/arcade/tetris + name = "Tetris (Computer Board)" + build_path = /obj/machinery/computer/arcade/tetris diff --git a/sandcode/code/game/objects/items/circuitboards/machine_circuitboards.dm b/sandcode/code/game/objects/items/circuitboards/machine_circuitboards.dm index 353340a947..3dd6a9ada6 100644 --- a/sandcode/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/sandcode/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -10,3 +10,52 @@ /obj/item/circuitboard/machine/pacman/mclunky name = "McLunky-type Generator (Machine Board)" build_path = /obj/machinery/power/port_gen/pacman/mclunky + +/obj/item/circuitboard/machine/autodoc + name = "Autodoc (Machine Board)" + build_path = /obj/machinery/autodoc + req_components = list(/obj/item/scalpel/advanced = 1, + /obj/item/retractor/advanced = 1, + /obj/item/surgicaldrill/advanced = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/micro_laser = 3, + /obj/item/stock_parts/matter_bin = 1) + +/obj/item/circuitboard/machine/cryptominer + name = "Cryptocurrency Miner (Machine Board)" + build_path = /obj/machinery/cryptominer + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stock_parts/manipulator = 2, + /obj/item/stock_parts/scanning_module = 2, + /obj/item/stack/ore/bluespace_crystal = 2) + +/obj/item/circuitboard/machine/cryptominer/syndie + name = "Syndicate Cryptocurrency Miner (Machine Board)" + build_path = /obj/machinery/cryptominer/syndie + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stock_parts/manipulator = 2, + /obj/item/stock_parts/scanning_module = 2, + /obj/item/stack/ore/bluespace_crystal = 2) + +/obj/item/circuitboard/machine/bluespace_miner + name = "Bluespace Miner (Machine Board)" + build_path = /obj/machinery/mineral/bluespace_miner + req_components = list( + /obj/item/stock_parts/matter_bin = 5, + /obj/item/stock_parts/micro_laser = 5, + /obj/item/stock_parts/manipulator = 5, + /obj/item/stock_parts/scanning_module = 5, + /obj/item/stack/ore/bluespace_crystal = 5) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/telecomms/message_server + name = "Message Server (Machine Board)" + build_path = /obj/machinery/telecomms/message_server + req_components = list( + /obj/item/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/stock_parts/subspace/filter = 1) diff --git a/sandcode/code/game/objects/items/computermath.dm b/sandcode/code/game/objects/items/computermath.dm new file mode 100644 index 0000000000..abca4e7877 --- /dev/null +++ b/sandcode/code/game/objects/items/computermath.dm @@ -0,0 +1,331 @@ +#define MATH_REWARD_EASY 1 +#define MATH_REWARD_MEDIUM 2.5 +#define MATH_REWARD_HARD 5 + +#define MATH_MULTIPLIER_SCIENCE 750 // If science points and cargo points need to be balanced seperately +#define MATH_MULTIPLIER_CARGO 500 // Difficulty reward gets multiplied by these + +/obj/item/computermath + icon = 'sandcode/icons/obj/computermath.dmi' + verb_say = "beeps" + var/charge_count + +/obj/item/computermath/Initialize() + . = ..() + START_PROCESSING(SSobj, src) + +/obj/item/computermath/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/computermath/proc/check_charges() + return FALSE + +/obj/item/computermath/proc/consume_charges() + return FALSE + +/obj/item/computermath/proc/give_question(mob/user, var/reward_type) + if(!reward_type) + say("Critical error. Program terminating.") + return + + if(!check_charges()) // Out of charges! + say("No current problems available. Try again later.") + playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) + return + + var/operator + var/difficulties = list("Easy", "Medium", "Hard") + var/query = "Please select the difficulty level. Reward scales with difficulty." + var/difficulty = input(user, query, "Select Difficulty") as null|anything in difficulties + if(!difficulty) + return + switch(difficulty) + if("Easy") + operator = pick("add","subtract","multiply") + if("Medium") + operator = pick("division", "exponent", "easy algebra") + if("Hard") + operator = pick("2nd polynomial", "algebra", "line intersection") + + var/correct = FALSE + switch(operator) + // Easy problems. The numbers need to be so it's doable without a calculator, yet not easy. + if("add") + var/addnum_1 = rand(1, 500) + var/addnum_2 = rand(1, 500) + var/question = "What is [addnum_1] + [addnum_2]?" + var/solution = addnum_1 + addnum_2 + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + if("subtract") + var/subnum_1 = rand(-100, 100) + var/subnum_2 = rand(-100, 200) + var/question = "What is [subnum_1] - [subnum_2]?" + var/solution = subnum_1 - subnum_2 + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + if("multiply") + var/multnum_1 = rand(-50, 50) + var/multnum_2 = rand(-250, 500) + var/question = "What is [multnum_1] * [multnum_2]?" + var/solution = multnum_1 * multnum_2 + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + + // Medium problems + if("division") + var/divnum_2 = rand(3, 12) + var/divnum_1 = rand(-50, 50) * divnum_2 // Nice numbers only. + var/question = "What is [divnum_1] / [divnum_2]? Rounded the answer down if applicable." + var/solution = round(divnum_1 / divnum_2) + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + + if("exponent") + var/expnum_1 = rand(-50, 50) + var/expnum_2 = pick(list(2, 3, 1/2)) // Also square root! + var/question = "What is ([expnum_1]) ^ [expnum_2]? Answer is rounded down if applicable." + var/solution + if(expnum_2 == 1/2) // For some reason, a ** 1/2 throws a runtime error, so just use sqrt() + solution = round(sqrt(abs(expnum_1))) + else + solution = round(expnum_1 ** expnum_2) + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + + if("easy algebra") + // ax + b = c ----> x = (c-b)/a + var/num_a = rand(1,5) + var/num_b = rand(-5,10) + var/num_c = rand(-10, 10) + var/question = "[num_a]x + [num_b] = [num_c]. Solve for x." + var/solution = (num_c - num_b)/num_a + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + + // Hard problems, where 'hard' is high school maths + if("algebra") // everyone's favorite :) + var/answer + var/solution + if(prob(50)) // 2 variants of the question + // a/bx = c ---> x = a/bc. b and c may not be 0. + var/num_a = rand(-100, 100) + var/num_b = rand(-5, 5) + if(num_b == 0) + num_b = 12 + var/num_c = rand(1, 10) + var/question = "[num_a]/([num_b]x) = [num_c]. Solve for x. Round down if applicable." + solution = round(num_a / (num_b * num_c)) + answer = input(user, question, "Math Problem") as null|num + else + // (a-x)/b = x/c ----> x=ac/(b+c), b+c and b*c may not be 0 + var/num_a = rand(-50, 50) + var/num_b = rand(1, 5) + var/num_c = rand(1, 10) + var/question = "([num_a]-x)/[num_b] = x/[num_c]. Solve for x. Round down if applicable." + solution = round((num_a * num_c)/(num_b + num_c)) + answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution) + correct = TRUE + + + if("2nd polynomial") + // Math part + var/num_a = rand(1, 2) + var/num_b = rand(-5, 5) + var/num_c = rand(-25, 25) + var/discriminant = num_b**2 - 4 * num_a * num_c + var/solution1 + var/solution2 + if(discriminant >= 0) // positive gives 2 solutions, if D=0 then sol1=sol2 anyway + // Quadratic formula + solution1 = round((-num_b+sqrt(discriminant))/(2*num_a)) + solution2 = round((-num_b-sqrt(discriminant))/(2*num_a)) + else + solution1 = 0 + solution2 = 0 + + // Answering part + var/question = "[num_a]x^2 + [num_b]x + [num_c] = 0. Solve for x, give any real solution. Fill in 0 for no real solutions. Answers are rounded down. (-0.25 becomes -1)" + var/answer = input(user, question, "Math Problem") as null|num + if(isnull(answer)) // User hit the cancel button + return + if(answer == solution1 || answer == solution2) + correct = TRUE + + if("line intersection") + // y1=ax+b + // y2=cx+d + // intersect: x=(d-c)/(a-b), y=a(d-c)/(a-b)+c. So a-b or c-d may never be 0. + var/num_a = rand(1,5) + var/num_b = rand(-10,-1) + var/num_c = rand(1, 10) + var/num_d = rand(-10, -1) + var/x_intersect = round((num_d-num_c)/(num_a-num_b)) + var/y_intersect = round(num_a * (num_d - num_c)/(num_a - num_b) + num_c) + var/question + var/answer + if(prob(50)) // 50% chance to ask for x, or y + question = "Given the lines y=[num_a]x+[num_b] and y=[num_c]x+[num_d], what is the x-value of their intersection point? Rounded down if applicable." + answer = input(user, question, "Math Problem") as null|num + if(answer == x_intersect) + correct = TRUE + else + question = "Given the lines y=[num_a]x+[num_b] and y=[num_c]x+[num_d], what is the y-value of their intersection point? Rounded down if applicable." + answer = input(user, question, "Math Problem") as null|num + if(answer == y_intersect) + correct = TRUE + if(isnull(answer)) // User hit the cancel button + return + + // An answer has been submitted, remove a charge and check if it's correct! + if(consume_charges()) + handle_reward(user, reward_type, correct, difficulty) + else // Ran out of charges while answering due to multiple characters using the computers + say("Error. All available problems have been resolved in the time it took to answer. Please wait for more to become available.") + playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) + return + +/obj/item/computermath/proc/handle_reward(mob/user, var/reward_type, var/correct, var/difficulty) + var/mob/living/LM = user + // Calculate points + var/points_awarded + switch(difficulty) + if("Easy") + points_awarded = MATH_REWARD_EASY + if("Medium") + points_awarded = MATH_REWARD_MEDIUM + if("Hard") + points_awarded = MATH_REWARD_HARD + switch(reward_type) + if("Cargo") + points_awarded *= MATH_MULTIPLIER_CARGO + if("Science") + points_awarded *= MATH_MULTIPLIER_SCIENCE + + // Incorrect answer is a point penalty. + if(!correct) + var/points_lost = points_awarded / 4 // Penalty for failure is 1/4th success points + say("Warning! Incorrect answer.") + switch(reward_type) + if("Science") + say("Research data has been corrupted. [points_lost] science points have been lost.") + SSresearch.science_tech.remove_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points_lost)) + if("Cargo") + say("To solve the resulting bureaucratic error, [points_lost] cargo points have been deducted from the balance.") + var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) + if(D) + D.adjust_money(-points_lost) + // me fail arithmetic, me brian hurt + playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) + if(difficulty == "Easy") // me fail arithmetic, me brian hurt + to_chat(user,"You feel lightheaded after failing such an easy question...") + LM.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10) + return + + // Award points for a correct answer. + switch(reward_type) + if("Science") + say("Correct data received. Applying to research algorithms...") + say("Completed. [points_awarded] science points added.") + SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points_awarded)) + if("Cargo") + say("Correct data received. Updating cargo manifests...") + say("Completed. [points_awarded] cargo points have been added to station balance.") + var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) + if(D) + D.adjust_money(points_awarded) + playsound(src, 'sound/machines/chime.ogg', 30, 1) + +/obj/item/computermath/default + name = "Unassigned Problem Computer" + desc = "This Problem Computer has not been assigned yet. Earn points by solving math problems." + icon_state = "defaulttab" + + var/static/radial_cargo = image(icon = 'sandcode/icons/obj/computermath.dmi', icon_state = "cargotab") + var/static/radial_science = image(icon = 'sandcode/icons/obj/computermath.dmi', icon_state = "sciencetab") + + var/static/list/radial_options = list("cargo" = radial_cargo, "science" = radial_science) + +/obj/item/computermath/default/attack_self(mob/user) + var/choice = show_radial_menu(user, src, radial_options) + switch(choice) + if("cargo") + var/obj/item/computermath/cargo/CT = new /obj/item/computermath/cargo(drop_location()) + qdel(src) + user.put_in_active_hand(CT) + if("science") + var/obj/item/computermath/science/ST = new /obj/item/computermath/science(drop_location()) + qdel(src) + user.put_in_active_hand(ST) + +/obj/item/computermath/cargo + name = "Cargo Problem Computer" + desc = "Earn points by solving math problems." + icon_state = "cargotab" + +/obj/item/computermath/cargo/attack_self(mob/user) + give_question(user, "Cargo") + +/obj/item/computermath/cargo/process() + var/old_charge_count = charge_count + charge_count = SSshuttle.problem_computer_charges + if(charge_count > old_charge_count) + say("A new problem solving opportunity has become available! There are now [charge_count] problems to be solved.") + +/obj/item/computermath/cargo/check_charges() + if(SSshuttle.problem_computer_charges > 0) + return TRUE + ..() + +/obj/item/computermath/cargo/consume_charges() + if(SSresearch.problem_computer_charges > 0) + SSshuttle.problem_computer_charges -= 1 + return TRUE + ..() + +/obj/item/computermath/science + name = "Science Problem Computer" + desc = "Earn points by solving math problems." + icon_state = "sciencetab" + +/obj/item/computermath/science/process() + var/old_charge_count = charge_count + charge_count = SSresearch.problem_computer_charges + if(charge_count > old_charge_count) + say("A new problem solving opportunity has become available! There are now [charge_count] problems to be solved.") + +/obj/item/computermath/science/check_charges() + if(SSresearch.problem_computer_charges > 0) + return TRUE + ..() + +/obj/item/computermath/science/consume_charges() + if(SSresearch.problem_computer_charges > 0) + SSresearch.problem_computer_charges -= 1 + return TRUE + ..() + +/obj/item/computermath/science/attack_self(mob/user) + give_question(user, "Science") diff --git a/sandcode/code/modules/client/asset_cache.dm b/sandcode/code/modules/client/asset_cache.dm new file mode 100644 index 0000000000..fa6d709a62 --- /dev/null +++ b/sandcode/code/modules/client/asset_cache.dm @@ -0,0 +1,21 @@ +/datum/asset/simple/tetris + assets = list( + "tetris_0.gif" = 'sandcode/icons/tetris/tetris_0.gif', + "tetris_1.gif" = 'sandcode/icons/tetris/tetris_1.gif', + "tetris_2.gif" = 'sandcode/icons/tetris/tetris_2.gif', + "tetris_3.gif" = 'sandcode/icons/tetris/tetris_3.gif', + "tetris_4.gif" = 'sandcode/icons/tetris/tetris_4.gif', + "tetris_5.gif" = 'sandcode/icons/tetris/tetris_5.gif', + "tetris_6.gif" = 'sandcode/icons/tetris/tetris_6.gif', + "tetris_7.gif" = 'sandcode/icons/tetris/tetris_7.gif', + "tetrisp0.gif" = 'sandcode/icons/tetris/tetrisp0.gif', + "tetrisp1.gif" = 'sandcode/icons/tetris/tetrisp1.gif', + "tetrisp2.gif" = 'sandcode/icons/tetris/tetrisp2.gif', + "tetrisp3.gif" = 'sandcode/icons/tetris/tetrisp3.gif', + "tetrisp4.gif" = 'sandcode/icons/tetris/tetrisp4.gif', + "tetrisp5.gif" = 'sandcode/icons/tetris/tetrisp5.gif', + "tetrisp6.gif" = 'sandcode/icons/tetris/tetrisp6.gif', + "tetrisp7.gif" = 'sandcode/icons/tetris/tetrisp7.gif', + "tetris.js" = 'tgui/src/interfaces/tetris/tetris.js', + "tetris2.js" = 'tgui/src/interfaces/tetris/tetris2.js' + ) diff --git a/sandcode/code/modules/clothing/spacesuits/hardsuit.dm b/sandcode/code/modules/clothing/spacesuits/hardsuit.dm new file mode 100644 index 0000000000..bfae87a635 --- /dev/null +++ b/sandcode/code/modules/clothing/spacesuits/hardsuit.dm @@ -0,0 +1,124 @@ +//Power armor +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor + name = "Power Armor Helmet MK. I" + desc = "An advanced helmet attached to a powered exoskeleton suit. Protects well against most forms of harm, but struggles against exotic hazards." + icon = 'sandcode/icons/obj/clothing/hats.dmi' + mob_overlay_icon = 'sandcode/icons/mob/clothing/head.dmi' + anthro_mob_worn_overlay = 'sandcode/icons/mob/clothing/head_muzzled.dmi' + icon_state = "hardsuit0-powerarmor-1" + item_state = "hardsuit0-powerarmor-1" + hardsuit_type = "powerarmor" + clothing_flags = THICKMATERIAL //Ouchie oofie my bones + armor = list("melee" = 40, "bullet" = 35, "laser" = 30, "energy" = 20, "bomb" = 40, "bio" = 100, "rad" = 5, "fire" = 75, "acid" = 100) + resistance_flags = ACID_PROOF + mutantrace_variation = STYLE_MUZZLE | STYLE_NO_ANTHRO_ICON + +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/Initialize() + . = ..() + AddComponent(/datum/component/spraycan_paintable) + update_icon() + +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/update_overlays() + . = ..() + var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hardsuit0-powerarmor-2") + if(icon_state == "hardsuit1-powerarmor-1") + glass_overlay = mutable_appearance(icon, "hardsuit1-powerarmor-2") + var/mutable_appearance/flight_overlay = mutable_appearance(icon, "hardsuit1-powerarmor-3") + flight_overlay.appearance_flags = RESET_COLOR + . += flight_overlay + glass_overlay.appearance_flags = RESET_COLOR + . += glass_overlay + +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) + . = ..() + if(!isinhands) + var/mutable_appearance/M1 = mutable_appearance(icon_file, "hardsuit0-powerarmor-2") + if(icon_state == "hardsuit1-powerarmor-1") + M1 = mutable_appearance(icon_file, "hardsuit1-powerarmor-2") + var/mutable_appearance/M2 = mutable_appearance(icon, "hardsuit1-powerarmor-3") + M2.appearance_flags = RESET_COLOR + . += M2 + M1.appearance_flags = RESET_COLOR + . += M1 + +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/equipped(mob/living/carbon/human/user, slot) + ..() + if (slot == SLOT_HEAD) + var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + DHUD.add_hud_to(user) + +/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/dropped(mob/living/carbon/human/user) + ..() + if (user.head == src) + var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + DHUD.remove_hud_from(user) + +/obj/item/clothing/suit/space/hardsuit/powerarmor + name = "Power Armor MK. I" + desc = "A self-powered exoskeleton suit comprised of flexible Plasteel sheets and advanced components, designed to offer excellent protection while still allowing mobility. Does not protect against Space, and struggles against more exotic hazards." + icon = 'sandcode/icons/obj/clothing/suits.dmi' + mob_overlay_icon = 'sandcode/icons/mob/clothing/suit.dmi' + anthro_mob_worn_overlay = 'sandcode/icons/mob/clothing/suit_digi.dmi' + icon_state = "hardsuit-powerarmor-1" + item_state = "hardsuit-powerarmor-1" + slowdown = -0.1 + clothing_flags = THICKMATERIAL //Not spaceproof. No, it isn't Spaceproof in Rimworld either. + armor = list("melee" = 40, "bullet" = 35, "laser" = 30, "energy" = 20, "bomb" = 40, "bio" = 100, "rad" = 5, "fire" = 75, "acid" = 100) //I was asked to buff this again. Here, fine. + resistance_flags = ACID_PROOF + var/explodioprobemp = 1 + var/stamdamageemp = 200 + var/brutedamageemp = 20 + var/rebootdelay + helmettype = /obj/item/clothing/head/helmet/space/hardsuit/powerarmor + mutantrace_variation = STYLE_DIGITIGRADE | STYLE_NO_ANTHRO_ICON + +/obj/item/clothing/suit/space/hardsuit/powerarmor/Initialize() + . = ..() + AddComponent(/datum/component/spraycan_paintable) + update_icon() + +/obj/item/clothing/suit/space/hardsuit/powerarmor/update_overlays() + . = ..() + var/mutable_appearance/black_overlay = mutable_appearance(icon, "hardsuit-powerarmor-2") + black_overlay.appearance_flags = RESET_COLOR + var/mutable_appearance/bluecore_overlay = mutable_appearance(icon, "hardsuit-powerarmor-3") + bluecore_overlay.appearance_flags = RESET_COLOR + . += black_overlay + . += bluecore_overlay + +/obj/item/clothing/suit/space/hardsuit/powerarmor/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) + . = ..() + if(!isinhands) + var/mutable_appearance/M1 = mutable_appearance(icon_file, "hardsuit-powerarmor-2") + M1.appearance_flags = RESET_COLOR + var/mutable_appearance/M2 = mutable_appearance(icon_file, "hardsuit-powerarmor-3") + M2.appearance_flags = RESET_COLOR + . += M1 + . += M2 + +/obj/item/clothing/suit/space/hardsuit/powerarmor/emp_act() + . = ..() + var/mob/living/carbon/human/user = src.loc + playsound(src.loc, 'sandcode/sound/misc/suitmalf.ogg', 60, 1, 10) + if (ishuman(user) && (user.wear_suit == src)) + to_chat(user, "The motors on your armor cease to function, causing the full weight of the suit to weigh on you all at once!") + user.emote("scream") + user.adjustStaminaLoss(stamdamageemp) + user.adjustBruteLoss(brutedamageemp) + if(prob(explodioprobemp)) + playsound(src.loc, 'sound/effects/fuse.ogg', 60, 1, 10) + visible_message("The power module on the [src] begins to smoke, glowing with an alarming warmth! Get away from it, now!") + addtimer(CALLBACK(src, .proc/detonate),50) + else + addtimer(CALLBACK(src, .proc/revivemessage), rebootdelay) + return + +/obj/item/clothing/suit/space/hardsuit/powerarmor/proc/revivemessage() //we use this proc to add a timer, so we can have it take a while to boot + visible_message("The power module on the [src] briefly flickers, before humming to life once more.") //without causing any problems + return //that sleep() would + +/obj/item/clothing/suit/space/hardsuit/powerarmor/proc/detonate() + visible_message("The power module of the [src] overheats, causing it to destabilize and explode!") + explosion(src.loc,0,0,3,flame_range = 3) + qdel(src) + return diff --git a/sandcode/code/modules/mining/machine_bluespaceminer.dm b/sandcode/code/modules/mining/machine_bluespaceminer.dm new file mode 100644 index 0000000000..1592cfd1b1 --- /dev/null +++ b/sandcode/code/modules/mining/machine_bluespaceminer.dm @@ -0,0 +1,55 @@ +/obj/machinery/mineral/bluespace_miner + name = "bluespace mining machine" + desc = "A machine that uses the magic of Bluespace to slowly generate materials and add them to a linked ore silo." + icon = 'icons/obj/machines/mining_machines.dmi' + icon_state = "stacker" + density = TRUE + circuit = /obj/item/circuitboard/machine/bluespace_miner + layer = BELOW_OBJ_LAYER + var/list/ore_rates = list(/datum/material/iron = 0.3, /datum/material/glass = 0.3, /datum/material/plasma = 0.1, /datum/material/silver = 0.1, /datum/material/gold = 0.05, /datum/material/titanium = 0.05, /datum/material/uranium = 0.05, /datum/material/diamond = 0.02) + var/datum/component/remote_materials/materials + +/obj/machinery/mineral/bluespace_miner/Initialize(mapload) + . = ..() + materials = AddComponent(/datum/component/remote_materials, "bsm", mapload) + +/obj/machinery/mineral/bluespace_miner/Destroy() + materials = null + return ..() + +/obj/machinery/mineral/bluespace_miner/multitool_act(mob/living/user, obj/item/multitool/M) + if(istype(M)) + if(!M.buffer || !istype(M.buffer, /obj/machinery/ore_silo)) + to_chat(user, "You need to multitool the ore silo first.") + return FALSE + +/obj/machinery/mineral/bluespace_miner/examine(mob/user) + . = ..() + if(!materials?.silo) + . += "No ore silo connected. Use a multi-tool to link an ore silo to this machine." + else if(materials?.on_hold()) + . += "Ore silo access is on hold, please contact the quartermaster." + +/obj/machinery/mineral/bluespace_miner/process() + if(!materials?.silo || materials?.on_hold()) + return + var/datum/component/material_container/mat_container = materials.mat_container + if(!mat_container || panel_open || !powered()) + return + var/datum/material/ore = pick(ore_rates) + mat_container.bsm_insert((ore_rates[ore] * 1000), ore) + +/datum/component/material_container/proc/bsm_insert(amt, var/datum/material/mat) + if(!istype(mat)) + mat = SSmaterials.GetMaterialRef(mat) + if(amt > 0 && has_space(amt)) + var/total_amount_saved = total_amount + if(mat) + materials[mat] += amt + total_amount += amt + else + for(var/i in materials) + materials[i] += amt + total_amount += amt + return (total_amount - total_amount_saved) + return FALSE diff --git a/sandcode/code/modules/research/designs/machine_designs.dm b/sandcode/code/modules/research/designs/machine_designs.dm index a0b2b97f6b..47454abfe2 100644 --- a/sandcode/code/modules/research/designs/machine_designs.dm +++ b/sandcode/code/modules/research/designs/machine_designs.dm @@ -39,3 +39,37 @@ build_path = /obj/item/circuitboard/machine/spaceship_navigation_beacon category = list ("Teleportation Machinery") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/board/autodoc + name = "Machine Design (Autodoc)" + desc = "The circuit board for an Autodoc." + id = "autodoc" + build_path = /obj/item/circuitboard/machine/autodoc + category = list("Medical Machinery") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +//Cryptocurrency Miners +/datum/design/board/cryptominer + name = "Machine Design (Cryptocurrency Miner)" + desc = "The circuit board for a Cryptocurrency Miner." + id = "cryptominer" + build_path = /obj/item/circuitboard/machine/cryptominer + category = list("Misc. Machinery") + departmental_flags = DEPARTMENTAL_FLAG_CARGO + +/datum/design/board/cryptominer/syndie + name = "Machine Design (Syndicate Cryptocurrency Miner)" + desc = "The circuit board for a Syndicate Cryptocurrency Miner." + id = "cryptominersyndie" + build_path = /obj/item/circuitboard/machine/cryptominer/syndie + category = list("Misc. Machinery") + departmental_flags = DEPARTMENTAL_FLAG_CARGO + +//BS miner +/datum/design/board/bluespace_miner + name = "Machine Design (Bluespace Miner)" + desc = "The circuit board for a Bluespace Miner." + id = "bluespace_miner" + build_path = /obj/item/circuitboard/machine/bluespace_miner + category = list ("Misc. Machinery") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING diff --git a/sandcode/code/modules/research/designs/machine_designs/machine_designs_all_misc.dm b/sandcode/code/modules/research/designs/machine_designs/machine_designs_all_misc.dm new file mode 100644 index 0000000000..8e392df917 --- /dev/null +++ b/sandcode/code/modules/research/designs/machine_designs/machine_designs_all_misc.dm @@ -0,0 +1,7 @@ +/datum/design/board/tetris + name = "Computer Design (T.E.T.R.I.S.)" + desc = "Allows for the construction of circuit boards used to build a TETRIS research system." + id = "tetris" + build_path = /obj/item/circuitboard/computer/arcade/tetris + category = list("Research Machinery") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING diff --git a/sandcode/code/modules/research/designs/mechfabricator_designs.dm b/sandcode/code/modules/research/designs/mechfabricator_designs.dm index a41bef3e5d..64cebc1e39 100644 --- a/sandcode/code/modules/research/designs/mechfabricator_designs.dm +++ b/sandcode/code/modules/research/designs/mechfabricator_designs.dm @@ -6,3 +6,68 @@ materials = list(/datum/material/iron = 1000, /datum/material/glass = 1000, /datum/material/bluespace = 500) construction_time = 100 category = list("Cyborg Upgrade Modules") + +///Power Armor +/datum/design/powerarmor_skeleton + name = "Power Armor Skeleton" + id = "powerarmor_skeleton" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/chassis/powerarmor + materials = list(/datum/material/iron=15000, /datum/material/plasma=5000) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_torso + name = "Power Armor Torso" + id = "powerarmor_torso" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_torso + materials = list(/datum/material/iron=40000, /datum/material/plasma=10000, /datum/material/titanium=5000) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_helmet + name = "Power Armor Helmet" + id = "powerarmor_helmet" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_helmet + materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000, /datum/material/glass=5000) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_armL + name = "Power Armor Left Arm" + id = "powerarmor_armL" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_left_arm + materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_armR + name = "Power Armor Right Arm" + id = "powerarmor_armR" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_right_arm + materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_legL + name = "Power Armor Left Leg" + id = "powerarmor_legL" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_left_leg + materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,) + construction_time = 500 + category = list("Misc") + +/datum/design/powerarmor_legR + name = "Power Armor Right Leg" + id = "powerarmor_legR" + build_type = MECHFAB + build_path = /obj/item/mecha_parts/part/powerarmor_right_leg + materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,) + construction_time = 500 + category = list("Misc") +///End of Power Armor diff --git a/sandcode/code/modules/research/designs/telecomms_designs.dm b/sandcode/code/modules/research/designs/telecomms_designs.dm new file mode 100644 index 0000000000..ed7f8db29d --- /dev/null +++ b/sandcode/code/modules/research/designs/telecomms_designs.dm @@ -0,0 +1,56 @@ +/////////////////////////////////// +/////Headset Encryption//////////// +/////////////////////////////////// + +/datum/design/encryption + materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 200) + build_type = PROTOLATHE | IMPRINTER + construction_time = 50 + category = list("Subspace Telecomms") + +/datum/design/encryption/eng_key + name = "Engineering radio encryption key" + desc = "Encryption key for the Engineering channel." + id = "eng_key" + build_path = /obj/item/encryptionkey/headset_eng + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/encryption/sci_key + name = "Science radio encryption key" + desc = "Encryption key for the Science channel." + id = "sci_key" + build_path = /obj/item/encryptionkey/headset_sci + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/encryption/supply_key + name = "Supply radio encryption key" + desc = "Encryption key for the Supply channel." + id = "supply_key" + build_path = /obj/item/encryptionkey/headset_cargo + departmental_flags = DEPARTMENTAL_FLAG_CARGO + +/datum/design/encryption/med_key + name = "Medical radio encryption key" + desc = "Encryption key for the Medical channel." + id = "med_key" + build_path = /obj/item/encryptionkey/headset_med + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/encryption/serv_key + name = "Service radio encryption key" + desc = "Encryption key for the Service channel." + id = "serv_key" + build_path = /obj/item/encryptionkey/headset_service + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/////////////////////////////////// +////////Telecomm Server//////////// +/////////////////////////////////// + +/datum/design/board/message_server + name = "Machine Design (Message Server)" + desc = "Allows for the construction of Message Server." + id = "message-server" + build_path = /obj/item/circuitboard/machine/telecomms/message_server + category = list("Subspace Telecomms") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE diff --git a/sandcode/code/modules/research/designs/tool_designs.dm b/sandcode/code/modules/research/designs/tool_designs.dm index a4b644d6d7..2cab36a1a5 100644 --- a/sandcode/code/modules/research/designs/tool_designs.dm +++ b/sandcode/code/modules/research/designs/tool_designs.dm @@ -7,3 +7,13 @@ build_path = /obj/item/pipe_dispenser/bluespace // Skyrat edit category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/computermath + name = "Problem Computer" + desc = "Solve math problems. Get them correct, get credits." + id = "computermath" + build_type = PROTOLATHE + materials = list(/datum/material/iron = 250, /datum/material/glass = 250, /datum/material/plastic = 250) + build_path = /obj/item/computermath/default + category = list("Tool Designs") + departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE diff --git a/sandcode/code/modules/research/techweb/all_nodes.dm b/sandcode/code/modules/research/techweb/all_nodes.dm index 78fc61c285..840d7499b5 100644 --- a/sandcode/code/modules/research/techweb/all_nodes.dm +++ b/sandcode/code/modules/research/techweb/all_nodes.dm @@ -46,3 +46,11 @@ prereq_ids = list("alien_bio") design_ids = list("ci-toolset-adv","ci-surgery-adv") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + +/datum/techweb_node/adv_surgery/New() + design_ids += "autodoc" + . = ..() + +/datum/techweb_node/computer_board_gaming/New() + design_ids += "tetris" + . = ..() diff --git a/sandcode/code/modules/research/techweb/bluespace_nodes.dm b/sandcode/code/modules/research/techweb/bluespace_nodes.dm index a5878292a3..5795a82614 100644 --- a/sandcode/code/modules/research/techweb/bluespace_nodes.dm +++ b/sandcode/code/modules/research/techweb/bluespace_nodes.dm @@ -2,3 +2,43 @@ design_ids += "borg_upgrade_bsrpd" design_ids += "bsrpd" . = ..() + +/datum/techweb_node/cryptominer + id = "cryptominer" + display_name = "Cryptocurrency Mining" + description = "Harness the power of cryptocurrency to make credits for Cargo-- slowly." + prereq_ids = list("bluespace_mining") + design_ids = list("cryptominer") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + +/datum/techweb_node/cryptominersyndie + id = "cryptominersyndie" + display_name = "Illegal Cryptocurrency Mining" + description = "Harness the power of bluespace to make credits for Cargo-- slowly." + prereq_ids = list("cryptominer","syndicate_basic") + design_ids = list("cryptominersyndie") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + +/datum/techweb_node/computermath + id = "computermath" + display_name = "Problem Computer" + description = "Solve problems for either cargo credits or research points." + prereq_ids = list("base") + design_ids = list("computermath") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) + +/datum/techweb_node/encryption + id = "encryption_key" + display_name = "Communication Encryption" + description = "Study into usage of frequencies within headsets and their repoduction." + prereq_ids = list("telecomms") + design_ids = list("eng_key", "sci_key", "med_key", "supply_key", "serv_key") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000) + +/datum/techweb_node/bs_mining + id = "bluespace_mining" + display_name = "Bluespace Mining Technology" + description = "Harness the power of bluespace to make materials out of nothing. Slowly." + prereq_ids = list("practical_bluespace", "adv_mining") + design_ids = list("bluespace_miner") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500) diff --git a/sandcode/code/modules/research/techweb/nodes/computer_hud_nodes.dm b/sandcode/code/modules/research/techweb/nodes/computer_hud_nodes.dm new file mode 100644 index 0000000000..ba76a5398c --- /dev/null +++ b/sandcode/code/modules/research/techweb/nodes/computer_hud_nodes.dm @@ -0,0 +1,3 @@ +/datum/techweb_node/telecomms/New() + . = ..() + design_ids += "message-server" diff --git a/sandcode/code/modules/research/techweb/nodes/robotics_nodes.dm b/sandcode/code/modules/research/techweb/nodes/robotics_nodes.dm new file mode 100644 index 0000000000..db873a544b --- /dev/null +++ b/sandcode/code/modules/research/techweb/nodes/robotics_nodes.dm @@ -0,0 +1,7 @@ +/datum/techweb_node/powerarmor + id = "powerarmor" + display_name = "Full Body Exoskeleton" + description = "Utilizing fluctuations in bluespace crystals, we can draw small amounts of energy to create self-powered body enhancing suits." + prereq_ids = list("adv_biotech", "adv_bluespace", "adv_robotics") + design_ids = list("powerarmor_skeleton","powerarmor_torso","powerarmor_helmet","powerarmor_armR","powerarmor_armL","powerarmor_legR","powerarmor_legL") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500) diff --git a/sandcode/icons/mecha/mech_construct.dmi b/sandcode/icons/mecha/mech_construct.dmi new file mode 100644 index 0000000000..ecfe3acb6d Binary files /dev/null and b/sandcode/icons/mecha/mech_construct.dmi differ diff --git a/sandcode/icons/mecha/mech_construction.dmi b/sandcode/icons/mecha/mech_construction.dmi new file mode 100644 index 0000000000..837a3d6100 Binary files /dev/null and b/sandcode/icons/mecha/mech_construction.dmi differ diff --git a/sandcode/icons/mob/clothing/head.dmi b/sandcode/icons/mob/clothing/head.dmi new file mode 100644 index 0000000000..9620b406bf Binary files /dev/null and b/sandcode/icons/mob/clothing/head.dmi differ diff --git a/sandcode/icons/mob/clothing/head_muzzled.dmi b/sandcode/icons/mob/clothing/head_muzzled.dmi new file mode 100644 index 0000000000..b80a598977 Binary files /dev/null and b/sandcode/icons/mob/clothing/head_muzzled.dmi differ diff --git a/sandcode/icons/mob/clothing/suit.dmi b/sandcode/icons/mob/clothing/suit.dmi new file mode 100644 index 0000000000..ef8c670a59 Binary files /dev/null and b/sandcode/icons/mob/clothing/suit.dmi differ diff --git a/sandcode/icons/mob/clothing/suit_digi.dmi b/sandcode/icons/mob/clothing/suit_digi.dmi new file mode 100644 index 0000000000..ae6ed70f7e Binary files /dev/null and b/sandcode/icons/mob/clothing/suit_digi.dmi differ diff --git a/sandcode/icons/obj/clothing/hats.dmi b/sandcode/icons/obj/clothing/hats.dmi new file mode 100644 index 0000000000..ed921f2f13 Binary files /dev/null and b/sandcode/icons/obj/clothing/hats.dmi differ diff --git a/sandcode/icons/obj/clothing/suits.dmi b/sandcode/icons/obj/clothing/suits.dmi new file mode 100644 index 0000000000..b3f6db3e4a Binary files /dev/null and b/sandcode/icons/obj/clothing/suits.dmi differ diff --git a/sandcode/icons/obj/computermath.dmi b/sandcode/icons/obj/computermath.dmi new file mode 100644 index 0000000000..1d7af3c1df Binary files /dev/null and b/sandcode/icons/obj/computermath.dmi differ diff --git a/sandcode/icons/obj/machines/autodoc.dmi b/sandcode/icons/obj/machines/autodoc.dmi new file mode 100644 index 0000000000..fcee04db49 Binary files /dev/null and b/sandcode/icons/obj/machines/autodoc.dmi differ diff --git a/sandcode/icons/obj/machines/cryptominer.dmi b/sandcode/icons/obj/machines/cryptominer.dmi new file mode 100644 index 0000000000..387ab4b622 Binary files /dev/null and b/sandcode/icons/obj/machines/cryptominer.dmi differ diff --git a/sandcode/icons/obj/machines/cryptominers/cargo.dmi b/sandcode/icons/obj/machines/cryptominers/cargo.dmi new file mode 100644 index 0000000000..c0af786a91 Binary files /dev/null and b/sandcode/icons/obj/machines/cryptominers/cargo.dmi differ diff --git a/sandcode/icons/obj/machines/cryptominers/nanotrasen.dmi b/sandcode/icons/obj/machines/cryptominers/nanotrasen.dmi new file mode 100644 index 0000000000..802468ac1e Binary files /dev/null and b/sandcode/icons/obj/machines/cryptominers/nanotrasen.dmi differ diff --git a/sandcode/icons/obj/machines/cryptominers/syndie.dmi b/sandcode/icons/obj/machines/cryptominers/syndie.dmi new file mode 100644 index 0000000000..09a0fb1ae0 Binary files /dev/null and b/sandcode/icons/obj/machines/cryptominers/syndie.dmi differ diff --git a/sandcode/icons/tetris/tetris_0.gif b/sandcode/icons/tetris/tetris_0.gif new file mode 100644 index 0000000000..cc02b973aa Binary files /dev/null and b/sandcode/icons/tetris/tetris_0.gif differ diff --git a/sandcode/icons/tetris/tetris_1.gif b/sandcode/icons/tetris/tetris_1.gif new file mode 100644 index 0000000000..2ca378df64 Binary files /dev/null and b/sandcode/icons/tetris/tetris_1.gif differ diff --git a/sandcode/icons/tetris/tetris_2.gif b/sandcode/icons/tetris/tetris_2.gif new file mode 100644 index 0000000000..92525f63f6 Binary files /dev/null and b/sandcode/icons/tetris/tetris_2.gif differ diff --git a/sandcode/icons/tetris/tetris_3.gif b/sandcode/icons/tetris/tetris_3.gif new file mode 100644 index 0000000000..3bb182b203 Binary files /dev/null and b/sandcode/icons/tetris/tetris_3.gif differ diff --git a/sandcode/icons/tetris/tetris_4.gif b/sandcode/icons/tetris/tetris_4.gif new file mode 100644 index 0000000000..4cf1862bca Binary files /dev/null and b/sandcode/icons/tetris/tetris_4.gif differ diff --git a/sandcode/icons/tetris/tetris_5.gif b/sandcode/icons/tetris/tetris_5.gif new file mode 100644 index 0000000000..1c8cb0a944 Binary files /dev/null and b/sandcode/icons/tetris/tetris_5.gif differ diff --git a/sandcode/icons/tetris/tetris_6.gif b/sandcode/icons/tetris/tetris_6.gif new file mode 100644 index 0000000000..45346cfeb1 Binary files /dev/null and b/sandcode/icons/tetris/tetris_6.gif differ diff --git a/sandcode/icons/tetris/tetris_7.gif b/sandcode/icons/tetris/tetris_7.gif new file mode 100644 index 0000000000..2b504c3878 Binary files /dev/null and b/sandcode/icons/tetris/tetris_7.gif differ diff --git a/sandcode/icons/tetris/tetrisp0.gif b/sandcode/icons/tetris/tetrisp0.gif new file mode 100644 index 0000000000..b3d0e89891 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp0.gif differ diff --git a/sandcode/icons/tetris/tetrisp1.gif b/sandcode/icons/tetris/tetrisp1.gif new file mode 100644 index 0000000000..a3db6452e0 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp1.gif differ diff --git a/sandcode/icons/tetris/tetrisp2.gif b/sandcode/icons/tetris/tetrisp2.gif new file mode 100644 index 0000000000..e4a311db50 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp2.gif differ diff --git a/sandcode/icons/tetris/tetrisp3.gif b/sandcode/icons/tetris/tetrisp3.gif new file mode 100644 index 0000000000..076f94520f Binary files /dev/null and b/sandcode/icons/tetris/tetrisp3.gif differ diff --git a/sandcode/icons/tetris/tetrisp4.gif b/sandcode/icons/tetris/tetrisp4.gif new file mode 100644 index 0000000000..078c73b5d1 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp4.gif differ diff --git a/sandcode/icons/tetris/tetrisp5.gif b/sandcode/icons/tetris/tetrisp5.gif new file mode 100644 index 0000000000..6d0eab340d Binary files /dev/null and b/sandcode/icons/tetris/tetrisp5.gif differ diff --git a/sandcode/icons/tetris/tetrisp6.gif b/sandcode/icons/tetris/tetrisp6.gif new file mode 100644 index 0000000000..08e06d72f6 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp6.gif differ diff --git a/sandcode/icons/tetris/tetrisp7.gif b/sandcode/icons/tetris/tetrisp7.gif new file mode 100644 index 0000000000..efa52ac086 Binary files /dev/null and b/sandcode/icons/tetris/tetrisp7.gif differ diff --git a/sandcode/sound/misc/suitmalf.ogg b/sandcode/sound/misc/suitmalf.ogg new file mode 100644 index 0000000000..f79abecbf6 Binary files /dev/null and b/sandcode/sound/misc/suitmalf.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 6c799aab2d..c155b24f81 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3500,13 +3500,19 @@ #include "sandcode\code\datums\traits\negative.dm" #include "sandcode\code\datums\traits\neutral.dm" #include "sandcode\code\game\area\ship_area.dm" +#include "sandcode\code\game\machinery\autodoc.dm" +#include "sandcode\code\game\machinery\cryptominers.dm" #include "sandcode\code\game\machinery\posialert.dm" +#include "sandcode\code\game\machinery\computer\arcade\tetris.dm" #include "sandcode\code\game\machinery\pipe\construction.dm" #include "sandcode\code\game\mecha\mech_fabricator.dm" +#include "sandcode\code\game\mecha\mecha_construction_paths.dm" +#include "sandcode\code\game\mecha\mecha_parts.dm" #include "sandcode\code\game\objects\effects\contraband.dm" #include "sandcode\code\game\objects\items\airlock_painter.dm" #include "sandcode\code\game\objects\items\BSRPD.dm" #include "sandcode\code\game\objects\items\cards_ids.dm" +#include "sandcode\code\game\objects\items\computermath.dm" #include "sandcode\code\game\objects\items\circuitboards\computer_circuitboards.dm" #include "sandcode\code\game\objects\items\circuitboards\machine_circuitboards.dm" #include "sandcode\code\game\objects\items\devices\extra_arm.dm" @@ -3514,15 +3520,27 @@ #include "sandcode\code\game\objects\items\robot\robot_upgrades.dm" #include "sandcode\code\game\objects\items\storage\backpack.dm" #include "sandcode\code\game\objects\items\storage\bags.dm" +#include "sandcode\code\interactions\_interaction.dm" +#include "sandcode\code\interactions\interaction_definitions.dm" +#include "sandcode\code\interactions\interaction_interface.dm" +#include "sandcode\code\interactions\interaction_mob.dm" +#include "sandcode\code\interactions\lewd\_lewd.dm" +#include "sandcode\code\interactions\lewd\lewd_datums.dm" +#include "sandcode\code\interactions\lewd\lewd_interactions.dm" +#include "sandcode\code\interactions\lewd\lewd_species.dm" +#include "sandcode\code\interactions\lewd\objects.dm" #include "sandcode\code\modules\atmospherics\machinery\pipes\bluespace.dm" #include "sandcode\code\modules\cargo\packs\emergency.dm" +#include "sandcode\code\modules\client\asset_cache.dm" #include "sandcode\code\modules\clothing\refactor.dm" #include "sandcode\code\modules\clothing\masks\miscellaneous.dm" #include "sandcode\code\modules\clothing\outfits\standard.dm" +#include "sandcode\code\modules\clothing\spacesuits\hardsuit.dm" #include "sandcode\code\modules\crafting\recipes\recipes_misc.dm" #include "sandcode\code\modules\hydroponics\grown\misc.dm" #include "sandcode\code\modules\integrated_electronics\subtypes\output.dm" #include "sandcode\code\modules\language\language.dm" +#include "sandcode\code\modules\mining\machine_bluespaceminer.dm" #include "sandcode\code\modules\misc\misc.dm" #include "sandcode\code\modules\mob\emote.dm" #include "sandcode\code\modules\mob\say.dm" @@ -3545,10 +3563,14 @@ #include "sandcode\code\modules\research\designs\machine_designs.dm" #include "sandcode\code\modules\research\designs\mechfabricator_designs.dm" #include "sandcode\code\modules\research\designs\misc_designs.dm" +#include "sandcode\code\modules\research\designs\telecomms_designs.dm" #include "sandcode\code\modules\research\designs\tool_designs.dm" #include "sandcode\code\modules\research\designs\weapon_designs.dm" +#include "sandcode\code\modules\research\designs\machine_designs\machine_designs_all_misc.dm" #include "sandcode\code\modules\research\techweb\all_nodes.dm" #include "sandcode\code\modules\research\techweb\bluespace_nodes.dm" +#include "sandcode\code\modules\research\techweb\nodes\computer_hud_nodes.dm" +#include "sandcode\code\modules\research\techweb\nodes\robotics_nodes.dm" #include "sandcode\code\modules\shuttle\spaceship_navigation_beacon.dm" #include "sandcode\code\modules\spells\spell.dm" #include "sandcode\code\modules\spells\spell_types\shapeshift.dm" @@ -3557,14 +3579,5 @@ #include "sandcode\code\modules\telescience\telesci.dm" #include "sandcode\code\modules\telescience\telesci_computer.dm" #include "sandcode\code\modules\uplink\uplink_items.dm" -#include "sandcode\code\interactions\_interaction.dm" -#include "sandcode\code\interactions\interaction_definitions.dm" -#include "sandcode\code\interactions\interaction_interface.dm" -#include "sandcode\code\interactions\interaction_mob.dm" -#include "sandcode\code\interactions\lewd\_lewd.dm" -#include "sandcode\code\interactions\lewd\lewd_datums.dm" -#include "sandcode\code\interactions\lewd\lewd_interactions.dm" -#include "sandcode\code\interactions\lewd\lewd_species.dm" -#include "sandcode\code\interactions\lewd\objects.dm" #include "sandcode\tools\Redirector\textprocs.dm" // END_INCLUDE diff --git a/tgui/src/interfaces/tetris/tetris.js b/tgui/src/interfaces/tetris/tetris.js new file mode 100644 index 0000000000..965c4cab15 --- /dev/null +++ b/tgui/src/interfaces/tetris/tetris.js @@ -0,0 +1,321 @@ +var i, j, IsOver, MaxX=10, MaxY=20, NextCol, Col, Score, Lines, IsHideFocus=true; +PosX=new Array(4); +PosY=new Array(4); +Delay=new Array(828,620,464,348,260,196,148,112,84,64,48,36,27); +Fld = new Array(MaxX); +for (i=0; i < MaxX; i++) +{ Fld[i]=new Array(MaxY); +} +RFld=new Array(MaxY); +Pic= new Array(8); +for (i=0; i<8; i++) +{ Pic[i] = new Image(); + Pic[i].src = "tetris_"+i+".gif"; +} +PrePic= new Array(8); +for (i=0; i<8; i++) +{ PrePic[i] = new Image(); + PrePic[i].src = "tetrisp"+i+".gif"; +} +PatternX=new Array(7); +PatternY=new Array(7); +PatternX[0]=new Array(0,1,2,3); +PatternY[0]=new Array(0,0,0,0); +PatternX[1]=new Array(2,1,0,0); +PatternY[1]=new Array(0,0,0,1); +PatternX[2]=new Array(2,1,1,0); +PatternY[2]=new Array(1,1,0,0); +PatternX[3]=new Array(1,2,1,2); +PatternY[3]=new Array(0,0,1,1); +PatternX[4]=new Array(1,2,2,3); +PatternY[4]=new Array(1,1,0,0); +PatternX[5]=new Array(1,2,3,3); +PatternY[5]=new Array(0,0,0,1); +PatternX[6]=new Array(1,2,3,2); +PatternY[6]=new Array(0,0,0,1); +function KeyDown(whichkey) +{ //alert(whichkey); + if (IsOver) return; + if (PosY<0) return; + if (whichkey == 37) Left(); + if (whichkey == 38) Rotate(); + if (whichkey == 39) Right(); + if (whichkey == 40) Down(); + + if (whichkey == 50) Down(); + if (whichkey == 52) Left(); + if (whichkey == 53) Down(); + if (whichkey == 54) Right(); + if (whichkey == 56) Rotate(); + + if (whichkey == 65458) Down(); + if (whichkey == 65460) Left(); + if (whichkey == 65461) Down(); + if (whichkey == 65462) Right(); + if (whichkey == 65464) Rotate(); +} +function Pause() +{ IsOver=true; + alert("Click OK to continue!"); + setTimeout("Init(false)",540); +} +function New() +{ IsOver=true; + setTimeout("Init(true)",540); +} +function Init(nn) +{ IsOver=false; + if (nn) + { for (i=0; i0) IsOver=true; + } + if (IsOver) + { if (CanShift(0,-1)) + { for (nn=0; nn<4; nn++) + document.images[PosX[nn]+MaxX*(PosY[nn]-1)].src = Pic[Col+1].src; + } + //if (confirm("Super, you got a score of "+Score+" ! Play again ?")) Init(true); + submitScore(Score); + return; + } + for (nn=0; nn<4; nn++) + { Fld[PosX[nn]][PosY[nn]]=Col+1; + document.images[PosX[nn]+MaxX*PosY[nn]].src = Pic[Col+1].src; + } + } + else + { for (nn=0; nn<4; nn++) + Fld[PosX[nn]][PosY[nn]]=0; + if (CanShift(0,1)) + { for (nn=0; nn<4; nn++) + Fld[PosX[nn]][PosY[nn]]=Col+1; + Shift(0,1); + } + else + { for (nn=0; nn<4; nn++) + Fld[PosX[nn]][PosY[nn]]=Col+1; + PosY[0]=-1; + Remove(); + window.document.ScoreForm.Score.value = Score; + window.document.ScoreForm.Level.value = Level; + window.document.ScoreForm.Lines.value = Lines; + } + } + //setTimeout("Go()",50*(11-Level)); + setTimeout("Go()",Delay[Level]); +} +function CanShift(xx, yy) +{ var nn, cc=true; + for (nn=0; nn<4; nn++) + { if (PosX[nn]+xx<0) return(false); + if (PosX[nn]+xx>=MaxX) return(false); + if (PosY[nn]+yy>=MaxY) return(false); + if (Fld[PosX[nn]+xx][PosY[nn]+yy]>0) return(false); + } + return(true); +} +function GetFld(xx, yy) +{ if (xx<0) return(-1); + if (xx>=MaxX) return(-1); + if (yy<0) return(-1); + if (yy>=MaxY) return(-1); + return(Fld[xx][yy]); +} +function Rotate() +{ if (IsOver) return; + if (PosY[0]<0) return; + var nn, ii, jj; + for (nn=0; nn<4; nn++) + Fld[PosX[nn]][PosY[nn]]=0; + if (!CanRotate()) + { for (nn=0; nn<4; nn++) + Fld[PosX[nn]][PosY[nn]]=Col+1; + return; + } + for (nn=0; nn<4; nn++) + document.images[PosX[nn]+MaxX*PosY[nn]].src = Pic[0].src; + if (Col==0) + { if (PosY[0]==PosY[1]) + { PosX[0]+=2;PosY[0]-=1; + PosX[1]+=1;PosY[2]+=1; + PosX[3]-=1;PosY[3]+=2; + } + else + { PosX[0]-=2;PosY[0]+=2; + PosX[1]-=1;PosY[1]+=1; + PosX[3]+=1;PosY[3]-=1; + } + } + if ((Col==2)||(Col==4)) + { if (PosY[0]==PosY[1]) + { PosX[0]-=1*(3-Col);PosY[0]-=1; + PosX[2]-=1*(3-Col);PosY[2]+=1; + PosY[3]+=2; + } + else + { PosX[0]+=1*(3-Col);PosY[0]+=1; + PosX[2]+=1*(3-Col);PosY[2]-=1; + PosY[3]-=2; + } + } + if ((Col==1)||(Col==5)||(Col==6)) + { nn=PosY[1]-PosY[0]; + PosY[0]=PosY[1]+(PosX[1]-PosX[0]); + PosX[0]=PosX[1]-nn; + nn=PosY[1]-PosY[2]; + PosY[2]=PosY[1]+(PosX[1]-PosX[2]); + PosX[2]=PosX[1]-nn; + nn=PosY[1]-PosY[3]; + PosY[3]=PosY[1]+(PosX[1]-PosX[3]); + PosX[3]=PosX[1]-nn; + } + for (nn=0; nn<4; nn++) + document.images[PosX[nn]+MaxX*PosY[nn]].src = Pic[Col+1].src; +} +function CanRotate() +{ var ii, jj, iim, jjm, dd=3; + if (Col==3) return(false); + if (Col==0) + { iim=PosX[2]-2; + jjm=PosY[2]-1; + dd=4; + } + else + { iim=PosX[1]-1; + jjm=PosY[1]-1; + } + for (ii=iim; ii0) Shift(0, dd); +} +function Shift(dx, dy) +{ var nn; + for (nn=0; nn<4; nn++) + { Fld[PosX[nn]][PosY[nn]]=0; + document.images[PosX[nn]+MaxX*PosY[nn]].src = Pic[0].src; + } + for (nn=0; nn<4; nn++) + { PosX[nn]+=dx; + PosY[nn]+=dy; + Fld[PosX[nn]][PosY[nn]]=Col+1; + document.images[PosX[nn]+MaxX*PosY[nn]].src = Pic[Col+1].src; + } +} +function Remove() +{ var xx, yy, nn=0; + Score+=20; + for (yy=0; yy=0; yy--) + { if (RFld[yy]>0) + { nn++ + for (xx=0; xx0) + { for (xx=0; xx=1500*Level)&&(Level<12)) Level++; + if (nn>0) RefreshScreen(); +} +function RefreshScreen() +{ for (i=0; i < MaxX; i++) + { for (j=0; j < MaxY; j++) + window.document.images[i+MaxX*j].src = Pic[Fld[i][j]].src; + } +} +function HideFocus() +{ if (IsHideFocus) + { document.ScoreForm.Score.focus(); + document.ScoreForm.Score.blur(); + } +} +function IncreaseDifficulty() +{ if (Level<12) + { window.document.ScoreForm.Level.value = Level + Level++; + } +} diff --git a/tgui/src/interfaces/tetris/tetris2.js b/tgui/src/interfaces/tetris/tetris2.js new file mode 100644 index 0000000000..cc9c152df4 --- /dev/null +++ b/tgui/src/interfaces/tetris/tetris2.js @@ -0,0 +1,27 @@ +document.open("text/plain"); +document.writeln("
"); +for (j=0; j < MaxY; j++) +{ document.writeln(""); + for (i=0; i < MaxX; i++) + document.write(""); + document.writeln("
"); +} +document.writeln("
"); + +if (navigator.appName == "Konqueror") +{ document.write(""); + document.write(""); + KeyCatchFocus(); + IsHideFocus=false; +} +function KeyCatchFocus() +{ setTimeout("document.forms[0].KeyCatch.focus()",100); +} +function KeyCatchChange() +{ var vv=""+document.forms[0].KeyCatch.value; + if (vv=="") return; + KeyDown(vv.charCodeAt(0)); + document.forms[0].KeyCatch.value=""; +} + +document.close();