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 fe27e399c84..cc6d6f9c621 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/datums/datumvars.dm b/code/datums/datumvars.dm index 65e6491bb0d..89f4a277796 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -592,7 +592,7 @@ client if(!istype(H)) usr << "This can only be used on instances of type /mob/living/carbon/human" return - + var/confirm = alert("Are you sure you want to turn this mob into a skeleton?","Confirm Skeleton Transformation","Yes","No") if(confirm != "Yes") return @@ -601,7 +601,7 @@ client message_admins("[key_name(usr)] has turned [key_name(H)] into a skeleton") log_admin("[key_name_admin(usr)] has turned [key_name_admin(H)] into a skeleton") href_list["datumrefresh"] = href_list["make_skeleton"] - + else if(href_list["offer_control"]) if(!check_rights(R_ADMIN)) return @@ -751,7 +751,7 @@ client switch(href_list["rotatedir"]) if("right") A.dir = turn(A.dir, -45) if("left") A.dir = turn(A.dir, 45) - + message_admins("[key_name_admin(usr)] has rotated \the [A]") log_admin("[key_name(usr)] has rotated \the [A]") href_list["datumrefresh"] = href_list["rotatedatum"] @@ -1031,7 +1031,7 @@ client usr << "This can only be done on mobs with clients" return - nanomanager.send_resources(H.client) + H.client.reload_nanoui_resources() usr << "Resource files sent" H << "Your NanoUI Resource files have been refreshed" diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 48dfe916303..87e3ac87e67 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -88,8 +88,8 @@ var/global/max_secret_rooms = 6 theme = "cavein" walltypes = list(/turf/simulated/mineral/random/high_chance=1) floortypes = list(/turf/simulated/floor/plating/airless/asteroid, /turf/simulated/floor/beach/sand) - treasureitems = list(/obj/mecha/working/ripley/mining=1, /obj/item/weapon/pickaxe/drill/diamonddrill=2,/obj/item/weapon/gun/energy/kinetic_accelerator=1, - /obj/item/weapon/resonator=1, /obj/item/weapon/pickaxe/drill/jackhammer=5) + treasureitems = list(/obj/mecha/working/ripley/mining=1, /obj/item/weapon/pickaxe/drill/diamonddrill=2,/obj/item/weapon/gun/energy/kinetic_accelerator/hyper=1, + /obj/item/weapon/resonator/upgraded=1, /obj/item/weapon/pickaxe/drill/jackhammer=5) fluffitems = list(/obj/effect/decal/cleanable/blood=3,/obj/effect/decal/remains/human=1,/obj/item/clothing/under/overalls=1, /obj/item/weapon/reagent_containers/food/snacks/grown/chili=1,/obj/item/weapon/tank/oxygen/red=2) @@ -165,6 +165,10 @@ var/global/max_secret_rooms = 6 valid = 0 continue + if(locate(/area/mine/abandoned) in surroundings) + valid = 0 + continue + if(locate(/turf/space) in surroundings) valid = 0 continue diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 891be23fdf2..08aff0a1fad 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -451,7 +451,7 @@ if (src.occupant.client) src.occupant.client.eye = src.occupant.client.mob src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc + src.occupant.forceMove(get_turf(src)) src.eject_wait = 0 //If it's still set somehow. domutcheck(src.occupant) //Waiting until they're out before possible notransform. src.occupant = null 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..a7703f651ab 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -584,7 +584,7 @@ obj/item/weapon/circuitboard/rdserver origin_tech = "programming=3;engineering=5;bluespace=5;materials=4" frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin." req_components = list( - /obj/item/bluespace_crystal = 3, + /obj/item/weapon/ore/bluespace_crystal = 3, /obj/item/weapon/stock_parts/matter_bin = 1) /obj/item/weapon/circuitboard/teleporter_station @@ -594,7 +594,7 @@ obj/item/weapon/circuitboard/rdserver origin_tech = "programming=4;engineering=4;bluespace=4" frame_desc = "Requires 2 Bluespace Crystals, 2 Capacitors and 1 Console Screen." req_components = list( - /obj/item/bluespace_crystal = 2, + /obj/item/weapon/ore/bluespace_crystal = 2, /obj/item/weapon/stock_parts/capacitor = 2, /obj/item/weapon/stock_parts/console_screen = 1) @@ -605,7 +605,7 @@ obj/item/weapon/circuitboard/rdserver origin_tech = "programming=4;engineering=3;materials=3;bluespace=4" frame_desc = "Requires 2 Bluespace Crystals, 1 Capacitor, 1 piece of cable and 1 Console Screen." req_components = list( - /obj/item/bluespace_crystal = 2, + /obj/item/weapon/ore/bluespace_crystal = 2, /obj/item/weapon/stock_parts/capacitor = 1, /obj/item/stack/cable_coil = 1, /obj/item/weapon/stock_parts/console_screen = 1) @@ -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 7e132f64614..0c2894ff960 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -9,41 +9,48 @@ var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0) density = 1 var/plays = 0 var/working = 0 - var/balance=0 + var/datum/money_account/account = null + var/result = null + var/resultlvl = null -/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") +/obj/machinery/slot_machine/attack_hand(mob/user as mob) + account = user.get_worn_id_account() + if(!account) + if(istype(user.get_active_hand(), /obj/item/weapon/card/id)) + account = get_card_account(user.get_active_hand()) + else + account = null + + ui_interact(user) + +/obj/machinery/slot_machine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + var/data[0] + + data["working"] = working + data["money"] = account ? account.money : null + data["plays"] = plays + data["result"] = result + data["resultlvl"] = resultlvl + + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200) + ui.set_initial_data(data) + ui.open() + ui.set_auto_update(1) /obj/machinery/slot_machine/Topic(href, href_list) + add_fingerprint(usr) + 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!" + if (!account || account.money < 5) + return + if(!account.charge(5, transaction_purpose = "Bet", dest_name = name)) return - usr.mind.initial_account.money -= 5 plays += 1 working = 1 icon_state = "slots-on" @@ -51,26 +58,43 @@ var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0) 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 + result = "JACKPOT! You win two hundred and fifty thousand credits!" + resultlvl = "highlight" + win_money(250000, 'sound/effects/engine_alert2.ogg') 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 + result = "Big Winner! You win five thousand credits!" + resultlvl = "good" + win_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 + visible_message("[src] says, 'Winner! [usr.name] has won five hundred credits!'") + result = "You win five hundred credits!" + resultlvl = "good" + win_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 + result = "You win 5 credits!" + resultlvl = "good" + win_money(5) else - usr << "No luck!" + result = "No luck!" + resultlvl = "average" working = 0 icon_state = "slots-off" - add_fingerprint(usr) - updateUsrDialog() - return + +/obj/machinery/slot_machine/proc/win_money(amt, sound='sound/machines/ping.ogg') + if(sound) + playsound(loc, sound, 50) + + if(!account) + return + account.money += amt + + var/datum/transaction/T = new() + T.target_name = account.owner_name + T.purpose = "Slot Winnings" + T.amount = "[amt]" + T.date = current_date_string + T.time = worldtime2text() + account.transaction_log.Add(T) \ No newline at end of file diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 2df044d7e8a..6a4dbe224d7 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -276,9 +276,9 @@ link_power_station() component_parts = list() component_parts += new /obj/item/weapon/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) RefreshParts() @@ -286,9 +286,9 @@ ..() component_parts = list() component_parts += new /obj/item/weapon/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) RefreshParts() @@ -385,8 +385,8 @@ ..() component_parts = list() component_parts += new /obj/item/weapon/circuitboard/teleporter_station(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/capacitor(null) component_parts += new /obj/item/weapon/stock_parts/capacitor(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 8d414c2168a..49dd158adf3 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1096,7 +1096,7 @@ icon_state = "engivend" icon_deny = "engivend-deny" req_access_txt = "11" //Engineering Equipment access - products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/apc_electronics = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/stock_parts/cell/high = 10) + products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/firealarm_electronics = 10,/obj/item/weapon/apc_electronics = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/stock_parts/cell/high = 10) contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3) premium = list(/obj/item/weapon/storage/belt/utility = 3) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 12a64dc01bb..41b6b99fb87 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -1090,7 +1090,9 @@ return var/list/occupant = list() occupant |= mecha.occupant + mecha.occupant.sight |= SEE_TURFS scanning = 1 mineral_scan_pulse(occupant,get_turf(loc)) spawn(equip_cooldown) scanning = 0 + mecha.occupant.sight -= SEE_TURFS 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/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 5e684b9ddef..844ccd978eb 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -1204,7 +1204,7 @@ "backkey"=/obj/item/weapon/crowbar, "desc"="The bluespace crystal is installed."), //10 - list("key"=/obj/item/bluespace_crystal, + list("key"=/obj/item/weapon/ore/bluespace_crystal, "backkey"=/obj/item/weapon/screwdriver, "desc"="Super capacitor is secured."), //11 @@ -1394,7 +1394,7 @@ holder.icon_state = "phazon16" else user.visible_message("[user] removes the bluespace crystal from the [holder].", "You remove the bluespace crystal from the [holder].") - new /obj/item/bluespace_crystal(get_turf(holder)) + new /obj/item/weapon/ore/bluespace_crystal(get_turf(holder)) holder.icon_state = "phazon14" if(8) if(diff==FORWARD) diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 3eba9cc2132..0666f6472af 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -20,6 +20,10 @@ return */ +/obj/mecha/working/ripley/Move() + . = ..() + update_pressure() + /obj/mecha/working/ripley/Destroy() while(src.damage_absorption.["brute"] < 0.6) new /obj/item/asteroid/goliath_hide(src.loc) @@ -165,4 +169,18 @@ if(T) T.Entered(A) step_rand(A) - return ..() \ No newline at end of file + return ..() + +/obj/mecha/working/ripley/proc/update_pressure() + var/turf/T = get_turf(loc) + var/datum/gas_mixture/environment = T.return_air() + var/pressure = environment.return_pressure() + + if(pressure < 20) + step_in = 3 + for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment) + drill.equip_cooldown = initial(drill.equip_cooldown)/2 + else + step_in = 5 + for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment) + drill.equip_cooldown = initial(drill.equip_cooldown) \ 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/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index ee203dad9b4..2118e493687 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -122,9 +122,8 @@ user << "It is too far away." /obj/item/weapon/card/id/proc/show(mob/user as mob) - if(user.client) // Send the stamp images to the client - var/datum/asset/simple/S = new/datum/asset/simple/paper() - send_asset_list(user.client, S.assets) + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper) + assets.send(user) if(!front) front = new(photo, dir = SOUTH) diff --git a/code/game/objects/structures/crates_lockers/walllocker.dm b/code/game/objects/structures/crates_lockers/walllocker.dm index 2937e7b58ac..03a81a7ca5b 100644 --- a/code/game/objects/structures/crates_lockers/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/walllocker.dm @@ -11,6 +11,10 @@ icon_closed = "wall-locker" icon_opened = "wall-lockeropen" +/obj/structure/closet/walllocker/close() + ..() + density = 0 //It's a locker in a wall, you aren't going to be walking into it. + //spawns endless (3 sets) amounts of breathmask, emergency oxy tank and crowbar /obj/structure/closet/walllocker/emerglocker @@ -19,12 +23,14 @@ var/list/spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar) var/amount = 3 // spawns each items X times. icon_state = "emerg" + icon_closed = "emerg" + icon_opened = "emergopen" /obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob) if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) if(!amount) - usr << "It's empty.." + usr << "It's empty." return if(amount) usr << "You take out some items from \the [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/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index ae97f0e6ad2..d595c46abd3 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -1177,3 +1177,18 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!") else alert("Invalid mob") + +/client/proc/reload_nanoui_resources() + set category = "Debug" + set name = "Reload NanoUI Resources" + set desc = "Force the client to redownload NanoUI Resources" + + // Close open NanoUIs. + nanomanager.close_user_uis(usr) + + // Re-load the assets. + var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) + assets.register() + + // Clear the user's cache so they get resent. + usr.client.cache = list() \ No newline at end of file diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index e46d72c338e..0af366ef215 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -138,7 +138,8 @@ var/list/admin_verbs_show_debug_verbs = list( /client/proc/print_jobban_old, /client/proc/print_jobban_old_filter, /client/proc/forceEvent, - /client/proc/nanomapgen_DumpImage + /client/proc/nanomapgen_DumpImage, + /client/proc/reload_nanoui_resources ) /client/proc/enable_debug_verbs() 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..9d423383b08 --- /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') + +/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]) + var/my_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]") + user << browse(my_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/client/asset_cache.dm b/code/modules/client/asset_cache.dm new file mode 100644 index 00000000000..d52f9947193 --- /dev/null +++ b/code/modules/client/asset_cache.dm @@ -0,0 +1,241 @@ +/* +Asset cache quick users guide: + +Make a datum at the bottom of this file with your assets for your thing. +The simple subsystem will most like be of use for most cases. +Then call get_asset_datum() with the type of the datum you created and store the return +Then call .send(client) on that stored return value. + +You can set verify to TRUE if you want send() to sleep until the client has the assets. +*/ + + +// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping. +// This is doubled for the first asset, then added per asset after +#define ASSET_CACHE_SEND_TIMEOUT 7 + +//When sending mutiple assets, how many before we give the client a quaint little sending resources message +#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8 + +//List of ALL assets for the above, format is list(filename = asset). +/var/global/list/asset_cache = list() + +/client + var/list/cache = list() // List of all assets sent to this client by the asset cache. + var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement. + var/list/sending = list() + var/last_asset_job = 0 // Last job done. + +//This proc sends the asset to the client, but only if it needs it. +//This proc blocks(sleeps) unless verify is set to false +/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE) + if(!istype(client)) + if(ismob(client)) + var/mob/M = client + if(M.client) + client = M.client + + else + return 0 + + else + return 0 + + if(client.cache.Find(asset_name) || client.sending.Find(asset_name)) + return 0 + + client << browse_rsc(asset_cache[asset_name], asset_name) + if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. + if (client) + client.cache += asset_name + return 1 + if (!client) + return 0 + + client.sending |= asset_name + var/job = ++client.last_asset_job + + client << browse({" + + "}, "window=asset_cache_browser") + + var/t = 0 + var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT + while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() + sleep(1) // Lock up the caller until this is received. + t++ + + if(client) + client.sending -= asset_name + client.cache |= asset_name + client.completed_asset_jobs -= job + + return 1 + +//This proc blocks(sleeps) unless verify is set to false +/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE) + if(!istype(client)) + if(ismob(client)) + var/mob/M = client + if(M.client) + client = M.client + + else + return 0 + + else + return 0 + + var/list/unreceived = asset_list - (client.cache + client.sending) + if(!unreceived || !unreceived.len) + return 0 + if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT) + client << "Sending Resources..." + for(var/asset in unreceived) + if (asset in asset_cache) + client << browse_rsc(asset_cache[asset], asset) + + if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. + if (client) + client.cache += unreceived + return 1 + if (!client) + return 0 + client.sending |= unreceived + var/job = ++client.last_asset_job + + client << browse({" + + "}, "window=asset_cache_browser") + + var/t = 0 + var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len + while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() + sleep(1) // Lock up the caller until this is received. + t++ + + if(client) + client.sending -= unreceived + client.cache |= unreceived + client.completed_asset_jobs -= job + + return 1 + +//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start. +//The proc calls procs that sleep for long times. +proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE) + for(var/file in files) + if (!client) + break + if (register_asset) + register_asset(file,files[file]) + send_asset(client,file) + sleep(-1) //queuing calls like this too quickly can cause issues in some client versions + +//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up. +//if it's an icon or something be careful, you'll have to copy it before further use. +/proc/register_asset(var/asset_name, var/asset) + asset_cache[asset_name] = asset + +//From here on out it's populating the asset cache. +/proc/populate_asset_cache() + for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple)) + var/datum/asset/A = new type() + A.register() + + for(var/client/C in clients) + //doing this to a client too soon after they've connected can cause issues, also the proc we call sleeps + spawn(10) + getFilesSlow(C, asset_cache, FALSE) + +//These datums are used to populate the asset cache, the proc "register()" does this. + +//all of our asset datums, used for referring to these later +/var/global/list/asset_datums = list() + +//get a assetdatum or make a new one +/proc/get_asset_datum(var/type) + if (!(type in asset_datums)) + return new type() + return asset_datums[type] + +/datum/asset/New() + asset_datums[type] = src + +/datum/asset/proc/register() + return + +/datum/asset/proc/send(client) + return + +//If you don't need anything complicated. +/datum/asset/simple + var/assets = list() + var/verify = FALSE + +/datum/asset/simple/register() + for(var/asset_name in assets) + register_asset(asset_name, assets[asset_name]) +/datum/asset/simple/send(client) + send_asset_list(client,assets,verify) + + +//DEFINITIONS FOR ASSET DATUMS START HERE. +/datum/asset/simple/paper + assets = list( + "large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png', + "large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png', + "large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png', + "large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png', + "large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png', + "large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png', + "large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png', + "large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png', + "large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png', + "large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png', + "large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png', + "large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png', + "large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png', + "talisman.png" = 'icons/paper_icons/talisman.png', + "ntlogo.png" = 'icons/paper_icons/ntlogo.png' + ) + +/datum/asset/nanoui + var/list/common = list() + + var/list/common_dirs = list( + "nano/css/", + "nano/js/", + "nano/images/", + "nano/layouts/" + ) + var/list/uncommon_dirs = list( + "nano/templates/" + ) + +/datum/asset/nanoui/register() + // Crawl the directories to find files. + for (var/path in common_dirs) + var/list/filenames = flist(path) + for(var/filename in filenames) + if(copytext(filename, length(filename)) != "/") // Ignore directories. + if(fexists(path + filename)) + common[filename] = fcopy_rsc(path + filename) + register_asset(filename, common[filename]) + for (var/path in uncommon_dirs) + var/list/filenames = flist(path) + for(var/filename in filenames) + if(copytext(filename, length(filename)) != "/") // Ignore directories. + if(fexists(path + filename)) + register_asset(filename, fcopy_rsc(path + filename)) + +/datum/asset/nanoui/send(client, uncommon) + if(!islist(uncommon)) + uncommon = list(uncommon) + + send_asset_list(client, uncommon) + send_asset_list(client, common) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 784bab5e588..5cd501a0b8f 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -35,6 +35,11 @@ #endif + if(href_list["asset_cache_confirm_arrival"]) + //src << "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED." + var/job = text2num(href_list["asset_cache_confirm_arrival"]) + completed_asset_jobs += job + return //Reduces spamming of links by dropping calls that happen during the delay period if(next_allowed_topic_time > world.time) @@ -232,8 +237,6 @@ /////////// /client/New(TopicData) TopicData = null //Prevent calls to client.Topic from connect - client_cache += src - client_cache[src] = list() if(connection != "seeker") //Invalid connection type. return null @@ -310,6 +313,9 @@ screen += void + if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them. + src << "Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you." + ////////////// //DISCONNECT// ////////////// @@ -415,8 +421,7 @@ 'html/panels.css' // Used for styling certain panels, such as in the new player panel ) - // Send NanoUI resources to this client - spawn nanomanager.send_resources(src) + getFilesSlow(src, asset_cache, register_asset = FALSE) //For debugging purposes /client/proc/list_all_languages() diff --git a/code/modules/client/global_cache.dm b/code/modules/client/global_cache.dm deleted file mode 100644 index f60d26fe84b..00000000000 --- a/code/modules/client/global_cache.dm +++ /dev/null @@ -1,84 +0,0 @@ -//We store a list of all clients, with a list of all file names that the client received. -/var/global/list/client_cache = list() - -//List of ALL assets for the above, format is list(filename = asset). -/var/global/list/asset_cache = list() - -//This proc sends the asset to the client, but only if it needs it. -/proc/send_asset(var/client/client, var/asset_name) - var/list/client_list = client_cache[client] - ASSERT(client_list) - - if(asset_name in client_list) - return - - //world << "sending a client the asset '[asset_name]'" - client << browse_rsc(asset_cache[asset_name], asset_name) - client_list += asset_name - -/proc/send_asset_list(var/client/client, var/list/asset_list) - for(var/asset_name in asset_list) - send_asset(client, asset_name) - -//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up. -//if it's an icon or something be careful, you'll have to copy it before further use. -/proc/register_asset(var/asset_name, var/asset) - asset_cache |= asset_name - asset_cache[asset_name] = asset - -//From here on out it's populating the asset cache. -/proc/populate_asset_cache() - for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple)) - var/datum/asset/A = new type() - - A.register() - -//These datums are used to populate the asset cache, the proc "register()" does this. -/datum/asset/proc/register() - return - -//If you don't need anything complicated. -/datum/asset/simple - var/assets = list() - -/datum/asset/simple/register() - for(var/asset_name in assets) - register_asset(asset_name, assets[asset_name]) - -//DEFINITIONS FOR ASSET DATUMS START HERE. -/datum/asset/simple/spider_os - assets = list( - "sos_1.png" = 'icons/spideros_icons/sos_1.png', - "sos_2.png" = 'icons/spideros_icons/sos_2.png', - "sos_3.png" = 'icons/spideros_icons/sos_3.png', - "sos_4.png" = 'icons/spideros_icons/sos_4.png', - "sos_5.png" = 'icons/spideros_icons/sos_5.png', - "sos_6.png" = 'icons/spideros_icons/sos_6.png', - "sos_7.png" = 'icons/spideros_icons/sos_7.png', - "sos_8.png" = 'icons/spideros_icons/sos_8.png', - "sos_9.png" = 'icons/spideros_icons/sos_9.png', - "sos_10.png" = 'icons/spideros_icons/sos_10.png', - "sos_11.png" = 'icons/spideros_icons/sos_11.png', - "sos_12.png" = 'icons/spideros_icons/sos_12.png', - "sos_13.png" = 'icons/spideros_icons/sos_13.png', - "sos_14.png" = 'icons/spideros_icons/sos_14.png' - ) - -/datum/asset/simple/paper - assets = list( - "large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png', - "large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png', - "large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png', - "large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png', - "large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png', - "large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png', - "large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png', - "large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png', - "large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png', - "large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png', - "large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png', - "large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png', - "large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png', - "talisman.png" = 'icons/paper_icons/talisman.png', - "ntlogo.png" = 'icons/paper_icons/ntlogo.png' - ) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d301db27226..e7987280d48 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -433,11 +433,11 @@ datum/preferences dat += "" // user << browse(dat, "window=preferences;size=560x580") - var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 640, 750) + var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 640, 810) popup.set_content(dat) popup.open(0) - proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 755, height = 780) + proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 760, height = 790) if(!job_master) return @@ -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/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index eaf73f5cd61..632914cd92f 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -69,6 +69,19 @@ /obj/item/clothing/glasses/meson/prescription prescription = 1 +/obj/item/clothing/glasses/meson/gar + name = "gar mesons" + icon_state = "garm" + item_state = "garm" + desc = "Do the impossible, see the invisible!" + force = 10 + throwforce = 10 + throw_speed = 4 + attack_verb = list("sliced") + hitsound = 'sound/weapons/bladeslice.ogg' + sharp = 1 + edge = 1 + /obj/item/clothing/glasses/meson/cyber name = "Eye Replacement Implant" desc = "An implanted replacement for a left eye with meson vision capabilities." diff --git a/code/modules/economy/utils.dm b/code/modules/economy/utils.dm index a6997bab4f4..44b5ebdd036 100644 --- a/code/modules/economy/utils.dm +++ b/code/modules/economy/utils.dm @@ -31,6 +31,8 @@ if(ishuman(src)) var/mob/living/carbon/human/H=src var/obj/item/weapon/card/id/I=H.get_idcard() + if(!I || !istype(I)) + return null var/attempt_pin=0 var/datum/money_account/D = get_money_account(I.associated_account_number) if(require_pin && user) 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/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index d410bf2fd97..9383a78588c 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -19,7 +19,7 @@ var/ore_pickup_rate = 15 var/sheet_per_ore = 1 var/point_upgrade = 1 - var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40)) + var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60)) var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma")) /obj/machinery/mineral/ore_redemption/New() @@ -79,28 +79,33 @@ qdel(O) //... garbage collect /obj/machinery/mineral/ore_redemption/process() - if(!panel_open) //If the machine is partially dissassembled, it should not process minerals - var/turf/T = get_turf(get_step(src, input_dir)) - var/i + if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals + var/turf/T = get_step(src, input_dir) + var/i = 0 if(T) - if(locate(/obj/item/weapon/ore) in T) - for (i = 0; i < ore_pickup_rate; i++) - var/obj/item/weapon/ore/O = locate() in T - if(O) - process_sheet(O) - else + for(var/obj/item/weapon/ore/O in T) + if (i >= ore_pickup_rate) + break + else if (!O || !O.refined_type) + continue + else + process_sheet(O) + i++ + else + var/obj/structure/ore_box/B = locate() in T + if(B) + for(var/obj/item/weapon/ore/O in B.contents) + if (i >= ore_pickup_rate) break - else - var/obj/structure/ore_box/B = locate() in T - if(B) - for (i = 0; i < ore_pickup_rate; i++) - var/obj/item/weapon/ore/O = locate() in B.contents - if(O) - process_sheet(O) - else - break + else if (!O || !O.refined_type) + continue + else + process_sheet(O) + i++ /obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params) + if (!powered()) + return if(istype(W,/obj/item/weapon/card/id)) var/obj/item/weapon/card/id/I = usr.get_active_hand() if(istype(I) && !istype(inserted_id)) @@ -249,7 +254,7 @@ if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return var/obj/item/stack/sheet/glassstack = stack_list[/obj/item/stack/sheet/glass] var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma] - + var/desired = input("How much?", "How much would you like to smelt?", 1) as num var/obj/item/stack/sheet/plasmaglass/plasglassout = new plasglassout.amount = min(desired, 50, glassstack.amount, plasmastack.amount) @@ -287,6 +292,17 @@ s.forceMove(loc) s.layer = initial(s.layer) +/obj/machinery/mineral/ore_redemption/power_change() + ..() + update_icon() + +/obj/machinery/mineral/ore_redemption/update_icon() + if(powered()) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]-off" + return + /**********************Mining Equipment Locker**************************/ /obj/machinery/mineral/equipment_vendor @@ -304,17 +320,23 @@ new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 100), new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 150), new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 200), - new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 250), new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 300), new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300), new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 400), - new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 500), + new /datum/data/mining_equipment("Hivelord Stabilizer", /obj/item/weapon/hivelordstabilizer, 400), + new /datum/data/mining_equipment("Mining Drone", /obj/item/weapon/mining_drone_cube, 500), + new /datum/data/mining_equipment("GAR mesons", /obj/item/clothing/glasses/meson/gar, 500), + new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600), + new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600), new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750), new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800), new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000), - new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 1200), - new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 1500), + new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000), + new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000), new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000), + new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000), + new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 2500), + new /datum/data/mining_equipment("Super Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator/super, 3000), new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500), ) @@ -339,6 +361,17 @@ component_parts += new /obj/item/weapon/stock_parts/console_screen(null) RefreshParts() +/obj/machinery/mineral/equipment_vendor/power_change() + ..() + update_icon() + +/obj/machinery/mineral/equipment_vendor/update_icon() + if(powered()) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]-off" + return + /obj/machinery/mineral/equipment_vendor/attack_hand(user as mob) if(..()) return @@ -424,8 +457,7 @@ if("Resonator") new /obj/item/weapon/resonator(src.loc) if("Mining Drone") - new /mob/living/simple_animal/hostile/mining_drone(src.loc) - new /obj/item/weapon/weldingtool/hugetank(src.loc) + new /obj/item/weapon/storage/box/drone_kit(src.loc) if("Advanced Scanner") new /obj/item/device/t_scanner/adv_mining_scanner(src.loc) qdel(voucher) @@ -548,6 +580,13 @@ var/burst_time = 50 var/fieldlimit = 3 +/obj/item/weapon/resonator/upgraded + name = "upgraded resonator" + desc = "An upgraded version of the resonator that can produce more fields at once." + icon_state = "resonator_u" + origin_tech = "magnets=3;combat=3" + fieldlimit = 5 + /obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator) var/turf/T = get_turf(target) if(locate(/obj/effect/resonance) in T) @@ -623,6 +662,22 @@ return +/**********************Mining drone cube**********************/ + +/obj/item/weapon/mining_drone_cube + name = "mining drone cube" + desc = "Compressed mining drone, ready for deployment. Just press the button to activate!" + w_class = 2.0 + icon = 'icons/obj/aibots.dmi' + icon_state = "minedronecube" + item_state = "electronic" + +/obj/item/weapon/mining_drone_cube/attack_self(mob/user) + user.visible_message("\The [src] suddenly expands into a fully functional mining drone!", \ + "You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!") + new /mob/living/simple_animal/hostile/mining_drone(get_turf(src)) + qdel(src) + /**********************Mining drone**********************/ /mob/living/simple_animal/hostile/mining_drone @@ -757,6 +812,22 @@ SetOffenseBehavior() ..() + +/**********************Mining drone kit**********************/ + +/obj/item/weapon/storage/box/drone_kit + name = "Drone Kit" + desc = "A boxed kit that includes one mining drone cube and a welding tool with an increased capacity." + icon_state = "implant" + max_w_class = 3 + storage_slots = 2 + can_hold = list("/obj/item/weapon/mining_drone_cube","/obj/item/weapon/weldingtool/hugetank") + +/obj/item/weapon/storage/box/drone_kit/New() + ..() + new /obj/item/weapon/mining_drone_cube(src) + new /obj/item/weapon/weldingtool/hugetank(src) + /**********************Lazarus Injector**********************/ /obj/item/weapon/lazarus_injector @@ -904,3 +975,22 @@ volume = 40 throw_range = 7 w_class = 3 //same as syndie harness + +/*********************Hivelord stabilizer****************/ + +/obj/item/weapon/hivelordstabilizer + name = "hivelord stabilizer" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle19" + desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely." + w_class = 1 + origin_tech = "biotech=1" + +/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/M, mob/user) + var/obj/item/asteroid/hivelord_core/C = M + if(!istype(C, /obj/item/asteroid/hivelord_core)) + user << "The stabilizer only works on hivelord cores." + return ..() + C.preserved = 1 + user << "You inject the hivelord core with the stabilizer. It will no longer go inert." + qdel(src) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index ec56a3eca8d..9c52dc7751f 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -79,6 +79,14 @@ /obj/item/weapon/pickaxe/proc/playDigSound() playsound(src, pick(digsound),20,1) +/obj/item/weapon/pickaxe/silver + name = "silver-plated pickaxe" + icon_state = "spickaxe" + item_state = "spickaxe" + digspeed = 30 //mines faster than a normal pickaxe, bought from mining vendor + origin_tech = "materials=3;engineering=2" + desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." + /obj/item/weapon/pickaxe/diamond name = "diamond-tipped pickaxe" icon_state = "dpickaxe" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index a2a7cbc706a..6e4defb9477 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -89,6 +89,7 @@ var/global/list/rockTurfEdgeCache /turf/simulated/mineral/proc/HideRock() if(hidden) + name = "rock" icon_state = "rock" return @@ -135,6 +136,7 @@ var/global/list/rockTurfEdgeCache if("BScrystal") M = new/turf/simulated/mineral/bscrystal(src) if(M) + M.mineralAmt = rand(1, 5) src = M M.levelupdate() return @@ -240,7 +242,7 @@ var/global/list/rockTurfEdgeCache /turf/simulated/mineral/bscrystal name = "bluespace crystal deposit" icon_state = "rock_BScrystal" - mineralType = /obj/item/bluespace_crystal + mineralType = /obj/item/weapon/ore/bluespace_crystal mineralName = "Bluespace crystal" mineralAmt = 1 spreadChance = 0 diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 8f520427b0c..f1def2e0270 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -9,7 +9,7 @@ /obj/item/weapon/ore/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = I - if(W.remove_fuel(15)) + if(W.remove_fuel(15) && refined_type) new refined_type(get_turf(src.loc)) qdel(src) else if(W.isOn()) @@ -20,7 +20,7 @@ name = "uranium ore" icon_state = "Uranium ore" origin_tech = "materials=5" - points = 18 + points = 30 refined_type = /obj/item/stack/sheet/mineral/uranium materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT) @@ -63,7 +63,7 @@ name = "plasma ore" icon_state = "Plasma ore" origin_tech = "plasmatech=2;materials=2" - points = 36 + points = 15 refined_type = /obj/item/stack/sheet/mineral/plasma materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT) @@ -79,7 +79,7 @@ name = "silver ore" icon_state = "Silver ore" origin_tech = "materials=3" - points = 18 + points = 16 refined_type = /obj/item/stack/sheet/mineral/silver materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT) @@ -95,7 +95,7 @@ name = "diamond ore" icon_state = "Diamond ore" origin_tech = "materials=6" - points = 36 + points = 50 refined_type = /obj/item/stack/sheet/mineral/diamond materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT) @@ -103,7 +103,7 @@ name = "bananium ore" icon_state = "Clown ore" origin_tech = "materials=4" - points = 27 + points = 60 refined_type = /obj/item/stack/sheet/mineral/bananium materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index ec69fb3d910..0cd4e62e4d7 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -31,6 +31,7 @@ var/amt_plasma = 0 var/amt_uranium = 0 var/amt_clown = 0 + var/amt_bluespace = 0 for (var/obj/item/weapon/ore/C in contents) if (istype(C,/obj/item/weapon/ore/diamond)) @@ -49,6 +50,8 @@ amt_uranium++; if (istype(C,/obj/item/weapon/ore/bananium)) amt_clown++; + if (istype(C,/obj/item/weapon/ore/bluespace_crystal)) + amt_bluespace++ var/dat = text("The contents of the ore box reveal...
") if (amt_gold) @@ -67,6 +70,8 @@ dat += text("Uranium ore: [amt_uranium]
") if (amt_clown) dat += text("Bananium ore: [amt_clown]
") + if (amt_bluespace) + dat += text("Bluespace crystals: [amt_bluespace]
") dat += text("

