add(atom/movable): Makes it possible for mappers to change scale/rotation of objs (#15835)

* Removes update_transform() from mob/
* Adds new file to _defines to hold default scales
* Tweaks atom/movable to use new defines
* Tweaks mob, living, human, species to use new defines for comparisons
* On atom/movable, we check if it is rotated or otherwise scaled and then call update_transform()
* It is now possible
This commit is contained in:
Runa Dacino
2024-03-16 04:50:03 +10:00
committed by GitHub
parent 69896eaa10
commit db998502f9
7 changed files with 18 additions and 9 deletions
@@ -1211,7 +1211,7 @@
if(species.default_language)
add_language(species.default_language)
if(species.icon_scale_x != 1 || species.icon_scale_y != 1)
if(species.icon_scale_x != DEFAULT_ICON_SCALE_X || species.icon_scale_y != DEFAULT_ICON_SCALE_Y)
update_transform()
if(example) //VOREStation Edit begin
@@ -32,8 +32,8 @@
var/tail_animation // If set, the icon to obtain tail animation states from.
var/tail_hair
var/icon_scale_x = 1 // Makes the icon wider/thinner.
var/icon_scale_y = 1 // Makes the icon taller/shorter.
var/icon_scale_x = DEFAULT_ICON_SCALE_X // Makes the icon wider/thinner.
var/icon_scale_y = DEFAULT_ICON_SCALE_Y // Makes the icon taller/shorter.
var/race_key = 0 // Used for mob icon cache string.
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
+1 -1
View File
@@ -1307,5 +1307,5 @@
/mob/living/set_dir(var/new_dir)
. = ..()
if(size_multiplier != 1 || icon_scale_x != 1 && center_offset > 0)
if(size_multiplier != 1 || icon_scale_x != DEFAULT_ICON_SCALE_X && center_offset > 0)
update_transform(TRUE)
-1
View File
@@ -42,7 +42,6 @@
lastarea = get_area(src)
set_focus(src) // VOREStation Add - Key Handling
hook_vr("mob_new",list(src)) //VOREStation Code
update_transform() // Some mobs may start bigger or smaller than normal.
return ..()
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)