Porting further material datum features and improvements.

This commit is contained in:
Ghommie
2020-06-24 20:45:17 +02:00
parent 07c7432f43
commit c5cbfa64e5
66 changed files with 945 additions and 234 deletions
@@ -9,16 +9,35 @@
throw_speed = 3
throw_range = 7
max_amount = 60
mats_per_stack = 500
var/turf_type = null
var/mineralType = null
novariants = TRUE
var/human_maxHealth = 100
/obj/item/stack/tile/Initialize(mapload, amount)
. = ..()
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3) //randomize a little
/obj/item/stack/tile/examine(mob/user)
. = ..()
if(throwforce && !is_cyborg) //do not want to divide by zero or show the message to borgs who can't throw
var/verb
switch(CEILING(human_maxHealth / throwforce, 1)) //throws to crit a human
if(1 to 3)
verb = "superb"
if(4 to 6)
verb = "great"
if(7 to 9)
verb = "good"
if(10 to 12)
verb = "fairly decent"
if(13 to 15)
verb = "mediocre"
if(!verb)
return
. += "<span class='notice'>Those could work as a [verb] throwing weapon.</span>"
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
@@ -470,7 +489,7 @@
/obj/item/stack/tile/plasteel
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon."
desc = "The ground you walk on."
icon_state = "tile"
force = 6
custom_materials = list(/datum/material/iron=500)
@@ -482,7 +501,15 @@
resistance_flags = FIRE_PROOF
/obj/item/stack/tile/plasteel/cyborg
desc = "The ground you walk on." //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
is_cyborg = 1
cost = 125
/obj/item/stack/tile/material
name = "floor tile"
singular_name = "floor tile"
desc = "The ground you walk on."
throwforce = 10
icon_state = "material_tile"
turf_type = /turf/open/floor/material
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS