diff --git a/baystation12.dme b/baystation12.dme index 61267102ff8..e4c660ca7e1 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -601,6 +601,7 @@ #include "code\game\objects\effects\spawners\bombspawner.dm" #include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\items\apc_frame.dm" +#include "code\game\objects\items\bees_items.dm" #include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\contraband.dm" @@ -1207,6 +1208,7 @@ #include "code\modules\hydroponics\spreading\spreading_growth.dm" #include "code\modules\hydroponics\spreading\spreading_response.dm" #include "code\modules\hydroponics\trays\tray.dm" +#include "code\modules\hydroponics\trays\tray_apiary.dm" #include "code\modules\hydroponics\trays\tray_process.dm" #include "code\modules\hydroponics\trays\tray_reagents.dm" #include "code\modules\hydroponics\trays\tray_soil.dm" @@ -1465,6 +1467,7 @@ #include "code\modules\mob\living\silicon\robot\drone\drone_items.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_say.dm" +#include "code\modules\mob\living\simple_animal\bees.dm" #include "code\modules\mob\living\simple_animal\corpse.dm" #include "code\modules\mob\living\simple_animal\parrot.dm" #include "code\modules\mob\living\simple_animal\shade.dm" diff --git a/code/__defines/lighting.dm b/code/__defines/lighting.dm index ef6e36aa717..73ca556c4c7 100644 --- a/code/__defines/lighting.dm +++ b/code/__defines/lighting.dm @@ -1,3 +1,17 @@ +//DVIEW defines +//DVIEW is a hack that uses a mob with darksight in order to find lists of viewable stuff while ignoring darkness + +var/mob/dview/dview_mob = new + +/mob/dview + invisibility = 101 + density = 0 + + anchored = 1 + simulated = 0 + + see_in_dark = 1e6 + #define FOR_DVIEW(type, range, center, invis_flags) \ dview_mob.loc = center; \ dview_mob.see_invisible = invis_flags; \ @@ -5,6 +19,15 @@ #define END_FOR_DVIEW dview_mob.loc = null +#define DVIEW(output, range, center, invis_flags) \ + dview_mob.loc = center; \ + dview_mob.see_invisible = invis_flags; \ + output = view(range, dview_mob); \ + dview_mob.loc = null ; + + + + // Night lighting controller times // The time (in ticks based on worldtime2ticks()) that various actions trigger #define MORNING_LIGHT_RESET 252000 // 7am or 07:00 - lighting restores to normal in morning diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 06ba7ec55a9..c4c2c7ba15e 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1296,28 +1296,7 @@ var/list/WALLITEMS = list( colour += temp_col return colour -var/mob/dview/dview_mob = new -//Version of view() which ignores darkness, because BYOND doesn't have it. -/proc/dview(var/range = world.view, var/center, var/invis_flags = 0) - if(!center) - return - - dview_mob.loc = center - - dview_mob.see_invisible = invis_flags - - . = view(range, dview_mob) - dview_mob.loc = null - -/mob/dview - invisibility = 101 - density = 0 - - anchored = 1 - simulated = 0 - - see_in_dark = 1e6 /atom/proc/get_light_and_color(var/atom/origin) if(origin) diff --git a/code/_macros.dm b/code/_macros.dm index aac6910e9f2..0bd37605e4d 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -2,6 +2,7 @@ #define CLAMP01(x) (Clamp(x, 0, 1)) #define isAI(A) istype(A, /mob/living/silicon/ai) +#define isDrone(A) istype(A, /mob/living/silicon/robot/drone) #define isalien(A) istype(A, /mob/living/carbon/alien) @@ -37,4 +38,4 @@ #define issilicon(A) istype(A, /mob/living/silicon) -#define isslime(A) istype(A, /mob/living/carbon/slime) +#define isslime(A) istype(A, /mob/living/carbon/slime) \ No newline at end of file diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 860d0f397a0..ae1203df9ae 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -75,12 +75,6 @@ datum/controller/game_controller/proc/setup_objects() sleep(-1) spawn_cargo_stock() - - // Create the mining ore distribution map. - // These values determine the specific area that the map is applied to. - // If you do not use the official Baycode asteroid map, you will need to change them. - asteroid_ore_map = new /datum/random_map/ore(null,13,32,5,217,223) - // Set up antagonists. populate_antag_type_list() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index e45be4bb6a6..6c918a78788 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -13,7 +13,8 @@ var/throw_range = 7 var/moved_recently = 0 var/mob/pulledby = null - var/item_state = null // Used to specify the item state for the on-mob overlays. + var/item_state = null // Base name of the image used for when the item is worn. Suffixes are added to this. + //Also used on holdable mobs for the same info related to their held version var/auto_init = 1 diff --git a/code/game/gamemodes/antagspawner.dm b/code/game/gamemodes/antagspawner.dm index e2e2d75dcf7..4deb202d60b 100644 --- a/code/game/gamemodes/antagspawner.dm +++ b/code/game/gamemodes/antagspawner.dm @@ -26,22 +26,44 @@ var/searching = 0 var/askDelay = 10 * 60 * 1 -/obj/item/weapon/antag_spawner/borg_tele/attack_self(mob/user as mob) - if(searching == 0) - //Start the process of searching for a new user. - user << "You carefully locate the manual activation switch and start the positronic brain's boot process." - src.searching = 1 - var/datum/ghosttrap/G = get_ghost_trap("syndicate cyborg") - G.request_player(brainmob, "Someone is requesting a syndicate cyborg.", 60 SECONDS) - spawn_antag(G, get_turf(src)) - spawn(600) reset_search() +/obj/item/weapon/antag_spawner/borg_tele/attack_self(mob/user) + user << "The syndicate robot teleporter is attempting to locate an available cyborg." + searching = 1 + for(var/mob/dead/observer/O in player_list) + if(!O.MayRespawn()) + continue + if(jobban_isbanned(O, "Syndicate") && jobban_isbanned(O, "Mercenary") && jobban_isbanned(O, "Cyborg")) + continue + if(O.client && O.client.prefs && (MODE_MERCENARY in O.client.prefs.be_special_role)) + question(O.client) + + spawn(600) + searching = 0 + if(!used) + user << "Unable to connect to the Syndicate Command. Perhaps you could try again later?" -obj/item/weapon/antag_spawner/borg_tele/spawn_antag(client/G, turf/T) + +/obj/item/weapon/antag_spawner/borg_tele/proc/question(var/client/C) + spawn(0) + if(!C) + return + var/response = alert(C, "Someone is requesting a syndicate cyborg Would you like to play as one?", + "Syndicate robot request","Yes", "No", "Never for this round") + if(response == "Yes") + response = alert(C, "Are you sure you want to play as a syndicate cyborg?", "Syndicate cyborg request", "Yes", "No") + if(!C || used || !searching) + return + if(response == "Yes") + spawn_antag(C, get_turf(src)) + else if (response == "Never for this round") + C.prefs.be_special_role ^= MODE_MERCENARY + +obj/item/weapon/antag_spawner/borg_tele/spawn_antag(client/C, turf/T) var/datum/effect/effect/system/spark_spread/S = new /datum/effect/effect/system/spark_spread S.set_up(4, 1, src) S.start() var/mob/living/silicon/robot/H = new /mob/living/silicon/robot/syndicate(T) - H.key = G.key + H.key = C.key var/newname = sanitizeSafe(input(H,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN) if (newname != "") H.real_name = newname @@ -49,6 +71,11 @@ obj/item/weapon/antag_spawner/borg_tele/spawn_antag(client/G, turf/T) H.mind.special_role = "Mercenary" H << "You are a syndicate cyborg, bound to help and follow the orders of the mercenaries that are deploying you. Remember to speak to the other mercenaries to know more about their plans, you are also able to change your name using the name pick command." + spawn(1) + used = 1 + qdel(src) + H << "You are a syndicate cyborg, bound to help and follow the orders of the mercenaries that are deploying you. Remember to speak to the other mercenaries to know more about their plans, you are also able to change your name using the name pick command." + spawn(1) used = 1 qdel(src) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 8b95aea3000..a2ed07562f1 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -239,11 +239,6 @@ update_flag healthcheck() ..() -/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj) - src.health = 0 - healthcheck() - return - /obj/machinery/portable_atmospherics/canister/AltClick(var/mob/dead/observer/admin) if (istype(admin)) if (admin.client && admin.client.holder && ((R_MOD|R_ADMIN) & admin.client.holder.rights)) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index b18492d8e6d..b2e4ed54f2c 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -96,7 +96,7 @@ if(!isAI(user)) user.set_machine(src) - usr.reset_view(current) + user.reset_view(current_camera) ui_interact(user) proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 7f724044674..ecd9caa8fd3 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -479,10 +479,7 @@ user << "You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]" return - if(orient_right) - icon_state = "[occupied_icon_state]-r" - else - icon_state = occupied_icon_state + icon_state = occupied_icon_state L << "\blue You feel cool air surround you. You go numb as your senses turn inward." L << "\blue If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index b50638aa432..eb0a6f9491e 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -76,7 +76,7 @@ return if (src.operating) return - if (src.density && (!issmall(M) || ishuman(M)) && src.allowed(AM)) + if (src.density && (!issmall(AM) || ishuman(AM)) && src.allowed(AM)) open() if(src.check_access(null)) sleep(50) diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index fd9907f85c7..70a49a74b35 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -84,9 +84,9 @@ var/turf/simulated/floor/T = new_turf if(!T.is_plating()) if(!T.broken && !T.burnt) - new T.floor_type(T) + new T.flooring.build_type() T.make_plating() - return !new_turf.intact + return T.is_plating() return 0 /obj/machinery/floorlayer/proc/TakeNewStack() diff --git a/code/game/objects/items/bees_items.dm b/code/game/objects/items/bees_items.dm new file mode 100644 index 00000000000..05f9231f8a3 --- /dev/null +++ b/code/game/objects/items/bees_items.dm @@ -0,0 +1,122 @@ + +/obj/item/queen_bee + name = "queen bee packet" + desc = "Place her into an apiary so she can get busy." + icon = 'icons/obj/seeds.dmi' + icon_state = "seed-kudzu" + w_class = 1 + +/obj/item/weapon/bee_net + name = "bee net" + desc = "For catching rogue bees." + icon = 'icons/obj/apiary_bees_etc.dmi' + icon_state = "bee_net" + item_state = "bedsheet" + w_class = 3 + var/caught_bees = 0 + +/obj/item/weapon/bee_net/attack_self(mob/user as mob) + var/turf/T = get_step(get_turf(user), user.dir) + for(var/mob/living/simple_animal/bee/B in T) + if(B.feral < 0) + caught_bees += B.strength + qdel(B) + user.visible_message("\blue [user] nets some bees.","\blue You net up some of the becalmed bees.") + else + user.visible_message("\red [user] swings at some bees, they don't seem to like it.","\red You swing at some bees, they don't seem to like it.") + B.feral = 5 + B.target_mob = user + +/obj/item/weapon/bee_net/verb/empty_bees() + set src in usr + set name = "Empty bee net" + set category = "Object" + var/mob/living/carbon/M + if(iscarbon(usr)) + M = usr + + while(caught_bees > 0) + //release a few super massive swarms + while(caught_bees > 5) + var/mob/living/simple_animal/bee/B = new(src.loc) + B.feral = 5 + B.target_mob = M + B.strength = 6 + B.icon_state = "bees_swarm" + caught_bees -= 6 + + //what's left over + var/mob/living/simple_animal/bee/B = new(src.loc) + B.strength = caught_bees + B.icon_state = "bees[B.strength]" + B.feral = 5 + B.target_mob = M + + caught_bees = 0 + +/obj/item/apiary + name = "moveable apiary" + icon = 'icons/obj/apiary_bees_etc.dmi' + icon_state = "apiary_item" + item_state = "giftbag" + w_class = 5 + +/obj/item/beezeez + name = "bottle of BeezEez" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/weapon/reagent_containers/food/snacks/honeycomb + name = "honeycomb" + icon_state = "honeycomb" + desc = "Dripping with sugary sweetness." + + New() + ..() + +/obj/item/weapon/reagent_containers/food/snacks/honeycomb/New() + ..() + reagents.add_reagent("honey",10) + reagents.add_reagent("nutriment", 0.5) + reagents.add_reagent("sugar", 2) + bitesize = 2 + +/datum/reagent/honey + name = "Honey" + id = "honey" + description = "A golden yellow syrup, loaded with sugary sweetness." + color = "#FFFF00" + +/obj/item/weapon/book/manual/hydroponics_beekeeping + name = "The Ins and Outs of Apiculture - A Precise Art" + icon_state ="bookHydroponicsBees" + author = "Beekeeper Dave" + title = "The Ins and Outs of Apiculture - A Precise Art" + dat = {" + + + + +

