diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 40977cb981..c676db1466 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -640,6 +640,7 @@ datum/mind ticker.mode.changelings -= src special_role = null current.remove_changeling_powers() + current.verbs -= /datum/changeling/proc/EvolutionMenu if(changeling) del(changeling) current << "You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!" log_admin("[key_name_admin(usr)] has de-changeling'ed [current].") diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index 9487e82784..35b5f42c69 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -1,5 +1,15 @@ /datum/intercept_text var/text + /* + var/prob_correct_person_lower = 20 + var/prob_correct_person_higher = 80 + var/prob_correct_job_lower = 20 + var/prob_correct_job_higher = 80 + var/prob_correct_prints_lower = 20 + var/prob_correct_print_higher = 80 + var/prob_correct_objective_lower = 20 + var/prob_correct_objective_higher = 80 + */ var/list/org_names_1 = list( "Blighted", "Defiled", diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index d39c64ad21..33b0839951 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -231,7 +231,7 @@ return /obj/machinery/door/proc/requiresID() - return 0 + return 1 /obj/machinery/door/proc/update_nearby_tiles(need_rebuild) if(!air_master) return 0 diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index d6fb415601..a2efc49384 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -812,6 +812,16 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) parent.update_tray() +/obj/item/seeds/grassseed/harvest(mob/user = usr) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_yield = round(yield*parent.yieldmod) + + if(t_yield > 0) + var/obj/item/stack/tile/grass/new_grass = new/obj/item/stack/tile/grass(user.loc) + new_grass.amount = t_yield + + parent.update_tray() + /obj/item/seeds/gibtomato/harvest(mob/user = usr) var/produce = text2path(productname) var/obj/machinery/hydroponics/parent = loc //for ease of access diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 926e413378..83340e5330 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -12,23 +12,42 @@ active_power_usage = 100 flags = NOREACT var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000. + var/icon_on = "smartfridge" + var/icon_off = "smartfridge-off" var/item_quants = list() var/ispowered = 1 //starts powered var/isbroken = 0 +/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/)) + return 1 + return 0 + +/obj/machinery/smartfridge/seeds + name = "\improper MegaSeed Servitor" + desc = "When you need seeds fast!" + icon = 'icons/obj/vending.dmi' + icon_state = "seeds" + icon_on = "seeds" + icon_off = "seeds-off" + +/obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/seeds/)) + return 1 + return 0 /obj/machinery/smartfridge/power_change() if( powered() ) src.ispowered = 1 stat &= ~NOPOWER if(!isbroken) - icon_state = "smartfridge" + icon_state = icon_on else spawn(rand(0, 15)) src.ispowered = 0 stat |= NOPOWER if(!isbroken) - icon_state = "smartfridge-off" + icon_state = icon_off /******************* @@ -40,7 +59,7 @@ user << "\The [src] is unpowered and useless." return - if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/)) + if(accept_check(O)) if(contents.len >= max_n_of_items) user << "\The [src] is full." return 1 @@ -55,19 +74,25 @@ "You add \the [O] to \the [src].") else if(istype(O, /obj/item/weapon/plantbag)) - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You load \the [src] with \the [O].") - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) - if(contents.len >= max_n_of_items) - user << "\The [src] is full." - return 1 - else - O.contents -= G - G.loc = src - if(item_quants[G.name]) - item_quants[G.name]++ + var/plants_loaded = 0 + for(var/obj/G in O.contents) + if(accept_check(G)) + if(contents.len >= max_n_of_items) + user << "\The [src] is full." + return 1 else - item_quants[G.name] = 1 + O.contents -= G + G.loc = src + if(item_quants[G.name]) + item_quants[G.name]++ + else + item_quants[G.name] = 1 + plants_loaded++ + if(plants_loaded) + user.visible_message("[user] loads \the [src] with \the [O].", \ + "You load \the [src] with \the [O].") + if(O.contents.len > 0) + user << "Some items are refused." else user << "\The [src] smartly refuses [O]." @@ -110,7 +135,7 @@ dat += "
" dat += "" - user << browse("SmartFridge Supplies[dat]", "window=smartfridge") + user << browse("[src] Supplies[dat]", "window=smartfridge") onclose(user, "smartfridge") return diff --git a/code/game/machinery/seed_extractor.dm b/code/game/machinery/seed_extractor.dm index cd1621e4c3..615e52f398 100644 --- a/code/game/machinery/seed_extractor.dm +++ b/code/game/machinery/seed_extractor.dm @@ -45,4 +45,10 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob t_amount++ del(O) + else if(istype(O, /obj/item/stack/tile/grass)) + var/obj/item/stack/tile/grass/S = O + user << "You extract some seeds from the [S.name]." + S.use(1) + new /obj/item/seeds/grassseed(loc) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 9ebb60804f..d7ed4ea053 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -21,7 +21,7 @@ w_class = 1 /obj/item/weapon/plantbag/attack_self(mob/user as mob) - for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents) + for (var/obj/item/O in contents) contents -= O O.loc = user.loc user << "\blue You empty the plant bag." diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 6c1d2a5443..dbdb389e0b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -221,7 +221,7 @@ datum/preferences var/HTML = "" HTML += "
" HTML += "Choose occupation chances
Unavailable occupations are in red.

