diff --git a/code/ATMOSPHERICS/datum_icon_manager.dm b/code/ATMOSPHERICS/datum_icon_manager.dm index bf514607b31..75cb0fce8ce 100644 --- a/code/ATMOSPHERICS/datum_icon_manager.dm +++ b/code/ATMOSPHERICS/datum_icon_manager.dm @@ -186,9 +186,9 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ var/cache_name = state for(var/D in cardinal) - var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) + var/image/I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D)) underlays[cache_name + "[D]"] = I for(var/pipe_color in pipe_colors) - I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) + I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D)) I.color = pipe_colors[pipe_color] underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index 30f9be83b4c..b36c5ed82cc 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -46,7 +46,8 @@ var/datum/gas_mixture/air var/archived_cycle = 0 var/current_cycle = 0 - + var/icy = 0 + var/icyoverlay var/obj/effect/hotspot/active_hotspot var/temperature_archived //USED ONLY FOR SOLIDS @@ -67,6 +68,8 @@ air.temperature = temperature + update_visuals() + /turf/simulated/Destroy() visibilityChanged() if(active_hotspot) @@ -209,8 +212,6 @@ air.react() - update_visuals() - if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) hotspot_expose(air.temperature, CELL_VOLUME) for(var/atom/movable/item in src) @@ -221,6 +222,13 @@ if(consider_superconductivity(starting = 1)) remove = 0 + if(air.temperature < T0C && air.return_pressure() > 10) + icy = 1 + else + icy = 0 + + update_visuals() + if(!excited_group && remove == 1) air_master.remove_from_active(src) @@ -232,6 +240,13 @@ archived_cycle = air_master.current_cycle /turf/simulated/proc/update_visuals() + if(icy && !icyoverlay) + overlays |= icemaster + icyoverlay = icemaster + else if(icyoverlay && !icy) + icyoverlay = null + overlays -= icemaster + var/new_overlay_type = tile_graphic() if (new_overlay_type == atmos_overlay_type) return diff --git a/code/__DEFINES/hydroponics.dm b/code/__DEFINES/hydroponics.dm index a53e66f0a0f..f6693b0bcfc 100644 --- a/code/__DEFINES/hydroponics.dm +++ b/code/__DEFINES/hydroponics.dm @@ -56,4 +56,5 @@ #define TRAIT_BIOLUM 36 #define TRAIT_BIOLUM_COLOUR 37 #define TRAIT_IMMUTABLE 38 -#define TRAIT_RARITY 39 \ No newline at end of file +#define TRAIT_RARITY 39 +#define TRAIT_BATTERY_RECHARGE 40 \ No newline at end of file diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index eb79649dcec..e30e904a462 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -1,20 +1,38 @@ -/proc/random_underwear(var/gender) +proc/random_underwear(gender, species = "Human") + var/list/pick_list = list() switch(gender) - if(MALE) return pick(underwear_m) - if(FEMALE) return pick(underwear_f) - else return pick(underwear_list) + if(MALE) pick_list = underwear_m + if(FEMALE) pick_list = underwear_f + else pick_list = underwear_list + return pick_species_allowed_underwear(pick_list, species) -/proc/random_undershirt(var/gender) +proc/random_undershirt(gender, species = "Human") + var/list/pick_list = list() switch(gender) - if(MALE) return pick(undershirt_m) - if(FEMALE) return pick(undershirt_f) - else return pick(undershirt_list) + if(MALE) pick_list = undershirt_m + if(FEMALE) pick_list = undershirt_f + else pick_list = undershirt_list + return pick_species_allowed_underwear(pick_list, species) -/proc/random_socks(gender) +proc/random_socks(gender, species = "Human") + var/list/pick_list = list() switch(gender) - if(MALE) return pick(socks_m) - if(FEMALE) return pick(socks_f) - else return pick(socks_list) + if(MALE) pick_list = socks_m + if(FEMALE) pick_list = socks_f + else pick_list = socks_list + return pick_species_allowed_underwear(pick_list, species) + +proc/pick_species_allowed_underwear(list/all_picks, species) + var/list/valid_picks = list() + for(var/test in all_picks) + var/datum/sprite_accessory/S = all_picks[test] + if(!(species in S.species_allowed)) + continue + valid_picks += test + + if(!valid_picks.len) valid_picks += "Nude" + + return pick(valid_picks) proc/random_hair_style(var/gender, species = "Human") var/h_style = "Bald" @@ -35,7 +53,7 @@ proc/random_hair_style(var/gender, species = "Human") return h_style -/proc/GetOppositeDir(var/dir) +proc/GetOppositeDir(var/dir) switch(dir) if(NORTH) return SOUTH if(SOUTH) return NORTH diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index bb9d4f354eb..51e0dfa8ab2 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -1,5 +1,6 @@ var/global/obj/effect/overlay/plmaster = null var/global/obj/effect/overlay/slmaster = null +var/global/obj/effect/overlay/icemaster = null // nanomanager, the manager for Nano UIs var/datum/nanomanager/nanomanager = new() diff --git a/code/controllers/Processes/air.dm b/code/controllers/Processes/air.dm index a20169c86d3..df52e295bcf 100644 --- a/code/controllers/Processes/air.dm +++ b/code/controllers/Processes/air.dm @@ -140,4 +140,10 @@ var/global/datum/controller/process/air_system/air_master slmaster.icon = 'icons/effects/tile_effects.dmi' slmaster.icon_state = "sleeping_agent" slmaster.layer = FLY_LAYER - slmaster.mouse_opacity = 0 \ No newline at end of file + slmaster.mouse_opacity = 0 + + icemaster = new /obj/effect/overlay() + icemaster.icon = 'icons/turf/overlays.dmi' + icemaster.icon_state = "snowfloor" + icemaster.layer = TURF_LAYER+0.1 + icemaster.mouse_opacity = 0 \ No newline at end of file diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm index 9fcb356b9b1..cbb074b8d24 100644 --- a/code/datums/cargoprofile.dm +++ b/code/datums/cargoprofile.dm @@ -258,7 +258,7 @@ whitelist = list(/obj/item/weapon/banhammer,/obj/item/weapon/sord,/obj/item/weapon/butch,/obj/item/weapon/claymore,/obj/item/weapon/holo/esword, /obj/item/weapon/flamethrower,/obj/item/weapon/grenade,/obj/item/weapon/gun,/obj/item/weapon/hatchet,/obj/item/weapon/katana, /obj/item/weapon/kitchenknife,/obj/item/weapon/melee,/obj/item/weapon/nullrod,/obj/item/weapon/pickaxe,/obj/item/weapon/twohanded, - /obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/deathnettle) + /obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/nettle/death) /datum/cargoprofile/tools name = "Devices & Tools" diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 39dd483d1b0..eaa244ca693 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -301,6 +301,8 @@ Made by Xhuis flags = NO_BLOOD | NO_BREATHE | NO_SCAN | NO_INTORGANS burn_mod = 1.5 //1.5x burn damage, 2x is excessive + silent_steps = 1 + /datum/game_mode/proc/update_shadow_icons_added(datum/mind/shadow_mind) var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW] shadow_hud.join_hud(shadow_mind.current) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 666023d0af8..cbfb8549923 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -120,7 +120,7 @@ if(!H) return 0 switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear) @@ -151,7 +151,7 @@ if(!H) return 0 switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear) @@ -181,8 +181,8 @@ if(!H) return 0 H.equip_or_collect(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear) switch(H.backbag) - if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/medic(H), slot_back) - if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) + if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/virology(H), slot_back) + if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_vir(H), slot_back) if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_or_collect(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform) H.equip_or_collect(new /obj/item/device/pda/viro(H), slot_wear_pda) diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 2f57243382f..5247727034a 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -27,7 +27,7 @@ if(!H) return 0 switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/science(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear) @@ -65,7 +65,7 @@ if(!H) return 0 switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/science(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear) diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 30b3e89e496..156ca4c29f4 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -90,7 +90,7 @@ if(!H) return 0 switch(H.backbag) if(1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back) + if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/botany(H), slot_back) if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back) if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 53a340696a4..e5b8956ad93 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -217,6 +217,15 @@ else robot["cell"] = 0 + var/turf/pos = get_turf(R) + var/area/bot_area = get_area(R) + robot["xpos"] = pos.x + robot["ypos"] = pos.y + robot["zpos"] = pos.z + robot["area"] = format_text(bot_area.name) + + robot["health"] = round(R.health * 100 / R.maxHealth,0.1) + robot["module"] = R.module ? R.module.name : "None" robot["master_ai"] = R.connected_ai ? R.connected_ai.name : "None" robot["hackable"] = 0 diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index f4f2d4d4ec6..87560b65d20 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -779,4 +779,15 @@ obj/item/weapon/circuitboard/rdserver origin_tech = "programming=1;engineering=2" req_components = list( /obj/item/weapon/stock_parts/console_screen = 1, - /obj/item/weapon/stock_parts/matter_bin = 3) \ No newline at end of file + /obj/item/weapon/stock_parts/matter_bin = 3) + +/obj/item/weapon/circuitboard/clawgame + name = "circuit board (Claw Game)" + build_path = /obj/machinery/arcade/claw + board_type = "machine" + origin_tech = "programming=2" + req_components = list( + /obj/item/weapon/stock_parts.matter_bin = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/glass = 1) \ No newline at end of file diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 192d2355656..7e132f64614 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -1,4 +1,5 @@ var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0) + /obj/machinery/slot_machine name = "slot machine" desc = "Gambling for the antisocial." @@ -6,77 +7,70 @@ var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0) icon_state = "slots-off" anchored = 1 density = 1 -// mats = 10 - var/money = 25000 var/plays = 0 var/working = 0 var/balance=0 - attack_hand(var/mob/user as mob) - if(user.mind) - if(user.mind.initial_account) - balance = user.mind.initial_account.money - user.machine = src - if (src.working) - var/dat = {"Slot Machine
-

- Please wait!
"} - user << browse(dat, "window=slotmachine;size=450x500") - onclose(user, "slotmachine") - else - var/dat = {"Slot Machine
-

