diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index 61e74cb8909..94d9d05c787 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -145,7 +145,7 @@ display_name = "Tadpole NK-Haul Model" /datum/map_template/shuttle/minidropship/mobile_bar - suffix = "_mobile_bar" + suffix = "_mobile_bar" description = "A Tadpole modified to provide drinks and disservices. God dammit it's him again, I thought we got rid of him." display_name = "Tadpole Mobile-Bar Model" admin_enable = FALSE @@ -156,7 +156,7 @@ display_name = "Tadpole Combat Model" /datum/map_template/shuttle/minidropship/umbilical - suffix = "_umbilical" + suffix = "_umbilical" description = "A high-point orbital shuttle with a tactical umbilical airlock for insertion of ground troops." display_name = "Tadpole Umbilical Model" diff --git a/code/game/objects/machinery.dm b/code/game/objects/machinery.dm index a5544594f8d..7a59371e96c 100644 --- a/code/game/objects/machinery.dm +++ b/code/game/objects/machinery.dm @@ -20,6 +20,8 @@ var/wrenchable = FALSE var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created var/mob/living/carbon/human/operator + //weight for tad check + var/weight_mashinery = 0 ///Whether bullets can bypass the object even though it's dense allow_pass_flags = PASSABLE diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index ff11335af18..aa0bcaa1e72 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -4,6 +4,7 @@ var/climb_delay = 50 var/flags_barrier = NONE var/broken = FALSE //similar to machinery's stat BROKEN + var/weight_structure = 1 obj_flags = CAN_BE_HIT anchored = TRUE allow_pass_flags = PASSABLE diff --git a/code/game/objects/structures/barricade.dm b/code/game/objects/structures/barricade.dm index 41229db0680..0aa2cd87df9 100644 --- a/code/game/objects/structures/barricade.dm +++ b/code/game/objects/structures/barricade.dm @@ -11,6 +11,7 @@ interaction_flags = INTERACT_CHECK_INCAPACITATED max_integrity = 100 flags_barrier = HANDLE_BARRIER_CHANCE + weight_structure = 1 ///The type of stack the barricade dropped when disassembled if any. var/stack_type ///The amount of stack dropped when disassembled at full health diff --git a/code/modules/reqtorio/machines.dm b/code/modules/reqtorio/machines.dm index f00278aaed7..a19a73e77a3 100644 --- a/code/modules/reqtorio/machines.dm +++ b/code/modules/reqtorio/machines.dm @@ -7,6 +7,7 @@ resistance_flags = XENO_DAMAGEABLE flags_atom = PREVENT_CONTENTS_EXPLOSION interaction_flags = INTERACT_MACHINE_TGUI + weight_mashinery = 1 ///Curent items being processed var/list/held_items ///Icon state displayed while something is being processed in the machine @@ -151,6 +152,7 @@ anchored = FALSE // start off unanchored so its easier to move resistance_flags = XENO_DAMAGEABLE flags_atom = PREVENT_CONTENTS_EXPLOSION + weight_mashinery = 3 ///Curent items being processed var/item_to_fabricate = /obj/item/stack/sheet/metal/large_stack ///Icon state displayed while something is being processed in the machine diff --git a/code/modules/shuttle/mini_dropship.dm b/code/modules/shuttle/mini_dropship.dm index 829c4d17ac8..a109e638af9 100644 --- a/code/modules/shuttle/mini_dropship.dm +++ b/code/modules/shuttle/mini_dropship.dm @@ -116,9 +116,33 @@ shuttle_port.assigned_transit.reserved_area.set_turf_type(/turf/open/space/transit/atmos) open_prompt = TRUE +/obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/proc/checkpayload() + var/area/tadarea = get_area(src) + var/weightintad = 0 + for(var/turf/turfcontent in tadarea) + for(var/objectontad in turfcontent.contents) + if(isliving(objectontad)) + var/mob/living/living = objectontad + weightintad += living.mob_size + if(isvehicle(objectontad)) + var/obj/vehicle/vehicle = objectontad + weightintad += vehicle.weight_vehcial + if(ismachinery(objectontad)) + var/obj/machinery/machinery = objectontad + weightintad += machinery.weight_mashinery + if(isstructure(objectontad)) + var/obj/structure/structure = objectontad + weightintad += structure.weight_structure + if(weightintad > 60) + return FALSE + return TRUE + ///The action of taking off and sending the shuttle to the atmosphere /obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/proc/take_off() shuttle_port = SSshuttle.getShuttle(shuttleId) + if(!checkpayload()) + to_chat(ui_user, span_warning("Tad too heavy to liftoff")) + return #ifndef TESTING if(!(shuttle_port.shuttle_flags & GAMEMODE_IMMUNE) && world.time < SSticker.round_start_time + SSticker.mode.deploy_time_lock) to_chat(ui_user, span_warning("The mothership is too far away from the theatre of operation, we cannot take off.")) @@ -142,6 +166,11 @@ ///The action of sending the shuttle back to its shuttle port on main ship /obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/proc/return_to_ship() + if(!checkpayload()) + to_chat(ui_user, span_warning("Tad too heavy to liftoff")) + to_chat(ui_user, span_userdanger("EMERGENCY LANDING")) + SSshuttle.moveShuttleToDock(shuttleId, last_valid_ground_port, TRUE) + return shuttle_port = SSshuttle.getShuttle(shuttleId) shuttle_port.shuttle_computer = src to_transit = TRUE diff --git a/code/modules/vehicles/__vehicle.dm b/code/modules/vehicles/__vehicle.dm index 00b7552d921..f190e1a0dad 100644 --- a/code/modules/vehicles/__vehicle.dm +++ b/code/modules/vehicles/__vehicle.dm @@ -43,6 +43,8 @@ ///This vehicle will follow us when we move (like atrailer duh) var/obj/vehicle/trailer var/are_legs_exposed = FALSE + // for tad check, how heavy is vehical + var/weight_vehcial = 3 /obj/vehicle/Initialize(mapload) . = ..() diff --git a/code/modules/vehicles/armored/__armored.dm b/code/modules/vehicles/armored/__armored.dm index 9a0a4566b72..0f8e742a953 100644 --- a/code/modules/vehicles/armored/__armored.dm +++ b/code/modules/vehicles/armored/__armored.dm @@ -15,6 +15,7 @@ move_delay = 0.7 SECONDS max_integrity = 600 light_range = 10 + weight_vehcial = 5 ///Tank bitflags var/flags_armored = ARMORED_HAS_PRIMARY_WEAPON|ARMORED_HAS_HEADLIGHTS ///Sound file(s) to play when we drive around diff --git a/code/modules/vehicles/armored/_multitile.dm b/code/modules/vehicles/armored/_multitile.dm index f5be801c3c7..47572db21e2 100644 --- a/code/modules/vehicles/armored/_multitile.dm +++ b/code/modules/vehicles/armored/_multitile.dm @@ -16,6 +16,7 @@ light_pixel_y= 32 pixel_x = -56 pixel_y = -48 + weight_vehcial = 10 max_integrity = 700 soft_armor = list(MELEE = 40, BULLET = 99 , LASER = 99, ENERGY = 60, BOMB = 60, BIO = 60, FIRE = 50, ACID = 40) hard_armor = list(MELEE = 0, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)