Upload files

This commit is contained in:
SandPoot
2022-03-16 14:00:31 -03:00
parent a9bd8c3e94
commit a8f454bd72
125 changed files with 6439 additions and 6600 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
var/obj/item/radio/radio = null //Let's give it a radio.
var/mob/living/brain/brainmob = null //The current occupant.
var/mob/living/silicon/robot = null //Appears unused.
var/obj/mecha = null //This does not appear to be used outside of reference in mecha.dm.
var/obj/vehicle/sealed/mecha = null //This does not appear to be used outside of reference in mecha.dm.
var/obj/item/organ/brain/brain = null //The actual brain
var/datum/ai_laws/laws = new()
var/force_replace_ai_name = FALSE
+2 -9
View File
@@ -41,7 +41,7 @@
return ..()
/mob/living/brain/update_mobility()
return ((mobility_flags = (container?.in_contents_of(/obj/mecha)? MOBILITY_FLAGS_DEFAULT : NONE)))
return ((mobility_flags = (container?.in_contents_of(/obj/vehicle/sealed/mecha)? MOBILITY_FLAGS_DEFAULT : NONE)))
/mob/living/brain/ex_act(severity, target, origin) //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
@@ -71,13 +71,6 @@
if(stored_dna)
stored_dna.real_name = real_name
/mob/living/brain/ClickOn(atom/A, params)
..()
if(container)
var/obj/mecha/M = container.mecha
if(istype(M))
return M.click_action(A,src,params)
/mob/living/brain/forceMove(atom/destination)
if(container)
return container.forceMove(destination)
@@ -98,7 +91,7 @@
if(!container)
return
if (container.mecha)
var/obj/mecha/M = container.mecha
var/obj/vehicle/sealed/mecha/M = container.mecha
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer
if (client && ranged_ability && ranged_ability.ranged_mousepointer)
@@ -43,10 +43,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift)
if(client && !suiciding && !(client in GLOB.dead_players_during_shift))
GLOB.dead_players_during_shift += client
GLOB.deaths_during_shift++
if(ismecha(loc))
var/obj/mecha/M = loc
if(M.occupant == src)
M.go_out()
if(!QDELETED(dna)) //The gibbed param is bit redundant here since dna won't exist at this point if they got deleted.
dna.species.spec_death(gibbed, src)
@@ -256,48 +256,6 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block, wound_bonus=wound_mod)
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
to_chat(M.occupant, "<span class='warning'>You don't want to harm other living beings!</span>")
return
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
var/obj/item/bodypart/temp = get_bodypart(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
if(temp)
var/update = 0
var/dmg = rand(M.force/2, M.force)
var/atom/throw_target = get_edge_target_turf(src, M.dir)
switch(M.damtype)
if("brute")
if(M.force > 35) // durand and other heavy mechas
DefaultCombatKnockdown(50)
src.throw_at(throw_target, rand(1,5), 7)
else if(M.force >= 20 && CHECK_MOBILITY(src, MOBILITY_STAND)) // lightweight mechas like gygax
DefaultCombatKnockdown(30)
src.throw_at(throw_target, rand(1,3), 7)
update |= temp.receive_damage(dmg, 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if("fire")
update |= temp.receive_damage(0, dmg)
playsound(src, 'sound/items/welder.ogg', 50, 1)
if("tox")
M.mech_toxin_damage(src)
else
return
if(update)
update_damage_overlays()
updatehealth()
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
"<span class='userdanger'>[M.name] has hit you!</span>", null, COMBAT_MESSAGE_RANGE, target = M,
target_message = "<span class='danger'>You have hit [src]!</span>")
log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
else
..()
/mob/living/carbon/human/ex_act(severity, target, origin)
if(TRAIT_BOMBIMMUNE in dna.species.species_traits)
-33
View File
@@ -149,39 +149,6 @@
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
..()
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
to_chat(M.occupant, "<span class='warning'>You don't want to harm other living beings!</span>")
return
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
switch(M.damtype)
if(BRUTE)
Unconscious(20)
take_overall_damage(rand(M.force/2, M.force))
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if(BURN)
take_overall_damage(0, rand(M.force/2, M.force))
playsound(src, 'sound/items/welder.ogg', 50, 1)
if(TOX)
M.mech_toxin_damage(src)
else
return
updatehealth()
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
"<span class='userdanger'>[M.name] has hit you!</span>", null, COMBAT_MESSAGE_RANGE, null,
M.occupant, "<span class='danger'>You hit [src] with your [M.name]!</span>")
log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
else
step_away(src,M)
log_combat(M.occupant, src, "pushed", M)
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>", \
"<span class='warning'>[M] pushes you out of the way.</span>", null, COMBAT_MESSAGE_RANGE, null,
M.occupant, "<span class='warning'>You push [src] out of the way with your [M.name].</span>")
/mob/living/fire_act()
adjust_fire_stacks(3)
IgniteMob()
+2 -2
View File
@@ -39,7 +39,7 @@
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
var/viewalerts = 0
var/icon/holo_icon//Female is assigned when AI is created.
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/obj/vehicle/sealed/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/radio_enabled = TRUE //Determins if a carded AI can speak with its built in radio or not.
radiomod = ";" //AIs will, by default, state their laws on the internal radio.
var/obj/item/pda/ai/aiPDA
@@ -408,7 +408,7 @@
return
if (href_list["ai_take_control"]) //Mech domination
var/obj/mecha/M = locate(href_list["ai_take_control"])
var/obj/vehicle/sealed/mecha/M = locate(href_list["ai_take_control"])
if(controlled_mech)
to_chat(src, "<span class='warning'>You are already loaded into an onboard computer!</span>")
return
+2 -2
View File
@@ -53,11 +53,11 @@
if(NONE)
return FALSE
if(POWER_REQ_ALL)
return !T || !A || ((!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || ((!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/vehicle/sealed/mecha)))
if(POWER_REQ_CLOCKCULT)
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
return FALSE
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/vehicle/sealed/mecha)))
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
@@ -146,7 +146,7 @@
if(!search_objects)
. = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden,/obj/item/electronic_assembly))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha, /obj/structure/destructible/clockwork/ocular_warden,/obj/item/electronic_assembly))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
@@ -236,9 +236,9 @@
return TRUE
if(ismecha(the_target))
var/obj/mecha/M = the_target
if(M.occupant)//Just so we don't attack empty mechs
if(CanAttack(M.occupant))
var/obj/vehicle/sealed/mecha/M = the_target
for(var/occupant in M.occupants)
if(CanAttack(occupant))
return TRUE
if(istype(the_target, /obj/machinery/porta_turret))
@@ -604,7 +604,7 @@
toggle_ai(AI_ON)
/mob/living/simple_animal/hostile/proc/ListTargetsLazy(var/_Z)//Step 1, find out what we can see
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha, /obj/structure/destructible/clockwork/ocular_warden))
. = list()
for (var/I in SSmobs.clients_by_zlevel[_Z])
var/mob/M = I
@@ -25,14 +25,14 @@
search_objects = 0
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
var/spawn_mecha_type = /obj/mecha/combat/marauder/mauler/loaded
var/obj/mecha/mecha //Ref to pilot's mecha instance
var/spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/mauler/loaded
var/obj/vehicle/sealed/mecha/mecha //Ref to pilot's mecha instance
var/required_mecha_charge = 7500 //If the pilot doesn't have a mecha, what charge does a potential Grand Theft Mecha need? (Defaults to half a battery)
var/mecha_charge_evacuate = 50 //Amount of charge at which the pilot tries to abandon the mecha
//Vars that control when the pilot uses their mecha's abilities (if the mecha has that ability)
var/threat_use_mecha_smoke = 5 //5 mobs is enough to engage crowd control
var/defence_mode_chance = 35 //Chance to engage Defence mode when damaged
var/defense_mode_chance = 35 //Chance to engage Defense mode when damaged
var/smoke_chance = 20 //Chance to deploy smoke for crowd control
var/retreat_chance = 40 //Chance to run away
@@ -42,18 +42,18 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize()
. = ..()
wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/nanotrasen //nanotrasen are syndies! no it's just a weird path.
name = "Nanotrasen Mecha Pilot"
name = "\improper Nanotrasen Mecha Pilot"
desc = "Death to the Syndicate. This variant comes in MECHA DEATH flavour."
icon_living = "nanotrasen"
icon_state = "nanotrasen"
faction = list("nanotrasen")
spawn_mecha_type = /obj/mecha/combat/marauder/loaded
spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/loaded
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/nanotrasen
name = "Nanotrasen Mecha Pilot"
name = "\improper Nanotrasen Mecha Pilot"
desc = "Death to the Syndicate. This variant comes in MECHA DEATH flavour."
icon_living = "nanotrasen"
icon_state = "nanotrasen"
@@ -63,12 +63,12 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize()
. = ..()
if(spawn_mecha_type)
var/obj/mecha/M = new spawn_mecha_type (get_turf(src))
var/obj/vehicle/sealed/mecha/M = new spawn_mecha_type (get_turf(src))
if(istype(M))
enter_mecha(M)
INVOKE_ASYNC(src, .proc/enter_mecha, M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
target = null //Target was our mecha, so null it out
@@ -78,7 +78,7 @@
var/do_ranged = 0
for(var/equip in mecha.equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = equip
if(ME.range & RANGED)
if(ME.range & MECHA_RANGED)
do_ranged = 1
break
if(do_ranged)
@@ -89,11 +89,11 @@
ranged = 0
wanted_objects = list()
search_objects = 0
if(mecha && mecha.lights_action) //an AI mecha is an EVIL EVIL thing, so let's not hide them in the dark
mecha.lights_action.Activate()
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
action.Trigger(TRUE)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
@@ -102,9 +102,9 @@
targets_from = src
//Find a new mecha
wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
var/search_aggressiveness = 2
for(var/obj/mecha/combat/C in range(vision_range,src))
for(var/obj/vehicle/sealed/mecha/combat/C in range(vision_range,src))
if(is_valid_mecha(C))
target = C
search_aggressiveness = 3 //We can see a mech? RUN FOR IT, IGNORE MOBS!
@@ -116,23 +116,23 @@
walk(M,0)//end any lingering movement loops, to prevent the haunted mecha bug
//Checks if a mecha is valid for theft
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
if(M.occupant)
return 0
return FALSE
if(LAZYLEN(M.occupants))
return FALSE
if(!M.has_charge(required_mecha_charge))
return 0
return FALSE
if(M.obj_integrity < M.max_integrity*0.5)
return 0
return 1
return FALSE
return TRUE
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/mecha_face_target(atom/A)
if(mecha)
var/dirto = get_dir(mecha,A)
if(mecha.dir != dirto) //checking, because otherwise the mecha makes too many turn noises
mecha.mechturn(dirto)
mecha.vehicle_move(dirto, TRUE)
@@ -144,7 +144,7 @@
ME.rearm()
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = RANGED)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = MECHA_RANGED)
. = list()
if(mecha)
for(var/equip in mecha.equipment)
@@ -160,11 +160,10 @@
if(mecha)
mecha_reload()
mecha_face_target(A)
var/list/possible_weapons = get_mecha_equip_by_flag(RANGED)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_RANGED)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons) //so we don't favor mecha.equipment[1] forever
if(ME.action(A))
ME.start_cooldown()
if(ME.action(src,A))
return
else
@@ -173,20 +172,19 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/AttackingTarget()
if(mecha)
var/list/possible_weapons = get_mecha_equip_by_flag(MELEE)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_MELEE)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons)
mecha_face_target(target)
if(ME.action(target))
ME.start_cooldown()
if(ME.action(src,target))
return
if(mecha.melee_can_hit)
if(!TIMER_COOLDOWN_CHECK(mecha, COOLDOWN_MECHA_MELEE_ATTACK))
mecha_face_target(target)
target.mech_melee_attack(mecha)
target.mech_melee_attack(mecha, src)
else
if(ismecha(target))
var/obj/mecha/M = target
var/obj/vehicle/sealed/mecha/M = target
if(is_valid_mecha(M))
enter_mecha(M)
return
@@ -199,50 +197,54 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/handle_automated_action()
if(..())
if(!mecha)
for(var/obj/mecha/combat/C in range(src,vision_range))
if(is_valid_mecha(C))
target = C //Let's nab it!
minimum_distance = 1
ranged = 0
break
if(mecha)
var/list/L = PossibleThreats()
var/threat_count = L.len
. = ..()
if(!.)
return
if(!mecha)
for(var/obj/vehicle/sealed/mecha/combat/mecha_in_range in range(src,vision_range))
if(is_valid_mecha(mecha_in_range))
target = mecha_in_range //Let's nab it!
minimum_distance = 1
ranged = 0
break
if(mecha)
var/list/L = PossibleThreats()
var/threat_count = L.len
//Low Charge - Eject
if(!mecha.has_charge(mecha_charge_evacuate))
exit_mecha(mecha)
return
//Low Charge - Eject
if(!mecha.has_charge(mecha_charge_evacuate))
exit_mecha(mecha)
return
//Too Much Damage - Eject
if(mecha.obj_integrity < mecha.max_integrity*0.1)
exit_mecha(mecha)
return
if(mecha.obj_integrity < mecha.max_integrity*0.1)
exit_mecha(mecha)
return
//Smoke if there's too many targets - Smoke Power
if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
if(mecha.smoke_action && mecha.smoke_action.owner && mecha.smoke)
mecha.smoke_action.Activate()
//Smoke if there's too many targets - Smoke Power
if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_smoke) && !mecha.smoke_charges)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_smoke]
action.Trigger()
//Heavy damage - Defence Power or Retreat
if(mecha.obj_integrity < mecha.max_integrity*0.25)
if(prob(defence_mode_chance))
if(mecha.defense_action && mecha.defense_action.owner && !mecha.defence_mode)
mecha.leg_overload_mode = 0
mecha.defense_action.Activate(TRUE)
addtimer(CALLBACK(mecha.defense_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of defence, then toggle off
//Heavy damage - Defense Power or Retreat
if(mecha.obj_integrity < mecha.max_integrity*0.25)
if(prob(defense_mode_chance))
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
action.Trigger(TRUE)
addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_defense_mode.proc/Trigger, FALSE), 100) //10 seconds of defense, then toggle off
else if(prob(retreat_chance))
//Speed boost if possible
if(mecha.overload_action && mecha.overload_action.owner && !mecha.leg_overload_mode)
mecha.overload_action.Activate(TRUE)
addtimer(CALLBACK(mecha.overload_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of speeeeed, then toggle off
else if(prob(retreat_chance))
//Speed boost if possible
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_overload_mode) && !mecha.leg_overload_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_overload_mode]
mecha.leg_overload_mode = FALSE
action.Trigger(TRUE)
addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_overload_mode.proc/Trigger, FALSE), 100) //10 seconds of speeeeed, then toggle off
retreat_distance = 50
spawn(100)
retreat_distance = 0
retreat_distance = 50
addtimer(VARSET_CALLBACK(src, retreat_distance, 0), 10 SECONDS)
@@ -261,17 +263,17 @@
//~simple animals~
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/CanAttack(atom/the_target)
if(ismecha(the_target))
var/obj/mecha/M = the_target
var/obj/vehicle/sealed/mecha/M = the_target
if(mecha)
if(M == mecha || !CanAttack(M.occupant))
return 0
if(M == mecha) //Dont kill yourself
return FALSE
else //we're not in a mecha, so we check if we can steal it instead.
if(is_valid_mecha(M))
return 1
else if (M.occupant && CanAttack(M.occupant))
return 1
else
return 0
return TRUE
for(var/occupant in M.occupants)
if(CanAttack(occupant))
return TRUE
return FALSE
. = ..()
@@ -290,6 +292,6 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Goto(target, delay, minimum_distance)
if(mecha)
walk_to(mecha, target, minimum_distance, mecha.step_in)
walk_to(mecha, target, minimum_distance, mecha.movedelay)
else
..()
@@ -195,7 +195,7 @@ Difficulty: Medium
if(L.client)
empty += pick(((RANGE_TURFS(2, L) - RANGE_TURFS(1, L)) & turfs) - empty) // picks a turf within 2 of the creature not outside or in the shield
any_attack = 1
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
empty += pick(((RANGE_TURFS(2, M) - RANGE_TURFS(1, M)) & turfs) - empty)
any_attack = 1
if(!any_attack)
@@ -264,7 +264,7 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You're hit by [src]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
@@ -350,7 +350,7 @@ Difficulty: Medium
var/throwtarget = get_edge_target_turf(src, throw_dir)
L.throw_at(throwtarget, 3)
visible_message("<span class='warning'>[L] is thrown clear of [src]!</span>")
for(var/obj/mecha/M in orange(1, src))
for(var/obj/vehicle/sealed/mecha/M in orange(1, src))
M.take_damage(75, BRUTE, "melee", 1)
for(var/mob/M in range(7, src))
@@ -409,7 +409,7 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You fall directly into the pool of lava!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
M.take_damage(45, BRUTE, "melee", 1)
// changes turf to lava temporarily
@@ -538,7 +538,7 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You're hit by [source]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
@@ -656,14 +656,16 @@ Difficulty: Normal
if(monster_damage_boost && (ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)))
L.adjustBruteLoss(damage)
log_combat(caster, L, "struck with a [name]")
for(var/obj/mecha/M in T.contents - hit_things) //also damage mechs.
for(var/obj/vehicle/sealed/mecha/M in T.contents - hit_things) //also damage mechs.
hit_things += M
if(M.occupant)
if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant))
for(var/O in M.occupants)
var/mob/living/occupant = O
if(friendly_fire_check && caster && caster.faction_check_mob(occupant))
continue
to_chat(M.occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
playsound(M,'sound/weapons/sear.ogg', 50, 1, -4)
M.take_damage(damage, BURN, 0, 0, null, 50)
to_chat(occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
playsound(M,'sound/weapons/sear.ogg', 50, TRUE, -4)
M.take_damage(damage, BURN, 0, 0)
/obj/effect/hierophant
name = "hierophant beacon"
@@ -200,7 +200,7 @@
L.Stun(75)
L.adjustBruteLoss(rand(15,20)) // Less stun more harm
latched = TRUE
for(var/obj/mecha/M in loc)
for(var/obj/vehicle/sealed/mecha/M in loc)
M.take_damage(20, BRUTE, null, null, null, 25)
if(!latched)
retract()
@@ -9,8 +9,8 @@
else
enemies -= L
else if(ismecha(A))
var/obj/mecha/M = A
if(M.occupant)
var/obj/vehicle/sealed/mecha/M = A
if(LAZYLEN(M.occupants))
return A
/mob/living/simple_animal/hostile/retaliate/ListTargets()
@@ -31,10 +31,10 @@
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
enemies |= M
else if(ismecha(A))
var/obj/mecha/M = A
if(M.occupant)
var/obj/vehicle/sealed/mecha/M = A
if(LAZYLEN(M.occupants))
enemies |= M
enemies |= M.occupant
enemies |= M.occupants
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
if(faction_check_mob(H) && !attack_same && !H.attack_same)
@@ -99,7 +99,7 @@
if(!chosen_color)
dragon_name()
color_selection()
/mob/living/simple_animal/hostile/space_dragon/Life()
. = ..()
@@ -158,8 +158,8 @@
adjustHealth(-L.maxHealth * 0.5)
return
. = ..()
if(istype(target, /obj/mecha))
var/obj/mecha/M = target
if(istype(target, /obj/vehicle/sealed/mecha))
var/obj/vehicle/sealed/mecha/M = target
M.take_damage(50, BRUTE, MELEE, 1)
/mob/living/simple_animal/hostile/space_dragon/AltClickOn(atom/A)
@@ -322,7 +322,7 @@
L.adjustFireLoss(30)
to_chat(L, "<span class='userdanger'>You're hit by [src]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
@@ -394,8 +394,8 @@
if(L.stat != CONSCIOUS)
return FALSE
if (ismecha(the_target))
var/obj/mecha/M = the_target
if (M.occupant)
var/obj/vehicle/sealed/mecha/M = the_target
if(LAZYLEN(M.occupants))
return FALSE
return TRUE
+1 -1
View File
@@ -879,7 +879,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
return
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
if (ismecha(loc))
var/obj/mecha/M = loc
var/obj/vehicle/sealed/mecha/M = loc
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer