mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] Porting Fixes
This commit is contained in:
@@ -515,7 +515,25 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
if(new_character.mind)
|
if(new_character.mind)
|
||||||
new_character.mind.loaded_from_ckey = picked_ckey
|
new_character.mind.loaded_from_ckey = picked_ckey
|
||||||
new_character.mind.loaded_from_slot = picked_slot
|
new_character.mind.loaded_from_slot = picked_slot
|
||||||
|
<<<<<<< HEAD
|
||||||
//VOREStation Add End
|
//VOREStation Add End
|
||||||
|
||||||| parent of 278c3eaa3f... Merge pull request #9761 from VOREStation/upstream-merge-7891
|
||||||
|
|
||||||
|
for(var/lang in picked_client.prefs.alternate_languages)
|
||||||
|
var/datum/language/chosen_language = GLOB.all_languages[lang]
|
||||||
|
if(chosen_language)
|
||||||
|
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
|
||||||
|
new_character.add_language(lang)
|
||||||
|
//VOREStation Add End
|
||||||
|
=======
|
||||||
|
//VOREStation Add End
|
||||||
|
|
||||||
|
for(var/lang in picked_client.prefs.alternate_languages)
|
||||||
|
var/datum/language/chosen_language = GLOB.all_languages[lang]
|
||||||
|
if(chosen_language)
|
||||||
|
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
|
||||||
|
new_character.add_language(lang)
|
||||||
|
>>>>>>> 278c3eaa3f... Merge pull request #9761 from VOREStation/upstream-merge-7891
|
||||||
|
|
||||||
//If desired, apply equipment.
|
//If desired, apply equipment.
|
||||||
if(equipment)
|
if(equipment)
|
||||||
|
|||||||
@@ -113,7 +113,15 @@
|
|||||||
icon_state = "slag"
|
icon_state = "slag"
|
||||||
material = null
|
material = null
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
/obj/item/weapon/ore/New()
|
/obj/item/weapon/ore/New()
|
||||||
|
||||||| parent of 278c3eaa3f... Merge pull request #9761 from VOREStation/upstream-merge-7891
|
||||||
|
/obj/item/weapon/ore/New()
|
||||||
|
..()
|
||||||
|
=======
|
||||||
|
/obj/item/weapon/ore/Initialize()
|
||||||
|
..()
|
||||||
|
>>>>>>> 278c3eaa3f... Merge pull request #9761 from VOREStation/upstream-merge-7891
|
||||||
randpixel_xy()
|
randpixel_xy()
|
||||||
|
|
||||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
|||||||
@@ -1,141 +1,141 @@
|
|||||||
// Mecha simple_mobs are essentially fake mechs. Generally tough and scary to fight.
|
// Mecha simple_mobs are essentially fake mechs. Generally tough and scary to fight.
|
||||||
// By default, they're automatically piloted by some kind of drone AI. They can be set to be "piloted" instead with a var.
|
// By default, they're automatically piloted by some kind of drone AI. They can be set to be "piloted" instead with a var.
|
||||||
// Tries to be as similar to the real deal as possible.
|
// Tries to be as similar to the real deal as possible.
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha
|
/mob/living/simple_mob/mechanical/mecha
|
||||||
name = "mecha"
|
name = "mecha"
|
||||||
desc = "A big stompy mech!"
|
desc = "A big stompy mech!"
|
||||||
icon = 'icons/mecha/mecha.dmi'
|
icon = 'icons/mecha/mecha.dmi'
|
||||||
|
|
||||||
faction = "syndicate"
|
faction = "syndicate"
|
||||||
movement_cooldown = 5
|
movement_cooldown = 5
|
||||||
movement_sound = "mechstep" // This gets fed into playsound(), which can also take strings as a 'group' of sound files.
|
movement_sound = "mechstep" // This gets fed into playsound(), which can also take strings as a 'group' of sound files.
|
||||||
turn_sound = 'sound/mecha/mechturn.ogg'
|
turn_sound = 'sound/mecha/mechturn.ogg'
|
||||||
maxHealth = 300
|
maxHealth = 300
|
||||||
mob_size = MOB_LARGE
|
mob_size = MOB_LARGE
|
||||||
|
|
||||||
// Very close to the base 'damage_absorption' var on the base mecha class.
|
// Very close to the base 'damage_absorption' var on the base mecha class.
|
||||||
armor = list(
|
armor = list(
|
||||||
"melee" = 20,
|
"melee" = 20,
|
||||||
"bullet" = 10,
|
"bullet" = 10,
|
||||||
"laser" = 0,
|
"laser" = 0,
|
||||||
"energy" = 0,
|
"energy" = 0,
|
||||||
"bomb" = 0,
|
"bomb" = 0,
|
||||||
"bio" = 100,
|
"bio" = 100,
|
||||||
"rad" = 100
|
"rad" = 100
|
||||||
)
|
)
|
||||||
|
|
||||||
response_help = "taps on"
|
response_help = "taps on"
|
||||||
response_disarm = "knocks on"
|
response_disarm = "knocks on"
|
||||||
response_harm = "uselessly hits"
|
response_harm = "uselessly hits"
|
||||||
harm_intent_damage = 0
|
harm_intent_damage = 0
|
||||||
|
|
||||||
ai_holder_type = /datum/ai_holder/simple_mob/melee
|
ai_holder_type = /datum/ai_holder/simple_mob/melee
|
||||||
say_list_type = /datum/say_list/malf_drone
|
say_list_type = /datum/say_list/malf_drone
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/sparks
|
var/datum/effect/effect/system/spark_spread/sparks
|
||||||
var/wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark
|
var/wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark
|
||||||
var/pilot_type = null // Set to spawn a pilot when destroyed. Setting this also makes the mecha vulnerable to things that affect sentient minds.
|
var/pilot_type = null // Set to spawn a pilot when destroyed. Setting this also makes the mecha vulnerable to things that affect sentient minds.
|
||||||
var/deflect_chance = 10 // Chance to outright stop an attack, just like a normal exosuit.
|
var/deflect_chance = 10 // Chance to outright stop an attack, just like a normal exosuit.
|
||||||
var/has_repair_droid = FALSE // If true, heals 2 damage every tick and gets a repair droid overlay.
|
var/has_repair_droid = FALSE // If true, heals 2 damage every tick and gets a repair droid overlay.
|
||||||
|
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/Initialize()
|
/mob/living/simple_mob/mechanical/mecha/Initialize()
|
||||||
sparks = new (src)
|
sparks = new (src)
|
||||||
sparks.set_up(3, 1, src)
|
sparks.set_up(3, 1, src)
|
||||||
sparks.attach(src)
|
sparks.attach(src)
|
||||||
|
|
||||||
if(!pilot_type)
|
if(!pilot_type)
|
||||||
name = "autonomous [initial(name)]"
|
name = "autonomous [initial(name)]"
|
||||||
desc = "[initial(desc)] It appears to be piloted by a drone intelligence."
|
desc = "[initial(desc)] It appears to be piloted by a drone intelligence."
|
||||||
else
|
else
|
||||||
say_list_type = /datum/say_list/merc
|
say_list_type = /datum/say_list/merc
|
||||||
|
|
||||||
if(has_repair_droid)
|
if(has_repair_droid)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/Destroy()
|
/mob/living/simple_mob/mechanical/mecha/Destroy()
|
||||||
qdel_null(sparks)
|
qdel_null(sparks)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/death()
|
/mob/living/simple_mob/mechanical/mecha/death()
|
||||||
..(0,"explodes!") // Do everything else first.
|
..(0,"explodes!") // Do everything else first.
|
||||||
|
|
||||||
// Make the exploding more convincing with an actual explosion and some sparks.
|
// Make the exploding more convincing with an actual explosion and some sparks.
|
||||||
sparks.start()
|
sparks.start()
|
||||||
explosion(get_turf(src), 0, 0, 1, 3)
|
explosion(get_turf(src), 0, 0, 1, 3)
|
||||||
|
|
||||||
// 'Eject' our pilot, if one exists.
|
// 'Eject' our pilot, if one exists.
|
||||||
if(pilot_type)
|
if(pilot_type)
|
||||||
var/mob/living/L = new pilot_type(loc)
|
var/mob/living/L = new pilot_type(loc)
|
||||||
L.faction = src.faction
|
L.faction = src.faction
|
||||||
|
|
||||||
new wreckage(loc) // Leave some wreckage.
|
new wreckage(loc) // Leave some wreckage.
|
||||||
|
|
||||||
qdel(src) // Then delete us since we don't actually have a body.
|
qdel(src) // Then delete us since we don't actually have a body.
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/handle_special()
|
/mob/living/simple_mob/mechanical/mecha/handle_special()
|
||||||
if(has_repair_droid)
|
if(has_repair_droid)
|
||||||
adjustBruteLoss(-2)
|
adjustBruteLoss(-2)
|
||||||
adjustFireLoss(-2)
|
adjustFireLoss(-2)
|
||||||
adjustToxLoss(-2)
|
adjustToxLoss(-2)
|
||||||
adjustOxyLoss(-2)
|
adjustOxyLoss(-2)
|
||||||
adjustCloneLoss(-2)
|
adjustCloneLoss(-2)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/update_icon()
|
/mob/living/simple_mob/mechanical/mecha/update_icon()
|
||||||
..() // Cuts everything else, so do that first.
|
..() // Cuts everything else, so do that first.
|
||||||
if(has_repair_droid)
|
if(has_repair_droid)
|
||||||
add_overlay(image(icon = 'icons/mecha/mecha_equipment.dmi', icon_state = "repair_droid"))
|
add_overlay(image(icon = 'icons/mecha/mecha_equipment.dmi', icon_state = "repair_droid"))
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/bullet_act()
|
/mob/living/simple_mob/mechanical/mecha/bullet_act()
|
||||||
. = ..()
|
. = ..()
|
||||||
sparks.start()
|
sparks.start()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/speech_bubble_appearance()
|
/mob/living/simple_mob/mechanical/mecha/speech_bubble_appearance()
|
||||||
return pilot_type ? "" : ..()
|
return pilot_type ? "" : ..()
|
||||||
|
|
||||||
// Piloted mechs are controlled by (presumably) something humanoid so they are vulnerable to certain things.
|
// Piloted mechs are controlled by (presumably) something humanoid so they are vulnerable to certain things.
|
||||||
/mob/living/simple_mob/mechanical/mecha/is_sentient()
|
/mob/living/simple_mob/mechanical/mecha/is_sentient()
|
||||||
return pilot_type ? TRUE : FALSE
|
return pilot_type ? TRUE : FALSE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Real mechs can't turn and run at the same time. This tries to simulate that.
|
// Real mechs can't turn and run at the same time. This tries to simulate that.
|
||||||
// Commented out because the AI can't handle it sadly.
|
// Commented out because the AI can't handle it sadly.
|
||||||
/mob/living/simple_mob/mechanical/mecha/SelfMove(turf/n, direct)
|
/mob/living/simple_mob/mechanical/mecha/SelfMove(turf/n, direct)
|
||||||
if(direct != dir)
|
if(direct != dir)
|
||||||
set_dir(direct)
|
set_dir(direct)
|
||||||
return FALSE // We didn't actually move, and returning FALSE means the mob can try to actually move almost immediately and not have to wait the full movement cooldown.
|
return FALSE // We didn't actually move, and returning FALSE means the mob can try to actually move almost immediately and not have to wait the full movement cooldown.
|
||||||
return ..()
|
return ..()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/bullet_act(obj/item/projectile/P)
|
/mob/living/simple_mob/mechanical/mecha/bullet_act(obj/item/projectile/P)
|
||||||
if(prob(deflect_chance))
|
if(prob(deflect_chance))
|
||||||
visible_message(span("warning", "\The [P] is deflected by \the [src]'s armor!"))
|
visible_message(span("warning", "\The [P] is deflected by \the [src]'s armor!"))
|
||||||
deflect_sprite()
|
deflect_sprite()
|
||||||
return 0
|
return 0
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/proc/deflect_sprite()
|
/mob/living/simple_mob/mechanical/mecha/proc/deflect_sprite()
|
||||||
var/image/deflect_image = image('icons/effects/effects.dmi', "deflect_static")
|
var/image/deflect_image = image('icons/effects/effects.dmi', "deflect_static")
|
||||||
add_overlay(deflect_image)
|
add_overlay(deflect_image)
|
||||||
sleep(1 SECOND)
|
sleep(1 SECOND)
|
||||||
cut_overlay(deflect_image)
|
cut_overlay(deflect_image)
|
||||||
qdel(deflect_image)
|
qdel(deflect_image)
|
||||||
// flick_overlay_view(deflect_image, src, duration = 1 SECOND, gc_after = TRUE)
|
// flick_overlay_view(deflect_image, src, duration = 1 SECOND, gc_after = TRUE)
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/attackby(obj/item/I, mob/user)
|
/mob/living/simple_mob/mechanical/mecha/attackby(obj/item/I, mob/user)
|
||||||
if(prob(deflect_chance))
|
if(prob(deflect_chance))
|
||||||
visible_message(span("warning", "\The [user]'s [I] bounces off \the [src]'s armor!"))
|
visible_message(span("warning", "\The [user]'s [I] bounces off \the [src]'s armor!"))
|
||||||
deflect_sprite()
|
deflect_sprite()
|
||||||
user.setClickCooldown(user.get_attack_speed(I))
|
user.setClickCooldown(user.get_attack_speed(I))
|
||||||
return
|
return
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/living/simple_mob/mechanical/mecha/ex_act(severity)
|
/mob/living/simple_mob/mechanical/mecha/ex_act(severity)
|
||||||
if(prob(deflect_chance))
|
if(prob(deflect_chance))
|
||||||
severity++ // This somewhat misleadingly makes it less severe.
|
severity++ // This somewhat misleadingly makes it less severe.
|
||||||
deflect_sprite()
|
deflect_sprite()
|
||||||
..(severity)
|
..(severity)
|
||||||
|
|||||||
Reference in New Issue
Block a user