Skip to content

Commit

Permalink
Mech update 3 (The forklifting update) (discordia-space#8378)
Browse files Browse the repository at this point in the history
* p1

* p2

* sisyphus struggle

* Fixes and HUD additions

* final fixes to mech huds.

* ssa

* the pulling , the medical and the ugly framework

* fixes

* fix 2

* more code , more fuel , more modules , more stuff.

* content

* fix

* fixes for multiple bugs

* Fixes mech breathing , lts mechs be built without arms/head, Additional handlign for no head /  arms , component gibbing , mech interaction for generators./

* fixes + the beginning of the forklifts.

* forklifting championship part 1

* Sacrifices in the name of forklifting championships..

* fixes

* more mech fixes

* more fixes

* Unleahs the forklift upon this universe

* fix

* i heard you like to lift..

* more fixes + fix for throwing shit whilst inside of other stuff.

* extra mech examine data.

* more fixes.

* Add functionality for removing people from forklifts / towing hooks + more examine text fixe.s

* Fixes + FORKLIFTING CHECKS!!!!!

* last Fixes.

* More examines + a new seat on the forklift chassis.

* Flip this around so it doesnt always give energy.

* Fix UI sometimes glitching , fix door forcing being do-able with light arms and clamper arms, fixes draining fuel generators

* Update utility.dm

* Update frame.dm

* fixes for bugs.

* fix for integrations

* Add all the modules to research + give them research data and material costs.

* f

* f2

* fix + reduce  use delay on auto mender

* fix integrations

* Update mech_damage.dm

* Update utility.dm

* better balance for wheels

* update b-shield sprites + make undeploying it much faster.

* Update utility.dm

* Update shield generator sprites.

* switch around a icon_state update and shield icons.
  • Loading branch information
MLGTASTICa authored Dec 15, 2023
1 parent 8ec1ce7 commit fcc3202
Show file tree
Hide file tree
Showing 53 changed files with 1,874 additions and 167 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
#define COMSIG_MOVABLE_Z_CHANGED "movable_z_moved" //from atom/movable/Move and forceMove): (oldz, newz)
#define COMSIG_MOVABLE_PREMOVE "moveable_boutta_move"

#define COMSIG_ATTEMPT_PULLING "attempt_pulling"
#define COMSIG_PULL_CANCEL (1<<0)

// /mob signals
#define COMSIG_MOB_LIFE "mob_life" //from mob/Life()
#define COMSIG_MOB_LOGIN "mob_login" //from mob/Login()
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
return 1

if(in_throw_mode)
if(isturf(A) || isturf(A.loc))
if(isturf(A) || isturf(A.loc) && isturf(loc))
throw_item(A)
return 1
throw_mode_off()
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
var/list/target_procs = (procs[target] ||= list())
var/list/lookup = (target.comp_lookup ||= list())


if(!override && target_procs[signal_type])
var/override_message = "[signal_type] overridden. Use override = TRUE to suppress this warning.\nTarget: [target] ([target.type]) Proc: [proctype]"
//log_signal(override_message)
Expand Down
6 changes: 6 additions & 0 deletions code/datums/movement/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@
else
M.stop_pulling()

if(istype(mob.loc, /obj/item/mech_equipment/forklifting_system))
if(mover == mob && isliving(mob))
mob:resist()
return MOVEMENT_STOP


return MOVEMENT_PROCEED


Expand Down
6 changes: 5 additions & 1 deletion code/datums/wires/wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
var/mob/living/L = usr
if(CanUse(L) && href_list["action"])
var/obj/item/I = L.get_active_hand()
holder.add_hiddenprint(L)
if(!ismech(L.loc))
holder.add_hiddenprint(L)
else
var/mob/living/exosuit/mech = L.loc
I = mech.get_active_hand()
if(href_list["cut"]) // Toggles the cut/mend status
if (!istype(I))
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ its easier to just keep the beam vertical.
/atom/movable/proc/fall_impact(turf/from, turf/dest)

//If atom stands under open space, it can prevent fall, or not
/atom/proc/can_prevent_fall()
/atom/proc/can_prevent_fall(above, atom/movable/thing)
return FALSE

// Show a message to all mobs and objects in sight of this atom
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
GLOB.all_doors -= src
..()

/obj/machinery/door/can_prevent_fall()
return density
/obj/machinery/door/can_prevent_fall(above)
return above ? density : null

/obj/machinery/door/attack_generic(mob/user, var/damage)
if(damage >= resistance)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/catwalk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@
return


/obj/structure/catwalk/can_prevent_fall()
return FALSE
/obj/structure/catwalk/can_prevent_fall(above)
return above ? FALSE : TRUE
8 changes: 6 additions & 2 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
var/store_mobs = 1
var/old_chance = 0 //Chance to have rusted closet content in it, from 0 to 100. Keep in mind that chance increases in maints

/obj/structure/closet/can_prevent_fall()
return TRUE
/obj/structure/closet/can_prevent_fall(above)
return above ? TRUE : FALSE

/obj/structure/closet/Initialize(mapload)
..()
Expand Down Expand Up @@ -350,6 +350,10 @@
//Empty gripper attacks will call attack_AI
return FALSE

/// So mechs dont open these when attacking.
if(istype(I, /obj/item/mech_equipment/forklifting_system))
return FALSE

var/list/usable_qualities = list(QUALITY_WELDING)
if(opened)
usable_qualities += QUALITY_SAWING
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/lattice.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@
return


/obj/structure/lattice/can_prevent_fall()
return TRUE
/obj/structure/lattice/can_prevent_fall(above)
return above ? FALSE : TRUE
6 changes: 3 additions & 3 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

atmos_canpass = CANPASS_PROC

/obj/structure/window/can_prevent_fall()
return !is_fulltile()
/obj/structure/window/can_prevent_fall(above)
return above ? !is_fulltile() : FALSE

/obj/structure/window/get_fall_damage(var/turf/from, var/turf/dest)
var/damage = health * 0.4 * get_health_ratio()
Expand Down Expand Up @@ -357,7 +357,7 @@ proc/end_grab_onto(mob/living/user, mob/living/target)
usable_qualities.Add(QUALITY_SEALING)

//If you set intent to harm, you can hit the window with tools to break it. Set to any other intent to use tools on it
if (usr.a_intent != I_HURT)
if (user.a_intent != I_HURT)
var/tool_type = I.get_tool_type(user, usable_qualities, src)
switch(tool_type)
if(QUALITY_SEALING)
Expand Down
5 changes: 4 additions & 1 deletion code/game/turfs/simulated/wall_attacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@
return

//get the user's location
if(!istype(user.loc, /turf)) return //can't do this stuff whilst inside objects and such
if(!istype(user.loc, /turf))
if(!(ismech(user.loc) && istype(I, /obj/item/tool/mech_kit)))
return


if(I)
radiate()
Expand Down
Loading

0 comments on commit fcc3202

Please sign in to comment.