diff --git a/citadel.dme b/citadel.dme index c6a3112e1514..25199f6af62e 100644 --- a/citadel.dme +++ b/citadel.dme @@ -722,6 +722,7 @@ #include "code\datums\components\gps_signal.dm" #include "code\datums\components\horror_aura.dm" #include "code\datums\components\jousting.dm" +#include "code\datums\components\object_transform.dm" #include "code\datums\components\orbiter.dm" #include "code\datums\components\simple_access.dm" #include "code\datums\components\slaved_atom_to_loc.dm" diff --git a/code/__DEFINES/_flags/atom_flags.dm b/code/__DEFINES/_flags/atom_flags.dm index d29d8ee6cdf1..afb4dec95219 100644 --- a/code/__DEFINES/_flags/atom_flags.dm +++ b/code/__DEFINES/_flags/atom_flags.dm @@ -156,7 +156,9 @@ DEFINE_BITFIELD(movement_type, list( /// Don't let us buckle people to ourselves. #define BUCKLING_NO_USER_BUCKLE_OTHER_TO_SELF (1<<6) /// Lets the user avoid step checks. -#define BUCKLING_GROUND_HOIST (1<<7) +#define BUCKLING_GROUND_HOIST (1<<7) +/// projects our depth to the buckled object. you usually don't want this. +#define BUCKLING_PROJECTS_DEPTH (1<<8) DEFINE_BITFIELD(buckle_flags, list( BITFIELD(BUCKLING_REQUIRES_RESTRAINTS), @@ -167,4 +169,5 @@ DEFINE_BITFIELD(buckle_flags, list( BITFIELD(BUCKLING_NO_DEFAULT_RESIST), BITFIELD(BUCKLING_NO_USER_BUCKLE_OTHER_TO_SELF), BITFIELD(BUCKLING_GROUND_HOIST), + BITFIELD(BUCKLING_PROJECTS_DEPTH), )) diff --git a/code/__DEFINES/_flags/obj_flags.dm b/code/__DEFINES/_flags/obj_flags.dm index bc1d453b2011..14beb93e7060 100644 --- a/code/__DEFINES/_flags/obj_flags.dm +++ b/code/__DEFINES/_flags/obj_flags.dm @@ -7,10 +7,13 @@ #define ON_BLUEPRINTS (1<<2) /// Prevent people from clicking under us #define OBJ_PREVENT_CLICK_UNDER (1<<3) +/// We ignore depth system when blocking mobs +#define OBJ_IGNORE_MOB_DEPTH (1<<4) DEFINE_BITFIELD(obj_flags, list( BITFIELD(EMAGGED), BITFIELD(CAN_BE_HIT), BITFIELD(ON_BLUEPRINTS), BITFIELD(OBJ_PREVENT_CLICK_UNDER), + BITFIELD(OBJ_IGNORE_MOB_DEPTH), )) diff --git a/code/__DEFINES/ability.dm b/code/__DEFINES/ability.dm index 914080f3b89e..dc6fd5c3b21e 100644 --- a/code/__DEFINES/ability.dm +++ b/code/__DEFINES/ability.dm @@ -13,3 +13,4 @@ #define ABILITY_CHECK_STANDING (1<<1) #define ABILITY_CHECK_FREE_HAND (1<<2) #define ABILITY_CHECK_STUNNED (1<<3) +#define ABILITY_CHECK_RESTING (1<<4) diff --git a/code/__DEFINES/procs/do_after.dm b/code/__DEFINES/procs/do_after.dm index 2a8c22cc0f62..24d4fd21fd55 100644 --- a/code/__DEFINES/procs/do_after.dm +++ b/code/__DEFINES/procs/do_after.dm @@ -52,3 +52,5 @@ #define INTERACTING_FOR_ALT_CLICK "alt_click" /// Attempting to resist out of something #define INTERACTING_FOR_RESIST "resist" +/// Climbing a structure +#define INTERACTING_FOR_CLIMB "climb" diff --git a/code/controllers/subsystem/mapping/maps.dm b/code/controllers/subsystem/mapping/maps.dm index c8cb7eee8987..7479adb8c495 100644 --- a/code/controllers/subsystem/mapping/maps.dm +++ b/code/controllers/subsystem/mapping/maps.dm @@ -252,3 +252,4 @@ log_and_message_admins("[key_name(src)] is changing the next map from [was.name] ([was.id]) to [changing_to.name] ([changing_to.id])") SSmapping.next_station = changing_to + SSmapping.write_next_map(changing_to) diff --git a/code/controllers/subsystem/supply.dm b/code/controllers/subsystem/supply.dm index af3411f44f0d..cbcb428d476d 100644 --- a/code/controllers/subsystem/supply.dm +++ b/code/controllers/subsystem/supply.dm @@ -221,6 +221,9 @@ SUBSYSTEM_DEF(supply) // Will attempt to purchase the specified order, returning TRUE on success, FALSE on failure /datum/controller/subsystem/supply/proc/approve_order(var/datum/supply_order/O, var/mob/user) + // do not double purchase!! + if(O.status != SUP_ORDER_REQUESTED) + return FALSE // Not enough points to purchase the crate if(SSsupply.points <= O.object.cost) return FALSE diff --git a/code/datums/ability.dm b/code/datums/ability.dm index 1ef787b7c196..6c50c2ba8b8e 100644 --- a/code/datums/ability.dm +++ b/code/datums/ability.dm @@ -170,7 +170,7 @@ to_chat(user, SPAN_WARNING("[src] is still on cooldown! ([round((world.time - last_used) * 0.1, 0.1)] / [round(cooldown * 0.1, 0.1)])")) return FALSE if(!available_check()) - to_chat(user, SPAN_WARNING("You can't do that right now!")) + to_chat(user, SPAN_WARNING(unavailable_reason())) return FALSE return TRUE @@ -259,6 +259,8 @@ return FALSE if((ability_check_flags & ABILITY_CHECK_FREE_HAND) && !(owner.has_free_hand())) return FALSE + if((ability_check_flags & ABILITY_CHECK_RESTING) && !IS_PRONE(owner)) + return FALSE if(!CHECK_MOBILITY(owner, mobility_check_flags)) return FALSE return TRUE @@ -277,6 +279,8 @@ return "You cannot do that while on the ground." if((ability_check_flags & ABILITY_CHECK_FREE_HAND) && !(owner.has_free_hand())) return "You cannot do that without a free hand." + if((ability_check_flags & ABILITY_CHECK_RESTING) && !owner.lying) + return "You must be lying down to do that." if(!CHECK_MOBILITY(owner, mobility_check_flags)) return "You cannot do that while incapacitated." diff --git a/code/datums/components/object_transform.dm b/code/datums/components/object_transform.dm new file mode 100644 index 000000000000..a772d920adbe --- /dev/null +++ b/code/datums/components/object_transform.dm @@ -0,0 +1,33 @@ +/datum/component/object_transform + var/obj/transformed_object + var/to_object_text + var/to_mob_text + +/datum/component/object_transform/Initialize(_transformed_object, _to_object_text, _to_mob_text) + transformed_object = _transformed_object + to_object_text = _to_object_text + to_mob_text = _to_mob_text + put_in_object(TRUE) + +/datum/component/object_transform/proc/swap_object(new_object) + . = transformed_object + var/mob/owner = parent + if(parent in transformed_object.contents) + owner.forceMove(transformed_object.loc) + transformed_object = new_object + put_in_object() + +/datum/component/object_transform/proc/put_in_object(silent = FALSE) + var/mob/owner = parent + transformed_object.forceMove(owner.loc) + owner.forceMove(transformed_object) + if(!silent && length(to_object_text)) + owner.visible_message("[owner] [to_object_text]") + +/datum/component/object_transform/proc/put_in_mob(silent = FALSE) + var/mob/owner = parent + owner.forceMove(transformed_object.loc) + transformed_object.forceMove(parent) + if(!silent && length(to_mob_text)) + owner.visible_message("[owner] [to_mob_text]") + diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 7351b5d8be42..4bda92467aba 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -26,6 +26,9 @@ icon_keyboard = "pcu_key" density = FALSE light_color = "#00cc00" + depth_level = 0 + depth_projected = FALSE + climb_allowed = FALSE /obj/machinery/computer/atmoscontrol/attack_ai(mob/user) ui_interact(user) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 34af11784c4c..956524447cf1 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -7,6 +7,9 @@ use_power = USE_POWER_IDLE idle_power_usage = 300 active_power_usage = 300 + depth_level = 8 + depth_projected = TRUE + climb_allowed = TRUE //blocks_emissive = FALSE var/processing = FALSE diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 2d7851711b0e..ded499f7c774 100755 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -84,7 +84,9 @@ layer = ABOVE_TURF_LAYER icon_keyboard = null icon_screen = "pass" - density = 0 + depth_projected = FALSE + climb_allowed = FALSE + density = FALSE circuit = /obj/item/circuitboard/guestpass var/obj/item/card/id/giver diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 734cc897362b..66badb710a09 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -507,7 +507,9 @@ light_color = "#5284e7" circuit = /obj/item/circuitboard/med_data/pcu density = FALSE - + depth_level = 0 + depth_projected = FALSE + climb_allowed = FALSE #undef FIELD #undef MED_FIELD diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 65b2b5870cc3..ba55c1287bea 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -14,6 +14,9 @@ req_one_access = list(ACCESS_COMMAND_BRIDGE) circuit = /obj/item/circuitboard/skills/pcu density = FALSE + depth_level = 0 + depth_projected = FALSE + climb_allowed = FALSE var/obj/item/card/id/scan = null var/authenticated = null var/rank = null diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 8d18a35c73e6..1b8cdfdd51bf 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -16,6 +16,8 @@ density = FALSE circuit = /obj/item/circuitboard/timeclock clicksound = null + climb_allowed = FALSE + depth_projected = FALSE var/channel = "Common" //Radio channel to announce on var/obj/item/card/id/card // Inserted Id card diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 8eb507be9e9e..2f740a0166ea 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -15,6 +15,8 @@ icon_state = "cellconsole" circuit = /obj/item/circuitboard/cryopodcontrol density = FALSE + climb_allowed = FALSE + depth_projected = FALSE interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_ALLOW_SILICON var/mode = null diff --git a/code/game/machinery/holopad.dm b/code/game/machinery/holopad.dm index 7f53db686258..dfaf5ab0c7d1 100644 --- a/code/game/machinery/holopad.dm +++ b/code/game/machinery/holopad.dm @@ -35,6 +35,8 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) active_power_usage = 100 light_range = 1.5 light_power = 0 + depth_projected = FALSE + climb_allowed = FALSE //? balancing /// base power used to project at all diff --git a/code/game/machinery/lathes/lathe.dm b/code/game/machinery/lathes/lathe.dm index 4c60f3c5269d..71a0e394180c 100644 --- a/code/game/machinery/lathes/lathe.dm +++ b/code/game/machinery/lathes/lathe.dm @@ -25,6 +25,9 @@ circuit = /obj/item/circuitboard/machine/lathe default_deconstruct = 0 SECONDS default_panel = 0 SECONDS + depth_projected = TRUE + depth_level = 8 + climb_allowed = TRUE /// icon state when printing, if any var/active_icon_state diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 949d4d23fdcb..4a10872a7473 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -4,6 +4,9 @@ w_class = ITEMSIZE_NORMAL // todo: better way, for now, block all rad contamination to interior rad_flags = RAD_BLOCK_CONTENTS + obj_flags = OBJ_IGNORE_MOB_DEPTH + depth_level = 0 + climb_allowed = FALSE //? Flags /// Item flags. diff --git a/code/game/objects/items/poi_items.dm b/code/game/objects/items/poi_items.dm index 5762579fcc9c..f94168e7a5cd 100644 --- a/code/game/objects/items/poi_items.dm +++ b/code/game/objects/items/poi_items.dm @@ -26,7 +26,6 @@ icon_state = "poireactor" icon_opened = "poireactor_open" icon_closed = "poireactor" - climbable = 0 starts_with = list( /obj/item/fuel_assembly/deuterium = 6) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 33bc578db287..623b05d1d001 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -18,6 +18,26 @@ /// If set, at least one of these accesses are needed to access this object. var/list/req_one_access + //? Climbing + /// people can climb onto us + var/climb_allowed = FALSE + /// people are allowed to knock climbers off of us + var/climb_knockable = TRUE + /// list of people currently climbing on us + /// currently, only /mob/living is allowed to climb + var/list/mob/living/climbing + /// nominal climb delay before modifiers + var/climb_delay = 3.5 SECONDS + + //? Depth + /// logical depth in pixels. people can freely run from high to low objects without being blocked. + /// + /// negative values are ignored as turfs are assumed to be depth 0 + /// unless we change that in the future + var/depth_level = 28 + /// contributes to depth when we're on a turf + var/depth_projected = FALSE + //? Economy /// economic category for objects var/economic_category_obj = ECONOMIC_CATEGORY_OBJ_DEFAULT @@ -163,7 +183,7 @@ /obj/proc/hides_under_flooring() return 0 - /** +/** * This proc is used for telling whether something can pass by this object in a given direction, for use by the pathfinding system. * * Trying to generate one long path across the station will call this proc on every single object on every single tile that we're seeing if we can move through, likely @@ -236,6 +256,157 @@ add_fingerprint(user) ..() +//? Climbing + +/obj/MouseDroppedOn(atom/dropping, mob/user, proximity, params) + if(drag_drop_climb_interaction(user, dropping)) + return CLICKCHAIN_DO_NOT_PROPAGATE + return ..() + +/obj/proc/drag_drop_climb_interaction(mob/user, atom/dropping) + if(!climb_allowed) + return FALSE + if(user != dropping) + return FALSE + // todo: better hinting to user for this + if(buckle_allowed && user.a_intent != INTENT_GRAB) + return FALSE + if(!user.Adjacent(src)) + return FALSE + . = TRUE + INVOKE_ASYNC(src, PROC_REF(attempt_climb_on), user) + +/obj/proc/attempt_climb_on(mob/living/climber, delay_mod = 1) + if(!istype(climber)) + return FALSE + if(!allow_climb_on(climber)) + climber.action_feedback(SPAN_WARNING("You can't climb onto [src]!"), src) + return FALSE + if(INTERACTING_WITH_FOR(climber, src, INTERACTING_FOR_CLIMB)) + return FALSE + climber.visible_action_feedback(SPAN_WARNING("[climber] starts climbing onto \the [src]!"), src, MESSAGE_RANGE_COMBAT_LOUD) + START_INTERACTING_WITH(climber, src, INTERACTING_FOR_CLIMB) + LAZYDISTINCTADD(climbing, climber) + . = do_after(climber, climb_delay * delay_mod, src, mobility_flags = MOBILITY_CAN_MOVE | MOBILITY_CAN_STAND | MOBILITY_IS_STANDING) + if(!INTERACTING_WITH_FOR(climber, src, INTERACTING_FOR_CLIMB)) + . = FALSE + LAZYREMOVE(climbing, climber) + STOP_INTERACTING_WITH(climber, src, INTERACTING_FOR_CLIMB) + if(!allow_climb_on(climber)) + climber.action_feedback(SPAN_WARNING("You couldn't climb onto [src]!"), src) + return FALSE + do_climb_on(climber) + +/obj/proc/allow_climb_on(mob/living/climber) + if(!istype(climber)) + return FALSE + if(!climb_allowed) + return FALSE + if(!climber.Adjacent(src)) + return FALSE + return TRUE + +/obj/proc/do_climb_on(mob/living/climber) + climber.visible_message(SPAN_WARNING("[climber] climbs onto \the [src]!")) + // all this effort just to avoid a splurtstation railing spare ID speedrun incident + var/old_depth = climber.depth_current + if(climber.depth_current < depth_level) + // basically, we don't force move them, we just elevate them to our level + // if something else blocks them, L + ratio + get parried + climber.change_depth(depth_level) + if(!step_towards(climber, do_climb_target(climber))) + climber.change_depth(old_depth) + +/obj/proc/do_climb_target(mob/living/climber) + return get_turf(src) + +/obj/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + if(length(climbing) && user.a_intent == INTENT_HARM) + user.visible_message(SPAN_WARNING("[user] slams against \the [src]!")) + user.do_attack_animation(src) + shake_climbers() + return TRUE + +/obj/proc/shake_climbers() + for(var/mob/living/climber as anything in climbing) + climber.afflict_knockdown(1 SECONDS) + climber.visible_message(SPAN_WARNING("[climber] is toppled off of \the [src]!")) + STOP_INTERACTING_WITH(climber, src, INTERACTING_FOR_CLIMB) + climbing = null + + // disabled old, but fun code that knocks people on their ass if something is shaken without climbers + // being ontop of it + // consider re-enabling this sometime. + /* + for(var/mob/living/M in get_turf(src)) + if(M.lying) return //No spamming this on people. + + M.afflict_paralyze(20 * 3) + to_chat(M, "You topple as \the [src] moves under you!") + + if(prob(25)) + + var/damage = rand(15,30) + var/mob/living/carbon/human/H = M + if(!istype(H)) + to_chat(H, "You land heavily!") + M.adjustBruteLoss(damage) + return + + var/obj/item/organ/external/affecting + + switch(pick(list("ankle","wrist","head","knee","elbow"))) + if("ankle") + affecting = H.get_organ(pick(BP_L_FOOT, BP_R_FOOT)) + if("knee") + affecting = H.get_organ(pick(BP_L_LEG, BP_R_LEG)) + if("wrist") + affecting = H.get_organ(pick(BP_L_HAND, BP_R_HAND)) + if("elbow") + affecting = H.get_organ(pick(BP_L_ARM, BP_R_ARM)) + if("head") + affecting = H.get_organ(BP_HEAD) + + if(affecting) + to_chat(M, "You land heavily on your [affecting.name]!") + affecting.take_damage(damage, 0) + if(affecting.parent) + affecting.parent.add_autopsy_data("Misadventure", damage) + else + to_chat(H, "You land heavily!") + H.adjustBruteLoss(damage) + + H.UpdateDamageIcon() + H.update_health() + */ + +//? Materials + +/obj/get_materials() + . = materials.Copy() + +/** + * initialize materials + */ +/obj/proc/init_materials() + if(!isnull(material_defaults)) + set_material_parts(material_defaults) + for(var/key in material_defaults) + var/mat = material_defaults[key] + var/amt = material_parts[key] + materials[mat] += amt + +/** + * sets our material parts to a list by key / value + * this does not update [materials], you have to do that manually + * this is usually done in init using init_materials + */ +/obj/proc/set_material_parts(list/parts) + return + //? Resists /** @@ -308,27 +479,3 @@ var/shake_dir = pick(-1, 1) animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1) animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING) - -//? materials - -/obj/get_materials() - . = materials.Copy() - -/** - * initialize materials - */ -/obj/proc/init_materials() - if(!isnull(material_defaults)) - set_material_parts(material_defaults) - for(var/key in material_defaults) - var/mat = material_defaults[key] - var/amt = material_parts[key] - materials[mat] += amt - -/** - * sets our material parts to a list by key / value - * this does not update [materials], you have to do that manually - * this is usually done in init using init_materials - */ -/obj/proc/set_material_parts(list/parts) - return diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index f050a280f3f3..f97ca561d5e4 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -5,11 +5,7 @@ // todo: rename to default_unanchor, allow generic structure unanchoring. var/allow_unanchor = FALSE - - var/climbable - var/climb_delay = 3.5 SECONDS - var/breakable - var/list/climbers = list() + var/breakable = FALSE var/list/connections var/list/other_connections @@ -19,9 +15,6 @@ /obj/structure/Initialize(mapload) . = ..() - if(climbable) - add_obj_verb(src, /obj/structure/proc/climb_on) - if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) QUEUE_SMOOTH(src) QUEUE_SMOOTH_NEIGHBORS(src) @@ -48,11 +41,6 @@ if(H.species.can_shred(user)) attack_generic(user,1,"slices") - if(climbers.len && !(user in climbers)) - user.visible_message("[user.name] shakes \the [src].", \ - "You shake \the [src].") - structure_shaken() - return ..() /obj/structure/attack_tk() @@ -70,122 +58,17 @@ if(3.0) return -/obj/structure/proc/climb_on() - - set name = "Climb structure" - set desc = "Climbs onto a structure." - set category = "Object" - set src in oview(1) - - do_climb(usr) - -/obj/structure/MouseDroppedOnLegacy(mob/target, mob/user) - - var/mob/living/H = user - if(istype(H) && can_climb(H) && target == user) - do_climb(target) - else - return ..() - -/obj/structure/proc/can_climb(var/mob/living/user, post_climb_check=0) - if (!climbable || !can_touch(user) || (!post_climb_check && (user in climbers))) - return 0 - - if (!user.Adjacent(src)) - to_chat(user, "You can't climb there, the way is blocked.") - return 0 - - var/obj/occupied = turf_is_crowded() - if(occupied) - to_chat(user, "There's \a [occupied] in the way.") - return 0 - return 1 - /obj/structure/proc/turf_is_crowded() var/turf/T = get_turf(src) if(!T || !istype(T)) return 0 for(var/obj/O in T.contents) - if(istype(O,/obj/structure)) - var/obj/structure/S = O - if(S.climbable) continue + if(O.climb_allowed) + continue if(O && O.density && !(O.atom_flags & ATOM_BORDER)) //ATOM_BORDER structures are handled by the Adjacent() check. return O return 0 -// todo: climbable obj-level (to avoid element/signal spam) -/obj/structure/proc/do_climb(var/mob/living/user) - if (!can_climb(user)) - return - - usr.visible_message("[user] starts climbing onto \the [src]!") - climbers |= user - - if(!do_after(user, issmall(user) ? climb_delay * 0.6 : climb_delay, src, mobility_flags = MOBILITY_CAN_MOVE | MOBILITY_CAN_USE)) - climbers -= user - return - - if (!can_climb(user, post_climb_check=1)) - climbers -= user - return - - var/old = pass_flags & (ATOM_PASS_BUCKLED) - pass_flags |= ATOM_PASS_BUCKLED - usr.locationTransitForceMove(get_turf(src), allow_buckled = TRUE, allow_pulled = FALSE, allow_grabbed = TRUE) - pass_flags = (pass_flags & ~(ATOM_PASS_BUCKLED)) | (old & ATOM_PASS_BUCKLED) - - if (get_turf(user) == get_turf(src)) - usr.visible_message("[user] climbs onto \the [src]!") - climbers -= user - -/obj/structure/proc/structure_shaken() - for(var/mob/living/M in climbers) - M.afflict_paralyze(20 * 1) - to_chat(M, "You topple as you are shaken off \the [src]!") - climbers.Cut(1,2) - - for(var/mob/living/M in get_turf(src)) - if(M.lying) return //No spamming this on people. - - M.afflict_paralyze(20 * 3) - to_chat(M, "You topple as \the [src] moves under you!") - - if(prob(25)) - - var/damage = rand(15,30) - var/mob/living/carbon/human/H = M - if(!istype(H)) - to_chat(H, "You land heavily!") - M.adjustBruteLoss(damage) - return - - var/obj/item/organ/external/affecting - - switch(pick(list("ankle","wrist","head","knee","elbow"))) - if("ankle") - affecting = H.get_organ(pick(BP_L_FOOT, BP_R_FOOT)) - if("knee") - affecting = H.get_organ(pick(BP_L_LEG, BP_R_LEG)) - if("wrist") - affecting = H.get_organ(pick(BP_L_HAND, BP_R_HAND)) - if("elbow") - affecting = H.get_organ(pick(BP_L_ARM, BP_R_ARM)) - if("head") - affecting = H.get_organ(BP_HEAD) - - if(affecting) - to_chat(M, "You land heavily on your [affecting.name]!") - affecting.take_damage(damage, 0) - if(affecting.parent) - affecting.parent.add_autopsy_data("Misadventure", damage) - else - to_chat(H, "You land heavily!") - H.adjustBruteLoss(damage) - - H.UpdateDamageIcon() - H.update_health() - return - // todo: remove /obj/structure/proc/can_touch(var/mob/user) if (!user) diff --git a/code/game/objects/structures/cliff.dm b/code/game/objects/structures/cliff.dm index e6100d7aaa87..8dae834f31c5 100644 --- a/code/game/objects/structures/cliff.dm +++ b/code/game/objects/structures/cliff.dm @@ -31,7 +31,7 @@ two tiles on initialization, and which way a cliff is facing may change during m anchored = TRUE density = TRUE opacity = FALSE - climbable = TRUE + climb_allowed = TRUE climb_delay = 10 SECONDS // TODO: IMPLEMENT THIS AGAIN, this was done in a horrifically slow and stupid way // block_turf_edges = TRUE // Don't want turf edges popping up from the cliff edge. @@ -219,19 +219,24 @@ two tiles on initialization, and which way a cliff is facing may change during m sleep(5) bottom_cliff.fall_off_cliff(L) -/obj/structure/cliff/can_climb(mob/living/user, post_climb_check = FALSE) +/obj/structure/cliff/allow_climb_on(mob/living/climber) + . = ..() + if(!.) + return + //! LEGAYC CODE START + var/mob/living/user = climber // Cliff climbing requires climbing gear. if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/clothing/shoes/shoes = H.shoes if(shoes && shoes.rock_climbing) - return ..() // Do the other checks too. + return TRUE var/obj/item/held = H.get_active_held_item() if(held && istype(held, /obj/item/pickaxe/icepick)) - return ..() //climb rock wall with ice pick. Makes sense. - + return TRUE to_chat(user, SPAN_WARNING( "\The [src] is too steep to climb unassisted.")) return FALSE + //! END // This tells AI mobs to not be dumb and step off cliffs willingly. /obj/structure/cliff/is_safe_to_step(mob/living/L) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index f97e309e16aa..cbcb39c99c76 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -5,7 +5,9 @@ desc = "A rectangular steel crate." icon = 'icons/obj/closets/bases/crate.dmi' closet_appearance = /singleton/closet_appearance/crate - climbable = 1 + climb_allowed = TRUE + depth_projected = TRUE + depth_level = 8 var/points_per_crate = 5 // mouse_drag_pointer = MOUSE_ACTIVE_POINTER //??? var/rigged = 0 @@ -44,9 +46,7 @@ O.forceMove(get_turf(src)) icon_state = icon_opened src.opened = 1 - - if(climbable) - structure_shaken() + shake_climbers() return 1 /obj/structure/closet/crate/close() diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 69405eb9c4f1..81ac90e359f3 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -94,11 +94,9 @@ if(MEDIUM_HOLE) visible_message(SPAN_NOTICE("\The [user] cuts into \the [src] some more.")) to_chat(user, SPAN_NOTICE("You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger.")) - climbable = TRUE if(LARGE_HOLE) visible_message(SPAN_NOTICE("\The [user] completely cuts through \the [src].")) to_chat(user, SPAN_NOTICE("The hole in \the [src] is now big enough to walk through.")) - climbable = FALSE update_cut_status() return TRUE @@ -106,15 +104,20 @@ if(!cuttable) return density = TRUE + climb_allowed = initial(climb_allowed) + climb_delay = initial(climb_delay) switch(hole_size) if(NO_HOLE) icon_state = initial(icon_state) if(MEDIUM_HOLE) icon_state = "straight-cut2" + climb_allowed = TRUE if(LARGE_HOLE) icon_state = "straight-cut3" density = FALSE + climb_allowed = TRUE + climb_delay = 0 //FENCE DOORS diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index e30cd90d92d4..ca18e4e9d962 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -6,6 +6,8 @@ density = TRUE plane = TURF_PLANE w_class = ITEMSIZE_HUGE + depth_level = 24 + depth_projected = TRUE var/state = 0 var/health = 200 diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index eb073df8cd69..4e52b35ec668 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -5,7 +5,8 @@ density = TRUE pass_flags_self = ATOM_PASS_THROWN | ATOM_PASS_CLICK | ATOM_PASS_TABLE | ATOM_PASS_OVERHEAD_THROW - climbable = TRUE + climb_allowed = TRUE + depth_level = 8 anchored = TRUE layer = ABOVE_JUNK_LAYER diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 7b04af27eaec..4e7067671332 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -7,7 +7,8 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) icon_state = "cart" anchored = 0 density = 1 - climbable = 1 + climb_allowed = TRUE + depth_level = 20 atom_flags = OPENCONTAINER //copypaste sorry var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite diff --git a/code/game/objects/structures/ledges.dm b/code/game/objects/structures/ledges.dm index 059a5916a6f4..4e715093f578 100644 --- a/code/game/objects/structures/ledges.dm +++ b/code/game/objects/structures/ledges.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/ledges.dmi' pass_flags_self = ATOM_PASS_TABLE | ATOM_PASS_THROWN | ATOM_PASS_CLICK | ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_BUCKLED density = TRUE - climbable = TRUE + climb_allowed = TRUE anchored = TRUE var/solidledge = 1 atom_flags = ATOM_BORDER @@ -19,7 +19,7 @@ icon = 'icons/obj/ledges.dmi' density = TRUE pass_flags_self = ATOM_PASS_TABLE | ATOM_PASS_THROWN | ATOM_PASS_CLICK | ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_BUCKLED - climbable = TRUE + climb_allowed = TRUE anchored = TRUE layer = STAIRS_LAYER @@ -51,37 +51,3 @@ if(!(get_dir(src, newLoc) & dir)) return TRUE return FALSE - -/obj/structure/ledge/do_climb(var/mob/living/user) - if(!can_climb(user)) - return - - usr.visible_message("[user] starts climbing onto \the [src]!") - climbers |= user - - if(!do_after(user,(issmall(user) ? 20 : 34))) - climbers -= user - return - - if(!can_climb(user, post_climb_check=1)) - climbers -= user - return - - if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) - else - usr.forceMove(get_turf(src)) - - usr.visible_message("[user] climbed over \the [src]!") - climbers -= user - -/obj/structure/ledge/can_climb(var/mob/living/user, post_climb_check=0) - if(!..()) - return 0 - - if(get_turf(user) == get_turf(src)) - var/obj/occupied = neighbor_turf_impassable() - if(occupied) - to_chat(user, "You can't climb there, there's \a [occupied] in the way.") - return 0 - return 1 diff --git a/code/game/objects/structures/low_wall.dm b/code/game/objects/structures/low_wall.dm index 333903bdf194..86df124311b3 100644 --- a/code/game/objects/structures/low_wall.dm +++ b/code/game/objects/structures/low_wall.dm @@ -25,6 +25,10 @@ GLOBAL_LIST_INIT(wallframe_typecache, typecacheof(list( smoothing_flags = SMOOTH_BITMASK smoothing_groups = (SMOOTH_GROUP_LOW_WALL) canSmoothWith = (SMOOTH_GROUP_AIRLOCK+SMOOTH_GROUP_LOW_WALL+SMOOTH_GROUP_WALLS) + depth_projected = TRUE + depth_level = 8 + climb_allowed = TRUE + climb_delay = 2.0 SECONDS plane = OBJ_PLANE var/default_material = MAT_STEEL diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 8b086f10d7e1..51e97f054af9 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -4,7 +4,8 @@ icon = 'icons/obj/janitor.dmi' icon_state = "mopbucket" density = 1 - climbable = 1 + climb_allowed = TRUE + depth_level = 8 w_class = ITEMSIZE_NORMAL pressure_resistance = 5 atom_flags = OPENCONTAINER diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 1178892d49ff..e6b9b7ea4ca1 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -5,7 +5,8 @@ icon = 'icons/obj/railing.dmi' density = TRUE pass_flags_self = ATOM_PASS_THROWN | ATOM_PASS_CLICK | ATOM_PASS_TABLE | ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_CLICK | ATOM_PASS_BUCKLED - climbable = TRUE + climb_allowed = TRUE + depth_level = 24 layer = WINDOW_LAYER anchored = TRUE atom_flags = ATOM_BORDER @@ -25,8 +26,6 @@ // TODO - "constructed" is not passed to us. We need to find a way to do this safely. if (constructed) // player-constructed railings anchored = 0 - if(climbable) - add_obj_verb(src, /obj/structure/proc/climb_on) if(src.anchored) update_icon(0) @@ -46,6 +45,10 @@ return TRUE if(!(get_dir(src, newLoc) & dir)) return TRUE + if(isliving(mover)) + var/mob/living/L = mover + if((L.depth_current >= depth_level) && !(obj_flags & OBJ_IGNORE_MOB_DEPTH)) + return TRUE return !density /obj/structure/railing/examine(mob/user, dist) @@ -268,55 +271,13 @@ switch(severity) if(1.0) qdel(src) - return if(2.0) qdel(src) - return if(3.0) qdel(src) - return - else - return - -// Duplicated from structures.dm, but its a bit different. -/obj/structure/railing/do_climb(var/mob/living/user) - if(!can_climb(user)) - return - - usr.visible_message("[user] starts climbing onto \the [src]!") - climbers |= user - - if(!do_after(user,(issmall(user) ? 20 : 34))) - climbers -= user - return - - if(!can_climb(user, post_climb_check=1)) - climbers -= user - return - - if(get_turf(user) == get_turf(src)) - usr.locationTransitForceMove(get_step(src, src.dir), allow_buckled = TRUE, allow_pulled = FALSE, allow_grabbed = TRUE) - else - usr.locationTransitForceMove(get_turf(src), allow_buckled = TRUE, allow_pulled = FALSE, allow_grabbed = TRUE) - - usr.visible_message("[user] climbed over \the [src]!") - if(!anchored) take_damage(maxhealth) // Fatboy - climbers -= user - -/obj/structure/railing/can_climb(var/mob/living/user, post_climb_check=0) - if(!..()) - return 0 - - // Normal can_climb() handles climbing from adjacent turf onto our turf. But railings also allow climbing - // from our turf onto an adjacent! If that is the case we need to do checks for that too... - if(get_turf(user) == get_turf(src)) - var/obj/occupied = neighbor_turf_impassable() - if(occupied) - to_chat(user, "You can't climb there, there's \a [occupied] in the way.") - return 0 - return 1 // TODO - This here might require some investigation +// todo: no, this here needs to be thrown out, we have depth system now /obj/structure/proc/neighbor_turf_impassable() var/turf/T = get_step(src, src.dir) if(!T || !istype(T)) @@ -326,6 +287,10 @@ for(var/obj/O in T.contents) if(istype(O,/obj/structure)) var/obj/structure/S = O - if(S.climbable) continue + if(S.climb_allowed) + continue if(O && O.density && !(O.atom_flags & ATOM_BORDER && !(turn(O.dir, 180) & dir))) return O + +/obj/structure/railing/do_climb_target(mob/living/climber) + return climber.loc == get_turf(src)? get_step(src, dir) : ..() diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 20c5fe87b595..c615c6156d13 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -346,7 +346,9 @@ density = TRUE anchored = TRUE pass_flags_self = ATOM_PASS_THROWN | ATOM_PASS_OVERHEAD_THROW - climbable = TRUE + climb_allowed = TRUE + depth_projected = TRUE + depth_level = 24 /obj/structure/memorial/small icon = 'icons/obj/structures.dmi' diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index ea9c84849ec3..de7f55114bd5 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -72,19 +72,24 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list( // Creates a new turf // new_baseturfs can be either a single type or list of types, formated the same as baseturfs. see turf.dm /turf/proc/ChangeTurf(path, list/new_baseturfs, flags) + // todo: hopefully someday we can get simulated/open to just be turf/open or something once + // we refactor ZAS + // then we can skip all this bullshit and have proper space zmimic + // as long as zm overhead isn't too high. switch(path) if(null) return if(/turf/baseturf_bottom) path = SSmapping.level_baseturf(z) || /turf/space if(!ispath(path)) - path = text2path(path) - if (!ispath(path)) - warning("Z-level [z] has invalid baseturf '[SSmapping.level_baseturf(z)]'") - path = /turf/space + stack_trace("Z-level [z] has invalid baseturf '[SSmapping.level_baseturf(z)]'") + path = /turf/space if(path == /turf/space) // no space/basic check, if you use space/basic in a map honestly get bent if(istype(GetBelow(src), /turf/simulated)) path = /turf/simulated/open + else if(path == /turf/simulated/open) + if(istype(GetBelow(src), /turf/space)) + path = /turf/space if(/turf/space/basic) // basic doesn't initialize and this will cause issues // no warning though because this can happen naturaly as a result of it being built on top of diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 3e776a064e93..84c2615ccace 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -566,12 +566,7 @@ return TRUE return FALSE -//? Radiation - -/turf/proc/update_rad_insulation() - rad_insulation_contents = 1 - -//? atom color - we don't use the expensive system. +//? Atom Color - we don't use the expensive system. /turf/get_atom_colour() return color @@ -589,3 +584,20 @@ if(isnull(other.color)) return color = other.color + +//? Depth + +/** + * gets overall depth level for stuff standing on us + */ +/turf/proc/depth_level() + . = 0 + for(var/obj/O in src) + if(!O.depth_projected) + continue + . = max(., O.depth_level) + +//? Radiation + +/turf/proc/update_rad_insulation() + rad_insulation_contents = 1 diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 8d77343171f4..6db0948469d2 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -363,8 +363,7 @@ GLOBAL_LIST_EMPTY(buildholders) var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object)) WIN.setDir(WEST) if(NORTHWEST) - var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object)) - WIN.setDir(NORTHWEST) + new /obj/spawner/window/reinforced/full(get_turf(object)) var/turf/TC = get_turf(object) log_admin("[key_name(usr)] made a window at [COORD(TC)]") if(2) // Adv. Build diff --git a/code/modules/atmospherics/machinery/machinery.dm b/code/modules/atmospherics/machinery/machinery.dm index 0db1aeffbf93..dfe8bf9a6383 100644 --- a/code/modules/atmospherics/machinery/machinery.dm +++ b/code/modules/atmospherics/machinery/machinery.dm @@ -20,6 +20,8 @@ Pipelines + Other Objects -> Pipe network // why block contents? so you ventcrawling little fucks don't pull a 2020 Citadel Main. rad_flags = RAD_BLOCK_CONTENTS | RAD_NO_CONTAMINATE atom_colouration_system = FALSE + climb_allowed = FALSE + depth_projected = FALSE ///The color of the pipe var/pipe_color diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index c8a75aed338f..6edf6b4af8fa 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -988,10 +988,12 @@ /obj/item/clothing/suit/varsity name = "black varsity jacket" desc = "A favorite of jocks everywhere from Sol to Nyx." + icon = 'icons/clothing/suit/jackets/varsity.dmi' icon_state = "varsity" allowed = list (/obj/item/pen, /obj/item/paper, /obj/item/flashlight,/obj/item/tank/emergency/oxygen, /obj/item/storage/fancy/cigarettes, /obj/item/storage/box/matches, /obj/item/reagent_containers/food/drinks/flask) item_state_slots = list(SLOT_ID_RIGHT_HAND = "suit_black", SLOT_ID_LEFT_HAND = "suit_black") inv_hide_flags = HIDETIE|HIDEHOLSTER + worn_render_flags = WORN_RENDER_SLOT_ONE_FOR_ALL /obj/item/clothing/suit/varsity/red name = "red varsity jacket" @@ -1454,10 +1456,19 @@ icon_state = "centcomformal_f" //Someone's on the line. -/obj/item/clothing/suit/storage/toggle/letterman +/obj/item/clothing/suit/storage/toggle/varsity name = "worn letterman jacket" desc = "A worn varsity letterman jacket. Some of the faded stains around the cuffs are rather suspicious." + icon = 'icons/clothing/suit/jackets/varsity.dmi' icon_state = "varsity_letterman" + inv_hide_flags = HIDEHOLSTER + worn_render_flags = WORN_RENDER_SLOT_ONE_FOR_ALL + +/obj/item/clothing/suit/storage/toggle/varsity/worn + name = "well-worn varsity jacket" + desc = "A worn varsity jacket. The NanoTrasen corporate logo on the back is outdated, suggesting the age of this coat." + icon_state = "varsity_worn" + allowed = list(/obj/item/gun/ballistic/sec/flash, /obj/item/tank/emergency/oxygen, /obj/item/flashlight,/obj/item/gun/energy,/obj/item/gun/ballistic,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/storage/fancy/cigarettes,/obj/item/flame/lighter,/obj/item/tape_recorder,/obj/item/uv_light) /obj/item/clothing/suit/storage/pullover name = "pullover hoodie" diff --git a/code/modules/events/meteor_strike_vr.dm b/code/modules/events/meteor_strike_vr.dm index a65c3e3f7544..4c306f10bce2 100644 --- a/code/modules/events/meteor_strike_vr.dm +++ b/code/modules/events/meteor_strike_vr.dm @@ -77,8 +77,9 @@ desc = "A big hunk of star-stuff." icon = 'icons/obj/meteor.dmi' icon_state = "large" - density = 1 - climbable = 1 + density = TRUE + climb_allowed = TRUE + depth_level = 16 /obj/structure/meteorite/Initialize(mapload) . = ..() diff --git a/code/modules/food/kitchen/smartfridge.dm b/code/modules/food/kitchen/smartfridge.dm index a3f79d0cf965..0a531eeaf693 100644 --- a/code/modules/food/kitchen/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge.dm @@ -37,6 +37,7 @@ wires = new/datum/wires/smartfridge/secure(src) else wires = new/datum/wires/smartfridge(src) + update_icon() /obj/machinery/smartfridge/Destroy() AIR_UPDATE_ON_DESTROY_AUTO diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index 7d4ceb7f7b3b..d1f740418da1 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -6,12 +6,14 @@ desc = "A virtual map of the surrounding station." icon = 'icons/obj/machines/stationmap.dmi' icon_state = "station_map" - anchored = 1 - density = 0 + anchored = TRUE + density = FALSE use_power = USE_POWER_IDLE idle_power_usage = 10 active_power_usage = 500 circuit = /obj/item/circuitboard/station_map + depth_projected = FALSE + climb_allowed = FALSE // TODO - Port use_auto_lights from /vg - for now declare here var/use_auto_lights = 1 diff --git a/code/modules/mining/mine_outcrops.dm b/code/modules/mining/mine_outcrops.dm index aeaa981eda9c..3cf2bc1c7bd4 100644 --- a/code/modules/mining/mine_outcrops.dm +++ b/code/modules/mining/mine_outcrops.dm @@ -4,7 +4,8 @@ icon = 'icons/obj/outcrop.dmi' density = TRUE pass_flags_self = ATOM_PASS_THROWN | ATOM_PASS_OVERHEAD_THROW - climbable = TRUE + climb_allowed = TRUE + depth_level = 12 anchored = TRUE icon_state = "outcrop" var/mindrop = 5 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 50b762dfef8a..f21a67fc0b02 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -8,6 +8,7 @@ /mob/living see_invisible = SEE_INVISIBLE_LIVING movable_flags = MOVABLE_NO_THROW_SPIN | MOVABLE_NO_THROW_DAMAGE_SCALING | MOVABLE_NO_THROW_SPEED_SCALING + buckle_flags = BUCKLING_PROJECTS_DEPTH //* Health and life related vars *// /// Maximum health that should be possible. Avoid adjusting this if you can, and instead use modifiers datums. @@ -144,3 +145,9 @@ var/getting_up_penalized /// last delay before modifications while getting up - used by resist_a_rest, so reducing damage / whatever doesn't leave you with the same delay var/getting_up_original + + //? movement + /// current depth on turf in pixels + var/depth_current = 0 + /// set during move: staged depth; on successful move, we update depth_current if it's different. + var/tmp/depth_staged = 0 diff --git a/code/modules/mob/living/movement.dm b/code/modules/mob/living/movement.dm index 7e8dc3978444..e7c3aa5f340f 100644 --- a/code/modules/mob/living/movement.dm +++ b/code/modules/mob/living/movement.dm @@ -8,15 +8,26 @@ if(MOVE_INTENT_WALK) . += config_legacy.walk_speed +// todo: all this depth staged stuff is stupid and it should all be on /turf and cached someday +// this is however, faster, so that'll be a very long 'someday'. + /mob/living/Move(atom/newloc, direct, glide_size_override) + depth_staged = 0 if(buckled && buckled.loc != newloc) return FALSE - return ..() + . = ..() + depth_staged = null -/mob/living/Moved() +/mob/living/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) . = ..() if(s_active && !CheapReachability(s_active)) s_active.close(src) + if(forced && isnull(depth_staged) && isturf(loc)) + var/turf/T = loc + depth_staged = T.depth_level() + if(!isnull(depth_staged)) + change_depth(depth_staged) + depth_staged = null /mob/living/forceMove(atom/destination) if(buckled && (buckled.loc != destination)) @@ -44,6 +55,16 @@ return TRUE return ..() +/mob/living/CanPassThrough(atom/blocker, turf/target, blocker_opinion) + . = ..() + if(isobj(blocker)) + var/obj/O = blocker + if(O.depth_projected) + // FINE ILL USE UNLINT INSTEAD OF REMOVE PURITY + UNLINT(depth_staged = max(depth_staged, O.depth_level)) + if(!(O.obj_flags & OBJ_IGNORE_MOB_DEPTH) && O.depth_level <= depth_current) + return TRUE + /mob/living/can_cross_under(atom/movable/mover) if(isliving(mover)) var/mob/living/L = mover @@ -84,6 +105,8 @@ return FALSE return TRUE +//? Bumping / Crawling + /mob/living/Bump(atom/A) var/skip_atom_bump_handling if(throwing) @@ -357,3 +380,21 @@ // restore dir if needed if(their_dir) pushing.setDir(their_dir) + +//? Depth + +/mob/living/proc/change_depth(new_depth) + // depth is propagated up/down our buckled objects, and overridden by what we're buckled to + if(isliving(buckled) && (buckled.buckle_flags & BUCKLING_PROJECTS_DEPTH)) + var/mob/living/L = buckled + new_depth = L.depth_current + else if(isobj(buckled) && (buckled.buckle_flags & BUCKLING_PROJECTS_DEPTH)) + var/obj/O = buckled + new_depth = O.depth_level + if(new_depth == depth_current) + return + . = new_depth - depth_current + depth_current = new_depth + pixel_y += . + for(var/mob/living/L in buckled_mobs) + L.change_depth(new_depth) diff --git a/code/modules/mob/living/silicon/pai/defense.dm b/code/modules/mob/living/silicon/pai/defense.dm index cb29a48f0c3a..cc1cf21f2a4c 100644 --- a/code/modules/mob/living/silicon/pai/defense.dm +++ b/code/modules/mob/living/silicon/pai/defense.dm @@ -16,6 +16,29 @@ else if(istype(W, /obj/item/card/id) && idaccessible == 0) to_chat(user, "[src] is not accepting access modifcations at this time.") return + else if(istype(W, /obj/item/clothing)) + var/obj/item/clothing/C = W + if(C.slot_flags & SLOT_HEAD) + base_uploaded_path = /obj/item/clothing/head + if(C.slot_flags & SLOT_ICLOTHING) + base_uploaded_path = /obj/item/clothing/under + if(C.slot_flags & SLOT_EYES) + base_uploaded_path = /obj/item/clothing/glasses + if(C.slot_flags & SLOT_GLOVES) + base_uploaded_path = /obj/item/clothing/gloves + if(C.slot_flags & SLOT_MASK) + base_uploaded_path = /obj/item/clothing/mask + if(C.slot_flags & SLOT_FEET) + base_uploaded_path = /obj/item/clothing/shoes + if(C.slot_flags & SLOT_OCLOTHING) + base_uploaded_path = /obj/item/clothing/suit + last_uploaded_path = W.type + + var/obj/item/clothing/under/U = C + if(istype(U)) + uploaded_snowflake_worn_state = U.snowflake_worn_state + + return else . = ..() diff --git a/code/modules/mob/living/silicon/pai/mobility.dm b/code/modules/mob/living/silicon/pai/mobility.dm index 5a026c9b307f..e2c1a31b5ed9 100644 --- a/code/modules/mob/living/silicon/pai/mobility.dm +++ b/code/modules/mob/living/silicon/pai/mobility.dm @@ -1,36 +1,35 @@ /mob/living/silicon/pai/restrained() - if(istype(src.loc,/obj/item/paicard)) + if(src.loc == shell) return FALSE ..() -//I'm not sure how much of this is necessary, but I would rather avoid issues. /mob/living/silicon/pai/proc/close_up() + // we can't close up if already inside our shell + if(src.loc == shell) + return - last_special = world.time + 20 + // we check mobility here to stop people folding up if they currently cannot move + if(!CHECK_MOBILITY(src, MOBILITY_CAN_MOVE)) + return - if(src.loc == card) + if(!can_action()) return - release_vore_contents() + last_special = world.time + 20 - var/turf/T = get_turf(src) - if(istype(T)) - T.visible_message("[src] neatly folds inwards, compacting down to a rectangular card.") + release_vore_contents() stop_pulling() - //stop resting - resting = FALSE - // If we are being held, handle removing our holder from their inv. var/obj/item/holder/H = loc if(istype(H)) H.forceMove(get_turf(src)) forceMove(get_turf(src)) - // Move us into the card and move the card to the ground. - card.forceMove(loc) - forceMove(card) + // Move us into the shell and move the shell to the ground. + transform_component.put_in_object() + update_perspective() set_resting(FALSE) update_mobility() @@ -40,34 +39,37 @@ /mob/living/silicon/pai/proc/open_up() last_special = world.time + 20 - //I'm not sure how much of this is necessary, but I would rather avoid issues. - if(istype(card.loc,/obj/item/hardsuit_module)) + // stops unfolding in hardsuits and vore bellies, if implanted you explode out + if(istype(shell.loc,/obj/item/hardsuit_module)) to_chat(src, "There is no room to unfold inside this hardsuit module. You're good and stuck.") return FALSE - else if(istype(card.loc,/mob)) - var/mob/holder = card.loc - var/datum/belly/inside_belly = check_belly(card) + else if(istype(shell.loc,/mob)) + var/mob/holder = shell.loc + var/datum/belly/inside_belly = check_belly(shell) if(inside_belly) to_chat(src, "There is no room to unfold in here. You're good and stuck.") return FALSE if(ishuman(holder)) var/mob/living/carbon/human/H = holder for(var/obj/item/organ/external/affecting in H.organs) - if(card in affecting.implants) + if(shell in affecting.implants) affecting.take_damage(rand(30,50)) - affecting.implants -= card + affecting.implants -= shell H.visible_message("\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!") break - holder.drop_item_to_ground(card, INV_OP_FORCE) - else if(istype(card.loc,/obj/item/pda)) - var/obj/item/pda/holder = card.loc + holder.drop_item_to_ground(shell, INV_OP_FORCE) + else if(istype(shell.loc,/obj/item/pda)) + var/obj/item/pda/holder = shell.loc holder.pai = null - forceMove(card.loc) - card.forceMove(src) + // handle the actual object stuffing via the component + transform_component.put_in_mob() + update_perspective() - card.screen_loc = null + var/obj/item/paicard/card = shell + if(istype(card)) + card.screen_loc = null var/turf/T = get_turf(src) if(istype(T)) @@ -106,9 +108,21 @@ // space movement (we get one ion burst every 3 seconds) /mob/living/silicon/pai/Process_Spacemove(movement_dir = NONE) . = ..() - if(!.) + if(!. && src.loc != shell) if(world.time >= last_space_movement + 30) last_space_movement = world.time // place an effect for the movement new /obj/effect/temp_visual/pai_ion_burst(get_turf(src)) return TRUE + +/mob/living/silicon/pai/proc/can_change_shell() + if(istype(src.loc, /mob)) + to_chat(src, "You're not able to change your shell while being held.") + return FALSE + if(stat != CONSCIOUS) + return FALSE + if(!can_action()) + return FALSE + if(!CHECK_MOBILITY(src, MOBILITY_CAN_MOVE)) + return FALSE + return TRUE diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index e9c28af19137..e55e796609f7 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -45,7 +45,8 @@ var/ram = 100 // Used as currency to purchase different abilities var/list/software = list() var/userDNA // The DNA string of our assigned user - var/obj/item/paicard/card // The card we inhabit + var/obj/item/shell // The shell we inhabit + var/obj/item/paicard/card // The card we belong to, it is not always our shell, but it is linked to us regardless var/obj/item/radio/radio // Our primary radio var/obj/item/communicator/integrated/communicator // Our integrated communicator. var/obj/item/pda/ai/pai/pda = null // Our integrated PDA @@ -74,6 +75,16 @@ "Canine" = list("yaps","barks","woofs"), ) + // shell transformation + var/global/list/possible_clothing_options = list( + "Maid Costume" = /obj/item/clothing/under/dress/maid/sexy, + "Grey Pleated Skirt" = /obj/item/clothing/under/color/grey_skirt, + "Last Uploaded Clothing" = null, + ) + var/obj/item/clothing/last_uploaded_path + var/obj/item/clothing/base_uploaded_path + var/uploaded_snowflake_worn_state + /// The cable we produce and use when door or camera jacking. var/obj/item/pai_cable/cable @@ -105,14 +116,20 @@ // space movement related var/last_space_movement = 0 + // transformation component + var/datum/component/object_transform/transform_component + /mob/living/silicon/pai/Initialize(mapload) . = ..() - card = loc + shell = loc + if(istype(shell, /obj/item/paicard)) + card = loc sradio = new(src) communicator = new(src) - if(card) - if(!card.radio) - card.radio = new /obj/item/radio(src.card) + if(shell) + transform_component = AddComponent(/datum/component/object_transform, shell, "neatly folds inwards, compacting down to a rectangular card", "folds outwards, expanding into a mobile form.") + if(card && !card.radio) + card.radio = new /obj/item/radio(src.card) radio = card.radio add_verb(src, /mob/living/silicon/pai/proc/choose_chassis) @@ -199,3 +216,48 @@ new_people_eaten += M.size_multiplier people_eaten = min(1, new_people_eaten) +// changing the shell +/mob/living/silicon/pai/proc/switch_shell(obj/item/new_shell) + // setup transform text + if(istype(new_shell, /obj/item/paicard)) + transform_component.to_object_text = "neatly folds inwards, compacting down to a rectangular card" + else + transform_component.to_object_text = "neatly folds inwards, compacting down into their shell" + + // swap the shell, if the old shell is our card we keep it, otherwise we delete it because it's not important + shell = new_shell + var/obj/item/old_shell = transform_component.swap_object(new_shell) + if(istype(old_shell, /obj/item/paicard)) + old_shell.forceMove(src) + else + QDEL_NULL(old_shell) + + // some sanity stuff because this is also putting us inside an object so we want to interrupt a couple of possible things such as pulling, resting, eating, viewing camera + release_vore_contents() + stop_pulling() + update_perspective() + set_resting(FALSE) + update_mobility() + remove_verb(src, /mob/living/silicon/pai/proc/pai_nom) + + // pass attack self on to the card regardless of our shell + if(!istype(new_shell, /obj/item/paicard)) + RegisterSignal(shell, COMSIG_ITEM_ATTACK_SELF, .proc/pass_attack_self_to_card) + +// changing the shell into clothing +/mob/living/silicon/pai/proc/change_shell_by_path(object_path) + if(!can_change_shell()) + return FALSE + + last_special = world.time + 20 + + var/obj/item/new_object = new object_path + new_object.name = src.name + new_object.desc = src.desc + new_object.forceMove(src.loc) + switch_shell(new_object) + return TRUE + +/mob/living/silicon/pai/proc/pass_attack_self_to_card() + if(istype(shell.loc, /mob/living/carbon)) + card.attack_self(shell.loc) diff --git a/code/modules/mob/living/silicon/pai/verbs.dm b/code/modules/mob/living/silicon/pai/verbs.dm index 2c214ff9ea86..1ed4938ef148 100644 --- a/code/modules/mob/living/silicon/pai/verbs.dm +++ b/code/modules/mob/living/silicon/pai/verbs.dm @@ -7,7 +7,7 @@ if(!can_action()) return // to fold out we need to be in the card - if(src.loc != card) + if(src.loc != shell) return open_up() @@ -22,7 +22,7 @@ if(!can_action()) return // to fold up we need to not be in the card already - if(src.loc == card) + if(src.loc == shell) return close_up() @@ -66,7 +66,7 @@ set category = "IC" // Pass lying down or getting up to our pet human, if we're in a hardsuit. - if(istype(src.loc,/obj/item/paicard)) + if(src.loc == shell) set_resting(FALSE) var/obj/item/hardsuit/hardsuit = src.get_hardsuit() if(istype(hardsuit)) @@ -115,3 +115,44 @@ if (stat != CONSCIOUS) return return feed_grabbed_to_self(src,T) + +/mob/living/silicon/pai/verb/change_shell_clothing() + set name = "pAI Clothing" + set category = "pAI Commands" + set desc = "Allows you to transform your shell into clothing." + + if(!can_change_shell()) + return + + var/clothing_entry = input(usr, "What clothing would you like to change your shell to?") as null|anything in possible_clothing_options + if(clothing_entry) + if(clothing_entry != "Last Uploaded Clothing") + change_shell_by_path(possible_clothing_options[clothing_entry]) + else + if(last_uploaded_path && can_change_shell()) + last_special = world.time + 20 + var/state = initial(last_uploaded_path.icon_state) + var/icon = initial(last_uploaded_path.icon) + var/obj/item/clothing/new_clothing = new base_uploaded_path + new_clothing.forceMove(src.loc) + new_clothing.name = src.name + new_clothing.desc = src.desc + new_clothing.icon = icon + new_clothing.icon_state = state + + var/obj/item/clothing/under/U = new_clothing + if(istype(U)) + U.snowflake_worn_state = uploaded_snowflake_worn_state + + switch_shell(new_clothing) + +/mob/living/silicon/pai/verb/revert_shell_to_card() + set name = "Reset Shell" + set category = "pAI Commands" + set desc = "Reverts your shell back to card form." + + if(!can_change_shell()) + return + if(!card || card.loc != src || card == shell) + return + switch_shell(card) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 6e03e78d6c80..3fdd8a484f74 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -635,3 +635,11 @@ var/list/global/organ_rel_size = list( . = JOINTEXT(.) if(re_encode) . = html_encode(.) + +/// if sufficent nutrition is present, take it and return true, otherwise just return false +/mob/proc/try_take_nutrition(var/amount) + if(nutrition >= amount) + nutrition = nutrition - amount + return TRUE + else + return FALSE diff --git a/code/modules/mob/movement.dm b/code/modules/mob/movement.dm index ab0cb5a37742..a1d8a8784a62 100644 --- a/code/modules/mob/movement.dm +++ b/code/modules/mob/movement.dm @@ -519,14 +519,15 @@ // Called when a mob successfully moves. // Would've been an /atom/movable proc but it caused issues. -/mob/Moved(atom/oldloc) +/mob/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) . = ..() client?.parallax_holder?.Update() for(var/obj/O in contents) - O.on_loc_moved(oldloc) + O.on_loc_moved(old_loc) reset_pixel_shifting() // Received from Moved(), useful for items that need to know that their loc just moved. +// todo: REMOVE, this is bad for performance. /obj/proc/on_loc_moved(atom/oldloc) return diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 9fe6bd1c69dc..e14fd0f798a2 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -192,7 +192,7 @@ icon_state = "stair_u" opacity = TRUE density = TRUE // Too high to simply step up on - climbable = TRUE // But they can be climbed if the bottom is out + climb_allowed = TRUE var/obj/structure/stairs/top/top = null var/obj/structure/stairs/bottom/bottom = null @@ -265,7 +265,7 @@ /obj/structure/stairs/middle/MouseDroppedOnLegacy(mob/target, mob/user) . = ..() if(check_integrity()) - do_climb(user) + do_climb_on(user) transition_atom(user, get_turf(top)) // You can't really drag things when you have to climb up the gap in the stairs yourself /obj/structure/stairs/middle/Bumped(mob/user) diff --git a/code/modules/organs/internal/species/xenos.dm b/code/modules/organs/internal/species/xenos.dm index f5314af880b4..8e41b7aab955 100644 --- a/code/modules/organs/internal/species/xenos.dm +++ b/code/modules/organs/internal/species/xenos.dm @@ -130,11 +130,17 @@ icon_state = "xenode" organ_tag = O_RESIN - /*organ_verbs = list( + organ_verbs = list( /mob/living/carbon/human/proc/resin, /mob/living/carbon/human/proc/plant ) - edit because the xenos that use it have the verbs anyways and hybrids dont want the plant verb*/ + +/obj/item/organ/internal/xenos/resinspinner/hybrid + name = "weakend resinspinner" + organ_verbs = list( + /mob/living/carbon/human/proc/hybrid_resin, + /mob/living/carbon/human/proc/hybrid_plant//replaced from the normal weed node to place a singular weed + ) /obj/item/organ/internal/xenos/resinspinner/grey icon_state = "xenode_grey" @@ -148,3 +154,8 @@ var/mob/living/carbon/human/H = owner if(H.species.blood_color) add_atom_colour(H.species.blood_color, FIXED_COLOUR_PRIORITY) + +/obj/item/organ/internal/heart/xenomorph + name = "xenomorph heart" + + diff --git a/code/modules/overmap/legacy/ships/computers/helm.dm b/code/modules/overmap/legacy/ships/computers/helm.dm index e90886ee0c12..c1a1c019300b 100644 --- a/code/modules/overmap/legacy/ships/computers/helm.dm +++ b/code/modules/overmap/legacy/ships/computers/helm.dm @@ -282,7 +282,9 @@ GLOBAL_LIST_EMPTY(all_waypoints) icon_keyboard = null icon_screen = null circuit = /obj/item/circuitboard/nav/tele - density = 0 + density = FALSE + depth_projected = FALSE + climb_allowed = FALSE /obj/machinery/computer/ship/navigation/telescreen/update_icon() if(machine_stat & NOPOWER || machine_stat & BROKEN) diff --git a/code/modules/overmap/legacy/spacetravel.dm b/code/modules/overmap/legacy/spacetravel.dm index 396b37cb5eef..e28e4a88668c 100644 --- a/code/modules/overmap/legacy/spacetravel.dm +++ b/code/modules/overmap/legacy/spacetravel.dm @@ -124,6 +124,11 @@ var/list/cached_space = list() ny = TRANSITIONEDGE + 2 nx = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2) + nz = SAFEPICK(M.map_z) + if(!isnull(nz)) + A.forceMove(locate(nx, ny, nz)) + return + testing("[A] spacemoving from [M] ([M.x], [M.y]).") var/turf/map = locate(M.x,M.y,(LEGACY_MAP_DATUM).overmap_z) diff --git a/code/modules/preferences/preference_setup/loadout/loadout_suit.dm b/code/modules/preferences/preference_setup/loadout/loadout_suit.dm index 3cb5f7cf4f42..ea580104b8a8 100644 --- a/code/modules/preferences/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/preferences/preference_setup/loadout/loadout_suit.dm @@ -272,6 +272,10 @@ varsities[initial(varsity.name)] = varsity gear_tweaks += new/datum/gear_tweak/path(tim_sort(varsities, /proc/cmp_text_asc)) +/datum/gear/suit/varsity_worn + name = "Varsity Jacket - Worn" + path = /obj/item/clothing/suit/storage/toggle/varsity/worn + /datum/gear/suit/track name = "Track Jacket - Selection" path = /obj/item/clothing/suit/storage/toggle/track diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index d2e2b3d3b6fa..bf7d6b858af2 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -10,7 +10,8 @@ anchored = TRUE unacidable = TRUE pass_flags = ATOM_PASS_TABLE - mouse_opacity = 0 + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + depth_level = INFINITY // nothing should be passing over us from depth ////TG PROJECTILE SYTSEM //Projectile stuff diff --git a/code/modules/rogueminer_vr/controller.dm b/code/modules/rogueminer_vr/controller.dm index 544a88088729..f5ebabf5bb69 100644 --- a/code/modules/rogueminer_vr/controller.dm +++ b/code/modules/rogueminer_vr/controller.dm @@ -142,7 +142,7 @@ var/datum/controller/rogue/rm_controller oldest_zone = ZM oldest_time = ZM.prepared_at - return oldest_zone + return oldest_zone || SAFEINDEXACCESS(all_zones, 1) /datum/controller/rogue/proc/mark_clean(var/datum/rogue/zonemaster/ZM) if(!(ZM in all_zones)) //What? Who? @@ -183,6 +183,11 @@ var/datum/controller/rogue/rm_controller /datum/controller/rogue/proc/prepare_new_zone() var/datum/rogue/zonemaster/ZM_target + if(clean_zones.len <= 1) //Need to clean the oldest one, too. + rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.") + var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone() + ZM_oldest.clean_zone() + if(clean_zones.len) ZM_target = pick(clean_zones) @@ -196,10 +201,4 @@ var/datum/controller/rogue/rm_controller else rm_controller.dbg("RMC(pnz): I was asked for a new zone but there's no space.") - if(clean_zones.len <= 1) //Need to clean the oldest one, too. - rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.") - spawn(0) //Detatch it so we can return the new zone for now. - var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone() - ZM_oldest.clean_zone() - return ZM_target diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 93007cb676fd..a4314251b010 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -3,7 +3,7 @@ desc = "Used to control a linked shuttle." icon_keyboard = "atmos_key" icon_screen = "shuttle" - circuit = null + circuit = /obj/item/circuitboard/shuttle_console var/shuttle_tag // Used to coordinate data in shuttle controller. var/hacked = 0 // Has been emagged, no access restrictions. diff --git a/code/modules/species/station/xenomorph_hybrids/hybrid_abilities.dm b/code/modules/species/station/xenomorph_hybrids/hybrid_abilities.dm index 8a3cd3839292..53cdedd199eb 100644 --- a/code/modules/species/station/xenomorph_hybrids/hybrid_abilities.dm +++ b/code/modules/species/station/xenomorph_hybrids/hybrid_abilities.dm @@ -9,3 +9,67 @@ if(O) O.color = "#422649" return + +/datum/ability/species/xenomorph_hybrid + action_icon = 'icons/screen/actions/xenomorph.dmi' + var/plasma_cost = 0 + +/datum/ability/species/xenomorph_hybrid/available_check() + . = ..() + if(.) + var/mob/living/carbon/human/H = owner + if(plasma_cost && !istype(H)) + return FALSE + if(plasma_cost > 0 && !check_plasmavessel(H)) + return FALSE + var/obj/item/organ/internal/xenos/plasmavessel/P = H.internal_organs_by_name[O_PLASMA] + if(istype(P) && P.stored_plasma < plasma_cost) + return FALSE + +/datum/ability/species/xenomorph_hybrid/proc/check_plasmavessel(var/mob/living/carbon/human/H) + var/obj/item/organ/internal/xenos/plasmavessel/P = H.internal_organs_by_name[O_PLASMA] + if(!istype(P)) + return FALSE + return TRUE + +/datum/ability/species/xenomorph_hybrid/proc/take_plasma(var/mob/living/carbon/human/H) + var/obj/item/organ/internal/xenos/plasmavessel/P = H.internal_organs_by_name[O_PLASMA] + if(!istype(P)) + return + P.adjust_plasma(-plasma_cost) + +/datum/ability/species/xenomorph_hybrid/on_trigger(mob/user, toggling) + . = ..() + take_plasma(user) + +/datum/ability/species/xenomorph_hybrid/regenerate + name = "Rest and regenerate" + desc = "Lie down and regenerate your health" + action_state = "regenerate" + windup = 0 SECOND + interact_type = ABILITY_INTERACT_TRIGGER + always_bind = TRUE + ability_check_flags = ABILITY_CHECK_RESTING + mobility_check_flags = MOBILITY_IS_CONSCIOUS + plasma_cost = 10 + +/datum/ability/species/xenomorph_hybrid/regenerate/on_trigger() + . = ..() + var/mob/living/carbon/human/O = owner + if(istype(O)) + to_chat(O, SPAN_NOTICEALIEN("We begin to mend our wounds.")) + O.active_regen = TRUE + + if (O.getBruteLoss() == 0) //If we have no flat damage remaining, fix internal issues, and not running around + for(var/limb_type in O.species.has_limbs) + var/obj/item/organ/external/E = O.organs_by_name[limb_type] + if((E.status & ORGAN_BROKEN)) + E.status &= ~ORGAN_BROKEN + to_chat(O, SPAN_NOTICEALIEN("You mend the bone in your [E]")) + return//fix one then stop, trigger again to mend more + + + + + + diff --git a/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm b/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm index bc0c3433767d..e8761a3cce83 100644 --- a/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm +++ b/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm @@ -50,15 +50,14 @@ /mob/living/proc/shred_limb, /mob/living/carbon/human/proc/tie_hair, /mob/living/carbon/human/proc/psychic_whisper, - /mob/living/carbon/human/proc/hybrid_resin, - /mob/living/carbon/human/proc/hybrid_plant//replaced from the normal weed node to place a singular weed ) abilities = list( /datum/ability/species/sonar, /datum/ability/species/toggle_agility, + /datum/ability/species/xenomorph_hybrid/regenerate, ) - total_health = 110 //Exoskeleton makes you tougher than baseline + total_health = 150 //Exoskeleton makes you tougher than baseline brute_mod = 0.95 // Chitin is somewhat hard to crack burn_mod = 1.5 // Natural enemy of xenomorphs is fire. Upgraded to Major Burn Weakness. Reduce to Minor if this is too harsh. blood_volume = 560 //Baseline @@ -95,46 +94,51 @@ O_PLASMA = /obj/item/organ/internal/xenos/plasmavessel/hunter,//Important for the xenomorph abilities, hunter to have a pretty small plasma capacity O_STOMACH = /obj/item/organ/internal/stomach, O_INTESTINE = /obj/item/organ/internal/intestine, - O_RESIN = /obj/item/organ/internal/xenos/resinspinner, + O_RESIN = /obj/item/organ/internal/xenos/resinspinner/hybrid, ) vision_organ = O_BRAIN//Neomorphs have no (visible) Eyes, seeing without them should be possible. reagent_tag = IS_XENOHYBRID + var/heal_rate = 0.5 //Lets just create a set number + /datum/species/xenohybrid/can_breathe_water() return TRUE //they dont quite breathe -/datum/species/xenohybrid/handle_environment_special(var/mob/living/carbon/human/H) - var/heal_amount = min(H.nutrition, 200) / 50 //Not to much else we might as well give them a diona like healing - H.nutrition = max(H.nutrition-heal_amount,0) - - if(H.resting) - heal_amount *= 1.05//resting allows you to heal a little faster - var/fire_damage = H.getFireLoss() - if(fire_damage >= heal_amount) - H.adjustFireLoss(-heal_amount) - heal_amount = 0; - return - if(fire_damage < heal_amount) - H.adjustFireLoss(-heal_amount) - heal_amount -= fire_damage - - var/trauma_damage = H.getBruteLoss() - if(trauma_damage >= heal_amount) - H.adjustBruteLoss(-heal_amount) - heal_amount = 0; +/datum/species/xenohybrid/proc/handle_healing_conditions(var/mob/living/carbon/human/H) + var/healing_factor = 1 + if(H.lying) + healing_factor *= 1.2 + if(H.active_regen) + if(!H.lying) + to_chat(H, SPAN_BOLDWARNING("You need to lie down to benefit from your enhanced regeneration")) + H.active_regen = FALSE + else if(H.nutrition < 50) + to_chat(H, SPAN_BOLDWARNING("You are too hungry to benefit from your enhanced regeneration")) + H.active_regen = FALSE + healing_factor *= 4 + var/turf/T = get_turf(H) + if(/obj/effect/alien/weeds in T.contents) + healing_factor *= 1.1 + if(/obj/structure/bed/hybrid_nest in T.contents) + healing_factor *= 1.2 + + return healing_factor // highest value is 6,336 + +/datum/species/xenohybrid/handle_environment_special(mob/living/carbon/human/H) + var/heal_amount = heal_rate * handle_healing_conditions(H) + + var/nutrition_debt = (H.getFireLoss() ? heal_rate : 0)//Heal rate and not heal_amount, since we want to reward taking the modifiers + H.adjustFireLoss(-heal_amount) + nutrition_debt += (H.getBruteLoss() ? heal_rate : 0) + H.adjustBruteLoss(-heal_amount) + nutrition_debt += (H.getToxLoss() ? heal_rate : 0) + H.adjustToxLoss(-heal_amount) + + H.nutrition -= nutrition_debt + if(H.nutrition < 100 || heal_amount <= 0.6) return - if(trauma_damage < heal_amount) - H.adjustBruteLoss(-heal_amount) - heal_amount -= trauma_damage - - var/posion_damage = H.getToxLoss() - if(posion_damage >= heal_amount) - H.adjustToxLoss(-heal_amount) - heal_amount = 0; - return - if(posion_damage < heal_amount) - H.adjustToxLoss(-heal_amount) - heal_amount -= posion_damage - H.nutrition += heal_amount + if(H.vessel.get_reagent_amount("blood") <= blood_level_safe && H.try_take_nutrition(heal_amount * 4)) + H.vessel.add_reagent("blood", heal_amount)//instead of IB healing, they regenerate blood a lot faster + diff --git a/code/modules/species/xenomorphs/alien_species.dm b/code/modules/species/xenomorphs/alien_species.dm index a247e87a2235..20b21f2e7cc5 100644 --- a/code/modules/species/xenomorphs/alien_species.dm +++ b/code/modules/species/xenomorphs/alien_species.dm @@ -198,10 +198,8 @@ inherent_verbs = list( /mob/living/proc/ventcrawl, /mob/living/carbon/human/proc/regurgitate, - /mob/living/carbon/human/proc/plant, /mob/living/carbon/human/proc/transfer_plasma, /mob/living/carbon/human/proc/evolve, - /mob/living/carbon/human/proc/resin, /mob/living/carbon/human/proc/corrosive_acid ) @@ -310,12 +308,10 @@ /mob/living/carbon/human/proc/psychic_whisper, /mob/living/carbon/human/proc/regurgitate, /mob/living/carbon/human/proc/lay_egg, - /mob/living/carbon/human/proc/plant, /mob/living/carbon/human/proc/transfer_plasma, /mob/living/carbon/human/proc/corrosive_acid, /mob/living/carbon/human/proc/neurotoxin, /mob/living/carbon/human/proc/acidspit, - /mob/living/carbon/human/proc/resin ) /datum/species/xenos/queen/handle_login_special(var/mob/living/carbon/human/H) diff --git a/code/modules/tables/flipping.dm b/code/modules/tables/flipping.dm index e271b22d1388..b3f7b6cefd0a 100644 --- a/code/modules/tables/flipping.dm +++ b/code/modules/tables/flipping.dm @@ -26,11 +26,7 @@ return usr.visible_message("[usr] flips \the [src]!") - - if(climbable) - structure_shaken() - - return + shake_climbers() /obj/structure/table/proc/unflipping_check(var/direction) @@ -86,7 +82,7 @@ if(dir != NORTH) plane = MOB_PLANE layer = ABOVE_MOB_LAYER - climbable = 0 //flipping tables allows them to be used as makeshift barriers + climb_delay = 10 SECONDS flipped = 1 atom_flags |= ATOM_BORDER for(var/D in list(turn(direction, 90), turn(direction, -90))) @@ -105,7 +101,7 @@ reset_plane_and_layer() flipped = 0 - climbable = initial(climbable) + climb_delay = initial(climb_delay) atom_flags &= ~ATOM_BORDER for(var/D in list(turn(dir, 90), turn(dir, -90))) var/obj/structure/table/T = locate() in get_step(src.loc,D) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 06e121332be8..9cca6dc8612a 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -8,7 +8,6 @@ var/list/table_icon_cache = list() density = TRUE pass_flags_self = ATOM_PASS_THROWN | ATOM_PASS_CLICK | ATOM_PASS_TABLE | ATOM_PASS_OVERHEAD_THROW | ATOM_PASS_BUCKLED anchored = TRUE - climbable = TRUE layer = TABLE_LAYER surgery_odds = 66 connections = list("nw0", "ne0", "sw0", "se0") @@ -17,6 +16,10 @@ var/list/table_icon_cache = list() smoothing_groups = (SMOOTH_GROUP_TABLES) canSmoothWith = (SMOOTH_GROUP_TABLES + SMOOTH_GROUP_LOW_WALL) + climb_allowed = TRUE + depth_level = 8 + depth_projected = TRUE + var/flipped = 0 var/maxhealth = 10 var/health = 10 diff --git a/icons/clothing/suit/jackets/varsity.dmi b/icons/clothing/suit/jackets/varsity.dmi new file mode 100644 index 000000000000..0c0ee857ed87 Binary files /dev/null and b/icons/clothing/suit/jackets/varsity.dmi differ diff --git a/icons/mob/clothing/suits.dmi b/icons/mob/clothing/suits.dmi index 2a298a72b349..b346f0956a13 100644 Binary files a/icons/mob/clothing/suits.dmi and b/icons/mob/clothing/suits.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index dec9932786cb..6c3b3a26b7ae 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/screen/actions/actions.dmi b/icons/screen/actions/actions.dmi index 34745da5dd54..e5b965bf4378 100644 Binary files a/icons/screen/actions/actions.dmi and b/icons/screen/actions/actions.dmi differ diff --git a/icons/screen/actions/xenomorph.dmi b/icons/screen/actions/xenomorph.dmi new file mode 100644 index 000000000000..0fba88bfd723 Binary files /dev/null and b/icons/screen/actions/xenomorph.dmi differ diff --git a/maps/rift/levels/rift-06-surface3.dmm b/maps/rift/levels/rift-06-surface3.dmm index b809b260383a..aac68e0f2bc8 100644 --- a/maps/rift/levels/rift-06-surface3.dmm +++ b/maps/rift/levels/rift-06-surface3.dmm @@ -9960,25 +9960,10 @@ /turf/simulated/floor/tiled/steel, /area/crew_quarters/heads/hop) "aBw" = ( -/obj/machinery/holopad, -/obj/machinery/ai_slipper, -/obj/machinery/button/remote/blast_door{ - dir = 4; - id = "AILockdown"; - name = "AI Upload Lockdown"; - pixel_x = -26; - pixel_y = 6 - }, -/obj/machinery/button/remote/blast_door{ - dir = 4; - id = "AICore"; - name = "AI Bunker Lockdown"; - pixel_x = -26; - pixel_y = -6 - }, /obj/machinery/light{ dir = 8 }, +/obj/machinery/media/jukebox, /turf/simulated/floor/tiled/techfloor/grid, /area/ai) "aBy" = ( @@ -20178,6 +20163,11 @@ /obj/structure/railing, /turf/simulated/open, /area/maintenance/station/exploration) +"fax" = ( +/obj/structure/foamedmetal, +/obj/structure/grille, +/turf/space/basic, +/area/rift/surfacebase/outside/outside3) "fbX" = ( /obj/machinery/door/blast/regular, /turf/simulated/floor/reinforced, @@ -21591,6 +21581,11 @@ }, /turf/simulated/floor/tiled/steel_grid, /area/exploration/explorer_prep) +"iKl" = ( +/obj/structure/foamedmetal, +/obj/structure/grille, +/turf/simulated/floor/plating, +/area/rift/surfacebase/outside/outside3) "iLh" = ( /obj/structure/cable{ icon_state = "1-4" @@ -23313,6 +23308,24 @@ }, /turf/simulated/floor/tiled/steel, /area/hallway/secondary/docking_hallway) +"neL" = ( +/obj/machinery/holopad, +/obj/machinery/ai_slipper, +/obj/machinery/button/remote/blast_door{ + id = "AILockdown"; + name = "AI Upload Lockdown"; + pixel_x = -26; + pixel_y = 30 + }, +/obj/machinery/button/remote/blast_door{ + dir = 1; + id = "AICore"; + name = "AI Bunker Lockdown"; + pixel_x = -26; + pixel_y = -30 + }, +/turf/simulated/floor/tiled/techfloor/grid, +/area/ai) "nfJ" = ( /turf/simulated/wall/prepainted, /area/hallway/primary/surfacethree) @@ -24527,6 +24540,11 @@ /obj/spawner/window/low_wall/reinforced/full/firelocks, /turf/simulated/floor/plating, /area/rift/trade_shop/landing_pad) +"quy" = ( +/obj/structure/grille, +/obj/structure/foamedmetal, +/turf/simulated/wall/prepainted, +/area/rift/surfacebase/outside/outside3) "qvL" = ( /obj/effect/floor_decal/borderfloor{ dir = 8 @@ -27323,6 +27341,11 @@ }, /turf/simulated/floor/tiled/steel, /area/hallway/secondary/docking_hallway2) +"xUe" = ( +/obj/structure/foamedmetal, +/obj/structure/grille, +/turf/space/basic, +/area/ai) "xVh" = ( /obj/effect/floor_decal/borderfloor{ dir = 8 @@ -54161,23 +54184,23 @@ hNS hNS aBL bWN -aXk -aCI +fax +xUe eod -aCa -aAi -aAi +eod +aTG +aTG aSo -aNN +aza aBw -aNN -aEW -akH -akH -aVl -uom -huX -aXk +aza +aAi +aTG +aTG +eod +eod +eod +fax cYF afq afq @@ -54355,23 +54378,23 @@ alx hNS aBL bWN -aXk +iKl aCI eod -eod -awN -aTG +aCa +aAi +aAi aSo -aza -aOb -aza -agK -aTG -awN -eod -eod -eod -aXk +aNN +neL +aNN +aEW +akH +akH +aVl +uom +huX +iKl cYF afq afq @@ -54550,22 +54573,22 @@ hNS aBL bWN aXk -aXk -eod +aCI eod eod +awN aTG -acv -aza +aSo aza +aOb aza -aFj +agK aTG +awN eod eod eod -aXk -aXk +quy cYF afq afq @@ -54748,19 +54771,19 @@ aXk eod eod eod -awN -aOw -atr -aAi -aEW -anS -awN +aTG +acv +aza +aza +aza +aFj +aTG +eod eod eod aXk aXk cYF -cYF afq afq afq @@ -54939,19 +54962,20 @@ aBL bWN aXk aXk -aXk -eod -eod eod eod -ahF -aQU -aWy -eod eod +awN +aOw +atr +aAi +aEW +anS +awN eod eod aXk +aXk cYF cYF afq @@ -55029,7 +55053,6 @@ afq afq afq afq -afq aXj "} (143,1,1) = {" @@ -55131,23 +55154,23 @@ mEN aBL bWN bWN -cYF -cYF +aXk aXk aXk eod eod eod eod -eod +ahF +aQU +aWy eod eod eod eod aXk -aXk cYF -afq +cYF afq afq afq @@ -55325,7 +55348,6 @@ mEN aBL bWN bWN -afq cYF cYF aXk @@ -55336,11 +55358,12 @@ eod eod eod eod -aXk +eod +eod +eod aXk aXk cYF -cYF afq afq afq @@ -55520,21 +55543,21 @@ aBL aBL bWN afq -afq cYF cYF aXk aXk -aXk -aXk -aXk +eod +eod +eod +eod +eod +eod aXk aXk aXk cYF cYF -cYF -afq afq afq afq @@ -55715,14 +55738,16 @@ aBL bWN afq afq -afq -cYF -cYF -cYF -cYF -cYF cYF cYF +aXk +aXk +aXk +aXk +aXk +aXk +aXk +aXk cYF cYF cYF @@ -55804,8 +55829,6 @@ afq afq afq afq -afq -afq aXj "} (147,1,1) = {" @@ -55910,16 +55933,16 @@ bWN afq afq afq -afq -afq -afq -afq -afq -afq -afq -afq -afq -afq +cYF +cYF +cYF +cYF +cYF +cYF +cYF +cYF +cYF +cYF afq afq afq diff --git a/maps/triumph/levels/deck3.dmm b/maps/triumph/levels/deck3.dmm index 8a96fef650f3..7dbe9b1170a9 100644 --- a/maps/triumph/levels/deck3.dmm +++ b/maps/triumph/levels/deck3.dmm @@ -4550,6 +4550,10 @@ }, /turf/simulated/floor/bluegrid, /area/rnd/xenobiology) +"dWe" = ( +/obj/landmark/spawnpoint/latejoin/station/cyborg, +/turf/simulated/floor/tiled/old_cargo/gray, +/area/assembly/robotics) "dWq" = ( /obj/machinery/atmospherics/pipe/simple/hidden/black, /obj/structure/cable/green{ @@ -26959,6 +26963,10 @@ }, /turf/simulated/floor/tiled/white, /area/medical/psych_ward) +"whU" = ( +/obj/landmark/spawnpoint/job/cyborg, +/turf/simulated/floor/tiled/techfloor, +/area/assembly/chargebay) "whY" = ( /obj/machinery/light{ dir = 1 @@ -34688,7 +34696,7 @@ ixf vGq wLK vGq -vGq +dWe wgM wor fUO @@ -36105,7 +36113,7 @@ biL jgu wQJ dXc -jEz +whU rLt sGT oYT @@ -36247,7 +36255,7 @@ fJP afy sGT mrJ -jEz +whU rLt sGT vQV diff --git a/maps/triumph/levels/deck4.dmm b/maps/triumph/levels/deck4.dmm index 7374fbd1bf2c..dbaf67071b41 100644 --- a/maps/triumph/levels/deck4.dmm +++ b/maps/triumph/levels/deck4.dmm @@ -29831,6 +29831,10 @@ /obj/structure/reagent_dispensers/beerkeg, /turf/simulated/floor/plating, /area/maintenance/central) +"vbT" = ( +/obj/landmark/spawnpoint/overflow/station, +/turf/simulated/floor/tiled/dark, +/area/hallway/primary/aft) "vbU" = ( /obj/machinery/power/smes/buildable{ charge = 5000; @@ -41204,7 +41208,7 @@ mSI psD psD psD -psD +vbT opV psD byi diff --git a/maps/triumph/triumph.dm b/maps/triumph/triumph.dm index 684cb2ed4e6b..458e1c369652 100644 --- a/maps/triumph/triumph.dm +++ b/maps/triumph/triumph.dm @@ -22,6 +22,7 @@ /datum/map/sector/tradeport_140, /datum/map/sector/lavaland_140, /datum/map/sector/roguemining_140/one, + /datum/map/sector/mining_140, ) //* LEGACY BELOW *// @@ -34,6 +35,7 @@ /datum/shuttle/autodock/overmap/mining/triumph, /datum/shuttle/autodock/overmap/civvie/triumph, /datum/shuttle/autodock/overmap/courser/triumph, + /datum/shuttle/autodock/ferry/belter, ) full_name = "NSV Triumph"