diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index 26b1d2d44a..017c92c922 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -80,6 +80,8 @@ #define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" ///from base of atom/Entered(): (atom/movable/entering, /atom) #define COMSIG_ATOM_ENTERED "atom_entered" +/// Sent from the atom that just Entered src. From base of atom/Entered(): (/atom/entered_atom, /atom/oldLoc) +#define COMSIG_ATOM_ENTERING "atom_entering" ///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) #define COMSIG_ATOM_EXIT "atom_exit" #define COMPONENT_ATOM_BLOCK_EXIT (1<<0) diff --git a/code/__defines/misc_vr.dm b/code/__defines/misc_vr.dm index 75e48a3bb9..eb1272c2c7 100644 --- a/code/__defines/misc_vr.dm +++ b/code/__defines/misc_vr.dm @@ -67,6 +67,11 @@ #define MAT_PLASTITANIUMGLASS "plastitanium glass" #define MAT_GOLDHULL "gold hull" +#define RESIZE_MINIMUM 0.25 +#define RESIZE_MAXIMUM 2 +#define RESIZE_MINIMUM_DORMS 0.01 +#define RESIZE_MAXIMUM_DORMS 6 + #define RESIZE_HUGE 2 #define RESIZE_BIG 1.5 #define RESIZE_NORMAL 1 diff --git a/code/__defines/sound.dm b/code/__defines/sound.dm index 0602ffc8dc..a0d5fe5be4 100644 --- a/code/__defines/sound.dm +++ b/code/__defines/sound.dm @@ -233,4 +233,3 @@ 'sound/ambience/engineering/engineering3.ogg',\ 'sound/ambience/atmospherics/atmospherics1.ogg'\ ) - diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 801d11a4d7..326ae19397 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -58,7 +58,8 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_SKYBOX 30 #define INIT_ORDER_MAPPING 25 #define INIT_ORDER_DECALS 20 -#define INIT_ORDER_PLANTS 18 // Must initialize before atoms. +#define INIT_ORDER_PLANTS 19 // Must initialize before atoms. +#define INIT_ORDER_PLANETS 18 #define INIT_ORDER_JOB 17 #define INIT_ORDER_ALARM 16 // Must initialize before atoms. #define INIT_ORDER_ATOMS 15 @@ -69,7 +70,6 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_LIGHTING 0 #define INIT_ORDER_AIR -1 #define INIT_ORDER_ASSETS -3 -#define INIT_ORDER_PLANETS -4 #define INIT_ORDER_HOLOMAPS -5 #define INIT_ORDER_NIGHTSHIFT -6 #define INIT_ORDER_OVERLAY -7 diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm index 5d1325bba5..4cf7222186 100644 --- a/code/controllers/subsystems/planets.dm +++ b/code/controllers/subsystems/planets.dm @@ -6,9 +6,6 @@ SUBSYSTEM_DEF(planets) flags = SS_BACKGROUND runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME - var/static/list/new_outdoor_turfs = list() - var/static/list/new_outdoor_walls = list() - var/static/list/planets = list() var/static/list/z_to_planet = list() @@ -20,7 +17,6 @@ SUBSYSTEM_DEF(planets) /datum/controller/subsystem/planets/Initialize(timeofday) admin_notice("Initializing planetary weather.", R_DEBUG) createPlanets() - allocateTurfs(TRUE) ..() /datum/controller/subsystem/planets/proc/createPlanets() @@ -36,64 +32,36 @@ SUBSYSTEM_DEF(planets) continue z_to_planet[Z] = NP -/datum/controller/subsystem/planets/proc/addTurf(var/turf/T,var/is_edge) - if(is_edge) - new_outdoor_walls |= T - else - new_outdoor_turfs |= T +// DO NOT CALL THIS DIRECTLY UNLESS IT'S IN INITIALIZE, +// USE turf/simulated/proc/make_indoors() and\ +// tyrf/simulated/proc/make_outdoors() +/datum/controller/subsystem/planets/proc/addTurf(var/turf/T) + if(z_to_planet.len >= T.z && z_to_planet[T.z]) + var/datum/planet/P = z_to_planet[T.z] + if(!istype(P)) + return + if(istype(T, /turf/unsimulated/wall/planetary)) + P.planet_walls += T + else if(istype(T, /turf/simulated) && T.outdoors) + P.planet_floors += T + T.vis_contents |= P.weather_holder.visuals + T.vis_contents |= P.weather_holder.special_visuals + /datum/controller/subsystem/planets/proc/removeTurf(var/turf/T,var/is_edge) - if(is_edge) - new_outdoor_walls -= T - else - new_outdoor_turfs -= T - if(z_to_planet.len >= T.z) var/datum/planet/P = z_to_planet[T.z] if(!P) return - if(is_edge) - P.planet_floors -= T - else + if(istype(T, /turf/unsimulated/wall/planetary)) P.planet_walls -= T - T.vis_contents -= P.weather_holder.visuals - T.vis_contents -= P.weather_holder.special_visuals - -/datum/controller/subsystem/planets/proc/allocateTurfs(var/initial = FALSE) - var/list/currentlist = new_outdoor_turfs - while(currentlist.len) - var/turf/simulated/OT = currentlist[currentlist.len] - currentlist.len-- - if(istype(OT) && OT.outdoors && z_to_planet.len >= OT.z && z_to_planet[OT.z]) - var/datum/planet/P = z_to_planet[OT.z] - P.planet_floors |= OT - OT.vis_contents |= P.weather_holder.visuals - OT.vis_contents |= P.weather_holder.special_visuals - if(!initial && MC_TICK_CHECK) - return - - currentlist = new_outdoor_walls - while(currentlist.len) - var/turf/unsimulated/wall/planetary/PW = currentlist[currentlist.len] - currentlist.len-- - if(istype(PW) && z_to_planet.len >= PW.z && z_to_planet[PW.z]) - var/datum/planet/P = z_to_planet[PW.z] - P.planet_walls |= PW - if(!initial && MC_TICK_CHECK) - return - -/datum/controller/subsystem/planets/proc/unallocateTurf(var/turf/simulated/T) - if(istype(T) && z_to_planet[T.z]) - var/datum/planet/P = z_to_planet[T.z] - P.planet_floors -= T - T.vis_contents -= P.weather_holder.visuals - T.vis_contents -= P.weather_holder.special_visuals + else + P.planet_floors -= T + T.vis_contents -= P.weather_holder.visuals + T.vis_contents -= P.weather_holder.special_visuals /datum/controller/subsystem/planets/fire(resumed = 0) - if(new_outdoor_turfs.len || new_outdoor_walls.len) - allocateTurfs() - if(!resumed) src.currentrun = planets.Copy() @@ -153,8 +121,7 @@ SUBSYSTEM_DEF(planets) var/lum_g = new_brightness * GetGreenPart(new_color) / 255 var/lum_b = new_brightness * GetBluePart (new_color) / 255 var/static/update_gen = -1 // Used to prevent double-processing corners. Otherwise would happen when looping over adjacent turfs. - for(var/I in P.planet_floors) - var/turf/simulated/T = I + for(var/turf/simulated/T as anything in P.planet_floors) if(!T.lighting_corners_initialised) T.generate_missing_corners() for(var/C in T.get_corners()) diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm index 03d1ca0fdd..bf36f2bfab 100644 --- a/code/datums/autolathe/autolathe.dm +++ b/code/datums/autolathe/autolathe.dm @@ -5,7 +5,7 @@ I = new path() if(!I) // Something has gone horribly wrong, or right. - log_debug("[name] created an Autolathe design without an assigned path. This is expected for only the Material Sheet generation.") + log_debug("[name] created an Autolathe design without an assigned path.") return if(I.matter && !resources) @@ -80,22 +80,12 @@ if(istype(M, /datum/material/alienalloy)) continue - var/obj/item/stack/material/Mat = new M.stack_type() - - if(Mat.name in items_by_name) - qdel(Mat) + var/obj/item/stack/material/S = M.stack_type + if(initial(S.name) in items_by_name) continue - var/datum/category_item/autolathe/materials/WorkDat = new(src) + var/datum/category_item/autolathe/materials/WorkDat = new(src, M) - WorkDat.name = "[Mat.name]" - WorkDat.resources = Mat.matter.Copy() - WorkDat.is_stack = TRUE - WorkDat.no_scale = TRUE - WorkDat.max_stack = Mat.max_amount - WorkDat.path = M.stack_type - - qdel(Mat) items |= WorkDat items_by_name[WorkDat.name] = WorkDat diff --git a/code/datums/autolathe/materials.dm b/code/datums/autolathe/materials.dm index 653fca8222..6deeb09be2 100644 --- a/code/datums/autolathe/materials.dm +++ b/code/datums/autolathe/materials.dm @@ -1,38 +1,23 @@ - -/datum/category_item/autolathe/materials/metal - name = "steel sheets" - path =/obj/item/stack/material/steel +/datum/category_item/autolathe/materials is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits + no_scale = TRUE //Prevents material duplication exploits -/datum/category_item/autolathe/materials/glass - name = "glass sheets" - path =/obj/item/stack/material/glass - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits +/datum/category_item/autolathe/materials/New(var/loc, var/mat) + if(istype(mat, /obj/item/stack/material)) + var/obj/item/stack/material/M = mat + name = M.name + resources = M.matter.Copy() + max_stack = M.max_amount + path = M.type + else if(istype(mat, /datum/material)) + var/datum/material/M = mat + var/obj/item/stack/material/S = M.stack_type + name = initial(S.name) + resources = M.get_matter() + max_stack = initial(S.max_amount) + path = S + . = ..() -/datum/category_item/autolathe/materials/rglass - name = "reinforced glass sheets" - path =/obj/item/stack/material/glass/reinforced - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/materials/rods +/datum/category_item/autolathe/materials/rods //Not strictly a material, so they need their own define name = "metal rods" path =/obj/item/stack/rods - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/materials/plasteel - name = "plasteel sheets" - path =/obj/item/stack/material/plasteel - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - resources = list(MAT_PLASTEEL = 2000) - -/datum/category_item/autolathe/materials/plastic - name = "plastic sheets" - path =/obj/item/stack/material/plastic - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - resources = list(MAT_PLASTIC = 2000) diff --git a/code/datums/components/resize_guard.dm b/code/datums/components/resize_guard.dm new file mode 100644 index 0000000000..724d252443 --- /dev/null +++ b/code/datums/components/resize_guard.dm @@ -0,0 +1,19 @@ +/datum/component/resize_guard + +/datum/component/resize_guard/Initialize() + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + +/datum/component/resize_guard/RegisterWithParent() + // When our parent mob enters any atom, we check resize + RegisterSignal(parent, COMSIG_ATOM_ENTERING, .proc/check_resize) + +/datum/component/resize_guard/UnregisterFromParent() + UnregisterSignal(parent, COMSIG_ATOM_ENTERING) + +/datum/component/resize_guard/proc/check_resize() + var/area/A = get_area(parent) + if(A?.limit_mob_size) + var/mob/living/L = parent + L.resize(L.size_multiplier) + qdel(src) \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c20c29be7b..e4ad20f5d4 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -638,6 +638,7 @@ . = ..() GLOB.moved_event.raise_event(AM, old_loc, AM.loc) SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, old_loc) + SEND_SIGNAL(AM, COMSIG_ATOM_ENTERING, src, old_loc) /atom/Exit(atom/movable/AM, atom/new_loc) . = ..() diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 9fc924dae8..e94befcd8b 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -222,7 +222,7 @@ // Playerscale var/size = dna.GetUIValueRange(DNA_UI_PLAYERSCALE, player_sizes_list.len) if((0 < size) && (size <= player_sizes_list.len)) - H.resize(player_sizes_list[player_sizes_list[size]], TRUE) + H.resize(player_sizes_list[player_sizes_list[size]], TRUE, ignore_prefs = TRUE) // Tail/Taur Color H.r_tail = dna.GetUIValueRange(DNA_UI_TAIL_R, 255) @@ -243,7 +243,7 @@ H.custom_exclaim = dna.custom_exclaim H.species.blood_color = dna.blood_color var/datum/species/S = H.species - S.produceCopy(dna.base_species,dna.species_traits,src) + S.produceCopy(dna.species_traits,src) // VOREStation Edit End H.force_update_organs() //VOREStation Add - Gotta do this too diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 49780638d8..4955aa2559 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -126,9 +126,9 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t if(8) //Aug switch(DD) -/* if(10) - Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, - on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common." */ +// if(10) +// Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, +// on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common." //VOREStation Add - Of course we need this. if(8) Holiday["Vore Day"] = "A holiday representing the innate desire in all/most/some/a few of us to devour each other or be devoured. \ @@ -167,10 +167,10 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t Holiday["Kindness Day"] = "Kindness Day is an unofficial holiday to highlight good deeds in the \ community, focusing on the positive power and the common thread of kindness which binds humanity and \ friends together." -/* if(28) //Space thanksgiving. + if(28) //Space thanksgiving. Holiday["Appreciation Day"] = "Originally an old holiday from Earth, Appreciation Day follows many of the \ traditions that its predecessor did, such as having a large feast (turkey often included), gathering with family, and being thankful \ - for what one has in life." */ + for what one has in life." if(28 > DD > 20) if(time2text(world.timeofday, "Day") == "Thursday") Holiday["Thanksgiving"] = "Originally an old holiday from Earth, Thanksgiving follows many of the \ diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 7d00e82ecc..fe0488d1b9 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -30,8 +30,8 @@ "wizard's cloak" = "wizard_cloak" ) - /* Some spell-specific variables go here, since spells themselves are temporary. Cores are more long term and more accessable than - mind datums. It may also allow creative players to try to pull off a 'soul jar' scenario. */ + // Some spell-specific variables go here, since spells themselves are temporary. Cores are more long term and more accessable than + // mind datums. It may also allow creative players to try to pull off a 'soul jar' scenario. var/list/summoned_mobs = list() // Maintained horribly with maintain_summon_list(). var/list/wards_in_use = list() // Wards don't count against the cap for other summons. var/max_summons = 10 // Maximum allowed summoned entities. Some cores will have different caps. @@ -365,4 +365,4 @@ instability_modifier = 0.3 spell_power_modifier = 0.7 universal = TRUE -//VOREStation Add End \ No newline at end of file +//VOREStation Add End diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index 5f438f698f..8ca1659d1b 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -31,10 +31,14 @@ var/list/turf_edge_cache = list() return ..() /turf/simulated/proc/make_outdoors() + if(outdoors) + return outdoors = TRUE SSplanets.addTurf(src) /turf/simulated/proc/make_indoors() + if(!outdoors) + return outdoors = FALSE SSplanets.removeTurf(src) diff --git a/code/modules/admin/verbs/resize.dm b/code/modules/admin/verbs/resize.dm index dddaeb9ec1..661eea5fca 100644 --- a/code/modules/admin/verbs/resize.dm +++ b/code/modules/admin/verbs/resize.dm @@ -4,13 +4,21 @@ set category = "Fun" if(!check_rights(R_ADMIN, R_FUN)) return - - var/size_multiplier = input(usr, "Input size multiplier.", "Resize", 1) - L.resize(size_multiplier, TRUE, TRUE) - if(size_multiplier >= RESIZE_TINY && size_multiplier <= RESIZE_HUGE) - L.size_uncapped = FALSE - else - L.size_uncapped = TRUE + + var/size_multiplier = input(usr, "Input size multiplier.", "Resize", 1) as num|null + if(!size_multiplier) + return //cancelled + + size_multiplier = clamp(size_multiplier, 0.01, 1000) + var/can_be_big = L.has_large_resize_bounds() + var/very_big = is_extreme_size(size_multiplier) + + if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse + to_chat(src,"[L] will lose this size upon moving into an area where this size is not allowed.") + else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse + to_chat(src,"[L] will retain this normally unallowed size outside this area.") + + L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE) log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].") feedback_add_details("admin_verb","RESIZE") \ No newline at end of file diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index a1149821d2..5af5db28b2 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -45,7 +45,7 @@ character.weight_gain = pref.weight_gain character.weight_loss = pref.weight_loss character.fuzzy = pref.fuzzy - character.resize(pref.size_multiplier, animate = FALSE) + character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE) /datum/category_item/player_setup_item/vore/size/content(var/mob/user) . += "
" diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 17147acb27..fdac138e4f 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -114,12 +114,7 @@ pref.dirty_synth = 0 var/datum/species/S = character.species - var/SB - if(S.selects_bodytype) - SB = pref.custom_base ? pref.custom_base : "Human" - else - SB = S.name - var/datum/species/new_S = S.produceCopy(SB, pref.pos_traits + pref.neu_traits + pref.neg_traits, character) + var/datum/species/new_S = S.produceCopy(pref.pos_traits + pref.neu_traits + pref.neg_traits, character, pref.custom_base) //Any additional non-trait settings can be applied here new_S.blood_color = pref.blood_color diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm index 075b3daece..4c581d728b 100644 --- a/code/modules/clothing/under/miscellaneous_vr.dm +++ b/code/modules/clothing/under/miscellaneous_vr.dm @@ -79,6 +79,8 @@ return var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null + if(!new_size) + return //cancelled //Check AGAIN because we accepted user input which is blocking. if (src != H.w_uniform) @@ -88,9 +90,9 @@ if (H.stat || H.restrained()) return - if (isnull(H.size_multiplier)) + if (isnull(H.size_multiplier)) // Why would this ever be the case? to_chat(H,"The uniform panics and corrects your apparently microscopic size.") - H.resize(RESIZE_NORMAL) + H.resize(RESIZE_NORMAL, ignore_prefs = TRUE) H.update_icons() //Just want the matrix transform return @@ -102,7 +104,7 @@ if(new_size != H.size_multiplier) if(!original_size) original_size = H.size_multiplier - H.resize(new_size/100) + H.resize(new_size/100, ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself H.visible_message("The space around [H] distorts as they change size!","The space around you distorts as you change size!") else //They chose their current size. return @@ -111,7 +113,7 @@ . = ..() if(. && ishuman(M) && original_size) var/mob/living/carbon/human/H = M - H.resize(original_size) + H.resize(original_size, ignore_prefs = TRUE) original_size = null H.visible_message("The space around [H] distorts as they return to their original size!","The space around you distorts as you return to your original size!") diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 125dc69773..eff20ca2a3 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -89,8 +89,8 @@ vermstring = "lizards" if(VERM_SPIDERS) spawn_types = list(/obj/effect/spider/spiderling) - min_number = 6 //CHOMP Add - max_number = 12 //CHOMP edit + min_number = 4 //CHOMP Add + max_number = 8 //CHOMP edit vermstring = "spiders" spawn(0) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 8a99178923..1168d2e643 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -7,7 +7,7 @@ /datum/event/spider_infestation/setup() announceWhen = rand(announceWhen, announceWhen + 60) - spawncount = rand(12 * severity, 18 * severity) //spiderlings only have a 50% chance to grow big and strong //CHOMP Edit: Tripled amount spawned + spawncount = rand(6 * severity, 12 * severity) //spiderlings only have a 50% chance to grow big and strong //CHOMP Edit: Tripled amount spawned sent_spiders_to_station = 0 /datum/event/spider_infestation/announce() diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index 6b866d23ba..a92e17c6da 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -27,7 +27,7 @@ var/datum/looping_sound/microwave/soundloop -// see code/modules/food/recipes_microwave.dm for recipes +//see code/modules/food/recipes_microwave.dm for recipes /******************* * Initialising @@ -283,68 +283,69 @@ if("dispose") dispose() return TRUE - -// /obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu -// var/dat = "" -// if(src.broken > 0) -// dat = {"Bzzzzttttt"} -// else if(src.operating) -// dat = {"Microwaving in progress!
Please wait...!
"} -// else if(src.dirty==100) -// dat = {"This microwave is dirty!
Please clean it before use!
"} -// else -// var/list/items_counts = new -// var/list/items_measures = new -// var/list/items_measures_p = new -// for (var/obj/O in ((contents - component_parts) - circuit)) -// var/display_name = O.name -// if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) -// items_measures[display_name] = "egg" -// items_measures_p[display_name] = "eggs" -// if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) -// items_measures[display_name] = "tofu chunk" -// items_measures_p[display_name] = "tofu chunks" -// if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat -// items_measures[display_name] = "slab of meat" -// items_measures_p[display_name] = "slabs of meat" -// if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) -// display_name = "Turnovers" -// items_measures[display_name] = "turnover" -// items_measures_p[display_name] = "turnovers" -// if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) -// items_measures[display_name] = "fillet of meat" -// items_measures_p[display_name] = "fillets of meat" -// items_counts[display_name]++ -// for (var/O in items_counts) -// var/N = items_counts[O] -// if (!(O in items_measures)) -// dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} -// else -// if (N==1) -// dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} -// else -// dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} +/* +/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu + var/dat = "" + if(src.broken > 0) + dat = {"Bzzzzttttt"} + else if(src.operating) + dat = {"Microwaving in progress!
Please wait...!
"} + else if(src.dirty==100) + dat = {"This microwave is dirty!
Please clean it before use!
"} + else + var/list/items_counts = new + var/list/items_measures = new + var/list/items_measures_p = new + for (var/obj/O in ((contents - component_parts) - circuit)) + var/display_name = O.name + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) + items_measures[display_name] = "egg" + items_measures_p[display_name] = "eggs" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) + items_measures[display_name] = "tofu chunk" + items_measures_p[display_name] = "tofu chunks" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat + items_measures[display_name] = "slab of meat" + items_measures_p[display_name] = "slabs of meat" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) + display_name = "Turnovers" + items_measures[display_name] = "turnover" + items_measures_p[display_name] = "turnovers" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) + items_measures[display_name] = "fillet of meat" + items_measures_p[display_name] = "fillets of meat" + items_counts[display_name]++ + for (var/O in items_counts) + var/N = items_counts[O] + if (!(O in items_measures)) + dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} + else + if (N==1) + dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} + else + dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} -// for (var/datum/reagent/R in reagents.reagent_list) -// var/display_name = R.name -// if (R.id == "capsaicin") -// display_name = "Hotsauce" -// if (R.id == "frostoil") -// display_name = "Coldsauce" -// dat += {"[display_name]: [R.volume] unit\s
"} + for (var/datum/reagent/R in reagents.reagent_list) + var/display_name = R.name + if (R.id == "capsaicin") + display_name = "Hotsauce" + if (R.id == "frostoil") + display_name = "Coldsauce" + dat += {"[display_name]: [R.volume] unit\s
"} -// if (items_counts.len==0 && reagents.reagent_list.len==0) -// dat = {"The microwave is empty
"} -// else -// dat = {"Ingredients:
[dat]"} -// dat += {"

