Makes borgs take damage from being flung into objects (#23000)

* we are so back

* Makes it compile

* Vendors, walls, windows and consoles done

* Blob and living mobs

* Magpulses are now based on traits

* Gives borgs the trait by action button

* Fixes modsuits

* Update code/game/objects/objs.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/turfs/turf.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/living.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Fixes Thunk

* Actually fixes it

* I took an L (away from the trait)

* One proc now

* Update code/modules/clothing/shoes/magboots.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/clothing/shoes/magboots.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
DGamerL
2023-12-13 15:22:02 +00:00
committed by GitHub
co-authored by Burzah Henri215
parent 2c85645444
commit 962e78a363
23 changed files with 108 additions and 70 deletions
+2 -2
View File
@@ -612,9 +612,9 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
var/damage = 10 + 1.5 * speed // speed while thrower is standing still is 2, while walking with an aggressive grab is 2.4, highest speed is 14
hit_atom.hit_by_thrown_carbon(src, throwingdatum, damage, FALSE, FALSE)
hit_atom.hit_by_thrown_mob(src, throwingdatum, damage, FALSE, FALSE)
/mob/living/carbon/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
/mob/living/carbon/hit_by_thrown_mob(mob/living/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
for(var/obj/item/dualsaber/D in contents)
if(HAS_TRAIT(D, TRAIT_WIELDED) && D.force)
visible_message("<span class='danger'>[src] impales [C] with [D], before dropping them on the ground!</span>")
+7 -3
View File
@@ -1102,7 +1102,7 @@
stop_pulling()
return ..()
/mob/living/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
/mob/living/hit_by_thrown_mob(mob/living/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
if(C == src || flying || !density)
return
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
@@ -1110,8 +1110,12 @@
return
if(!self_hurt)
take_organ_damage(damage)
C.take_organ_damage(damage)
C.KnockDown(3 SECONDS)
if(issilicon(C))
C.adjustBruteLoss(damage)
C.Weaken(3 SECONDS)
else
C.take_organ_damage(damage)
C.KnockDown(3 SECONDS)
C.visible_message("<span class='danger'>[C] crashes into [src], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [src]!</span>")
/**
@@ -15,7 +15,6 @@
has_camera = FALSE
req_one_access = list(ACCESS_ENGINE, ACCESS_ROBOTICS)
ventcrawler = VENTCRAWLER_ALWAYS
magpulse = TRUE
mob_size = MOB_SIZE_SMALL
pull_force = MOVE_FORCE_VERY_WEAK // Can only drag small items
modules_break = FALSE
@@ -79,7 +78,9 @@
module = new /obj/item/robot_module/drone(src)
// Give us our action button
var/datum/action/innate/hide/drone_hide/hide = new()
var/datum/action/innate/robot_magpulse/pulse = new()
hide.Grant(src)
pulse.Grant(src)
//Allows Drones to hear the Engineering channel.
module.channels = list("Engineering" = 1)
@@ -105,7 +105,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD)
var/default_cell_type = /obj/item/stock_parts/cell/high
var/magpulse = FALSE
var/ionpulse = FALSE // Jetpack-like effect.
var/ionpulse_on = FALSE // Jetpack-like effect.
/// Does it clean the tile under it?
@@ -463,7 +462,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
module.channels = list("Engineering" = 1)
if(camera && ("Robots" in camera.network))
camera.network += "Engineering"
magpulse = TRUE
if("Janitor")
module = new /obj/item/robot_module/janitor(src)
module.channels = list("Service" = 1)
@@ -543,7 +541,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
speed = 0 // Remove upgrades.
ionpulse = FALSE
magpulse = FALSE
weapons_unlock = FALSE
add_language("Robot Talk", TRUE)
if("lava" in weather_immunities) // Remove the lava-immunity effect given by a printable upgrade
@@ -1366,7 +1363,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
has_camera = FALSE
req_one_access = list(ACCESS_CENT_SPECOPS)
ionpulse = TRUE
magpulse = TRUE
pdahide = TRUE
eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
ear_protection = TRUE // Immunity to the audio part of flashbangs
@@ -1446,7 +1442,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
force_modules = list("Combat", "Engineering", "Medical")
damage_protection = 5 // Reduce all incoming damage by this number
eprefix = "Gamma"
magpulse = TRUE
/mob/living/silicon/robot/destroyer
@@ -1460,7 +1455,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
has_camera = FALSE
req_one_access = list(ACCESS_CENT_SPECOPS)
ionpulse = TRUE
magpulse = TRUE
pdahide = TRUE
eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
ear_protection = TRUE // Immunity to the audio part of flashbangs
@@ -35,3 +35,25 @@
sight_mode = BORGMESON
icon_icon = 'icons/obj/clothing/glasses.dmi'
button_icon_state = "meson"
/datum/action/innate/robot_magpulse
name = "Magnetic pulse"
icon_icon = 'icons/obj/clothing/shoes.dmi'
button_icon_state = "magboots0"
var/slowdown_active = 2 // Same as magboots
/datum/action/innate/robot_magpulse/Activate()
ADD_TRAIT(owner, TRAIT_MAGPULSE, "innate boots")
to_chat(owner, "You turn your magboots on.")
var/mob/living/silicon/robot/robot = owner
robot.speed += slowdown_active
button_icon_state = "magboots1"
active = TRUE
/datum/action/innate/robot_magpulse/Deactivate()
REMOVE_TRAIT(owner, TRAIT_MAGPULSE, "innate boots")
to_chat(owner, "You turn your magboots off.")
var/mob/living/silicon/robot/robot = owner
robot.speed -= slowdown_active
button_icon_state = initial(button_icon_state)
active = FALSE
@@ -385,7 +385,7 @@
name = "engineering robot module"
module_type = "Engineer"
subsystems = list(/mob/living/silicon/proc/subsystem_power_monitor)
module_actions = list(/datum/action/innate/robot_sight/meson)
module_actions = list(/datum/action/innate/robot_sight/meson, /datum/action/innate/robot_magpulse)
basic_modules = list(
/obj/item/flash/cyborg,
/obj/item/rpd,
@@ -615,7 +615,7 @@
/obj/item/robot_module/deathsquad
name = "NT advanced combat module"
module_type = "Malf"
module_actions = list(/datum/action/innate/robot_sight/thermal)
module_actions = list(/datum/action/innate/robot_sight/thermal, /datum/action/innate/robot_magpulse)
basic_modules = list(
/obj/item/flash/cyborg,
/obj/item/melee/energy/sword/cyborg,
@@ -706,7 +706,7 @@
/obj/item/robot_module/destroyer
name = "destroyer robot module"
module_type = "Malf"
module_actions = list(/datum/action/innate/robot_sight/thermal)
module_actions = list(/datum/action/innate/robot_sight/thermal, /datum/action/innate/robot_magpulse)
basic_modules = list(
/obj/item/flash/cyborg,
/obj/item/gun/energy/immolator/multi/cyborg, // See comments on /robot_module/combat below
@@ -723,6 +723,7 @@
/obj/item/robot_module/combat
name = "combat robot module"
module_type = "Malf"
module_actions = list(/datum/action/innate/robot_magpulse)
basic_modules = list(
/obj/item/flash/cyborg,
/obj/item/gun/energy/immolator/multi/cyborg, // primary weapon, strong at close range (ie: against blob/terror/xeno), but consumes a lot of energy per shot.
@@ -14,11 +14,11 @@
. += GLOB.configuration.movement.robot_delay
/mob/living/silicon/robot/mob_negates_gravity()
return magpulse
return HAS_TRAIT(src, TRAIT_MAGPULSE)
/mob/living/silicon/robot/mob_has_gravity()
return ..() || mob_negates_gravity()
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
if(!magpulse)
if(!HAS_TRAIT(src, TRAIT_MAGPULSE))
return ..()
@@ -432,3 +432,8 @@
/mob/living/silicon/on_standing_up()
return // Silicons are always standing by default.
/mob/living/silicon/throw_impact(atom/hit_atom, throwingdatum, speed = 1)
. = ..()
var/damage = 10 + 1.5 * speed
hit_atom.hit_by_thrown_mob(src, throwingdatum, damage, FALSE, FALSE)