Raising Bees

+ + Bees are loving but fickle creatures. Don't mess with their hive and stay away from any clusters of them, and you'll avoid their ire. + Sometimes, you'll need to dig around in there for those delicious sweeties though - in that case make sure you wear sealed protection gear + and carry an extinguisher or smoker with you - any bees chasing you, once calmed down, can thusly be netted and returned safely to the hive. + BeezEez is a cure-all panacea for them, but use it too much and the hive may grow to apocalyptic proportions. Other than that, bees are excellent pets + for all the family and are excellent caretakers of one's garden: having a hive or two around will aid in the longevity and growth rate of plants, + and aid them in fighting off poisons and disease. + + + + "} diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 0e1373ea858..ee8c237a235 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -956,7 +956,6 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1) if(tap) U.visible_message("\The [U] taps on \his PDA's screen.") - U.last_target_click = world.time var/t = input(U, "Please enter message", P.name, null) as text|null t = sanitize(t) //t = readd_quotes(t) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index d3004bef958..50627a048eb 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -1,66 +1,10 @@ /* CONTAINS: -T-RAY -DETECTIVE SCANNER HEALTH ANALYZER GAS ANALYZER MASS SPECTROMETER REAGENT SCANNER */ -/obj/item/device/t_scanner - name = "\improper T-ray scanner" - desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." - icon_state = "t-ray0" - var/on = 0 - slot_flags = SLOT_BELT - w_class = 2 - item_state = "electronic" - - matter = list(DEFAULT_WALL_MATERIAL = 150) - - origin_tech = "magnets=1;engineering=1" - -/obj/item/device/t_scanner/attack_self(mob/user) - - on = !on - icon_state = "t-ray[on]" - - if(on) - processing_objects.Add(src) - - -/obj/item/device/t_scanner/process() - if(!on) - processing_objects.Remove(src) - return null - - for(var/turf/T in range(1, src.loc) ) - - if(!T || !T.is_intact()) - continue - - for(var/obj/O in T.contents) - - if(O.level != 1) - continue - - if(O.invisibility == 101) - O.invisibility = 0 - O.alpha = 128 - spawn(10) - if(O) - var/turf/U = O.loc - if(U.is_intact()) - O.invisibility = 101 - O.alpha = 255 - - var/mob/living/M = locate() in T - if(M && M.invisibility == 2) - M.invisibility = 0 - spawn(2) - if(M) - M.invisibility = INVISIBILITY_LEVEL_TWO - /obj/item/device/healthanalyzer name = "health analyzer" diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index a1897883518..8f704b2af8d 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -258,8 +258,24 @@ A list of items and costs is stored under the datum of every game mode, alongsid establish_db_connection(dbcon) if (dbcon.IsConnected()) + nanoui_data["contracts"] = list() + + if (!nanoui_data["contracts_current_page"]) + nanoui_data["contracts_current_page"] = 1 + + if (!nanoui_data["contracts_view"]) + nanoui_data["contracts_view"] = 1 + var/query_details[0] - query_details[":contract_id"] = text2num(id) + + switch (nanoui_data["contracts_view"]) + if (1) + query_details[":status"] = "open" + if (2) + query_details[":status"] = "closed" + else + nanoui_data["contracts_view"] = 1 + query_details[":status"] = "open" var/DBQuery/select_query = dbcon.NewQuery("SELECT contract_id, contractee_name, status, title, description, reward_other FROM ss13_syndie_contracts WHERE contract_id = :contract_id") select_query.Execute(query_details) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index c63567c5a93..75f1011f8ef 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -100,7 +100,7 @@ var/const/NO_EMAG_ACT = -50 "Resomi" = 'icons/mob/species/resomi/id.dmi' ) - var/access = list() + var/list/access = list() var/registered_name = "Unknown" // The name registered_name on the card slot_flags = SLOT_ID @@ -152,8 +152,6 @@ var/const/NO_EMAG_ACT = -50 id_card.registered_name = real_name id_card.sex = capitalize(gender) id_card.set_id_photo(src) - id_card.citizenship = citizenship - id_card.religion = religion if(dna) id_card.blood_type = dna.b_type @@ -164,6 +162,8 @@ var/const/NO_EMAG_ACT = -50 /mob/living/carbon/human/set_id_info(var/obj/item/weapon/card/id/id_card) ..() id_card.age = age + id_card.citizenship = citizenship + id_card.religion = religion /obj/item/weapon/card/id/proc/dat() var/dat = ("
") diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 1dd13fb75cf..32285851bdc 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -289,7 +289,7 @@ if (istype(location, /turf)) location.hotspot_expose(700, 5) -/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/weldingtool/attack(mob/living/M as mob, mob/user as mob) if(hasorgans(M)) @@ -299,12 +299,9 @@ if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) return ..() - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - if(M == user) - user << "You can't repair damage to your own body - it's against OH&S." - return + if(M.isSynthetic() && M == user) + user << "You can't repair damage to your own body - it's against OH&S." + return if(S.brute_dam == 0) // Organ undamaged user << "Nothing to fix here!" diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index 880837452b4..f1298bd72dd 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -148,7 +148,7 @@ /obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time /obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (issilicon(M))//safety to stop robots losing their items + if (istype(user,/mob/living/silicon/robot))//safety to stop robots losing their items return if (istype(W, /obj/item/weapon/tray))//safety to prevent tray stacking diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 9fe43ba1087..98c4fee4db6 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -16,7 +16,6 @@ var/being_shocked = 0 - var/item_state // Base name of the image used for when the item is worn. Suffixes are added to this. var/icon_species_tag = ""//If set, this holds the 3-letter shortname of a species, used for species-specific worn icons var/icon_auto_adapt = 0//If 1, this item will automatically change its species tag to match the wearer's species. //requires that the wearer's species is listed in icon_supported_species_tags diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index e0555530127..5461434a3ea 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -62,9 +62,6 @@ content_size += Ceiling(I.w_class/2) return content_size -/obj/structure/closet/alter_health() - return get_turf(src) - /obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0 || wall_mounted)) return 1 return (!density) diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index 0932ae560ff..03534d65760 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -143,7 +143,7 @@ var/list/flooring_types damage_temperature = T0C+200 descriptor = "planks" build_type = /obj/item/stack/tile/wood - flags = TURF_CAN_BREAK | TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER + flags = TURF_CAN_BREAK | TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER | TURF_CAN_BURN /decl/flooring/reinforced name = "reinforced floor" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b84d24a8e6a..d59051c6f64 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -747,7 +747,7 @@ proc/admin_notice(var/message, var/rights) world.visibility = !(world.visibility) var/long_message = " toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility])." - send2adminirc("[key_name(src)]" + long_message) + discord_bot.send_to_admins("[key_name(src)]" + long_message) message_admins("[key_name_admin(usr)]" + long_message, 1) log_admin("[key_name(usr)] toggled hub visibility.") feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc diff --git a/code/modules/cargo/randomstock.dm b/code/modules/cargo/randomstock.dm index 6a1cb57d114..93bb53d98df 100644 --- a/code/modules/cargo/randomstock.dm +++ b/code/modules/cargo/randomstock.dm @@ -150,7 +150,6 @@ var/list/global/random_stock_uncommon = list( "crimekit" = 1, "carpet" = 2, "gift" = 4, - "lightfloor" = 2, "linenbin" = 1, "coatrack" = 1, "riotshield" = 2, @@ -1172,8 +1171,6 @@ var/list/global/random_stock_large = list( new /obj/item/stack/tile/carpet(L, 50) if ("gift") new /obj/item/weapon/a_gift(L) - if ("lightfloor") - new /obj/item/stack/tile/light(L, 50) if ("linenbin") new /obj/structure/bedsheetbin(get_turf(L)) if ("coatrack") @@ -1217,7 +1214,7 @@ var/list/global/random_stock_large = list( var/mob/living/bot/newbot = new type(L) newbot.on = 0//Deactivated if (prob(10)) - newbot.Emag(null) + newbot.emag_act(9999,null) if ("latexb") new /obj/item/latexballon(L) @@ -1884,6 +1881,3 @@ var/list/global/random_stock_large = list( exosuit.pr_manage_warnings.process(exosuit) else log_debug("ERROR: Random cargo spawn failed for [stock]") - - - diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index e8f46ce52c0..f6eda831da3 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -5,23 +5,25 @@ /obj/item/proc/disguise(var/newtype) //this is necessary, unfortunately, as initial() does not play well with list vars var/obj/item/copy = new newtype(null) //so that it is GCed once we exit - + desc = copy.desc name = copy.name icon_state = copy.icon_state item_state = copy.item_state body_parts_covered = copy.body_parts_covered - - item_icons = copy.item_icons.Copy() - item_state_slots = copy.item_state_slots.Copy() - sprite_sheets = copy.sprite_sheets.Copy() + flags_inv = copy.flags_inv + + if(copy.item_icons) + item_icons = copy.item_icons.Copy() + if(copy.sprite_sheets) + sprite_sheets = copy.sprite_sheets.Copy() //copying sprite_sheets_obj should be unnecessary as chameleon items are not refittable. - + return copy //for inheritance /proc/generate_chameleon_choices(var/basetype, var/blacklist=list()) . = list() - + var/i = 1 //in case there is a collision with both name AND icon_state for(var/typepath in typesof(basetype) - blacklist) var/obj/O = typepath @@ -100,7 +102,7 @@ if(!ispath(clothing_choices[picked])) return - + disguise(clothing_choices[picked]) update_clothing_icon() //so our overlays update. @@ -333,19 +335,19 @@ w_class = 3 origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) matter = list() - + fire_sound = 'sound/weapons/Gunshot.ogg' projectile_type = /obj/item/projectile/chameleon charge_meter = 0 charge_cost = 20 //uses next to no power, since it's just holograms max_shots = 50 - + var/obj/item/projectile/copy_projectile var/global/list/gun_choices /obj/item/weapon/gun/energy/chameleon/New() ..() - + if(!gun_choices) gun_choices = list() for(var/gun_type in typesof(/obj/item/weapon/gun/) - src.type) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index f5c5268a796..c3f29de601d 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -156,8 +156,6 @@ var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner") ears.Blend(earbit, ICON_OVERLAY) - item_icons[icon_head] = ears - /obj/item/clothing/head/richard name = "chicken mask" desc = "You can hear the distant sounds of rhythmic electronica." diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index d20c3268645..8e6c4446ef6 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -54,7 +54,7 @@ desc = "Use in case of bomb." icon_state = "bombsuit" w_class = 5//Too large to fit in a backpack - flags_item = STOPPRESSUREDAMAGE|THICKMATERIAL|BLOCK_GAS_SMOKE_EFFECT + item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL|BLOCK_GAS_SMOKE_EFFECT armor = list(melee = 30, bullet = 20, laser = 25,energy = 30, bomb = 100, bio = 60, rad = 60) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES body_parts_covered = HEAD|FACE|EYES @@ -77,7 +77,7 @@ permeability_coefficient = 0.01 slowdown = 8 armor = list(melee = 55, bullet = 55, laser = 55,energy = 60, bomb = 100, bio = 60, rad = 60) - flags_item = STOPPRESSUREDAMAGE|THICKMATERIAL + item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL flags_inv = HIDEJUMPSUIT|HIDETAIL heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS diff --git a/code/modules/hydroponics/trays/tray_apiary.dm b/code/modules/hydroponics/trays/tray_apiary.dm new file mode 100644 index 00000000000..80280fecde1 --- /dev/null +++ b/code/modules/hydroponics/trays/tray_apiary.dm @@ -0,0 +1,240 @@ +//http://www.youtube.com/watch?v=-1GadTfGFvU +//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code + +/obj/machinery/apiary + name = "apiary tray" + icon = 'icons/obj/hydroponics_machines.dmi' + icon_state = "hydrotray3" + density = 1 + anchored = 1 + var/nutrilevel = 0 + var/yieldmod = 1 + var/mut = 1 + var/toxic = 0 + var/dead = 0 + var/health = -1 + var/maxhealth = 100 + var/lastcycle = 0 + var/cycledelay = 100 + var/harvestable_honey = 0 + var/beezeez = 0 + var/swarming = 0 + + var/bees_in_hive = 0 + var/list/owned_bee_swarms = list() + var/hydrotray_type = /obj/machinery/portable_atmospherics/hydroponics + +//overwrite this after it's created if the apiary needs a custom machinery sprite +/obj/machinery/apiary/New() + ..() + overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary") + +/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables. + if(istype(Proj ,/obj/item/projectile/energy/floramut)) + mut++ + else if(istype(Proj ,/obj/item/projectile/energy/florayield)) + if(!yieldmod) + yieldmod += 1 + //world << "Yield increased by 1, from 0, to a total of [myseed.yield]" + else if (prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2... + yieldmod += 1 + //world << "Yield increased by 1, to a total of [myseed.yield]" + else + ..() + return + +/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(istype(O, /obj/item/queen_bee)) + if(health > 0) + user << "\red There is already a queen in there." + else + health = 10 + nutrilevel += 10 + user.drop_item() + qdel(O) + user << "\blue You carefully insert the queen into [src], she gets busy making a hive." + bees_in_hive = 0 + else if(istype(O, /obj/item/beezeez)) + beezeez += 100 + nutrilevel += 10 + user.drop_item() + if(health > 0) + user << "\blue You insert [O] into [src]. A relaxed humming appears to pick up." + else + user << "\blue You insert [O] into [src]. Now it just needs some bees." + qdel(O) + else if(istype(O, /obj/item/weapon/material/minihoe)) + if(health > 0) + user << "\red You begin to dislodge the apiary from the tray, the bees don't like that." + angry_swarm(user) + else + user << "\blue You begin to dislodge the dead apiary from the tray." + if(do_after(user, 50)) + new hydrotray_type(src.loc) + new /obj/item/apiary(src.loc) + user << "\red You dislodge the apiary from the tray." + qdel(src) + else if(istype(O, /obj/item/weapon/bee_net)) + var/obj/item/weapon/bee_net/N = O + if(N.caught_bees > 0) + user << "\blue You empty the bees into the apiary." + bees_in_hive += N.caught_bees + N.caught_bees = 0 + else + user << "\blue There are no more bees in the net." + else if(istype(O, /obj/item/weapon/reagent_containers/glass)) + var/obj/item/weapon/reagent_containers/glass/G = O + if(harvestable_honey > 0) + if(health > 0) + user << "\red You begin to harvest the honey. The bees don't seem to like it." + angry_swarm(user) + else + user << "\blue You begin to harvest the honey." + if(do_after(user,50)) + G.reagents.add_reagent("honey",harvestable_honey) + harvestable_honey = 0 + user << "\blue You successfully harvest the honey." + else + user << "\blue There is no honey left to harvest." + else + angry_swarm(user) + ..() + +/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group || (height==0)) return 1 + + if(istype(mover) && mover.checkpass(PASSTABLE)) + return 1 + else + return 0 + +/obj/machinery/apiary/process() + + if(swarming > 0) + swarming -= 1 + if(swarming <= 0) + for(var/mob/living/simple_animal/bee/B in src.loc) + bees_in_hive += B.strength + qdel(B) + else if(bees_in_hive < 10) + for(var/mob/living/simple_animal/bee/B in src.loc) + bees_in_hive += B.strength + qdel(B) + + if(world.time > (lastcycle + cycledelay)) + lastcycle = world.time + if(health < 0) + return + + //magical bee formula + if(beezeez > 0) + beezeez -= 1 + + nutrilevel += 2 + health += 1 + toxic = max(0, toxic - 1) + + //handle nutrients + nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5 + if(nutrilevel > 0) + bees_in_hive += 1 * yieldmod + if(health < maxhealth) + health++ + else + //nutrilevel is less than 1, so we're effectively subtracting here + health += max(nutrilevel - 1, round(-health / 2)) + bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2)) + if(owned_bee_swarms.len) + var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms) + B.target_turf = get_turf(src) + + //clear out some toxins + if(toxic > 0) + toxic -= 1 + health -= 1 + + if(health <= 0) + return + + //make a bit of honey + if(harvestable_honey < 50) + harvestable_honey += 0.5 + + //make some new bees + if(bees_in_hive >= 10 && prob(bees_in_hive * 10)) + var/mob/living/simple_animal/bee/B = new(get_turf(src), src) + owned_bee_swarms.Add(B) + B.mut = mut + B.toxic = toxic + bees_in_hive -= 1 + + //find some plants, harvest + for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src)) + if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10)) + src.nutrilevel++ + H.nutrilevel++ + if(mut < H.mutation_mod - 1) + mut = H.mutation_mod - 1 + else if(mut > H.mutation_mod - 1) + H.mutation_mod = mut + + //flowers give us pollen (nutrients) +/* - All plants should be giving nutrients to the hive. + if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed) + src.nutrilevel++ + H.nutrilevel++ +*/ + //have a few beneficial effects on nearby plants + if(prob(10)) + H.lastcycle -= 5 + if(prob(10)) + H.seed.set_trait(TRAIT_ENDURANCE,max(H.seed.get_trait(TRAIT_ENDURANCE)*1.5,H.seed.get_trait(TRAIT_ENDURANCE)+1)) + if(H.toxins && prob(10)) + H.toxins = min(0, H.toxins - 1) + toxic++ + +/obj/machinery/apiary/proc/die() + if(owned_bee_swarms.len) + var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms) + B.target_turf = get_turf(src) + B.strength -= 1 + if(B.strength <= 0) + qdel(B) + else if(B.strength <= 5) + B.icon_state = "bees[B.strength]" + bees_in_hive = 0 + health = 0 + +/obj/machinery/apiary/proc/angry_swarm(var/mob/M) + for(var/mob/living/simple_animal/bee/B in owned_bee_swarms) + B.feral = 25 + B.target_mob = M + + swarming = 25 + + while(bees_in_hive > 0) + var/spawn_strength = bees_in_hive + if(bees_in_hive >= 5) + spawn_strength = 6 + + var/mob/living/simple_animal/bee/B = new(get_turf(src), src) + B.target_mob = M + B.strength = spawn_strength + B.feral = 25 + B.mut = mut + B.toxic = toxic + bees_in_hive -= spawn_strength + +/obj/machinery/apiary/verb/harvest_honeycomb() + set src in oview(1) + set name = "Harvest honeycomb" + set category = "Object" + + while(health > 15) + health -= 15 + var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc) + if(toxic > 0) + H.reagents.add_reagent("toxin", toxic) + + usr << "\blue You harvest the honeycomb from the hive. There is a wild buzzing!" + angry_swarm(usr) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3056e208b25..4d202eb440b 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -182,7 +182,7 @@ Works together with spawning an observer, noted above. //It is also set in the mob/death proc if (isanimal(src)) set_death_time(ANIMAL, world.time) - else if (ispAI(src) || isdrone(src)) + else if (ispAI(src) || isDrone(src)) set_death_time(MINISYNTH, world.time) else set_death_time(CREW, world.time)//Crew is the fallback diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index cc12816bb02..a48dd5ec78c 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -82,7 +82,7 @@ timeofdeath = world.time if (isanimal(src)) set_death_time(ANIMAL, world.time) - else if (ispAI(src) || isdrone(src)) + else if (ispAI(src) || isDrone(src)) set_death_time(MINISYNTH, world.time) else if (isliving(src)) set_death_time(CREW, world.time)//Crew is the fallback diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 39d948f433f..5fd4f819561 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -36,9 +36,6 @@ var/list/holder_mob_icon_cache = list() else ..() -/obj/item/weapon/holder/process() - update_state() - /obj/item/weapon/holder/GetID() for(var/mob/M in contents) @@ -101,6 +98,7 @@ var/list/holder_mob_icon_cache = list() if (isalive && contained.stat == DEAD) held_death(1)//If we get here, it means the mob died sometime after we picked it up. We pass in 1 so that we can play its deathmessage + //This function checks if the current location is safe to release inside //it returns 1 if the creature will bug out when released /obj/item/weapon/holder/proc/is_unsafe_container(var/obj/place) @@ -306,6 +304,9 @@ var/list/holder_mob_icon_cache = list() // Handle the rest of sync(). ..(M) +//#TODO-MERGE +//Port the reduced-duplication holder method from baystation upstream: +//https://github.com/Baystation12/Baystation12/blob/master/code/modules/mob/holder.dm //Mob specific holders. //w_class mainly determines whether they can fit in trashbags. <=2 can, >=3 cannot diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b7b34a87380..79c3a22db60 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -378,7 +378,7 @@ src << browse(null, t1) if(href_list["item"]) - if (handle_strip(href_list["item"],usr)) + handle_strip(href_list["item"],usr) if(href_list["criminal"]) if(hasHUD(usr,"security")) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index c10cf820b88..5d4e7201d1b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -604,57 +604,12 @@ apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) - //breathing in hot/cold air also heats/cools you a bit var/temp_adj = breath.temperature - bodytemperature if (temp_adj < 0) temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed else - failed_last_breath = 0 - adjustOxyLoss(-3) - - - - - // Hot air hurts :( - if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations)) - - if(breath.temperature <= species.cold_level_1) - if(prob(20)) - src << "You feel your face freezing and icicles forming in your lungs!" - else if(breath.temperature >= species.heat_level_1) - if(prob(20)) - src << "You feel your face burning and a searing heat in your lungs!" - - if(breath.temperature >= species.heat_level_1) - if(breath.temperature < species.heat_level_2) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat") - fire_alert = max(fire_alert, 2) - else if(breath.temperature < species.heat_level_3) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat") - fire_alert = max(fire_alert, 2) - else - apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat") - fire_alert = max(fire_alert, 2) - - else if(breath.temperature <= species.cold_level_1) - if(breath.temperature > species.cold_level_2) - apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold") - fire_alert = max(fire_alert, 1) - else if(breath.temperature > species.cold_level_3) - apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold") - fire_alert = max(fire_alert, 1) - else - apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold") - fire_alert = max(fire_alert, 1) - - - //breathing in hot/cold air also heats/cools you a bit - var/temp_adj = breath.temperature - bodytemperature - if (temp_adj < 0) - temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed - else - temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed + temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE) temp_adj *= relative_density @@ -1077,26 +1032,23 @@ if(hallucination) //Machines do not hallucinate. - if (species.flags & IS_SYNTHETIC) - hallucination = 0 - else - if(hallucination >= 20) - if(prob(3)) - fake_attack(src) - if(!handling_hal) - spawn handle_hallucinations() //The not boring kind! - if(client && prob(5)) - client.dir = pick(2,4,8) - var/client/C = client - spawn(rand(20,50)) - if(C) - C.dir = 1 + if (hallucination >= 20 && !(species.flags & (NO_POISON|IS_PLANT))) + if(prob(3)) + fake_attack(src) + if(!handling_hal) + spawn handle_hallucinations() //The not boring kind! + if(client && prob(5)) + client.dir = pick(2,4,8) + var/client/C = client + spawn(rand(20,50)) + if(C) + C.dir = 1 - if(hallucination<=2) - hallucination = 0 - halloss = 0 - else - hallucination -= 2 + if(hallucination<=2) + hallucination = 0 + halloss = 0 + else + hallucination -= 2 else for(var/atom/a in hallucinations) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 714cc8f4e95..bc5497f60c4 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -481,14 +481,9 @@ var/list/ai_verbs_default = list( return -/mob/living/silicon/ai/meteorhit(obj/O as obj) - for(var/mob/M in viewers(src, null)) - M.show_message(text("\red [] has been hit by []", src, O), 1) - //Foreach goto(19) +/mob/living/silicon/ai/ex_act(severity) if (health > 0) - adjustBruteLoss(30) - if ((O.icon_state == "flaming")) - adjustFireLoss(40) + adjustBruteLoss(min(30/severity, health)) updatehealth() return diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index bb67b3fb3ab..6e9df95a11a 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -28,13 +28,10 @@ user << "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down." flick("portable_analyzer_scan", src) playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) - if(loaded_item.reliability >= min_reliability) - var/list/temp_tech = ConvertReqString2List(loaded_item.origin_tech) - for(var/T in temp_tech) - files.UpdateTech(T, temp_tech[T]) - user << "\The [loaded_item] had level [temp_tech[T]] in [T]." - else - user << "\The [loaded_item] was not reliable enough to advance research." + var/list/temp_tech = ConvertReqString2List(loaded_item.origin_tech) + for(var/T in temp_tech) + files.UpdateTech(T, temp_tech[T]) + user << "\The [loaded_item] had level [temp_tech[T]] in [T]." loaded_item = null for(var/obj/I in contents) for(var/mob/M in I.contents) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 20807e8cbeb..f8883fc302a 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -374,7 +374,6 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) /mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user) if(istype(O, /obj/item/stack/medical)) - user.changeNext_move(4) if(stat != DEAD) var/obj/item/stack/medical/MED = O if(health < maxHealth) @@ -399,7 +398,6 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) //TODO: refactor mob attackby(), attacked_by(), and friends. /mob/living/simple_animal/proc/attacked_with_item(var/obj/item/O, var/mob/user) - user.changeNext_move(8) if(!O.force) visible_message("[user] gently taps [src] with \the [O].") return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index d0d60e88546..170ddc67f69 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -30,6 +30,44 @@ /mob/living/carbon/human/isMonkey() return istype(species, /datum/species/monkey) + +/proc/ishuman_species(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Human")) + return 1 + return 0 + +/proc/isunathi(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Unathi")) + return 1 + return 0 + +/proc/istajara(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Tajara")) + return 1 + return 0 + +/proc/isskrell(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Skrell")) + return 1 + return 0 + +/proc/isvaurca(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Vaurca")) + return 1 + return 0 + +/proc/isipc(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Machine")) + return 1 + return 0 + +/proc/isvox(A) + if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Vox")) + return 1 + return 0 + + + /mob/proc/is_diona() //returns which type of diona we are, or zero if (istype(src, /mob/living/carbon/human)) @@ -952,8 +990,7 @@ var/list/wierd_mobs_inclusive = list( /mob/living/simple_animal/construct, else if (mob_listed(src, synthetic_mobs_inclusive,0)) mobtypes |= TYPE_SYNTHETIC else - var/datum/species/S = src.get_species(1) - if (S && (S.flags & IS_SYNTHETIC)) + if (isSynthetic()) mobtypes |= TYPE_SYNTHETIC if (mob_listed(src, wierd_mobs_specific,1)) @@ -1068,15 +1105,6 @@ var/list/wierd_mobs_inclusive = list( /mob/living/simple_animal/construct, else return "its"//Something went wrong - -/mob/proc/isHoldingShield() - var/obj/item/test = l_hand - if (istype(test, /obj/item) && test.IsShield()) - return 1 - test = r_hand - if (istype(test, /obj/item) && test.IsShield()) - return 1 - return 0 #undef SAFE_PERP /mob/proc/get_multitool(var/obj/item/device/multitool/P) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 69c891b4fef..b7a1e6927a3 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -266,11 +266,7 @@ src << "\blue You're pinned to a wall by [mob.pinned[1]]!" return 0 - - - move_delay = world.time//set move delay - mob.last_move_intent = world.time + 10 - + move_delay = world.time //set move delay if (mob.buckled || mob.pulledby) if(istype(mob.buckled, /obj/vehicle)) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index ee1d62529af..7e88e115a3a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -161,6 +161,27 @@ qdel(src) return O +//human -> alien +/mob/living/carbon/human/proc/Alienize() + for(var/obj/item/W in src) + drop_from_inventory(W) + regenerate_icons() + canmove = 0 + icon = null + invisibility = 101 + for(var/t in organs) + qdel(t) + + var/alien_caste = pick("Hunter","Sentinel","Drone") + var/mob/living/carbon/human/new_xeno = create_new_xenomorph(alien_caste,loc) + + new_xeno.a_intent = I_HURT + new_xeno.key = key + + new_xeno << "You are now an alien." + qdel(src) + return + /mob/living/carbon/human/proc/slimeize(adult as num, reproduce as num) if (transforming) return @@ -317,6 +338,3 @@ //Not in here? Must be untested! return 0 - - - diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 6d0158e574c..276b9346314 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -183,7 +183,7 @@ process_point_blank(projectile, user, target) if(process_projectile(projectile, user, target, user.zone_sel.selecting, clickparams)) - handle_post_fire(user, target, pointblank, reflex, i == _burst) + handle_post_fire(user, target, pointblank, reflex) update_icon() if(i < burst) diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index c30119c0e18..7339a1d549c 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -32,6 +32,7 @@ force = 8 //looks heavier than a pistol self_recharge = 1 modifystate = null + var/reliability = 95 firemodes = list( list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), @@ -98,11 +99,11 @@ switch(current_mode.name) if("stun") overlays += "nucgun-stun" if("lethal") overlays += "nucgun-kill" - +/* /obj/item/weapon/gun/energy/gun/nuclear/emp_act(severity) ..() reliability -= round(15/severity) - +*/ /obj/item/weapon/gun/energy/gun/nuclear/update_icon() overlays.Cut() update_charge() diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index d20b395b75a..8da9a9724fe 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1468,7 +1468,6 @@ datum/design/item/weapon/lasshotgun id = "laser_shotgun" req_tech = list("combat" = 3, "materials" = 5, "powerstorage" = 4) materials = list("$metal" = 5000, "$glass" = 1500, "$uranium" = 500, "$diamond" = 500) - reliability_base = 76 build_path = /obj/item/weapon/gun/energy/laser/shotgun datum/design/item/weapon/stunrevolver @@ -1559,7 +1558,6 @@ datum/design/item/weapon/large_grenade id = "large_Grenade" req_tech = list("combat" = 3, "materials" = 2) materials = list("$metal" = 3000) - reliability_base = 79 build_path = /obj/item/weapon/grenade/chem_grenade/large /datum/design/aimodule diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 562ddcd345a..7dfaf81ed72 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -30,11 +30,6 @@ Note: Must be placed within 3 tiles of the R&D Console for(var/obj/item/weapon/stock_parts/S in component_parts) T += S.rating decon_mod = T * 0.1 - min_reliability = 90 - T - -/obj/machinery/r_n_d/destructive_analyzer/meteorhit() - qdel(src) - return /obj/machinery/r_n_d/destructive_analyzer/update_icon() if(panel_open) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 0b3e5c68e35..da9d85aa0e7 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -135,7 +135,8 @@ ..() if (prob(20)) - PoolOrNew(/obj/effect/effect/sparks, loc) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, src) healthcheck()