- Five credits to play!
- Prize Money Available: [src.money]
- Credits Remaining: [balance]
- [src.plays] players have tried their luck today!
-

- Play!
"} - user << browse(dat, "window=slotmachine;size=400x500") - onclose(user, "slotmachine") +/obj/machinery/slot_machine/attack_hand(var/mob/user as mob) + if(user.mind) + if(user.mind.initial_account) + balance = user.mind.initial_account.money + user.machine = src + if (working) + var/dat = {"Slot Machine
+

+ Please wait!
"} + user << browse(dat, "window=slotmachine;size=450x500") + onclose(user, "slotmachine") + else + var/dat = {"Slot Machine
+

+ Five credits to play!
+ Credits Remaining: [balance]
+ [plays] players have tried their luck today!
+

+
Play!
"} + user << browse(dat, "window=slotmachine;size=400x500") + onclose(user, "slotmachine") - Topic(href, href_list) - if(href_list["ops"]) - var/operation = text2num(href_list["ops"]) - if(operation == 1) // Play -/* if (src.working == 1) - usr << "\red You need to wait until the machine stops spinning!" - return */ - if (balance < 5) - usr << "\red Insufficient money to play!" - return - usr.mind.initial_account.money -= 5 - src.money += 5 - src.plays += 1 - src.working = 1 - src.icon_state = "slots-on" - usr << "Let's roll!" - var/roll = rand(1,10000) - spawn(100) - if (roll == 1) - for(var/mob/O in hearers(src, null)) - O.show_message(text("[] says, 'JACKPOT! You win [src.money]!'", src), 1) - slotmachine_announcement.Announce("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner") - usr.mind.initial_account.money += src.money - src.money = 0 - else if (roll > 1 && roll <= 10) - for(var/mob/O in hearers(src, null)) - O.show_message(text("[] says, 'Big Winner! You win five thousand credits!'", src), 1) - usr.mind.initial_account.money += 5000 - src.money -= 5000 - else if (roll > 10 && roll <= 100) - for(var/mob/O in hearers(src, null)) - O.show_message(text("[] says, 'Winner! You win five hundred credits!'", src), 1) - usr.mind.initial_account.money += 500 - src.money -= 500 - else if (roll > 100 && roll <= 1000) - usr << "\blue You win a free game!" - usr.mind.initial_account.money += 5 - src.money -= 5 - else - usr << "\red No luck!" - src.working = 0 - src.icon_state = "slots-off" - src.add_fingerprint(usr) - src.updateUsrDialog() - return +/obj/machinery/slot_machine/Topic(href, href_list) + if(href_list["ops"]) + var/operation = text2num(href_list["ops"]) + if(operation == 1) // Play + if (working == 1) + usr << "You need to wait until the machine stops spinning!" + return + if (balance < 5) + usr << "Insufficient money to play!" + return + usr.mind.initial_account.money -= 5 + plays += 1 + working = 1 + icon_state = "slots-on" + var/roll = rand(1,10000) + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + spawn(30) + if (roll == 1) + playsound(src.loc, 'sound/effects/engine_alert2.ogg', 50, 0) + visible_message("[src] says, 'JACKPOT! [usr.name] has won two hundred and fifty thousand credits!'") + slotmachine_announcement.Announce("Congratulations to [usr.name] on winning the jackpot of two hundred and fifty thousand credits!", "Jackpot Winner") + usr.mind.initial_account.money += 250000 + else if (roll > 1 && roll <= 10) + playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + visible_message("[src] says, 'Big Winner! [usr.name] has won five thousand credits!'") + usr.mind.initial_account.money += 5000 + else if (roll > 10 && roll <= 100) + playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + visible_message("[src] says, 'Winner! [usr.name] has won win five hundred credits!'") + usr.mind.initial_account.money += 500 + else if (roll > 100 && roll <= 1000) + playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + usr << "You win 5 credits!" + usr.mind.initial_account.money += 5 + else + usr << "No luck!" + working = 0 + icon_state = "slots-off" + add_fingerprint(usr) + updateUsrDialog() + return diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index a7cdb7a0049..9e335de1f07 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -8,7 +8,6 @@ use_power = 1 idle_power_usage = 20 active_power_usage = 5000 - req_access = list(access_robotics) var/time_coeff = 1 var/resource_coeff = 1 var/time_coeff_tech = 1 @@ -92,36 +91,6 @@ time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01) -/obj/machinery/mecha_part_fabricator/check_access(obj/item/weapon/card/id/I) - if(istype(I, /obj/item/device/pda)) - var/obj/item/device/pda/pda = I - I = pda.id - if(!istype(I) || !I.access) //not ID or no access - return 0 - for(var/req in req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - -/obj/machinery/mecha_part_fabricator/proc/emag() - switch(emagged) - if(0) - emagged = 0.5 - visible_message("\icon[src] \The [src] beeps: \"DB error \[Code 0x00F1\]\"") - sleep(10) - visible_message("\icon[src] \The [src] beeps: \"Attempting auto-repair\"") - sleep(15) - visible_message("\icon[src] \The [src] beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"") - sleep(30) - visible_message("\icon[src] \The [src] beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"") - req_access = null - emagged = 1 - if(0.5) - visible_message("\icon[src] \The [src] beeps: \"DB not responding \[Code 0x0003\]...\"") - if(1) - visible_message("\icon[src] \The [src] beeps: \"No records in User DB\"") - return - /obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name) var/output = "" for(var/datum/design/D in files.known_designs) @@ -149,9 +118,9 @@ var/output for(var/resource in resources) var/amount = min(res_max_amount, resources[resource]) - output += "[material2name(resource)]: [amount] cm³" + output += "[material2name(resource)]: [amount] cm³, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets" if(amount>0) - output += " - Remove \[
1\] | \[10\] | \[All\]" + output += " - Remove \[1\] | \[10\] | \[Custom\] | \[All\]" output += "
" return output @@ -319,8 +288,12 @@ interact(user) /obj/machinery/mecha_part_fabricator/attack_hand(mob/user) - if(!(..())) - return interact(user) + if(..()) + return 1 + if(!allowed(user) && !isobserver(user)) + user << "Access denied." + return 1 + return interact(user) /obj/machinery/mecha_part_fabricator/interact(mob/user as mob) var/dat, left_part @@ -455,7 +428,13 @@ if(href_list["remove_mat"] && href_list["material"]) var/amount = text2num(href_list["remove_mat"]) var/material = href_list["material"] - if(amount < 0 || amount > resources[material]) //href protection + if(href_list["custom_eject"]) + amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num + amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart + if (!amount) + return + amount = round(amount) + if(amount < 0 || amount > resources[material]) //href protection, except that resources[] is 2000 per sheet return var/removed = remove_material(material,amount) @@ -569,8 +548,5 @@ user << "\The [src] cannot hold any more [sname] sheet\s." return -/obj/machinery/mecha_part_fabricator/emag_act(user as mob) - emag() - /obj/machinery/mecha_part_fabricator/proc/material2name(var/ID) return copytext(ID,2) \ No newline at end of file diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 39196db70fa..d39a8dfbc93 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -111,11 +111,13 @@ else if(issilicon(M)) if(isrobot(M)) var/mob/living/silicon/robot/R = M - for(var/obj/item/borg/combat/shield/S in R.module.modules) - if(R.activated(S)) - add_logs(M, user, "flashed", object="[src.name]") - user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!") - return 1 + + if (R.module) // Perhaps they didn't choose a module yet + for(var/obj/item/borg/combat/shield/S in R.module.modules) + if(R.activated(S)) + add_logs(M, user, "flashed", object="[src.name]") + user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!") + return 1 M.Weaken(rand(5,10)) add_logs(M, user, "flashed", object="[src.name]") user.visible_message("[user] overloads [M]'s sensors with the [src.name]!", "You overload [M]'s sensors with the [src.name]!") diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index c99415ea5b5..425b7e0b54f 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -217,7 +217,11 @@ return 1 var/to_transfer as num if (user.get_inactive_hand()==src) - to_transfer = 1 + var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num + if(!desired) + return + desired = round(desired) + to_transfer = max(1,min(desired,S.max_amount-S.amount,src.amount)) else to_transfer = min(src.amount, S.max_amount-S.amount) S.amount+=to_transfer diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 5c5953d4085..37f7fccbc94 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -120,6 +120,36 @@ icon_state = "engiepack" item_state = "engiepack" +/obj/item/weapon/storage/backpack/botany + name = "botany backpack" + desc = "It's a backpack made of all-natural fibers." + icon_state = "botpack" + item_state = "botpack" + +/obj/item/weapon/storage/backpack/chemistry + name = "chemistry backpack" + desc = "A backpack specially designed to repel stains and hazardous liquids." + icon_state = "chempack" + item_state = "chempack" + +/obj/item/weapon/storage/backpack/genetics + name = "genetics backpack" + desc = "A bag designed to be super tough, just in case someone hulks out on you." + icon_state = "genepack" + item_state = "genepack" + +/obj/item/weapon/storage/backpack/science + name = "science backpack" + desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma." + icon_state = "toxpack" + item_state = "toxpack" + +/obj/item/weapon/storage/backpack/virology + name = "virology backpack" + desc = "A backpack made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey." + icon_state = "viropack" + item_state = "viropack" + /* * Satchel Types */ @@ -149,13 +179,11 @@ name = "industrial satchel" desc = "A tough satchel with extra pockets." icon_state = "satchel-eng" - item_state = "engiepack" /obj/item/weapon/storage/backpack/satchel_med name = "medical satchel" desc = "A sterile satchel used in medical departments." icon_state = "satchel-med" - item_state = "medicalpack" /obj/item/weapon/storage/backpack/satchel_vir name = "virologist satchel" @@ -181,18 +209,16 @@ name = "security satchel" desc = "A robust satchel for security related needs." icon_state = "satchel-sec" - item_state = "securitypack" /obj/item/weapon/storage/backpack/satchel_hyd name = "hydroponics satchel" desc = "A green satchel for plant related work." - icon_state = "satchel_hyd" + icon_state = "satchel-hyd" /obj/item/weapon/storage/backpack/satchel_cap name = "captain's satchel" desc = "An exclusive satchel for Nanotrasen officers." icon_state = "satchel-cap" - item_state = "captainpack" /obj/item/weapon/storage/backpack/satchel_flat name = "smuggler's satchel" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm index 01526c99976..a935d1f8cfb 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm @@ -11,6 +11,7 @@ New() ..() sleep(2) + new /obj/item/weapon/storage/backpack/science(src) new /obj/item/weapon/storage/backpack/satchel_tox(src) new /obj/item/clothing/under/rank/scientist(src) //new /obj/item/clothing/suit/labcoat/science(src) diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index b5680be43bc..7304681bf6b 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -373,6 +373,8 @@ new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/suit/storage/labcoat/chemist(src) new /obj/item/clothing/suit/storage/labcoat/chemist(src) + new /obj/item/weapon/storage/backpack/chemistry(src) + new /obj/item/weapon/storage/backpack/chemistry(src) new /obj/item/weapon/storage/backpack/satchel_chem(src) new /obj/item/weapon/storage/backpack/satchel_chem(src) new /obj/item/weapon/storage/bag/chemistry(src) @@ -394,6 +396,10 @@ new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/suit/storage/labcoat/genetics(src) new /obj/item/clothing/suit/storage/labcoat/genetics(src) + new /obj/item/weapon/storage/backpack/genetics(src) + new /obj/item/weapon/storage/backpack/genetics(src) + new /obj/item/weapon/storage/backpack/satchel_gen(src) + new /obj/item/weapon/storage/backpack/satchel_gen(src) return @@ -413,6 +419,10 @@ new /obj/item/clothing/suit/storage/labcoat/virologist(src) new /obj/item/clothing/mask/surgical(src) new /obj/item/clothing/mask/surgical(src) + new /obj/item/weapon/storage/backpack/virology(src) + new /obj/item/weapon/storage/backpack/virology(src) + new /obj/item/weapon/storage/backpack/satchel_vir(src) + new /obj/item/weapon/storage/backpack/satchel_vir(src) return diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 2a33289d811..f0747bc2f89 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -205,7 +205,7 @@ icon_state = "plant-36" /obj/structure/flora/kirbyplants/dead - name = "/improper RD's potted plant" + name = "\improper RD's potted plant" desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..." icon_state = "plant-dead" diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index a23ba5ac92e..7c6de0f828f 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -35,7 +35,7 @@ /obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 0 - + /obj/structure/inflatable/CanAtmosPass(turf/T) return !density @@ -75,15 +75,15 @@ user.visible_message("[user] tears at [src]!") /obj/structure/inflatable/attack_alien(mob/user as mob) - if(islarva(user)) + if(islarva(user)) return attack_generic(user, 15) /obj/structure/inflatable/attack_animal(mob/user as mob) - if(!isanimal(user)) + if(!isanimal(user)) return var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) + if(M.melee_damage_upper <= 0) return attack_generic(M, M.melee_damage_upper) @@ -94,7 +94,7 @@ attack_generic(user, rand(10, 15)) /obj/structure/inflatable/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(!istype(W)) + if(!istype(W)) return if (can_puncture(W)) visible_message("\red [user] pierces [src] with [W]!") @@ -119,7 +119,6 @@ src.transfer_fingerprints_to(R) qdel(src) else - //user << "\blue You slowly deflate the inflatable wall." visible_message("[src] slowly deflates.") spawn(50) var/obj/item/inflatable/R = new /obj/item/inflatable(loc) @@ -178,16 +177,16 @@ if(istype(mover, /obj/effect/beam)) return !opacity return !density - + /obj/structure/inflatable/door/CanAtmosPass(turf/T) return !density /obj/structure/inflatable/door/proc/TryToSwitchState(atom/user) - if(isSwitchingStates) + if(isSwitchingStates) return if(ismob(user)) var/mob/M = user - if(world.time - user.last_bumped <= 60) + if(world.time - user.last_bumped <= 60) return //NOTE do we really need that? if(M.client) if(iscarbon(M)) @@ -240,14 +239,14 @@ visible_message("[src] rapidly deflates!") var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) src.transfer_fingerprints_to(R) + qdel(src) else visible_message("[src] slowly deflates.") spawn(50) var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) src.transfer_fingerprints_to(R) - + qdel(src) air_update_turf(1) - qdel(src) /obj/item/inflatable/torn name = "torn inflatable wall" diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index c24482a0da4..9cddb5a9fa4 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -115,6 +115,12 @@ var/list/wood_icons = list("wood","wood-broken") else if(is_plating()) if(!broken && !burnt) icon_state = icon_plating //Because asteroids are 'platings' too. + + footstep_sounds = list( + "human" = list('sound/effects/footstep/plating_human.ogg'), + "xeno" = list('sound/effects/footstep/plating_xeno.ogg') + ) + else if(is_light_floor()) var/obj/item/stack/tile/light/T = floor_tile if(T.on) @@ -193,11 +199,20 @@ var/list/wood_icons = list("wood","wood-broken") icon_state = "carpet[connectdir]-[diagonalconnect]" + footstep_sounds = list( + "human" = list('sound/effects/footstep/carpet_human.ogg'), + "xeno" = list('sound/effects/footstep/carpet_xeno.ogg') + ) + else if(is_wood_floor()) if(!broken && !burnt) if( !(icon_state in wood_icons) ) icon_state = "wood" - //world << "[icon_state]y's got [icon_state]" + + footstep_sounds = list( + "human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org + "xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org + ) /turf/simulated/floor/return_siding_icon_state() diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index b9279f779cb..cb77106508e 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -31,6 +31,11 @@ icon_state = "wood" floor_tile = new/obj/item/stack/tile/wood + footstep_sounds = list( + "human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org + "xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org + ) + /turf/simulated/floor/vault icon_state = "rockvault" @@ -131,6 +136,11 @@ floor_tile = null intact = 0 + footstep_sounds = list( + "human" = list('sound/effects/footstep/plating_human.ogg'), + "xeno" = list('sound/effects/footstep/plating_xeno.ogg') + ) + /turf/simulated/floor/plating/airless icon_state = "plating" name = "airless plating" @@ -246,6 +256,11 @@ icon_state = "carpet" floor_tile = new/obj/item/stack/tile/carpet + footstep_sounds = list( + "human" = list('sound/effects/footstep/carpet_human.ogg'), + "xeno" = list('sound/effects/footstep/carpet_xeno.ogg') + ) + New() floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well. if(!icon_state) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 8cd2500b0e0..3dce001a535 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -29,6 +29,8 @@ var/image/obscured //camerachunks + var/list/footstep_sounds = list() + /turf/New() ..() for(var/atom/movable/AM in src) diff --git a/code/game/vehicles/spacepods/pod_fabricator.dm b/code/game/vehicles/spacepods/pod_fabricator.dm index fcc65870b1e..a3d9e4911a3 100644 --- a/code/game/vehicles/spacepods/pod_fabricator.dm +++ b/code/game/vehicles/spacepods/pod_fabricator.dm @@ -8,7 +8,6 @@ use_power = 1 idle_power_usage = 20 active_power_usage = 5000 - req_access = list(access_robotics) var/time_coeff = 1 var/resource_coeff = 1 var/time_coeff_tech = 1 @@ -97,37 +96,6 @@ T += Ml.rating time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01) - -/obj/machinery/spod_part_fabricator/check_access(obj/item/weapon/card/id/I) - if(istype(I, /obj/item/device/pda)) - var/obj/item/device/pda/pda = I - I = pda.id - if(!istype(I) || !I.access) //not ID or no access - return 0 - for(var/req in req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - -/obj/machinery/spod_part_fabricator/proc/emag() - switch(emagged) - if(0) - emagged = 0.5 - visible_message("\icon[src] \The [src] beeps: \"DB error \[Code 0x00F1\]\"") - sleep(10) - visible_message("\icon[src] \The [src] beeps: \"Attempting auto-repair\"") - sleep(15) - visible_message("\icon[src] \The [src] beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"") - sleep(30) - visible_message("\icon[src] \The [src] beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"") - req_access = null - emagged = 1 - if(0.5) - visible_message("\icon[src] \The [src] beeps: \"DB not responding \[Code 0x0003\]...\"") - if(1) - visible_message("\icon[src] \The [src] beeps: \"No records in User DB\"") - return - /obj/machinery/spod_part_fabricator/proc/output_parts_list(set_name) var/output = "" for(var/datum/design/D in files.known_designs) @@ -155,9 +123,9 @@ var/output for(var/resource in resources) var/amount = min(res_max_amount, resources[resource]) - output += "[material2name(resource)]: [amount] cm³" + output += "[material2name(resource)]: [amount] cm³, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets" if(amount>0) - output += " - Remove \[1\] | \[10\] | \[All\]" + output += " - Remove \[1\] | \[10\] | \[Custom\] | \[All\]" output += "
" return output @@ -322,8 +290,9 @@ return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto) /obj/machinery/spod_part_fabricator/attack_hand(mob/user) - if(!(..())) - return interact(user) + if(..()) + return 1 + return interact(user) /obj/machinery/spod_part_fabricator/interact(mob/user as mob) var/dat, left_part @@ -457,6 +426,12 @@ if(href_list["remove_mat"] && href_list["material"]) var/amount = text2num(href_list["remove_mat"]) var/material = href_list["material"] + if(href_list["custom_eject"]) + amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num + amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart + if (!amount) + return + amount = round(amount) if(amount < 0 || amount > resources[material]) //href protection return @@ -571,8 +546,5 @@ user << "\The [src] cannot hold any more [sname] sheet\s." return -/obj/machinery/spod_part_fabricator/emag_act(user as mob) - emag() - /obj/machinery/spod_part_fabricator/proc/material2name(var/ID) return copytext(ID,2) \ No newline at end of file diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 37c6a60bcdd..7565d710091 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -3,6 +3,10 @@ world/IsBanned(key,address,computer_id) if (!key || !address || !computer_id) log_access("Failed Login (invalid data): [key] [address]-[computer_id]") return list("reason"="invalid login data", "desc"="Error: Could not check ban status, please try again. Error message: Your computer provided invalid or blank information to the server on connection (BYOND Username, IP, and Computer ID). Provided information for reference: Username: '[key]' IP: '[address]' Computer ID: '[computer_id]'. If you continue to get this error, please restart byond or contact byond support.") + + if (computer_id == 2147483647) //this cid causes stickybans to go haywire + log_access("Failed Login (invalid cid): [key] [address]-[computer_id]") + return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.") var/admin = 0 var/ckey = ckey(key) if((ckey in admin_datums) || (ckey in deadmins)) @@ -20,7 +24,7 @@ world/IsBanned(key,address,computer_id) message_admins("Failed Login: [key] - Banned: Tor") //ban their computer_id and ckey for posterity AddBan(ckey(key), computer_id, "Use of Tor", "Automated Ban", 0, 0) - var/mistakemessage = "" + var/mistakemessage = "" if(config.banappeals) mistakemessage = "\nIf you believe this is a mistake, please request help at [config.banappeals]." return list("reason"="using Tor", "desc"="\nReason: The network you are using to connect has been banned.[mistakemessage]") diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm new file mode 100644 index 00000000000..da83338b5f3 --- /dev/null +++ b/code/modules/arcade/arcade_base.dm @@ -0,0 +1,165 @@ + +/obj/machinery/arcade + name = "Arcade Game" + desc = "One of the most generic arcade games ever." + icon = 'icons/obj/arcade.dmi' + icon_state = "clawmachine_on" + density = 1 + anchored = 1 + use_power = 1 + idle_power_usage = 40 + var/tokens = 0 + var/freeplay = 0 //for debugging and admin kindness + var/token_price = 0 + var/last_winner = null //for letting people who to hunt down and steal prizes from + var/window_name = "arcade" //in case you want to change the window name for certain machines + +/obj/machinery/arcade/New() + ..() + var/choice = pick(subtypesof(/obj/machinery/arcade)) + new choice(loc) + qdel(src) + +/obj/machinery/arcade/examine(mob/user) + ..(user) + if(freeplay) + user << "Someone enabled freeplay on this machine!" + else + if(token_price) + user << "\The [src.name] costs [token_price] credits per play." + if(!tokens) + user << "\The [src.name] has no available play credits. Better feed the machine!" + else if(tokens == 1) + user << "\The [src.name] has only 1 play credit left!" + else + user << "\The [src.name] has [tokens] play credits!" + +/obj/machinery/arcade/attack_hand(mob/user as mob) + if(..()) + if(in_use && src == user.machine) //this one checks if they fell down/died and closes the game + src.close_game() + return + if(in_use && src == user.machine) //this one just checks if they are playing so it doesn't eat tokens + return + interact(user) + +/obj/machinery/arcade/interact(mob/user as mob) + if(stat & BROKEN || panel_open) + return + if(!tokens && !freeplay) + user << "\The [src.name] doesn't have enough credits to play! Pay first!" + return + if(!in_use && (tokens || freeplay)) + in_use = 1 + start_play(user) + return + if(in_use) + if(src != user.machine) + user << "Someone else is already playing this machine, please wait your turn!" + return + +/obj/machinery/arcade/attackby(var/obj/item/O as obj, var/mob/user as mob, params) + if(istype(O, /obj/item/weapon/screwdriver) && anchored) + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + panel_open = !panel_open + user << "You [panel_open ? "open" : "close"] the maintenance panel." + update_icon() + return + if(!freeplay) + if(istype(O, /obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/C = O + if(pay_with_card(C)) + tokens += 1 + return + else if(istype(O, /obj/item/weapon/spacecash)) + var/obj/item/weapon/spacecash/C = O + if(pay_with_cash(C, user)) + tokens += 1 + return + if(panel_open&& component_parts && istype(O, /obj/item/weapon/crowbar)) + default_deconstruction_crowbar(O) + +/obj/machinery/arcade/update_icon() + return + +/obj/machinery/arcade/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, var/mob/user) + if(cashmoney.get_total() < token_price) + user << "\icon[cashmoney] That is not enough money." + return 0 + visible_message("[usr] inserts a credit chip into [src].") + var/left = cashmoney.get_total() - token_price + user.unEquip(cashmoney) + qdel(cashmoney) + if(left) + dispense_cash(left, src.loc, user) + return 1 + +/obj/machinery/arcade/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/mob/user) + visible_message("[usr] swipes a card through [src].") + var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number) + if (!customer_account) + user <<"Error: Unable to access account. Please contact technical support if problem persists." + return 0 + + if(customer_account.suspended) + user << "Unable to access account: account suspended." + return 0 + + // Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is + // empty at high security levels + if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) + var/attempt_pin = input("Enter pin code", "Vendor transaction") as num + customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2) + + if(!customer_account) + user << "Unable to access account: incorrect credentials." + return 0 + + if(token_price > customer_account.money) + user << "Insufficient funds in account." + return 0 + else + // Okay to move the money at this point + + // debit money from the purchaser's account + customer_account.money -= token_price + + // create entry in the purchaser's account log + var/datum/transaction/T = new() + T.target_name = "[src.name]" + T.purpose = "Purchase of [src.name] credit" + if(token_price > 0) + T.amount = "([token_price])" + else + T.amount = "[token_price]" + T.source_terminal = src.name + T.date = current_date_string + T.time = worldtime2text() + customer_account.transaction_log.Add(T) + return 1 + +/obj/machinery/arcade/proc/start_play(mob/user as mob) + user.set_machine(src) + if(!freeplay) + tokens -= 1 + +/obj/machinery/arcade/proc/close_game() + in_use = 0 + for(var/mob/user in viewers(world.view, src)) // I don't know who you are. + if(user.client && user.machine == src) // I will look for you, + user.unset_machine() // I will find you, + user << browse(null, "window=[window_name]") // And I will kill you. + return + +/obj/machinery/arcade/proc/win() + return + +/obj/machinery/arcade/process() + if(in_use) + src.updateUsrDialog() + if(!in_use) + src.close_game() + +/obj/machinery/arcade/Destroy() + src.close_game() + return ..() \ No newline at end of file diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm new file mode 100644 index 00000000000..30374d31a52 --- /dev/null +++ b/code/modules/arcade/arcade_prize.dm @@ -0,0 +1,24 @@ + +/obj/item/toy/prizeball + name = "prize ball" + desc = "A toy is a toy, but a prize ball could be anything! It could even be a toy!" + icon = 'icons/obj/arcade.dmi' + icon_state = "prizeball_1" + var/opening = 0 + +/obj/item/toy/prizeball/New() + ..() + icon_state = pick("prizeball_1","prizeball_2","prizeball_3") + +/obj/item/toy/prizeball/attack_self(mob/user as mob) + if(opening) + return + opening = 1 + playsound(src.loc, 'sound/items/bubblewrap.ogg', 30, 1, extrarange = -4, falloff = 10) + icon_state = "prizeconfetti" + src.color = pick(random_color_list) + var/prize_inside = pick(/obj/random/carp_plushie, /obj/random/plushie, /obj/random/figure) //will add ticket bundles later + spawn(10) + user.unEquip(src) + new prize_inside(user.loc) + qdel(src) \ No newline at end of file diff --git a/code/modules/arcade/claw_game.dm b/code/modules/arcade/claw_game.dm new file mode 100644 index 00000000000..30dae8567d0 --- /dev/null +++ b/code/modules/arcade/claw_game.dm @@ -0,0 +1,82 @@ +/var/claw_game_html = null + +/obj/machinery/arcade/claw + name = "Claw Game" + desc = "One of the most infuriating ways to win a toy." + icon = 'icons/obj/arcade.dmi' + icon_state = "clawmachine_1_on" + token_price = 15 + window_name = "Claw Game" + var/machine_image = "_1" + var/bonus_prize_chance = 5 //chance to dispense a SECOND prize if you win, increased by matter bin rating + + //This is to make sure the images are available + var/list/img_resources = list('icons/obj/arcade_images/backgroundsprite.png', + 'icons/obj/arcade_images/clawpieces.png', + 'icons/obj/arcade_images/crane_bot.png', + 'icons/obj/arcade_images/crane_top.png', + 'icons/obj/arcade_images/prize_inside.png', + 'icons/obj/arcade_images/prizeorbs.png') + +/obj/machinery/arcade/claw/New() + src.addAtProcessing() + + machine_image = pick("_1", "_2") + update_icon() + + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/clawgame(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/stack/cable_coil(null, 5) + component_parts += new /obj/item/stack/sheet/glass(null, 1) + RefreshParts() + + if(!claw_game_html) + claw_game_html = file2text('code/modules/arcade/crane.html') + claw_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]") + +/obj/machinery/arcade/claw/RefreshParts() + var/bin_upgrades = 0 + for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts) + bin_upgrades = B.rating + bonus_prize_chance = bin_upgrades * 5 //equals +5% chance per matter bin rating level (+20% with rating 4) + +/obj/machinery/arcade/claw/update_icon() + if(stat & BROKEN) + icon_state = "clawmachine[machine_image]_broken" + else if(panel_open) + icon_state = "clawmachine[machine_image]_open" + else if(stat & NOPOWER) + icon_state = "clawmachine[machine_image]_off" + else + icon_state = "clawmachine[machine_image]_on" + return + +/obj/machinery/arcade/claw/win() + icon_state = "clawmachine[machine_image]_win" + visible_message("[src.name] beeps, \"WINNER!\"") + if(prob(bonus_prize_chance)) + //double prize mania! + new /obj/item/toy/prizeball(get_turf(src)) + new /obj/item/toy/prizeball(get_turf(src)) + playsound(src.loc, 'sound/arcade/Win.ogg', 50, 1, extrarange = -3, falloff = 10) + spawn(10) + update_icon() + +/obj/machinery/arcade/claw/start_play(mob/user as mob) + ..() + user << browse_rsc('page.css') + for(var/i=1, i<=img_resources.len, i++) + user << browse_rsc(img_resources[i]) + user << browse(claw_game_html, "window=[window_name];size=700x600") + +/obj/machinery/arcade/claw/Topic(href, list/href_list) + if(..()) + return + var/prize_won = null + prize_won = href_list["prizeWon"] + if(!isnull(prize_won)) + close_game() + if(prize_won == "1") + win() \ No newline at end of file diff --git a/code/modules/arcade/crane.html b/code/modules/arcade/crane.html new file mode 100644 index 00000000000..3cf0fc67ae3 --- /dev/null +++ b/code/modules/arcade/crane.html @@ -0,0 +1,289 @@ + + + + + Crane game + + + + + + + + +
+
+ +
+
+
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ + + +
+ + diff --git a/code/modules/arcade/page.css b/code/modules/arcade/page.css new file mode 100644 index 00000000000..1c569967750 --- /dev/null +++ b/code/modules/arcade/page.css @@ -0,0 +1,84 @@ +#background { + width:900px; + height:406px; + position: absolute; + background: url(backgroundsprite.png) no-repeat; + background-position: 0 -166px; + top: 62px; +} + +#grayorbs-chute { + width: 902px; + height: 131px; + position: absolute; + background: url(backgroundsprite.png) no-repeat center; + background-position: 3px -15px; + top: 337px; + left: -3px; +} + +#foreground { + width:900px; + height:520px; + position: absolute; + background: url(backgroundsprite.png) no-repeat center; + background-position: 0 -575px; + z-index:10; +} + +#crane { + width:100px; + height:100px; + position: absolute; + top: 131px; + left: 100px; +} + +#crane-handle-top { + width: 10px; + height: 83px; + position: absolute; + background: url('crane_top.png') repeat-y center; + bottom: 86px;/*top: -69px;*/ + left: 47px; +} + +#crane-handle-bottom { + width:10px; + height:8px; + position: absolute; + background: url('clawpieces.png') no-repeat center; + top: 14px; + left: 47px; + background-position: -198px -83px; +} + +#crane-center{ + width: 26px; + height: 27px; + position: absolute; + background: url('clawpieces.png') no-repeat center; + top: 22px; + left: 39px; + background-position: -190px -101px; +} + +#crane-claw { + width: 110px; + height: 78px; + position: absolute; + background: url('clawpieces.png') no-repeat center; + top: 33px; + left: 11px; + background-position: -36px -34px; +} + +.prize-ball { + width: 60px; + height: 60px; + //background: url('prizeorbs.png') no-repeat; + //-moz-border-radius: 30px; + //-webkit-border-radius: 30px; + //border-radius: 30px; + position: absolute; +} \ No newline at end of file diff --git a/code/modules/awaymissions/exile.dm b/code/modules/awaymissions/exile.dm index 09003df1a4d..d0cdce5b7f4 100644 --- a/code/modules/awaymissions/exile.dm +++ b/code/modules/awaymissions/exile.dm @@ -23,7 +23,7 @@ return dat /obj/item/weapon/implantcase/exile - name = "/improper Glass Case- 'Exile'" + name = "\improper Glass Case- 'Exile'" desc = "A case containing an exile implant." icon = 'icons/obj/items.dmi' icon_state = "implantcase-r" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d301db27226..324b5e7b427 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1040,7 +1040,7 @@ datum/preferences if("input") switch(href_list["preference"]) if("name") - var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null + var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.) var/new_name = reject_bad_name(raw_name) if(new_name) @@ -1108,6 +1108,19 @@ datum/preferences //this shouldn't happen f_style = facial_hair_styles_list["Shaved"] + // Don't wear another species' underwear! + var/datum/sprite_accessory/S = underwear_list[underwear] + if(!(species in S.species_allowed)) + underwear = random_underwear(gender, species) + + S = undershirt_list[undershirt] + if(!(species in S.species_allowed)) + undershirt = random_undershirt(gender, species) + + S = socks_list[socks] + if(!(species in S.species_allowed)) + socks = random_socks(gender, species) + //reset hair colour and skin colour r_hair = 0//hex2num(copytext(new_hair, 2, 4)) g_hair = 0//hex2num(copytext(new_hair, 4, 6)) @@ -1156,7 +1169,7 @@ datum/preferences var/input = "Choose your character's hair colour:" if(species == "Machine") input = "Choose your character's frame colour:" - var/new_hair = input(user, input, "Character Preference") as color|null + var/new_hair = input(user, input, "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null if(new_hair) r_hair = hex2num(copytext(new_hair, 2, 4)) g_hair = hex2num(copytext(new_hair, 4, 6)) @@ -1193,7 +1206,7 @@ datum/preferences body_accessory = (new_body_accessory == "None") ? null : new_body_accessory if("facial") - var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as color|null + var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null if(new_facial) r_facial = hex2num(copytext(new_facial, 2, 4)) g_facial = hex2num(copytext(new_facial, 4, 6)) @@ -1255,7 +1268,7 @@ datum/preferences socks = new_socks if("eyes") - var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null + var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null if(new_eyes) r_eyes = hex2num(copytext(new_eyes, 2, 4)) g_eyes = hex2num(copytext(new_eyes, 4, 6)) @@ -1270,7 +1283,7 @@ datum/preferences if("skin") if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) - var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference") as color|null + var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null if(new_skin) r_skin = hex2num(copytext(new_skin, 2, 4)) g_skin = hex2num(copytext(new_skin, 4, 6)) @@ -1278,7 +1291,7 @@ datum/preferences if("ooccolor") - var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null + var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference", ooccolor) as color|null if(new_ooccolor) ooccolor = new_ooccolor @@ -1423,7 +1436,7 @@ datum/preferences UI_style = "Midnight" if("UIcolor") - var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!") as color|null + var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null if(!UI_style_color_new) return UI_style_color = UI_style_color_new diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 7acc46213e3..ec84df9474c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -320,6 +320,7 @@ BLIND // can't see anything body_parts_covered = FEET slot_flags = SLOT_FEET + var/silence_steps = 0 permeability_coefficient = 0.50 slowdown = SHOES_SLOWDOWN diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index b7e0e549a74..1c5aa131e68 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -1,5 +1,5 @@ /obj/item/clothing/glasses/hud - name = "/improper HUD" + name = "\improper HUD" desc = "A heads-up display that provides important info in (almost) real time." flags = null //doesn't protect eyes because it's a monocle, duh origin_tech = "magnets=3;biotech=2" @@ -24,20 +24,20 @@ desc = desc + " The display flickers slightly." /obj/item/clothing/glasses/hud/health - name = "/improper Health Scanner HUD" + name = "\improper Health Scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." icon_state = "healthhud" HUDType = DATA_HUD_MEDICAL_ADVANCED /obj/item/clothing/glasses/hud/health_advanced - name = "/improper Advanced Health Scanner HUD" + name = "\improper Advanced Health Scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter." icon_state = "advmedhud" flash_protect = 1 HUDType = DATA_HUD_MEDICAL_ADVANCED /obj/item/clothing/glasses/hud/health/night - name = "/improper Night Vision Health Scanner HUD" + name = "\improper Night Vision Health Scanner HUD" desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness." icon_state = "healthhudnight" item_state = "glasses" @@ -52,7 +52,7 @@ HUDType = DATA_HUD_DIAGNOSTIC /obj/item/clothing/glasses/hud/security - name = "/improper Security HUD" + name = "\improper Security HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records." icon_state = "securityhud" var/global/list/jobs[0] @@ -68,7 +68,7 @@ invisa_view = 2 /obj/item/clothing/glasses/hud/security/night - name = "/improper Night Vision Security HUD" + name = "\improper Night Vision Security HUD" desc = "An advanced heads-up display which provides id data and vision in complete darkness." icon_state = "securityhudnight" darkness_view = 8 diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index f9f39bc063d..418db118b82 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -11,6 +11,7 @@ var/list/clothing_choices = list() siemens_coefficient = 0.8 species_restricted = null + silence_steps = 1 /obj/item/clothing/shoes/mime name = "mime shoes" @@ -175,3 +176,25 @@ icon_state = "noble_boot" item_color = "noble_boot" item_state = "noble_boot" + + +/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/shoe_silencer)) + silence_steps = 1 + user.unEquip(I) + qdel(I) + else . = ..() + +/obj/item/shoe_silencer + name = "shoe rags" + desc = "Looks sneaky." + icon_state = "sheet-cloth" + +/datum/table_recipe/shoe_rags + name = "Shoe Rags" + + result = /obj/item/shoe_silencer + reqs = list(/obj/item/stack/tape_roll = 10) + tools = list(/obj/item/weapon/wirecutters) + + time = 40 diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 4dae0d4dd6a..b39ca263d02 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -429,6 +429,22 @@ user.put_in_hands(NF) qdel(src) return + if("nettle") + var/obj/item/weapon/grown/nettle/nettle = new /obj/item/weapon/grown/nettle(user.loc) + nettle.force = round((5 + potency / 5), 1) + user << "You straighten up the plant." + user.unEquip(src) + user.put_in_hands(nettle) + qdel(src) + return + if("deathnettle") + var/obj/item/weapon/grown/nettle/death/DN = new /obj/item/weapon/grown/nettle/death(user.loc) + DN.force = round((5 + potency / 2.5), 1) + user << "You straighten up the plant." + user.unEquip(src) + user.put_in_hands(DN) + qdel(src) + return if("cashpod") user << "You crack open the cash pod..." var/value = round(seed.get_trait(TRAIT_POTENCY)) @@ -475,4 +491,21 @@ return reagents.remove_any(rand(1,3)) //Todo, make it actually remove the reagents the seed uses. seed.do_thorns(H,src) - seed.do_sting(H,src,pick("r_hand","l_hand")) \ No newline at end of file + seed.do_sting(H,src,pick("r_hand","l_hand")) + + +/obj/item/weapon/reagent_containers/food/snacks/grown/On_Consume() + if(seed && seed.get_trait(TRAIT_BATTERY_RECHARGE)) + if(!reagents.total_volume) + var/batteries_recharged = 0 + for(var/obj/item/weapon/stock_parts/cell/C in usr.GetAllContents()) + var/newcharge = (potency*0.01)*C.maxcharge + if(C.charge < newcharge) + C.charge = newcharge + if(isobj(C.loc)) + var/obj/O = C.loc + O.update_icon() //update power meters and such + batteries_recharged = 1 + if(batteries_recharged) + usr << "Battery has recovered." + ..() \ No newline at end of file diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index b6a3b05d966..95c6e9350f4 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -32,28 +32,77 @@ rtotal += round(potency/reagent_data[2]) reagents.add_reagent(rid,max(1,rtotal)) -/obj/item/weapon/grown/deathnettle // -- Skie - plantname = "deathnettle" - desc = "The \red glowing \black nettle incites \redrage\black in you just from looking at it!" +/obj/item/weapon/grown/nettle //abstract type + name = "nettle" + desc = "It's probably not wise to touch it with bare hands..." icon = 'icons/obj/weapons.dmi' - name = "deathnettle" - icon_state = "deathnettle" + icon_state = "nettle" damtype = "fire" - force = 30 - throwforce = 1 - w_class = 2.0 + force = 15 + hitsound = 'sound/weapons/bladeslice.ogg' + throwforce = 5 + w_class = 1 throw_speed = 1 throw_range = 3 - origin_tech = "combat=3" + origin_tech = "combat=1" attack_verb = list("stung") - New() - ..() - spawn(5) - force = round((5+potency/2.5), 1) - suicide_act(mob/user) - viewers(user) << "\red [user] is eating some of the [src.name]! It looks like \he's trying to commit suicide." - return (BRUTELOSS|TOXLOSS) +/obj/item/weapon/grown/nettle/suicide_act(mob/user) + user.visible_message("[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.") + return (BRUTELOSS|TOXLOSS) + +/obj/item/weapon/grown/nettle/pickup(mob/living/user) + if(!iscarbon(user)) + return 0 + var/mob/living/carbon/C = user + if(ishuman(user)) + var/mob/living/carbon/human/H = C + if(H.gloves) + return 0 + var/organ = ((user.hand ? "l_":"r_") + "arm") + var/obj/item/organ/external/affecting = H.get_organ(organ) + if(affecting.take_damage(0,force)) + user.UpdateDamageIcon() + else + C.take_organ_damage(0,force) + C << "The nettle burns your bare hand!" + return 1 + +/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity) + if(!proximity) return + if(force > 0) + force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off + else + usr << "All the leaves have fallen off the nettle from violent whacking." + usr.unEquip(src) + qdel(src) + + +/obj/item/weapon/grown/nettle/death + name = "deathnettle" + desc = "The glowing \black nettle incites rage\black in you just from looking at it!" + icon_state = "deathnettle" + force = 30 + throwforce = 15 + origin_tech = "combat=3" + +/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user) + if(..()) + if(prob(50)) + user.Paralyse(5) + user << "You are stunned by the Deathnettle when you try picking it up!" + +/obj/item/weapon/grown/nettle/death/afterattack(mob/living/carbon/M, mob/user) + if(istype(M, /mob/living)) + M << "You are stunned by the powerful acid of the Deathnettle!" + add_logs(M, user, "attacked", src) + + M.eye_blurry += force/7 + if(prob(20)) + M.Paralyse(force / 6) + M.Weaken(force / 15) + M.drop_item() + ..() /obj/item/weapon/corncob name = "corn cob" diff --git a/code/modules/hydroponics/grown_predefined.dm b/code/modules/hydroponics/grown_predefined.dm index 523974abac3..44c9c3a1943 100644 --- a/code/modules/hydroponics/grown_predefined.dm +++ b/code/modules/hydroponics/grown_predefined.dm @@ -43,4 +43,7 @@ plantname = "aloe" /obj/item/weapon/reagent_containers/food/snacks/grown/comfrey - plantname = "comfrey" \ No newline at end of file + plantname = "comfrey" + +/obj/item/weapon/reagent_containers/food/snacks/grown/glowcap + plantname = "glowcap" \ No newline at end of file diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index d206c8f8e3a..86a4f19630d 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -42,6 +42,7 @@ set_trait(TRAIT_MATURATION, 0) // Time taken before the plant is mature. set_trait(TRAIT_PRODUCTION, 0) // Time before harvesting can be undertaken again. set_trait(TRAIT_TELEPORTING, 0) // Uses the bluespace tomato effect. + set_trait(TRAIT_BATTERY_RECHARGE, 0) // Used for glowcaps; recharges batteries on a user. set_trait(TRAIT_BIOLUM, 0) // Plant is bioluminescent. set_trait(TRAIT_ALTER_TEMP, 0) // If set, the plant will periodically alter local temp by this amount. set_trait(TRAIT_PRODUCT_ICON, 0) // Icon to use for fruit coming from this plant. @@ -675,7 +676,7 @@ P.values["[TRAIT_EXUDE_GASSES]"] = exude_gasses traits_to_copy = list(TRAIT_POTENCY) if(GENE_OUTPUT) - traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM) + traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM,TRAIT_BATTERY_RECHARGE) if(GENE_ATMOSPHERE) traits_to_copy = list(TRAIT_HEAT_TOLERANCE,TRAIT_LOWKPA_TOLERANCE,TRAIT_HIGHKPA_TOLERANCE) if(GENE_HARDINESS) diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index 34dac891dce..28cd89843ac 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -132,6 +132,7 @@ chems = list("plantmatter" = list(1,50), "sacid" = list(0,1)) kitchen_tag = "nettle" preset_icon = "nettle" + final_form = 0 /datum/seed/nettle/New() ..() @@ -654,7 +655,7 @@ name = "glowshroom" seed_name = "glowshroom" display_name = "glowshrooms" - mutants = null + mutants = list("glowcap") chems = list("radium" = list(1,20)) preset_icon = "glowshroom" @@ -672,6 +673,20 @@ set_trait(TRAIT_PLANT_ICON,"mushroom7") set_trait(TRAIT_RARITY,20) +/datum/seed/mushroom/glowshroom/glowcap + name = "glowcap" + seed_name = "glowcap" + display_name = "glowcaps" + mutants = null + preset_icon = "glowcap" + +/datum/seed/mushroom/glowshroom/glowcap/New() + ..() + set_trait(TRAIT_BIOLUM_COLOUR,"#8E0300") + set_trait(TRAIT_PRODUCT_COLOUR,"#C65680") + set_trait(TRAIT_PLANT_COLOUR,"#B72D68") + set_trait(TRAIT_BATTERY_RECHARGE,1) + /datum/seed/mushroom/plastic name = "plastic" seed_name = "plastellium" diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 18645c4f531..568af7a89ec 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -179,6 +179,9 @@ var/global/list/plant_seed_sprites = list() /obj/item/seeds/glowshroom seed_type = "glowshroom" +/obj/item/seeds/glowcap + seed_type = "glowcap" + /obj/item/seeds/plumpmycelium seed_type = "plumphelmet" diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index f255c558c20..9fe6284d9e9 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -92,39 +92,41 @@ "adminordrazine" = -5 ) var/global/list/water_reagents = list( - "water" = 1, - "adminordrazine" = 1, - "milk" = 0.9, - "beer" = 0.7, - "fluorine" = -0.5, - "chlorine" = -0.5, - "phosphorus" = -0.5, - "water" = 1, - "sodawater" = 1, - "fishwater" = 1, + "water" = list(1, 0), + "adminordrazine" = list(1, 0), + "milk" = list(0.9, 0), + "beer" = list(0.7, 0), + "fluorine" = list(-0.5, 0), + "chlorine" = list(-0.5, 0), + "phosphorus" = list(-0.5, 0), + "water" = list(1, 0), + "sodawater" = list(1, 0), + "fishwater" = list(1, 0), + "holywater" = list(1, 0.1), ) // Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order). var/global/list/beneficial_reagents = list( - // "reagent" = list(health, yield_Mod, mut_mod), - "beer" = list( -0.05, 0, 0 ), - "fluorine" = list( -2, 0, 0 ), - "chlorine" = list( -1, 0, 0 ), - "phosphorus" = list( -0.75, 0, 0 ), - "sodawater" = list( 0.1, 0, 0 ), - "sacid" = list( -1, 0, 0 ), - "facid" = list( -2, 0, 0 ), - "atrazine" = list( -2, 0, 0.2), - "cryoxadone" = list( 3, 0, 0 ), - "ammonia" = list( 0.5, 0, 0 ), - "diethylamine" = list( 1, 0, 0 ), - "nutriment" = list( 0.25, 0.15, 0 ), - "protein" = list( 0.25, 0.15, 0 ), - "plantmatter" = list( 0.25, 0.15, 0 ), - "radium" = list( -1.5, 0, 0.2), - "adminordrazine" = list( 1, 1, 1 ), - "robustharvest" = list( 0, 0.2, 0 ), - "left4zed" = list( 0, 0, 0.2) + // "reagent" = list(health, yield_Mod, mut_mod, production, potency), + "beer" = list( -0.05, 0, 0, 0, 0), + "fluorine" = list( -2, 0, 0, 0, 0), + "chlorine" = list( -1, 0, 0, 0, 0), + "phosphorus" = list( -0.75, 0, 0, 0, 0), + "sodawater" = list( 0.1, 0, 0, 0, 0), + "sacid" = list( -1, 0, 0, 0, 0), + "facid" = list( -2, 0, 0, 0, 0), + "atrazine" = list( -2, 0, 0.2, 0, 0), + "cryoxadone" = list( 3, 0, 0, 0, 0), + "ammonia" = list( 0.5, 0, 0, 0, 0), + "diethylamine" = list( 1, 0, 0, 0, 0), + "nutriment" = list( 0.25, 0.15, 0, 0, 0), + "protein" = list( 0.25, 0.15, 0, 0, 0), + "plantmatter" = list( 0.25, 0.15, 0, 0, 0), + "radium" = list( -1.5, 0, 0.2, 0, 0), + "adminordrazine" = list( 1, 1, 1, 0, 0), + "robustharvest" = list( 0, 0.2, 0, 0, 0), + "left4zed" = list( 0, 0, 0.2, 0, 0), + "saltpetre" = list( 0.25, 0, 0, -0.02, 0.01), ) //--FalseIncarnate @@ -274,6 +276,9 @@ health += beneficial_reagents[R.id][1] * reagent_total yield_mod = min(100, yield_mod + (beneficial_reagents[R.id][2] * reagent_total)) mutation_mod += beneficial_reagents[R.id][3] * reagent_total + if(seed.get_trait(TRAIT_PRODUCTION) > 1) + seed.set_trait(TRAIT_PRODUCTION, max(2, seed.get_trait(TRAIT_PRODUCTION) + beneficial_reagents[R.id][4] * reagent_total)) + seed.set_trait(TRAIT_POTENCY, min(100, seed.get_trait(TRAIT_POTENCY) + beneficial_reagents[R.id][5] * reagent_total)) // Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation. @@ -303,9 +308,10 @@ // Handle water and water refilling. var/water_added = 0 if(water_reagents[R.id]) - var/water_input = water_reagents[R.id] * reagent_total + var/water_input = water_reagents[R.id][1] * reagent_total water_added += water_input waterlevel += water_input + health += water_reagents[R.id][2] * reagent_total // Water dilutes toxin level. if(water_added > 0) diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index a18ed380196..147f02f69c1 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -234,6 +234,9 @@ if(grown_seed.get_trait(TRAIT_PRODUCES_POWER)) dat += "
The fruit will function as a battery if prepared appropriately." + if(grown_seed.get_trait(TRAIT_BATTERY_RECHARGE)) + dat += "
The fruit hums with an odd electrical energy." + if(grown_seed.get_trait(TRAIT_STINGS)) dat += "
The fruit is covered in stinging spines." diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 16a8602e527..cdd23e4d9b3 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -291,3 +291,30 @@ Des: Removes all infected images from the alien. #undef HEAT_DAMAGE_LEVEL_1 #undef HEAT_DAMAGE_LEVEL_2 #undef HEAT_DAMAGE_LEVEL_3 + +/mob/living/carbon/alien/handle_footstep(turf/T) + if(..()) + if(T.footstep_sounds["xeno"]) + var/S = pick(T.footstep_sounds["xeno"]) + if(S) + if(m_intent == "run") + if(!(step_count % 2)) //every other turf makes a sound + return 0 + + var/range = -(world.view - 2) + range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4) + var/volume = 5 + + if(m_intent == "walk") + return 0 //silent when walking + + if(buckled || lying || throwing) + return 0 //people flying, lying down or sitting do not step + + if(!has_gravity(src)) + if(step_count % 3) //this basically says, every three moves make a noise + return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0 + + playsound(T, S, volume, 1, range) + return 1 + return 0 diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 39bdd785530..c6e6279b3ad 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -95,4 +95,55 @@ if(!has_gravity(loc)) return var/obj/item/clothing/shoes/S = shoes - S.step_action(src) \ No newline at end of file + S.step_action(src) + +/mob/living/carbon/human/handle_footstep(turf/T) + if(..()) + if(T.footstep_sounds["human"]) + var/S = pick(T.footstep_sounds["human"]) + if(S) + if(m_intent == "run") + if(!(step_count % 2)) //every other turf makes a sound + return 0 + + var/range = -(world.view - 2) + if(m_intent == "walk") + range -= 0.333 + if(!shoes) + range -= 0.333 + + //shoes + running + //-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6) + //running OR shoes + //-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5) + //walking AND no shoes + //-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4) + + var/volume = 13 + if(m_intent == "walk") + volume -= 4 + if(!shoes) + volume -= 4 + + if(istype(shoes, /obj/item/clothing/shoes)) + var/obj/item/clothing/shoes/shooess = shoes + if(shooess.silence_steps) + return 0 //silent + + if(!has_organ("l_foot") && !has_organ("r_foot")) + return 0 //no feet no footsteps + + if(buckled || lying || throwing) + return 0 //people flying, lying down or sitting do not step + + if(!has_gravity(src)) + if(step_count % 3) //this basically says, every three moves make a noise + return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0 + + if(species.silent_steps) + return 0 //species is silent + + playsound(T, S, volume, 1, range) + return 1 + + return 0 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 3de3c0a714b..e679991ed2e 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -23,6 +23,7 @@ var/unarmed //For empty hand harm-intent attack var/unarmed_type = /datum/unarmed_attack var/slowdown = 0 // Passive movement speed malus (or boost, if negative) + var/silent_steps = 0 // Stops step noises var/breath_type = "oxygen" // Non-oxygen gas breathed, if any. var/poison_type = "plasma" // Poisonous air. @@ -591,4 +592,4 @@ else H.bodytemp.icon_state = "temp0" - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1826658faba..a248d5ae581 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -481,10 +481,18 @@ if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much. s_active.close(src) + handle_footstep(loc) + step_count++ + if(update_slimes) for(var/mob/living/carbon/slime/M in view(1,src)) M.UpdateFeed(src) +/mob/living/proc/handle_footstep(turf/T) + if(istype(T)) + return 1 + return 0 + /*////////////////////// START RESIST PROCS */////////////////////// diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 08a99c0dba2..f21d2a2d954 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -51,4 +51,5 @@ var/list/icon/pipes_shown = list() var/last_played_vent - var/list/datum/action/actions = list() \ No newline at end of file + var/list/datum/action/actions = list() + var/step_count = 0 \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 8bd45097fef..4b38f79c2cc 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -14,6 +14,7 @@ density = 0 req_access = list(access_engine, access_robotics) local_transmit = 1 + ventcrawler = 2 // We need to keep track of a few module items so we don't need to do list operations // every time we need them. These get set in New() after the module is chosen. @@ -211,12 +212,12 @@ //Drones killed by damage will gib. /mob/living/silicon/robot/drone/handle_regular_status_updates() - if(health <= -35 && src.stat != 2) + if(health <= -35 && src.stat != DEAD) timeofdeath = world.time death() //Possibly redundant, having trouble making death() cooperate. gib() return - ..() + return ..() // If you don't return anything here, you won't update status effects, like weakening /mob/living/silicon/robot/drone/death(gibbed) @@ -339,4 +340,4 @@ /mob/living/silicon/robot/drone/update_canmove() . = ..() - density = 0 //this is reset every canmove update otherwise \ No newline at end of file + density = 0 //this is reset every canmove update otherwise diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index c0d89f12417..f1b9b80e9ab 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -5,9 +5,9 @@ datum/preferences gender = gender_override else gender = pick(MALE, FEMALE) - underwear = random_underwear(gender) - undershirt = random_undershirt(gender) - socks = random_socks(gender) + underwear = random_underwear(gender, species) + undershirt = random_undershirt(gender, species) + socks = random_socks(gender, species) if(species == "Human") s_tone = random_skin_tone() h_style = random_hair_style(gender, species) @@ -804,7 +804,7 @@ datum/preferences else if(backbag == 3 || backbag == 4) clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY) - if(!current_species.bodyflags & NO_EYES) + if(!(current_species.bodyflags & NO_EYES)) preview_icon.Blend(eyes_s, ICON_OVERLAY) if(underwear_s) preview_icon.Blend(underwear_s, ICON_OVERLAY) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index f543fe28b4a..50183e4e506 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -28,11 +28,11 @@ L[D.name] = D switch(D.gender) - if(MALE) male += D.name - if(FEMALE) female += D.name + if(MALE) male[D.name] = D + if(FEMALE) female[D.name] = D else - male += D.name - female += D.name + male[D.name] = D + female[D.name] = D return L /datum/sprite_accessory @@ -1019,7 +1019,7 @@ /datum/sprite_accessory/underwear icon = 'icons/mob/underwear.dmi' - species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington") + species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington") nude name = "Nude" @@ -1092,7 +1092,7 @@ /datum/sprite_accessory/undershirt icon = 'icons/mob/underwear.dmi' - species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington") + species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington") /datum/sprite_accessory/undershirt/nude name = "Nude" @@ -1331,6 +1331,7 @@ /////////////////////// /datum/sprite_accessory/socks icon = 'icons/mob/underwear.dmi' + species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/nude name = "Nude" @@ -1343,111 +1344,95 @@ name = "Normal White" icon_state = "white_norm" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/black_norm name = "Normal Black" icon_state = "black_norm" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/white_short name = "Short White" icon_state = "white_short" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/black_short name = "Short Black" icon_state = "black_short" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/white_knee name = "Knee-high White" icon_state = "white_knee" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/black_knee name = "Knee-high Black" icon_state = "black_knee" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/thin_knee name = "Knee-high Thin" icon_state = "thin_knee" gender = FEMALE - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/striped_knee name = "Knee-high Striped" icon_state = "striped_knee" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/rainbow_knee name = "Knee-high Rainbow" icon_state = "rainbow_knee" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/white_thigh name = "Thigh-high White" icon_state = "white_thigh" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/black_thigh name = "Thigh-high Black" icon_state = "black_thigh" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/thin_thigh name = "Thigh-high Thin" icon_state = "thin_thigh" gender = FEMALE - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/striped_thigh name = "Thigh-high Striped" icon_state = "striped_thigh" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/rainbow_thigh name = "Thigh-high Rainbow" icon_state = "rainbow_thigh" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/pantyhose name = "Pantyhose" icon_state = "pantyhose" gender = FEMALE - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/black_fishnet name = "Black Fishnet" icon_state = "black_fishnet" gender = NEUTER - species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington") /datum/sprite_accessory/socks/vox_white name = "Vox White" diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index afde00f4aed..ed4ca6eeeed 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -4,7 +4,7 @@ icon_state = "laser" item_state = "laser" fire_sound = 'sound/weapons/Laser.ogg' - charge_cost = 830 + charge_cost = 760 w_class = 3.0 materials = list(MAT_METAL=2000) origin_tech = "combat=3;magnets=2" diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index 3e97194174e..5cb063ee86f 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -197,7 +197,7 @@ reagents.add_reagent("blackpepper", 20) /obj/item/weapon/reagent_containers/food/condiment/syndisauce - name = "/improper Chef Excellence's Special Sauce" + name = "\improper Chef Excellence's Special Sauce" desc = "A potent sauce extracted from the potent amanita mushrooms. Death never tasted quite so delicious." amount_per_transfer_from_this = 5 volume = 50 diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 101b7a772f9..a033b45682e 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -245,7 +245,8 @@ M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","You swallow up the last part of \the [src].") playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) var/mob/living/simple_animal/pet/corgi/C = M - C.health = min(C.health + 5, C.maxHealth) + C.adjustBruteLoss(-5) + C.adjustFireLoss(-5) qdel(src) else M.visible_message("[M] takes a bite of \the [src].","You take a bite of \the [src].") @@ -257,7 +258,8 @@ if(prob(50)) N.visible_message("[N] nibbles away at [src].", "") //N.emote("nibbles away at the [src]") - N.health = min(N.health + 1, N.maxHealth) + N.adjustBruteLoss(-1) + N.adjustFireLoss(-1) //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 5c392cc5e01..8caa9af8b12 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -463,11 +463,21 @@ category = list ("Misc. Machinery") /datum/design/mining_equipment_vendor - name = "Machine Design (Mining Rewards Vender Board)" - desc = "The circuit board for a Mining Rewards Vender." + name = "Machine Design (Mining Rewards Vendor Board)" + desc = "The circuit board for a Mining Rewards Vendor." id = "mining_equipment_vendor" req_tech = list("programming" = 1, "engineering" = 2) build_type = IMPRINTER materials = list(MAT_GLASS=1000, "sacid"=20) build_path = /obj/item/weapon/circuitboard/mining_equipment_vendor + category = list ("Misc. Machinery") + +/datum/design/clawgame + name = "Machine Design (Claw Game Board)" + desc = "The circuit board for a Claw Game." + id = "clawgame" + req_tech = list("programming" = 2) + build_type = IMPRINTER + materials = list(MAT_GLASS=1000, "sacid"=20) + build_path = /obj/item/weapon/circuitboard/clawgame category = list ("Misc. Machinery") \ No newline at end of file diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index c733e715398..0212dcf4834 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -508,7 +508,15 @@ proc/CallMaterialName(ID) linked_lathe.reagents.clear_reagents() else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material - var/desired_num_sheets = text2num(href_list["lathe_ejectsheet_amt"]) + var/desired_num_sheets + if (href_list["lathe_ejectsheet_amt"] == "custom") + desired_num_sheets = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num + desired_num_sheets = max(0,desired_num_sheets) // If you input too high of a number, the mineral datum will take care of it either way + if (!desired_num_sheets) + return + desired_num_sheets = round(desired_num_sheets) // No partial-sheet goofery + else + desired_num_sheets = text2num(href_list["lathe_ejectsheet_amt"]) var/MAT switch(href_list["lathe_ejectsheet"]) if("metal") @@ -531,6 +539,14 @@ proc/CallMaterialName(ID) else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material var/desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"]) + if (href_list["imprinter_ejectsheet_amt"] == "custom") + desired_num_sheets = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num + desired_num_sheets = max(0,desired_num_sheets) // for the imprinter they have something hacky, that still will guard against shenanigans. eh + if (!desired_num_sheets) + return + desired_num_sheets = round(desired_num_sheets) // No partial-sheet goofery + else + desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"]) var/res_amount, type switch(href_list["imprinter_ejectsheet"]) if("glass") @@ -921,57 +937,73 @@ proc/CallMaterialName(ID) dat += "