Empty box") user << browse("[dat]", "window=orebox") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a248d5ae581..18ef210b90f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -892,6 +892,10 @@ var/obj/mecha/M = loc loc_temp = M.return_temperature() + else if(istype(loc, /obj/spacepod)) + var/obj/spacepod/S = loc + loc_temp = S.return_temperature() + else if(istype(loc, /obj/structure/transit_tube_pod)) loc_temp = environment.temperature 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/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index da8dda44a3e..7b8b7617431 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -153,6 +153,11 @@ var/ore_eaten = 1 var/chase_time = 100 +/mob/living/simple_animal/hostile/asteroid/goldgrub/New() + ..() + ore_types_eaten += pick(/obj/item/weapon/ore/silver, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/diamond) + ore_eaten = rand(1,3) + /mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(var/new_target) target = new_target if(target != null) @@ -182,8 +187,8 @@ if(!(O.type in ore_types_eaten)) ore_types_eaten += O.type qdel(O) - if(ore_eaten > 5)//Limit the scope of the reward you can get, or else things might get silly - ore_eaten = 5 + if(ore_eaten > 10)//Limit the scope of the reward you can get, or else things might get silly + ore_eaten = 10 visible_message("The ore was swallowed whole!") /mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time @@ -272,11 +277,13 @@ icon = 'icons/obj/food/food.dmi' icon_state = "boiledrorocore" var/inert = 0 + var/preserved = 0 /obj/item/asteroid/hivelord_core/New() - spawn(1200) - inert = 1 - desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested." + spawn(2400) + if(!preserved) + inert = 1 + desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested." /obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob) if(ishuman(M)) 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/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index fcd2152f561..edf8218731e 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -5,32 +5,6 @@ var/open_uis[0] // a list of current open /nanoui UIs, not grouped, for use in processing var/list/processing_uis = list() - // a list of asset filenames which are to be sent to the client on user logon - var/list/asset_files = list() - - /** - * Create a new nanomanager instance. - * This proc generates a list of assets which are to be sent to each client on connect - * - * @return /nanomanager new nanomanager object - */ -/datum/nanomanager/New() - var/list/nano_asset_dirs = list(\ - "nano/css/",\ - "nano/images/",\ - "nano/js/",\ - "nano/templates/"\ - ) - - var/list/filenames = null - for (var/path in nano_asset_dirs) - filenames = flist(path) - for(var/filename in filenames) - if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore - if(fexists(path + filename)) - asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect - - return /** * Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data @@ -122,8 +96,8 @@ if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) ui.close() close_count++ - return close_count - + return close_count + /** * Update /nanoui uis belonging to user * @@ -253,18 +227,4 @@ oldMob.open_uis.Cut() - return 1 // success - - /** - * Sends all nano assets to the client - * This is called on user login - * - * @param client /client The user's client - * - * @return nothing - */ - -/datum/nanomanager/proc/send_resources(client) - for(var/file in asset_files) - client << browse_rsc(file) // send the file to the client - + return 1 // success \ No newline at end of file diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 23f3dc00313..dea02f984f7 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -96,6 +96,9 @@ nanoui is used to open and update nano browser uis add_common_assets() + var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) + assets.send(user, ntemplate_filename) + /** * Use this proc to add assets which are common to (and required by) all nano uis * diff --git a/code/modules/ninja/suit/SpiderOS.dm b/code/modules/ninja/suit/SpiderOS.dm index f7ff3cb9014..de7cc2e179c 100644 --- a/code/modules/ninja/suit/SpiderOS.dm +++ b/code/modules/ninja/suit/SpiderOS.dm @@ -16,10 +16,10 @@ if(!affecting) return//If no mob is wearing the suit. I almost forgot about this variable. var/mob/living/carbon/human/U = affecting var/display_to = U//Who do we want to display certain messages to? - + if(U.client) // Send the spider OS images to the client - var/datum/asset/simple/S = new/datum/asset/simple/spider_os() - send_asset_list(U.client, S.assets) + var/datum/asset/simple/S = new/datum/asset/simple/spider_os() //no longer exists ;) + send_asset_list(U.client, S.assets) var/dat = "SpiderOS" dat += " Refresh" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 479bb429efc..1cd4d014532 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -59,10 +59,8 @@ user << "You have to go closer if you want to read it." /obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1) - set src in oview(1) - if(user.client) // Send the paper images to the client - var/datum/asset/simple/S = new/datum/asset/simple/paper() - send_asset_list(user.client, S.assets) + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper) + assets.send(user) var/data if((!user.say_understands(null, all_languages["Galactic Common"]) && !forceshow) || forcestars) //assuming all paper is written in common is better than hardcoded type checks diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 917171351b3..3d765d7e1da 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -207,6 +207,24 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. var/overheat_time = 16 var/recent_reload = 1 +/obj/item/weapon/gun/energy/kinetic_accelerator/super + name = "super-kinetic accelerator" + desc = "An upgraded, superior version of the proto-kinetic accelerator." + icon_state = "kineticgun_u" + projectile_type = "/obj/item/projectile/kinetic/super" + overheat_time = 15 + fire_delay = 15 + origin_tech = "combat=3;powerstorage=2" + +/obj/item/weapon/gun/energy/kinetic_accelerator/hyper + name = "hyper-kinetic accelerator" + desc = "An upgraded, even more superior version of the proto-kinetic accelerator." + icon_state = "kineticgun_h" + projectile_type = "/obj/item/projectile/kinetic/hyper" + overheat_time = 13 + fire_delay = 13 + origin_tech = "combat=4;powerstorage=3" + /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg flags = NODROP diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 38fa2f06fdb..ac9cb8f0ac8 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -218,6 +218,16 @@ damage_type = BRUTE flag = "bomb" range = 3 + var/splash = 0 + +/obj/item/projectile/kinetic/super + damage = 11 + range = 4 + +/obj/item/projectile/kinetic/hyper + damage = 12 + range = 5 + splash = 1 obj/item/projectile/kinetic/New() var/turf/proj_turf = get_turf(src) @@ -243,6 +253,11 @@ obj/item/projectile/kinetic/New() var/turf/simulated/mineral/M = target_turf M.gets_drilled(firer) new /obj/item/effect/kinetic_blast(target_turf) + if(src.splash) + for(var/turf/T in range(splash, target_turf)) + if(istype(T, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = T + M.gets_drilled(firer) /obj/item/effect/kinetic_blast name = "kinetic explosion" diff --git a/code/modules/reagents/newchem/food.dm b/code/modules/reagents/newchem/food.dm index 5c3c6e5547f..ed244f15ae0 100644 --- a/code/modules/reagents/newchem/food.dm +++ b/code/modules/reagents/newchem/food.dm @@ -199,6 +199,7 @@ datum/reagent/fungus/reaction_mob(var/mob/M, var/method=TOUCH, var/volume) description = "An old household remedy for mild illnesses." reagent_state = LIQUID color = "#B4B400" + metabolization_rate = 0.2 /datum/reagent/chicken_soup/on_mob_life(var/mob/living/M as mob) M.nutrition += 2 diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm index 4745a026fbf..8d6294b4156 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/newchem/medicine.dm @@ -278,6 +278,7 @@ datum/reagent/sal_acid description = "This is a is a standard salicylate pain reliever and fever reducer." reagent_state = LIQUID color = "#B3B3B3" + metabolization_rate = 0.1 shock_reduction = 25 overdose_threshold = 25 @@ -285,6 +286,10 @@ datum/reagent/sal_acid/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(prob(55)) M.adjustBruteLoss(-2*REM) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.traumatic_shock < 100) + H.shock_stage = 0 ..() return @@ -458,6 +463,10 @@ datum/reagent/morphine/on_mob_life(var/mob/living/M as mob) if(36 to INFINITY) M.Paralyse(10) M.drowsyness = max(M.drowsyness, 15) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.traumatic_shock < 100) + H.shock_stage = 0 ..() return @@ -794,7 +803,7 @@ datum/reagent/antihol/on_mob_life(var/mob/living/M as mob) M.drowsyness = 0 M.slurring = 0 M.confused = 0 - M.reagents.remove_reagent("ethanol", 8) + M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1) if(M.health < 25) M.adjustToxLoss(-2.0) ..() diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm index d5d20843759..99a500c601a 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/newchem/toxins.dm @@ -454,6 +454,7 @@ datum/reagent/lipolicide description = "A compound found in many seedy dollar stores in the form of a weight-loss tonic." reagent_state = SOLID color = "#D1DED1" + metabolization_rate = 0.2 /datum/chemical_reaction/lipolicide name = "lipolicide" @@ -465,7 +466,8 @@ datum/reagent/lipolicide datum/reagent/lipolicide/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(!holder.has_reagent("nutriment")) - M.adjustToxLoss(1) + if(prob(30)) + M.adjustToxLoss(1) M.nutrition -= 10 * REAGENTS_METABOLISM M.overeatduration = 0 if(M.nutrition < 0)//Prevent from going into negatives. diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm index b44ffa066c4..e4726c4779c 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm +++ b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm @@ -461,7 +461,7 @@ on_reaction(var/datum/reagents/holder, var/created_volume) feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") if(holder.my_atom) - var/obj/item/bluespace_crystal/BC = new(get_turf(holder.my_atom)) + var/obj/item/weapon/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom)) BC.visible_message("The [BC.name] appears out of thin air!") //Cerulean slimepsteroid2 diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm index a9f2d48bb19..1a43b01f0e7 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_med.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_med.dm @@ -9,6 +9,10 @@ /datum/reagent/hydrocodone/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.traumatic_shock < 100) + H.shock_stage = 0 ..() return @@ -102,27 +106,22 @@ /datum/reagent/rezadone name = "Rezadone" id = "rezadone" - description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." + description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage." reagent_state = SOLID color = "#669900" // rgb: 102, 153, 0 + overdose_threshold = 30 -/datum/reagent/rezadone/on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(!data) data = 1 - data++ - switch(data) - if(1 to 15) - M.adjustCloneLoss(-1) - M.heal_organ_damage(1,1) - if(15 to 35) - M.adjustCloneLoss(-2) - M.heal_organ_damage(2,1) - M.status_flags &= ~DISFIGURED - if(35 to INFINITY) - M.adjustToxLoss(1) - M.Dizzy(5) - M.Jitter(5) +/datum/reagent/rezadone/on_mob_life(mob/living/M) + M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. + M.heal_organ_damage(1,1) + M.status_flags &= ~DISFIGURED + ..() + return +/datum/reagent/rezadone/overdose_process(mob/living/M) + M.adjustToxLoss(1) + M.Dizzy(5) + M.Jitter(5) ..() return @@ -132,6 +131,7 @@ description = "An all-purpose antibiotic agent extracted from space fungus." reagent_state = LIQUID color = "#0AB478" + metabolization_rate = 0.2 /datum/reagent/spaceacillin/on_mob_life(var/mob/living/M as mob) ..() diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index 06e6d3cd257..e15fe544f1a 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -9,7 +9,7 @@ build_type = PROTOLATHE materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500) reliability = 100 - build_path = /obj/item/bluespace_crystal/artificial + build_path = /obj/item/weapon/ore/bluespace_crystal/artificial category = list("Bluespace") /datum/design/bag_holding 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/designs/mining_designs.dm b/code/modules/research/designs/mining_designs.dm index 9bf221cb5d5..2b7d911f2b1 100644 --- a/code/modules/research/designs/mining_designs.dm +++ b/code/modules/research/designs/mining_designs.dm @@ -60,6 +60,36 @@ id = "jackhammer" req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6) build_type = PROTOLATHE - materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_DIAMOND = 6000) + materials = list(MAT_METAL = 6000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_DIAMOND = 6000) build_path = /obj/item/weapon/pickaxe/drill/jackhammer category = list("Mining") + +/datum/design/superaccelerator + name = "Super-Kinetic Accelerator" + desc = "An upgraded version of the proto-kinetic accelerator, with superior damage, speed and range." + id = "superaccelerator" + req_tech = list("materials" = 5, "powerstorage" = 4, "engineering" = 4, "magnets" = 4, "combat" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000) + build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/super + category = list("Mining") + +/datum/design/hyperaccelerator + name = "Hyper-Kinetic Accelerator" + desc = "An upgraded version of the proto-kinetic accelerator, with even more superior damage, speed and range." + id = "hyperaccelerator" + req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6, "combat" = 4) + build_type = PROTOLATHE + materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 2000, MAT_DIAMOND = 2000) + build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/hyper + category = list("Mining") + +/datum/design/superresonator + name = "Upgraded Resonator" + desc = "An upgraded version of the resonator that allows more fields to be active at once." + id = "superresonator" + req_tech = list("materials" = 4, "powerstorage" = 3, "engineering" = 3, "magnets" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 4000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000) + build_path = /obj/item/weapon/resonator/upgraded + category = list("Mining") \ 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/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index b554c244ba7..2c6185d0d3c 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -1,39 +1,40 @@ // Bluespace crystals, used in telescience and when crushed it will blink you to a random turf. -/obj/item/bluespace_crystal +/obj/item/weapon/ore/bluespace_crystal name = "bluespace crystal" desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate." icon = 'icons/obj/telescience.dmi' icon_state = "bluespace_crystal" w_class = 1 origin_tech = "bluespace=4;materials=3" + points = 50 var/blink_range = 8 // The teleport range when crushed/thrown at someone. -/obj/item/bluespace_crystal/New() +/obj/item/weapon/ore/bluespace_crystal/New() ..() pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) -/obj/item/bluespace_crystal/attack_self(var/mob/user) +/obj/item/weapon/ore/bluespace_crystal/attack_self(var/mob/user) blink_mob(user) user.drop_item() user.visible_message("[user] crushes the [src]!") qdel(src) -/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L) +/obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L) if(L.z in config.admin_levels) src.visible_message("[src]'s fragments begin rapidly vibrating and blink out of existence.") qdel(src) return do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg') -/obj/item/bluespace_crystal/throw_impact(atom/hit_atom) +/obj/item/weapon/ore/bluespace_crystal/throw_impact(atom/hit_atom) ..() if(isliving(hit_atom)) blink_mob(hit_atom) qdel(src) // Artifical bluespace crystal, doesn't give you much research. -/obj/item/bluespace_crystal/artificial +/obj/item/weapon/ore/bluespace_crystal/artificial name = "artificial bluespace crystal" desc = "An artificially made bluespace crystal, it looks delicate." origin_tech = "bluespace=2" diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 1fe42e91ede..ee4e9a790a6 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -14,8 +14,8 @@ ..() component_parts = list() component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/capacitor(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) @@ -25,8 +25,8 @@ ..() component_parts = list() component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) - component_parts += new /obj/item/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index a060b0619d4..15edeec20a2 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -49,10 +49,10 @@ /obj/machinery/computer/telescience/initialize() ..() for(var/i = 1; i <= starting_crystals; i++) - crystals += new /obj/item/bluespace_crystal/artificial(null) // starting crystals + crystals += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) // starting crystals /obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/bluespace_crystal)) + if(istype(W, /obj/item/weapon/ore/bluespace_crystal)) if(crystals.len >= max_crystals) user << "There are not enough crystal slots." return diff --git a/code/world.dm b/code/world.dm index 9062500b0d8..5c9e86d963f 100644 --- a/code/world.dm +++ b/code/world.dm @@ -67,7 +67,7 @@ var/global/datum/global_init/init = new () processScheduler.setup() master_controller.setup() - + #ifdef MAP_NAME map_name = "[MAP_NAME]" #else @@ -239,9 +239,9 @@ var/world_topic_spam_protect_time = world.timeofday spawn(0) world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy - + processScheduler.stop() - + for(var/client/C in clients) if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index fb089d6455f..75d3a2d077e 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/obj/aibots.dmi b/icons/obj/aibots.dmi index 3c6ecf0c776..1a0d4960abe 100644 Binary files a/icons/obj/aibots.dmi and b/icons/obj/aibots.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/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index c41b8e60053..a63f9af50bc 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index cb002637bb7..ee60d654a48 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi 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/items.dmi b/icons/obj/items.dmi index 9130736fbc2..6ef95efd7e8 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/machines/mining_machines.dmi b/icons/obj/machines/mining_machines.dmi index 25114f60032..83c12986772 100644 Binary files a/icons/obj/machines/mining_machines.dmi and b/icons/obj/machines/mining_machines.dmi differ diff --git a/icons/obj/walllocker.dmi b/icons/obj/walllocker.dmi index 1b3fe851f0d..4c9389ec1aa 100644 Binary files a/icons/obj/walllocker.dmi and b/icons/obj/walllocker.dmi differ diff --git a/interface/skin.dmf b/interface/skin.dmf index c66843ff071..e8c3a63731a 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -2106,6 +2106,32 @@ window "mainwindow" macro = "macro" menu = "menu" on-close = "" + elem "asset_cache_browser" + type = BROWSER + pos = 424,208 + size = 1x1 + anchor1 = none + anchor2 = none + font-family = "" + font-size = 0 + font-style = "" + text-color = #000000 + background-color = none + is-visible = false + is-disabled = false + is-transparent = false + is-default = false + border = none + drop-zone = false + right-click = false + saved-params = "" + on-size = "" + show-history = false + show-url = false + auto-format = true + use-title = false + on-show = "" + on-hide = "" elem "hotkey_toggle" type = BUTTON pos = 560,420 diff --git a/nano/css/layout_basic.css b/nano/layouts/layout_basic.css similarity index 100% rename from nano/css/layout_basic.css rename to nano/layouts/layout_basic.css diff --git a/nano/templates/layout_basic.tmpl b/nano/layouts/layout_basic.tmpl similarity index 100% rename from nano/templates/layout_basic.tmpl rename to nano/layouts/layout_basic.tmpl diff --git a/nano/css/layout_default.css b/nano/layouts/layout_default.css similarity index 100% rename from nano/css/layout_default.css rename to nano/layouts/layout_default.css diff --git a/nano/templates/layout_default.tmpl b/nano/layouts/layout_default.tmpl similarity index 100% rename from nano/templates/layout_default.tmpl rename to nano/layouts/layout_default.tmpl 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/nano/templates/slotmachine.tmpl b/nano/templates/slotmachine.tmpl new file mode 100644 index 00000000000..dd0e29b42ea --- /dev/null +++ b/nano/templates/slotmachine.tmpl @@ -0,0 +1,34 @@ + +{{if data.money != null}} +
+ {{:data.plays}} players have tried their luck today! +
+
+
Credits Remaining:
+ {{:helper.string("
{1}
", data.money >= 5 ? "" : "bad", data.money)}} +
+
+
+ Five credits to play! +
+
+ {{:helper.link('SPIN!', 'arrowrefresh-1-s', {'ops' : 1}, data.money >= 5 && !data.working ? null : 'disabled')}} +
+
+ {{if data.result}} +
+ {{:data.result}} +
+ {{/if}} + {{if data.working}} +
Spinning!
+ {{/if}} +{{else}} +
+ Could not scan your card or could not find account!
+ Please wear or hold your ID and try again. +
+{{/if}} \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index d71861222ce..26acbb5f239 100644 --- a/paradise.dme +++ b/paradise.dme @@ -955,6 +955,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" @@ -996,9 +999,9 @@ #include "code\modules\awaymissions\mission_code\spacebattle.dm" #include "code\modules\awaymissions\mission_code\stationCollision.dm" #include "code\modules\awaymissions\mission_code\wildwest.dm" +#include "code\modules\client\asset_cache.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" -#include "code\modules\client\global_cache.dm" #include "code\modules\client\message.dm" #include "code\modules\client\preferences.dm" #include "code\modules\client\preferences_mysql.dm"