mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-25 16:53:28 +00:00
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
|
|
// This class of weapons takes force and appearance data from a material datum.
|
|
// They are also fragile based on material data and many can break/smash apart.
|
|
/obj/item/weapon/material
|
|
health = 10
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
gender = NEUTER
|
|
throw_speed = 3
|
|
throw_range = 7
|
|
w_class = 3
|
|
sharp = 0
|
|
edge = 0
|
|
|
|
var/applies_material_colour = 1
|
|
var/unbreakable
|
|
var/force_divisor = 0.5
|
|
var/thrown_force_divisor = 0.5
|
|
var/default_material = DEFAULT_WALL_MATERIAL
|
|
var/material/material
|
|
var/drops_debris = 1
|
|
|
|
/obj/item/weapon/material/New(var/newloc, var/material_key)
|
|
..(newloc)
|
|
if(!material_key)
|
|
material_key = default_material
|
|
set_material(material_key)
|
|
if(!material)
|
|
qdel(src)
|
|
return
|
|
|
|
matter = material.get_matter()
|
|
if(matter.len)
|
|
for(var/material_type in matter)
|
|
if(!isnull(matter[material_type]))
|
|
matter[material_type] *= force_divisor // May require a new var instead.
|
|
|
|
/obj/item/weapon/material/get_material()
|
|
return material
|
|
|
|
/obj/item/weapon/material/proc/update_force()
|
|
if(edge || sharp)
|
|
force = material.get_edge_damage()
|
|
else
|
|
force = material.get_blunt_damage()
|
|
force = round(force*force_divisor)
|
|
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
|
|
|
/obj/item/weapon/material/proc/set_material(var/new_material)
|
|
material = get_material_by_name(new_material)
|
|
if(!material)
|
|
qdel(src)
|
|
else
|
|
name = "[material.display_name] [initial(name)]"
|
|
health = round(material.integrity/10)
|
|
if(applies_material_colour)
|
|
color = material.icon_colour
|
|
if(material.products_need_process())
|
|
START_PROCESSING(SSprocessing, src)
|
|
update_force()
|
|
|
|
/obj/item/weapon/material/Destroy()
|
|
STOP_PROCESSING(SSprocessing, src)
|
|
return ..()
|
|
|
|
/obj/item/weapon/material/apply_hit_effect()
|
|
. = ..()
|
|
if(!unbreakable)
|
|
if(material.is_brittle())
|
|
health = 0
|
|
else if(!prob(material.hardness))
|
|
health--
|
|
check_health()
|
|
|
|
/obj/item/weapon/material/proc/check_health(var/consumed)
|
|
if(health<=0)
|
|
shatter(consumed)
|
|
|
|
/obj/item/weapon/material/proc/shatter(var/consumed)
|
|
var/turf/T = get_turf(src)
|
|
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
|
if(istype(loc, /mob/living))
|
|
var/mob/living/M = loc
|
|
M.drop_from_inventory(src)
|
|
playsound(src, "shatter", 70, 1)
|
|
if(!consumed && drops_debris) material.place_shard(T)
|
|
qdel(src)
|
|
|