Material Storage:



" //Metal var/m_amount = linked_lathe.materials.amount(MAT_METAL) - dat += "* [m_amount] of Metal: " - if(m_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [m_amount] of Metal, [round(m_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(m_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(m_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(m_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Glass var/g_amount = linked_lathe.materials.amount(MAT_GLASS) - dat += "* [g_amount] of Glass: " - if(g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [g_amount] of Glass, [round(g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(g_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Gold var/gold_amount = linked_lathe.materials.amount(MAT_GOLD) - dat += "* [gold_amount] of Gold: " - if(gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [gold_amount] of Gold, [round(gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(gold_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Silver var/silver_amount = linked_lathe.materials.amount(MAT_SILVER) - dat += "* [silver_amount] of Silver: " - if(silver_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [silver_amount] of Silver, [round(silver_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(silver_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(silver_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(silver_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Plasma var/plasma_amount = linked_lathe.materials.amount(MAT_PLASMA) - dat += "* [plasma_amount] of Solid Plasma: " - if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [plasma_amount] of Solid Plasma, [round(plasma_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(plasma_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Uranium var/uranium_amount = linked_lathe.materials.amount(MAT_URANIUM) - dat += "* [uranium_amount] of Uranium: " - if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [uranium_amount] of Uranium, [round(uranium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(uranium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Diamond var/diamond_amount = linked_lathe.materials.amount(MAT_DIAMOND) - dat += "* [diamond_amount] of Diamond: " - if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [diamond_amount] of Diamond, [round(diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Bananium var/bananium_amount = linked_lathe.materials.amount(MAT_BANANIUM) - dat += "* [bananium_amount] of Bananium: " - if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [bananium_amount] of Bananium, [round(bananium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(bananium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "" @@ -1074,20 +1106,26 @@ proc/CallMaterialName(ID) dat += "Circuit Imprinter Menu
" dat += "