" - HTML += "\[Done\]

" // Easier to press up here. + HTML += "
\[Reset\] - \[Done\]


" // Easier to press up here. HTML += "
" // Table within a table for alignment, also allows you to easily add more colomns. HTML += "" var/index = -1 @@ -317,6 +317,20 @@ datum/preferences SetChoices(user) return 1 + proc/ResetJobs() + + job_civilian_high = 0 + job_civilian_med = 0 + job_civilian_low = 0 + + job_medsci_high = 0 + job_medsci_med = 0 + job_medsci_low = 0 + + job_engsec_high = 0 + job_engsec_med = 0 + job_engsec_low = 0 + proc/GetJobDepartment(var/datum/job/job, var/level) if(!job || !level) return 0 @@ -407,6 +421,9 @@ datum/preferences if("close") user << browse(null, "window=mob_occupation") ShowChoices(user) + if("reset") + ResetJobs() + SetChoices(user) if("random") userandomjob = !userandomjob SetChoices(user) diff --git a/code/modules/reagents/reagent_containers/food/snacks/grown.dm b/code/modules/reagents/reagent_containers/food/snacks/grown.dm index a8eedf06bd..97d38d4fcc 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/grown.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/grown.dm @@ -52,13 +52,33 @@ if (istype(O, /obj/item/weapon/plantbag)) var/obj/item/weapon/plantbag/S = O if (S.mode == 1) - for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(src.x,src.y,src.z)) - if (S.contents.len < S.capacity) - S.contents += G; - else - user << "\blue The plant bag is full." - return - user << "\blue You pick up all the plants." + for(var/obj/item/G in get_turf(src)) + if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown)) + if (S.contents.len < S.capacity) + S.contents += G + else + user << "\blue The plant bag is full." + return + user << "\blue You pick up all the plants and seeds." + else + if (S.contents.len < S.capacity) + S.contents += src; + else + user << "\blue The plant bag is full." + return + +/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob) + if (istype(O, /obj/item/weapon/plantbag)) + var/obj/item/weapon/plantbag/S = O + if (S.mode == 1) + for(var/obj/item/G in get_turf(src)) + if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown)) + if (S.contents.len < S.capacity) + S.contents += G + else + user << "\blue The plant bag is full." + return + user << "\blue You pick up all the plants and seeds." else if (S.contents.len < S.capacity) S.contents += src; @@ -852,6 +872,7 @@ // Putting these at the bottom so they don't clutter the list up. -Cheridan // ************************************* +/* //This object is just a transition object. All it does is make a grass tile and delete itself. /obj/item/weapon/reagent_containers/food/snacks/grown/grass seed = "/obj/item/seeds/grassseed" @@ -863,6 +884,7 @@ new/obj/item/stack/tile/grass(src.loc) spawn(5) //Workaround to keep harvesting from working weirdly. del(src) +*/ //This object is just a transition object. All it does is make dosh and delete itself. -Cheridan /obj/item/weapon/reagent_containers/food/snacks/grown/money