\ -// Turn on!
\ -//
Eject ingredients!
\ -// "} + if (items_counts.len==0 && reagents.reagent_list.len==0) + dat = {"The microwave is empty
"} + else + dat = {"Ingredients:
[dat]"} + dat += {"

\ +
Turn on!
\ +
Eject ingredients!
\ +"} -// user << browse("Microwave Controls[dat]", "window=microwave") -// onclose(user, "microwave") -// return + user << browse("Microwave Controls[dat]", "window=microwave") + onclose(user, "microwave") + return +*/ /*********************************** * Microwave Menu Handling/Cooking diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 005b461679..acd3c5a809 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -53,9 +53,10 @@ var/list/name_to_material /proc/populate_material_list(force_remake=0) if(name_to_material && !force_remake) return // Already set up! name_to_material = list() - for(var/type in typesof(/datum/material) - /datum/material) + for(var/type in subtypesof(/datum/material)) var/datum/material/new_mineral = new type if(!new_mineral.name) + qdel(new_mineral) continue name_to_material[lowertext(new_mineral.name)] = new_mineral return 1 diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index 5eeda3a8e4..e8df964590 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -207,15 +207,6 @@ return FALSE -/mob/living/carbon/human/verb/toggle_resizing_immunity() - set name = "Toggle Resizing Immunity" - set desc = "Toggles your ability to resist resizing attempts" - set category = "IC" - - resizable = !resizable - to_chat(src, "You are now [resizable ? "susceptible" : "immune"] to being resized.") - - /mob/living/carbon/human/proc/handle_flip_vr() var/original_density = density var/original_passflags = pass_flags diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index c04abed29f..e4f2b63aeb 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -190,7 +190,7 @@ if(istype(back, /obj/item/weapon/tank/jetpack)) return back else if(istype(rig)) - for(var/obj/item/rig_module/maneuvering_jets.module in rig.installed_modules) + for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules) return module.jets /mob/living/carbon/human/Process_Spacemove(var/check_drift = 0) diff --git a/code/modules/mob/living/carbon/human/species/species_vr.dm b/code/modules/mob/living/carbon/human/species/species_vr.dm index 9777f197b0..06c9d2bdf3 100644 --- a/code/modules/mob/living/carbon/human/species/species_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_vr.dm @@ -42,32 +42,49 @@ nif.nifsofts = nifsofts else ..() -/datum/species/proc/produceCopy(var/datum/species/to_copy,var/list/traits,var/mob/living/carbon/human/H) - ASSERT(to_copy) +/datum/species/proc/produceCopy(var/list/traits,var/mob/living/carbon/human/H, var/custom_base) + var/datum/species/S + //If species allows custom base, and custom base is set, apply it, otherwise use default. + if(selects_bodytype && custom_base) + S = GLOB.all_species[custom_base] + else + S = GLOB.all_species[src.name] + ASSERT(S) ASSERT(istype(H)) + var/datum/species/new_copy = new S.type() - if(ispath(to_copy)) - to_copy = "[initial(to_copy.name)]" - if(istext(to_copy)) - to_copy = GLOB.all_species[to_copy] + for(var/i in S.vars) //Thorough copy of species. + if(new_copy.vars[i] != S.vars[i]) + //Skipping lists because they may contain more lists, copy those manually. + //Also ignoring type var since it's read-only and will runtime. + if(islist(vars[i])) + continue + new_copy.vars[i] = S.vars[i] - var/datum/species/new_copy = new to_copy.type() - - for(var/organ in to_copy.has_limbs) - var/list/organ_data = to_copy.has_limbs[organ] + for(var/organ in S.has_limbs) //Copy important organ data generated by species. + var/list/organ_data = S.has_limbs[organ] new_copy.has_limbs[organ] = organ_data.Copy() + new_copy.traits = traits //If you had traits, apply them if(new_copy.traits) for(var/trait in new_copy.traits) var/datum/trait/T = all_traits[trait] - T.apply(new_copy,H) + T.apply(new_copy, H) //Set up a mob H.species = new_copy + H.icon_state = new_copy.get_bodytype() + + if(new_copy.holder_type) + H.holder_type = new_copy.holder_type if(H.dna) H.dna.ready_dna(H) - return new_copy \ No newline at end of file + return new_copy + + +/datum/species/get_bodytype() + return base_species \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 434fd8add6..99f3ad22e3 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -447,55 +447,6 @@ //End of fruit gland code. -/datum/species/alraune/produceCopy(var/datum/species/to_copy,var/list/traits,var/mob/living/carbon/human/H) - ASSERT(to_copy) - ASSERT(istype(H)) - - if(ispath(to_copy)) - to_copy = "[initial(to_copy.name)]" - if(istext(to_copy)) - to_copy = GLOB.all_species[to_copy] - - var/datum/species/alraune/new_copy = new() - - //Initials so it works with a simple path passed, or an instance - new_copy.base_species = to_copy.name - new_copy.icobase = to_copy.icobase - new_copy.deform = to_copy.deform - new_copy.tail = to_copy.tail - new_copy.tail_animation = to_copy.tail_animation - new_copy.icobase_tail = to_copy.icobase_tail - new_copy.color_mult = to_copy.color_mult - new_copy.primitive_form = to_copy.primitive_form - new_copy.appearance_flags = to_copy.appearance_flags - new_copy.flesh_color = to_copy.flesh_color - new_copy.base_color = to_copy.base_color - new_copy.blood_mask = to_copy.blood_mask - new_copy.damage_mask = to_copy.damage_mask - new_copy.damage_overlays = to_copy.damage_overlays - new_copy.traits = traits - - //If you had traits, apply them - if(new_copy.traits) - for(var/trait in new_copy.traits) - var/datum/trait/T = all_traits[trait] - T.apply(new_copy,H) - - //Set up a mob - H.species = new_copy - H.icon_state = lowertext(new_copy.get_bodytype()) - - if(new_copy.holder_type) - H.holder_type = new_copy.holder_type - - if(H.dna) - H.dna.ready_dna(H) - - return new_copy - -/datum/species/alraune/get_bodytype() - return base_species - /datum/species/alraune/get_race_key() var/datum/species/real = GLOB.all_species[base_species] return real.race_key diff --git a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm index 9a418e271b..53c5bd9b5e 100644 --- a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm @@ -45,61 +45,14 @@ BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right, "descriptor" = "right foot") ) -/datum/species/custom/get_bodytype() - return base_species - /datum/species/custom/get_race_key() var/datum/species/real = GLOB.all_species[base_species] return real.race_key -/datum/species/custom/produceCopy(var/datum/species/to_copy,var/list/traits,var/mob/living/carbon/human/H) - ASSERT(to_copy) - ASSERT(istype(H)) - - if(ispath(to_copy)) - to_copy = "[initial(to_copy.name)]" - if(istext(to_copy)) - to_copy = GLOB.all_species[to_copy] - - var/datum/species/custom/new_copy = new() - - //Initials so it works with a simple path passed, or an instance - new_copy.base_species = to_copy.name - new_copy.icobase = to_copy.icobase - new_copy.deform = to_copy.deform - new_copy.tail = to_copy.tail - new_copy.tail_animation = to_copy.tail_animation - new_copy.icobase_tail = to_copy.icobase_tail - new_copy.color_mult = to_copy.color_mult - new_copy.primitive_form = to_copy.primitive_form - new_copy.appearance_flags = to_copy.appearance_flags - new_copy.flesh_color = to_copy.flesh_color - new_copy.base_color = to_copy.base_color - new_copy.blood_mask = to_copy.blood_mask - new_copy.damage_mask = to_copy.damage_mask - new_copy.damage_overlays = to_copy.damage_overlays - new_copy.traits = traits - new_copy.move_trail = move_trail - new_copy.has_floating_eyes = has_floating_eyes - - //If you had traits, apply them - if(new_copy.traits) - for(var/trait in new_copy.traits) - var/datum/trait/T = all_traits[trait] - T.apply(new_copy,H) - - //Set up a mob - H.species = new_copy - H.maxHealth = new_copy.total_health - H.hunger_rate = new_copy.hunger_factor - - if(new_copy.holder_type) - H.holder_type = new_copy.holder_type - - if(H.dna) - H.dna.ready_dna(H) - - return new_copy +/datum/species/custom/produceCopy(var/list/traits,var/mob/living/carbon/human/H) + . = ..() + H.maxHealth = H.species.total_health + H.hunger_rate = H.species.hunger_factor // Stub species overrides for shoving trait abilities into diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index 07d6d070f4..b797fe7c16 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -502,7 +502,7 @@ var/global/list/disallowed_protean_accessories = list( var/atom/reform_spot = blob.drop_location() //Size update - resize(blob.size_multiplier, FALSE) + resize(blob.size_multiplier, FALSE, ignore_prefs = TRUE) //Move them back where the blob was forceMove(reform_spot) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index 4efff07b39..a27319b51b 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -396,14 +396,14 @@ //Sizing up if(cost > 0) if(refactory.use_stored_material(MAT_STEEL,cost)) - user.resize(size_factor) + user.resize(size_factor, ignore_prefs = TRUE) else to_chat(user,"That size change would cost [cost] steel, which you don't have.") //Sizing down (or not at all) else if(cost <= 0) cost = abs(cost) var/actually_added = refactory.add_stored_material(MAT_STEEL,cost) - user.resize(size_factor) + user.resize(size_factor, ignore_prefs = TRUE) if(actually_added != cost) to_chat(user,"Unfortunately, [cost-actually_added] steel was lost due to lack of storage space.") diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm index 31f6638e83..0bb05f1af9 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm @@ -294,56 +294,6 @@ // HUD update time update_xenochimera_hud(H, danger, feral_state) - -/datum/species/xenochimera/produceCopy(var/datum/species/to_copy,var/list/traits,var/mob/living/carbon/human/H) - ASSERT(to_copy) - ASSERT(istype(H)) - - if(ispath(to_copy)) - to_copy = "[initial(to_copy.name)]" - if(istext(to_copy)) - to_copy = GLOB.all_species[to_copy] - - var/datum/species/xenochimera/new_copy = new() - - //Initials so it works with a simple path passed, or an instance - new_copy.base_species = to_copy.name - new_copy.icobase = to_copy.icobase - new_copy.deform = to_copy.deform - new_copy.tail = to_copy.tail - new_copy.tail_animation = to_copy.tail_animation - new_copy.icobase_tail = to_copy.icobase_tail - new_copy.color_mult = to_copy.color_mult - new_copy.primitive_form = to_copy.primitive_form - new_copy.appearance_flags = to_copy.appearance_flags - new_copy.flesh_color = to_copy.flesh_color - new_copy.base_color = to_copy.base_color - new_copy.blood_mask = to_copy.blood_mask - new_copy.damage_mask = to_copy.damage_mask - new_copy.damage_overlays = to_copy.damage_overlays - new_copy.traits = traits - - //If you had traits, apply them - if(new_copy.traits) - for(var/trait in new_copy.traits) - var/datum/trait/T = all_traits[trait] - T.apply(new_copy,H) - - //Set up a mob - H.species = new_copy - H.icon_state = lowertext(new_copy.get_bodytype()) - - if(new_copy.holder_type) - H.holder_type = new_copy.holder_type - - if(H.dna) - H.dna.ready_dna(H) - - return new_copy - -/datum/species/xenochimera/get_bodytype() - return base_species - /datum/species/xenochimera/get_race_key() var/datum/species/real = GLOB.all_species[base_species] return real.race_key diff --git a/code/modules/mob/living/living_defines_vr.dm b/code/modules/mob/living/living_defines_vr.dm index 6964193c5c..8dc2c2fe19 100644 --- a/code/modules/mob/living/living_defines_vr.dm +++ b/code/modules/mob/living/living_defines_vr.dm @@ -5,9 +5,6 @@ var/ooc_notes = null appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER var/hunger_rate = DEFAULT_HUNGER_FACTOR - var/resizable = TRUE - var/size_uncapped = FALSE //Determines if a mob's size obedies the resize cap, used for adminbus resize. - //custom say verbs var/custom_say = null var/custom_ask = null @@ -17,4 +14,4 @@ //YW Add Start /mob var/wingdings = 0 -//Yw Add End +//Yw Add End \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm index 493cb9c08d..d5c94894e9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm @@ -88,9 +88,9 @@ hitsound_wall = 'sound/weapons/effects/searwall.ogg' -/* Close to mid-ranged shooter that arcs over other things, ideal if allies are in front of it. - Difference from siege hivebots is that siege hivebots have limited charges for their attacks, are very long range, and - the projectiles have an AoE component, where as backline hivebots do not. */ +// Close to mid-ranged shooter that arcs over other things, ideal if allies are in front of it. +// Difference from siege hivebots is that siege hivebots have limited charges for their attacks, are very long range, and +// the projectiles have an AoE component, where as backline hivebots do not. /mob/living/simple_mob/mechanical/hivebot/ranged_damage/backline name = "backline hivebot" desc = "A robot that can fire short-ranged projectiles over their allies." diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm index 7b2da46008..4a843eed80 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm @@ -121,7 +121,7 @@ else if(ismob(target)) var/mob/living/M = target - resize(M.size_multiplier) + resize(M.size_multiplier, ignore_prefs = TRUE) //Morphed is weaker melee_damage_lower = melee_damage_disguised @@ -165,7 +165,7 @@ maptext = null size_multiplier = our_size_multiplier - resize(size_multiplier) + resize(size_multiplier, ignore_prefs = TRUE) //Baseline stats melee_damage_lower = initial(melee_damage_lower) @@ -183,7 +183,7 @@ /mob/living/simple_mob/vore/hostile/morph/will_show_tooltip() return (!morphed) -/mob/living/simple_mob/vore/hostile/morph/resize(var/new_size, var/animate = TRUE) +/mob/living/simple_mob/vore/hostile/morph/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE, var/ignore_prefs = FALSE) if(morphed && !ismob(form)) return return ..() diff --git a/code/modules/mob/new_player/sprite_accessories_extra_vr.dm b/code/modules/mob/new_player/sprite_accessories_extra_vr.dm index f69ec4a574..52d1d1923b 100644 --- a/code/modules/mob/new_player/sprite_accessories_extra_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_extra_vr.dm @@ -728,3 +728,9 @@ icon_state = "unathilongfrills" color_blend_mode = ICON_MULTIPLY body_parts = list(BP_HEAD) + +/datum/sprite_accessory/marking/vr/thunderthighs + name = "Boosted Thighs" + icon_state = "thunderthighs" + color_blend_mode = ICON_MULTIPLY + body_parts = list(BP_L_LEG,BP_R_LEG) \ No newline at end of file diff --git a/code/modules/mob/new_player/sprite_accessories_taur_ch.dm b/code/modules/mob/new_player/sprite_accessories_taur_ch.dm index abee9a16d1..64da92af3f 100644 --- a/code/modules/mob/new_player/sprite_accessories_taur_ch.dm +++ b/code/modules/mob/new_player/sprite_accessories_taur_ch.dm @@ -65,3 +65,20 @@ icon_state = "sergwheat" extra_overlay = "sergwheat_markings" +/datum/sprite_accessory/tail/taur/wolf/fatsynthwolf + name = "Fat SynthWolf dual-color (Taur)" + icon_state = "fatsynthwolf_s" + extra_overlay = "fatsynthwolf_markings" + extra_overlay2 = "fatsynthwolf_glow" + +/datum/sprite_accessory/tail/taur/lizard/fatsynthlizard + name = "Fat SynthLizard dual-color (Taur)" + icon_state = "fatsynthlizard_s" + extra_overlay = "fatsynthlizard_markings" + extra_overlay2 = "fatsynthlizard_glow" + +/datum/sprite_accessory/tail/taur/feline/fatsynthfeline + name = "Fat SynthFeline dual-color (Taur)" + icon_state = "fatsynthfeline_s" + extra_overlay = "fatsynthfeline_markings" + extra_overlay2 = "fatsynthfeline_glow" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index bd7c1d0d49..fc0c3bebdd 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -192,7 +192,7 @@ var/datum/preferences/B = O.client.prefs for(var/language in B.alternate_languages) O.add_language(language) - O.resize(B.size_multiplier, animate = TRUE) //VOREStation Addition: add size prefs to borgs + O.resize(B.size_multiplier, animate = TRUE, ignore_prefs = TRUE) //VOREStation Addition: add size prefs to borgs O.fuzzy = B.fuzzy //VOREStation Addition: add size prefs to borgs callHook("borgify", list(O)) diff --git a/code/modules/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm index 2b173346ce..79592fa030 100644 --- a/code/modules/nifsoft/software/15_misc.dm +++ b/code/modules/nifsoft/software/15_misc.dm @@ -134,7 +134,7 @@ to_chat(nif.human,"The safety features of the NIF Program prevent you from choosing this size.") return else - if(nif.human.resize(new_size/100)) + if(nif.human.resize(new_size/100, uncapped=nif.human.has_large_resize_bounds(), ignore_prefs = TRUE)) to_chat(nif.human,"You set the size to [new_size]%") nif.human.visible_message("Swirling grey mist envelops [nif.human] as they change size!","Swirling streams of nanites wrap around you as you change size!") spawn(0) diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index e3f0b31810..b7c4f7f3b7 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -216,15 +216,17 @@ var/datum/planet/sif/planet_sif = null outdoor_sounds_type = /datum/looping_sound/weather/outside_snow indoor_sounds_type = /datum/looping_sound/weather/inside_snow +/* /datum/weather/sif/snow/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) T.chill() +*/ /datum/weather/sif/blizzard name = "blizzard" @@ -249,15 +251,17 @@ var/datum/planet/sif/planet_sif = null outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard +/* /datum/weather/sif/blizzard/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) T.chill() +*/ /datum/weather/sif/rain name = "rain" @@ -283,25 +287,21 @@ var/datum/planet/sif/planet_sif = null /datum/weather/sif/rain/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain patters softly onto your umbrella.") + continue L.water_act(1) if(show_message) @@ -340,24 +340,21 @@ var/datum/planet/sif/planet_sif = null /datum/weather/sif/storm/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. + // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain showers loudly onto your umbrella!") + continue L.water_act(2) @@ -401,20 +398,18 @@ var/datum/planet/sif/planet_sif = null /datum/weather/sif/hail/process_effects() ..() - for(var/humie in human_mob_list) - var/mob/living/carbon/human/H = humie + for(var/mob/living/carbon/H as anything in human_mob_list) if(H.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(H) if(!T.outdoors) continue // They're indoors, so no need to pelt them with ice. // If they have an open umbrella, it'll guard from hail - var/obj/item/weapon/melee/umbrella/U - if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella)) - U = H.get_active_hand() - else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = H.get_active_hand() + if(!istype(U) || !U.open) U = H.get_inactive_hand() - if(U && U.open) + + if(istype(U) && U.open) if(show_message) to_chat(H, "Hail patters onto your umbrella.") continue diff --git a/code/modules/planet/virgo3b_better_vr.dm b/code/modules/planet/virgo3b_better_vr.dm index 80fbdc2a89..219788e3de 100644 --- a/code/modules/planet/virgo3b_better_vr.dm +++ b/code/modules/planet/virgo3b_better_vr.dm @@ -156,15 +156,17 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null outdoor_sounds_type = /datum/looping_sound/weather/outside_snow indoor_sounds_type = /datum/looping_sound/weather/inside_snow +/* /datum/weather/virgo3b_better/snow/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) T.chill() +*/ /datum/weather/virgo3b_better/blizzard name = "blizzard" @@ -189,15 +191,17 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard +/* /datum/weather/virgo3b_better/blizzard/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) T.chill() +*/ /datum/weather/virgo3b_better/rain name = "rain" @@ -220,25 +224,21 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null /datum/weather/virgo3b_better/rain/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain patters softly onto your umbrella.") + continue L.water_act(1) if(show_message) @@ -275,25 +275,21 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null /datum/weather/virgo3b_better/storm/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain showers loudly onto your umbrella!") + continue L.water_act(2) @@ -335,20 +331,18 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null /datum/weather/virgo3b_better/hail/process_effects() ..() - for(var/humie in human_mob_list) - var/mob/living/carbon/human/H = humie + for(var/mob/living/carbon/H as anything in human_mob_list) if(H.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(H) if(!T.outdoors) continue // They're indoors, so no need to pelt them with ice. // If they have an open umbrella, it'll guard from hail - var/obj/item/weapon/melee/umbrella/U - if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella)) - U = H.get_active_hand() - else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = H.get_active_hand() + if(!istype(U) || !U.open) U = H.get_inactive_hand() - if(U && U.open) + + if(istype(U) && U.open) if(show_message) to_chat(H, "Hail patters onto your umbrella.") continue diff --git a/code/modules/planet/virgo3b_vr.dm b/code/modules/planet/virgo3b_vr.dm index 710f2698c0..f9cc58ca0c 100644 --- a/code/modules/planet/virgo3b_vr.dm +++ b/code/modules/planet/virgo3b_vr.dm @@ -203,15 +203,17 @@ var/datum/planet/virgo3b/planet_virgo3b = null outdoor_sounds_type = /datum/looping_sound/weather/outside_snow indoor_sounds_type = /datum/looping_sound/weather/inside_snow +/* /datum/weather/virgo3b/snow/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) T.chill() +*/ /datum/weather/virgo3b/blizzard name = "blizzard" @@ -236,15 +238,17 @@ var/datum/planet/virgo3b/planet_virgo3b = null outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard +/* /datum/weather/virgo3b/blizzard/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) T.chill() +*/ /datum/weather/virgo3b/rain name = "rain" @@ -270,25 +274,21 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/weather/virgo3b/rain/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain patters softly onto your umbrella.") + continue L.water_act(1) if(show_message) @@ -325,25 +325,21 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/weather/virgo3b/storm/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain patters softly onto your umbrella.") + continue L.water_act(2) @@ -385,20 +381,18 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/weather/virgo3b/hail/process_effects() ..() - for(var/humie in human_mob_list) - var/mob/living/carbon/human/H = humie + for(var/mob/living/carbon/H as anything in human_mob_list) if(H.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(H) if(!T.outdoors) continue // They're indoors, so no need to pelt them with ice. // If they have an open umbrella, it'll guard from hail - var/obj/item/weapon/melee/umbrella/U - if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella)) - U = H.get_active_hand() - else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = H.get_active_hand() + if(!istype(U) || !U.open) U = H.get_inactive_hand() - if(U && U.open) + + if(istype(U) && U.open) if(show_message) to_chat(H, "Hail patters onto your umbrella.") continue diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm index 13302b040a..3909b9e6cd 100644 --- a/code/modules/planet/virgo4_vr.dm +++ b/code/modules/planet/virgo4_vr.dm @@ -187,15 +187,17 @@ var/datum/planet/virgo4/planet_virgo4 = null outdoor_sounds_type = /datum/looping_sound/weather/outside_snow indoor_sounds_type = /datum/looping_sound/weather/inside_snow +/* /datum/weather/virgo4/snow/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) T.chill() +*/ /datum/weather/virgo4/blizzard name = "blizzard" @@ -217,15 +219,17 @@ var/datum/planet/virgo4/planet_virgo4 = null outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard +/* /datum/weather/virgo4/blizzard/process_effects() ..() - for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either + for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) for(var/dir_checked in cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) T.chill() +*/ /datum/weather/virgo4/rain name = "rain" @@ -248,25 +252,21 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/weather/virgo4/rain/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain patters softly onto your umbrella.") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain patters softly onto your umbrella.") + continue L.water_act(1) if(show_message) @@ -298,25 +298,21 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/weather/virgo4/storm/process_effects() ..() - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L as anything in living_mob_list) if(L.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(L) if(!T.outdoors) continue // They're indoors, so no need to rain on them. // If they have an open umbrella, it'll guard from rain - if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue - else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) - var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() - if(U.open) - if(show_message) - to_chat(L, "Rain showers loudly onto your umbrella!") - continue + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(!istype(U) || !U.open) + U = L.get_inactive_hand() + + if(istype(U) && U.open) + if(show_message) + to_chat(L, "Rain showers loudly onto your umbrella!") + continue L.water_act(2) @@ -355,20 +351,18 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/weather/virgo4/hail/process_effects() ..() - for(var/humie in human_mob_list) - var/mob/living/carbon/human/H = humie + for(var/mob/living/carbon/H as anything in human_mob_list) if(H.z in holder.our_planet.expected_z_levels) var/turf/T = get_turf(H) if(!T.outdoors) continue // They're indoors, so no need to pelt them with ice. // If they have an open umbrella, it'll guard from hail - var/obj/item/weapon/melee/umbrella/U - if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella)) - U = H.get_active_hand() - else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = H.get_active_hand() + if(!istype(U) || !U.open) U = H.get_inactive_hand() - if(U && U.open) + + if(istype(U) && U.open) if(show_message) to_chat(H, "Hail patters onto your umbrella.") continue diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm index 02334afe15..920316fd5f 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm @@ -13,8 +13,7 @@ mrate_static = TRUE /datum/reagent/macrocillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - if(M.size_range_check(M.size_multiplier)) - M.resize(M.size_multiplier+0.01, FALSE)//Incrrease 1% per tick. //CHOMP Edit: don't do fancy animates. Unnecessary on 1% changes. Laggy. + M.resize(M.size_multiplier+0.01, animate = FALSE, uncapped = M.has_large_resize_bounds()) //Incrrease 1% per tick. //CHOMP Edit: don't do fancy animates. Unnecessary on 1% changes. Laggy. return /datum/reagent/microcillin @@ -27,8 +26,7 @@ mrate_static = TRUE /datum/reagent/microcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - if(M.size_range_check(M.size_multiplier)) - M.resize(M.size_multiplier-0.01, FALSE) //Decrease 1% per tick. //CHOMP Edit: don't do fancy animates. Unnecessary on 1% changes. Laggy. + M.resize(M.size_multiplier-0.01, animate = FALSE, uncapped = M.has_large_resize_bounds()) //Decrease 1% per tick. //CHOMP Edit: don't do fancy animates. Unnecessary on 1% changes. Laggy. return diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 69d5f520f3..63f31f44e4 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -426,20 +426,3 @@ user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") affected.createwound(BRUISE, 20) - -////////////////////////////////////////////////////////////////// -// HEART SURGERY // -////////////////////////////////////////////////////////////////// -// To be finished after some tests. -/* /datum/surgery_step/ribcage/heart/cut - allowed_tools = list( - /obj/item/weapon/surgical/scalpel = 100, - /obj/item/weapon/material/knife = 75, - /obj/item/weapon/material/shard = 50, - ) - - min_duration = 30 - max_duration = 40 - - /datum/surgery_step/ribcage/heart/cut/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - return ..() && target.op_stage.ribcage == 2 */ \ No newline at end of file diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 1c8d15d829..f4ea03a86f 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -3,7 +3,8 @@ var/digestable = TRUE // Can the mob be digested inside a belly? var/devourable = TRUE // Can the mob be devoured at all? var/feeding = TRUE // Can the mob be vorishly force fed or fed to others? - var/absorbable = TRUE // Are you allowed to absorb this person? TFF addition 14/12/19 + var/absorbable = TRUE // Are you allowed to absorb this person? + var/resizable = TRUE // Can other people resize you? (Usually ignored for self-resizes) var/digest_leave_remains = FALSE // Will this mob leave bones/skull/etc after the melty demise? var/allowmobvore = TRUE // Will simplemobs attempt to eat the mob? var/showvoreprefs = TRUE // Determines if the mechanical vore preferences button will be displayed on the mob or not. @@ -228,7 +229,8 @@ P.digestable = src.digestable P.devourable = src.devourable P.feeding = src.feeding - P.absorbable = src.absorbable //TFF 14/12/19 - choose whether allowing absorbing + P.absorbable = src.absorbable + P.resizable = src.resizable P.digest_leave_remains = src.digest_leave_remains P.allowmobvore = src.allowmobvore P.vore_taste = src.vore_taste @@ -269,7 +271,8 @@ digestable = P.digestable devourable = P.devourable feeding = P.feeding - absorbable = P.absorbable //TFF 14/12/19 - choose whether allowing absorbing + absorbable = P.absorbable + resizable = P.resizable digest_leave_remains = P.digest_leave_remains allowmobvore = P.allowmobvore vore_taste = P.vore_taste diff --git a/code/modules/vore/eating/vore_vr.dm b/code/modules/vore/eating/vore_vr.dm index 5a69bc9dc9..ba5938f336 100644 --- a/code/modules/vore/eating/vore_vr.dm +++ b/code/modules/vore/eating/vore_vr.dm @@ -45,26 +45,28 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE //Actual preferences var/digestable = TRUE var/devourable = TRUE + var/absorbable = TRUE var/feeding = TRUE - var/absorbable = TRUE //TFF 14/12/19 - choose whether allowing absorbing - var/digest_leave_remains = FALSE - var/allowmobvore = TRUE - var/list/belly_prefs = list() - var/vore_taste = "nothing in particular" - var/vore_smell = "nothing in particular" - var/permit_healbelly = TRUE - var/show_vore_fx = TRUE var/can_be_drop_prey = FALSE var/can_be_drop_pred = FALSE + var/digest_leave_remains = FALSE + var/allowmobvore = TRUE + var/permit_healbelly = TRUE + + var/resizable = TRUE + var/show_vore_fx = TRUE var/step_mechanics_pref = FALSE var/pickup_pref = TRUE - //CHOMP stuff var/receive_reagents = FALSE var/give_reagents = FALSE var/latejoin_vore = FALSE + //CHOMP stuff end + var/list/belly_prefs = list() + var/vore_taste = "nothing in particular" + var/vore_smell = "nothing in particular" //Mechanically required var/path @@ -129,8 +131,9 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE digestable = json_from_file["digestable"] devourable = json_from_file["devourable"] + resizable = json_from_file["resizable"] feeding = json_from_file["feeding"] - absorbable = json_from_file["absorbable"] //TFF 14/12/19 - choose whether allowing absorbing + absorbable = json_from_file["absorbable"] digest_leave_remains = json_from_file["digest_leave_remains"] allowmobvore = json_from_file["allowmobvore"] vore_taste = json_from_file["vore_taste"] @@ -155,6 +158,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE digestable = TRUE if(isnull(devourable)) devourable = TRUE + if(isnull(resizable)) + resizable = TRUE if(isnull(feeding)) feeding = TRUE if(isnull(absorbable)) @@ -197,6 +202,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE "version" = version, "digestable" = digestable, "devourable" = devourable, + "resizable" = resizable, "absorbable" = absorbable, "feeding" = feeding, "digest_leave_remains" = digest_leave_remains, diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 7b68d4fced..a5c40c867a 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -254,6 +254,7 @@ data["prefs"] = list( "digestable" = host.digestable, "devourable" = host.devourable, + "resizable" = host.resizable, "feeding" = host.feeding, "absorbable" = host.absorbable, "digest_leave_remains" = host.digest_leave_remains, @@ -415,6 +416,12 @@ host.client.prefs_vr.devourable = host.devourable unsaved_changes = TRUE return TRUE + if("toggle_resize") + host.resizable = !host.resizable + if(host.client.prefs_vr) + host.client.prefs_vr.resizable = host.resizable + unsaved_changes = TRUE + return TRUE if("toggle_feed") host.feeding = !host.feeding if(host.client.prefs_vr) diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index f726775207..04c3e47dba 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -1,6 +1,3 @@ -GLOBAL_LIST_EMPTY(size_uncapped_mobs) -GLOBAL_VAR(size_uncapped_mobs_timer) - // Adding needed defines to /mob/living // Note: Polaris had this on /mob/living/carbon/human We need it higher up for animals and stuff. /mob/living @@ -49,57 +46,40 @@ GLOBAL_VAR(size_uncapped_mobs_timer) /mob/living/get_effective_size() return size_multiplier -/** - * Resizes the mob immediately to the desired mod, animating it growing/shrinking. - * It can be used by anything that calls it. - */ - /atom/movable/proc/size_range_check(size_select) //both objects and mobs needs to have that var/area/A = get_area(src) //Get the atom's area to check for size limit. if((A.limit_mob_size && (size_select > 200 || size_select < 25)) || (size_select > 600 || size_select <1)) return FALSE return TRUE -/proc/add_to_uncapped_list(var/mob/living/L) - if(L.size_uncapped) - return - if(!GLOB.size_uncapped_mobs.len) - GLOB.size_uncapped_mobs_timer = addtimer(CALLBACK(GLOBAL_PROC, .check_uncapped_list), 2 SECONDS, TIMER_LOOP | TIMER_UNIQUE | TIMER_STOPPABLE) - GLOB.size_uncapped_mobs |= weakref(L) +/atom/movable/proc/has_large_resize_bounds() + var/area/A = get_area(src) //Get the atom's area to check for size limit. + return !A.limit_mob_size -/proc/remove_from_uncapped_list(var/mob/living/L) - if(!GLOB.size_uncapped_mobs.len) - return +/proc/is_extreme_size(size) + return (size < RESIZE_MINIMUM || size > RESIZE_MAXIMUM) - GLOB.size_uncapped_mobs -= weakref(L) - if(!GLOB.size_uncapped_mobs.len) - deltimer(GLOB.size_uncapped_mobs_timer) - GLOB.size_uncapped_mobs_timer = null +/** + * Resizes the mob immediately to the desired mod, animating it growing/shrinking. + * It can be used by anything that calls it. + */ -/proc/check_uncapped_list() - for(var/weakref/wr in GLOB.size_uncapped_mobs) - var/mob/living/L = wr.resolve() - var/area/A = get_area(L) - if(!istype(L)) - GLOB.size_uncapped_mobs -= wr - continue - - if((A.limit_mob_size && !L.size_uncapped) && (L.size_multiplier <= RESIZE_TINY || L.size_multiplier >= RESIZE_HUGE)) - L.resize(L.size_multiplier) - GLOB.size_uncapped_mobs -= wr - if(!GLOB.size_uncapped_mobs.len) - deltimer(GLOB.size_uncapped_mobs_timer) - GLOB.size_uncapped_mobs_timer = null - -/mob/living/proc/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE) +/mob/living/proc/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE, var/ignore_prefs = FALSE) if(!uncapped) - new_size = clamp(new_size, RESIZE_TINY, RESIZE_HUGE) - src.size_uncapped = FALSE - remove_from_uncapped_list(src) - else - add_to_uncapped_list(src) + new_size = clamp(new_size, RESIZE_MINIMUM, RESIZE_MAXIMUM) + var/datum/component/resize_guard/guard = GetComponent(/datum/component/resize_guard) + if(guard) + qdel(guard) + else if(has_large_resize_bounds()) + if(is_extreme_size(new_size)) + AddComponent(/datum/component/resize_guard) + else + var/datum/component/resize_guard/guard = GetComponent(/datum/component/resize_guard) + if(guard) + qdel(guard) + if(size_multiplier == new_size) return 1 @@ -130,8 +110,8 @@ GLOBAL_VAR(size_uncapped_mobs_timer) else update_transform() //Lame way -/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE) - if(!resizable) +/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE, var/ignore_prefs = FALSE) + if(!resizable && !ignore_prefs) return 1 if(species) vis_height = species.icon_height @@ -144,7 +124,7 @@ GLOBAL_VAR(size_uncapped_mobs_timer) apply_hud(index, HI) // Optimize mannequins - never a point to animating or doing HUDs on these. -/mob/living/carbon/human/dummy/mannequin/resize(var/new_size, var/animate = TRUE) +/mob/living/carbon/human/dummy/mannequin/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE, var/ignore_prefs = FALSE) size_multiplier = new_size /** diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm index d042c6cb34..41775af2a5 100644 --- a/code/modules/vore/resizing/sizegun_vr.dm +++ b/code/modules/vore/resizing/sizegun_vr.dm @@ -44,12 +44,15 @@ set category = "Object" set src in view(1) - var/size_select = input("Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num - if(!size_range_check(size_select)) - to_chat(usr, "Invalid size.") - return - size_set_to = (size_select/100) + var/size_select = input("Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num|null + if(!size_select) + return //cancelled + //We do valid resize testing in actual firings because people move after setting these things. + //Just a basic clamp here to the valid ranges. + size_set_to = clamp((size_select/100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) to_chat(usr, "You set the size to [size_select]%") + if(size_set_to < RESIZE_MINIMUM || size_set_to > RESIZE_MAXIMUM) + to_chat(usr, "Note: Resizing limited to 25-200% automatically while outside dormatory areas.") //hint that we clamp it in resize /obj/item/weapon/gun/energy/sizegun/examine(mob/user) . = ..() @@ -66,8 +69,10 @@ set category = "Object" set src in view(1) - var/size_select = input("Put the desired size", "Set Size", size_set_to * 100) as num - size_set_to = max(1,size_select/100) //No negative numbers + var/size_select = input("Put the desired size (1-600%)", "Set Size", size_set_to * 100) as num|null + if(!size_select) + return //cancelled + size_set_to = clamp((size_select/100), 0, 1000) //eheh to_chat(usr, "You set the size to [size_select]%") // @@ -88,8 +93,10 @@ /obj/item/projectile/beam/sizelaser/on_hit(var/atom/target) var/mob/living/M = target + var/ignoring_prefs = (target == firer ? TRUE : FALSE) // Resizing yourself + if(istype(M)) - if(!M.resize(set_size)) + if(!M.resize(set_size, uncapped = M.has_large_resize_bounds(), ignore_prefs = ignoring_prefs)) to_chat(M, "The beam fires into your body, changing your size!") M.updateicon() return @@ -97,11 +104,19 @@ /obj/item/projectile/beam/sizelaser/admin/on_hit(var/atom/target) var/mob/living/M = target + if(istype(M)) - M.resize(set_size, TRUE, TRUE) - if(set_size >= RESIZE_TINY && set_size <= RESIZE_HUGE) - M.size_uncapped = FALSE - M.size_uncapped = TRUE + + var/can_be_big = M.has_large_resize_bounds() + var/very_big = is_extreme_size(set_size) + + if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse + to_chat(firer, "[M] will lose this size upon moving into an area where this size is not allowed.") + else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse + to_chat(firer, "[M] will retain this normally unallowed size outside this area.") + + M.resize(set_size, uncapped = TRUE, ignore_prefs = TRUE) // Always ignores prefs, caution is advisable + to_chat(M, "The beam fires into your body, changing your size!") M.updateicon() return diff --git a/icons/mob/human_races/markings_vr.dmi b/icons/mob/human_races/markings_vr.dmi index 175e5387c6..6a96c24689 100644 Binary files a/icons/mob/human_races/markings_vr.dmi and b/icons/mob/human_races/markings_vr.dmi differ diff --git a/icons/mob/vore/taurs_ch.dmi b/icons/mob/vore/taurs_ch.dmi index 319e0236ae..b312aef79c 100644 Binary files a/icons/mob/vore/taurs_ch.dmi and b/icons/mob/vore/taurs_ch.dmi differ diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index 9725685f75..845e896969 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -908,6 +908,7 @@ const VoreUserPreferences = (props, context) => { const { digestable, devourable, + resizable, feeding, absorbable, digest_leave_remains, @@ -1055,6 +1056,44 @@ const VoreUserPreferences = (props, context) => { : "Click here to turn on hunger noises.")} content={noisy ? "Hunger Noises Enabled" : "Hunger Noises Disabled"} /> + +