Material Storage:



" //Glass - dat += "* [linked_imprinter.g_amount] glass: " - if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [linked_imprinter.g_amount] glass, [round(linked_imprinter.g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Gold - dat += "* [linked_imprinter.gold_amount] gold: " - if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [linked_imprinter.gold_amount] gold, [round(linked_imprinter.gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" //Diamond - dat += "* [linked_imprinter.diamond_amount] diamond: " - if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "Eject " + dat += "* [linked_imprinter.diamond_amount] diamond, [round(linked_imprinter.diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: " + if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) + dat += "Eject " + dat += "C " if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "5x " if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "All" dat += "
" diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index 96b0f22f29f..0866d0b0879 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/obj/arcade.dmi b/icons/obj/arcade.dmi new file mode 100644 index 00000000000..50f8e800273 Binary files /dev/null and b/icons/obj/arcade.dmi differ diff --git a/icons/obj/arcade_images/backgroundsprite.png b/icons/obj/arcade_images/backgroundsprite.png new file mode 100644 index 00000000000..b38cb9a5652 Binary files /dev/null and b/icons/obj/arcade_images/backgroundsprite.png differ diff --git a/icons/obj/arcade_images/clawpieces.png b/icons/obj/arcade_images/clawpieces.png new file mode 100644 index 00000000000..99a428ea617 Binary files /dev/null and b/icons/obj/arcade_images/clawpieces.png differ diff --git a/icons/obj/arcade_images/crane_bot.png b/icons/obj/arcade_images/crane_bot.png new file mode 100644 index 00000000000..cddf802f00f Binary files /dev/null and b/icons/obj/arcade_images/crane_bot.png differ diff --git a/icons/obj/arcade_images/crane_top.png b/icons/obj/arcade_images/crane_top.png new file mode 100644 index 00000000000..b7b7fca08f1 Binary files /dev/null and b/icons/obj/arcade_images/crane_top.png differ diff --git a/icons/obj/arcade_images/prize_inside.png b/icons/obj/arcade_images/prize_inside.png new file mode 100644 index 00000000000..dc5cda231d8 Binary files /dev/null and b/icons/obj/arcade_images/prize_inside.png differ diff --git a/icons/obj/arcade_images/prizeorbs.png b/icons/obj/arcade_images/prizeorbs.png new file mode 100644 index 00000000000..230b1f7c025 Binary files /dev/null and b/icons/obj/arcade_images/prizeorbs.png differ diff --git a/icons/obj/harvest.dmi b/icons/obj/harvest.dmi index fb06ace12ef..0b7045cc64c 100644 Binary files a/icons/obj/harvest.dmi and b/icons/obj/harvest.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 8c930f53059..111bc8d2061 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/nano/templates/robot_control.tmpl b/nano/templates/robot_control.tmpl index 2e5e892e0e8..3ee100e0de6 100644 --- a/nano/templates/robot_control.tmpl +++ b/nano/templates/robot_control.tmpl @@ -27,6 +27,18 @@ {{:value.status}} + + System Integrity: + + + {{:value.health}} % + + + Location: + + + ({{:value.xpos}}, {{:value.ypos}}, {{:value.zpos}}): {{:value.area}} + Master AI: diff --git a/paradise.dme b/paradise.dme index fda32c4de2d..20a6adf8531 100644 --- a/paradise.dme +++ b/paradise.dme @@ -961,6 +961,9 @@ #include "code\modules\alarm\fire_alarm.dm" #include "code\modules\alarm\motion_alarm.dm" #include "code\modules\alarm\power_alarm.dm" +#include "code\modules\arcade\arcade_base.dm" +#include "code\modules\arcade\arcade_prize.dm" +#include "code\modules\arcade\claw_game.dm" #include "code\modules\assembly\assembly.dm" #include "code\modules\assembly\bomb.dm" #include "code\modules\assembly\health.dm" diff --git a/sound/effects/footstep/carpet_human.ogg b/sound/effects/footstep/carpet_human.ogg new file mode 100644 index 00000000000..8e7d16e6810 Binary files /dev/null and b/sound/effects/footstep/carpet_human.ogg differ diff --git a/sound/effects/footstep/carpet_xeno.ogg b/sound/effects/footstep/carpet_xeno.ogg new file mode 100644 index 00000000000..86569b3f28b Binary files /dev/null and b/sound/effects/footstep/carpet_xeno.ogg differ diff --git a/sound/effects/footstep/plating_human.ogg b/sound/effects/footstep/plating_human.ogg new file mode 100644 index 00000000000..72c04e7fe41 Binary files /dev/null and b/sound/effects/footstep/plating_human.ogg differ diff --git a/sound/effects/footstep/plating_xeno.ogg b/sound/effects/footstep/plating_xeno.ogg new file mode 100644 index 00000000000..f38a1eb5c3f Binary files /dev/null and b/sound/effects/footstep/plating_xeno.ogg differ diff --git a/sound/effects/footstep/wood_all.ogg b/sound/effects/footstep/wood_all.ogg new file mode 100644 index 00000000000..72628a8eaea Binary files /dev/null and b/sound/effects/footstep/wood_all.ogg differ