Merge branch 'master' of https://github.com/tgstation/-tg-station into CraftingTable
3
code/__HELPERS/matrices.dm
Normal file
@@ -0,0 +1,3 @@
|
||||
/matrix/proc/TurnTo(old_angle, new_angle)
|
||||
. = new_angle - old_angle
|
||||
Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT
|
||||
@@ -65,7 +65,8 @@
|
||||
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
|
||||
|
||||
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_borg_panel "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_borg_intents "EAST-2:26,SOUTH:5"
|
||||
|
||||
//Upper-middle right (damage indicators)
|
||||
#define ui_toxin "EAST-1:28,CENTER+5:27"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
using.name = "radio"
|
||||
using.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
using.icon_state = "radio"
|
||||
using.screen_loc = ui_movi
|
||||
using.screen_loc = ui_borg_radio
|
||||
using.layer = 20
|
||||
adding += using
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
using.name = "act_intent"
|
||||
using.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
using.icon_state = mymob.a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.screen_loc = ui_borg_intents
|
||||
using.layer = 20
|
||||
adding += using
|
||||
action_intent = using
|
||||
@@ -76,15 +76,6 @@
|
||||
mymob.hands.name = "module"
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
|
||||
//Module Panel
|
||||
using = new /obj/screen()
|
||||
using.name = "panel"
|
||||
using.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
using.icon_state = "panel"
|
||||
using.screen_loc = ui_borg_panel
|
||||
using.layer = 19
|
||||
adding += using
|
||||
|
||||
//Store
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
@@ -156,30 +147,30 @@
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
if(r.shown_robot_modules)
|
||||
//Modules display is shown
|
||||
r.client.screen += r.throw_icon //"store" icon
|
||||
if(r.client)
|
||||
if(r.shown_robot_modules)
|
||||
//Modules display is shown
|
||||
r.client.screen += r.throw_icon //"store" icon
|
||||
|
||||
if(!r.module)
|
||||
usr << "<span class='danger'>No module selected</span>"
|
||||
return
|
||||
if(!r.module)
|
||||
usr << "<span class='danger'>No module selected</span>"
|
||||
return
|
||||
|
||||
if(!r.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
if(!r.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
|
||||
if(!r.robot_modules_background)
|
||||
return
|
||||
if(!r.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
var/display_rows = Ceiling(length(r.module.get_inactive_modules()) / 8)
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in r.module.modules)
|
||||
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
|
||||
for(var/atom/movable/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen += A
|
||||
if(x < 0)
|
||||
@@ -193,13 +184,12 @@
|
||||
x = -4
|
||||
y++
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
r.client.screen -= r.throw_icon //"store" icon
|
||||
else
|
||||
//Modules display is hidden
|
||||
r.client.screen -= r.throw_icon //"store" icon
|
||||
|
||||
for(var/atom/A in r.module.modules)
|
||||
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
|
||||
for(var/atom/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen -= A
|
||||
r.shown_robot_modules = 0
|
||||
r.client.screen -= r.robot_modules_background
|
||||
r.shown_robot_modules = 0
|
||||
r.client.screen -= r.robot_modules_background
|
||||
@@ -861,18 +861,7 @@ datum/mind
|
||||
if("unemag")
|
||||
var/mob/living/silicon/robot/R = current
|
||||
if (istype(R))
|
||||
R.emagged = 0
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_2 == R.module.emag)
|
||||
R.module_state_2 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_3 == R.module.emag)
|
||||
R.module_state_3 = null
|
||||
R.contents -= R.module.emag
|
||||
R.SetEmagged(0)
|
||||
message_admins("[key_name_admin(usr)] has unemag'ed [R].")
|
||||
log_admin("[key_name(usr)] has unemag'ed [R].")
|
||||
|
||||
@@ -880,19 +869,7 @@ datum/mind
|
||||
if (istype(current, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/ai = current
|
||||
for (var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
R.emagged = 0
|
||||
if (R.module)
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_2 == R.module.emag)
|
||||
R.module_state_2 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_3 == R.module.emag)
|
||||
R.module_state_3 = null
|
||||
R.contents -= R.module.emag
|
||||
R.SetEmagged(0)
|
||||
message_admins("[key_name_admin(usr)] has unemag'ed [ai]'s Cyborgs.")
|
||||
log_admin("[key_name(usr)] has unemag'ed [ai]'s Cyborgs.")
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
var/mob/living/silicon/robot/R = locate(href_list["magbot"])
|
||||
if(istype(R) && !R.emagged && R.connected_ai == usr && !R.scrambledcodes && can_control(usr, R))
|
||||
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
|
||||
R.emagged = 1
|
||||
R.SetEmagged(1)
|
||||
if(R.mind.special_role)
|
||||
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
|
||||
@@ -164,5 +164,5 @@
|
||||
if(R.emagged == 1)
|
||||
return 0
|
||||
|
||||
R.emagged = 1
|
||||
R.SetEmagged(1)
|
||||
return 1
|
||||
@@ -10,6 +10,7 @@
|
||||
* Snap pops
|
||||
* Water flower
|
||||
* Cards
|
||||
* Toy nuke
|
||||
*/
|
||||
|
||||
|
||||
@@ -860,14 +861,18 @@ obj/item/toy/singlecard/attack_self(mob/user)
|
||||
|
||||
/obj/item/toy/nuke/attack_self(mob/user)
|
||||
if (cooldown < world.time)
|
||||
cooldown = world.time + 3000 //5 minutes
|
||||
cooldown = world.time + 1800 //3 minutes
|
||||
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
|
||||
spawn(5) //gia said so
|
||||
icon_state = "nuketoy"
|
||||
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
|
||||
sleep(135)
|
||||
icon_state = "nuketoycool"
|
||||
sleep(cooldown - world.time)
|
||||
icon_state = "nuketoyidle"
|
||||
|
||||
else
|
||||
var/timeleft = (cooldown - world.time)
|
||||
user << "<span class='alert'>Nothing happens, and '</span>[round(timeleft/10)]<span class='alert'>' appears on a small display.</span>"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -76,4 +76,4 @@
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
user << "<span class='notice'>[src] can now be concealed.</span>"
|
||||
reflect_chance = 0
|
||||
add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -76,15 +76,13 @@
|
||||
pixel_x = -16
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "queen_sleep"
|
||||
else icon_state = "queen_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
if(stat == DEAD)
|
||||
icon_state = "queen_dead"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "queen_sleep"
|
||||
else
|
||||
icon_state = "queen_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
@@ -6,35 +6,26 @@
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
var/list/overlays_lying[X_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[X_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays.Cut()
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
if(stat == DEAD)
|
||||
//If we mostly took damage from fire
|
||||
if(fireloss > 125)
|
||||
icon_state = "alien[caste]_husked"
|
||||
else
|
||||
icon_state = "alien[caste]_dead"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else if(lying)
|
||||
if(resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(stat == UNCONSCIOUS)
|
||||
icon_state = "alien[caste]_unconscious"
|
||||
else
|
||||
icon_state = "alien[caste]_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(m_intent == "run")
|
||||
icon_state = "alien[caste]_running"
|
||||
else
|
||||
if(m_intent == "run") icon_state = "alien[caste]_running"
|
||||
else icon_state = "alien[caste]_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
icon_state = "alien[caste]_s"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
||||
..()
|
||||
@@ -44,8 +35,16 @@
|
||||
update_inv_l_hand(0)
|
||||
update_inv_pockets(0)
|
||||
update_hud()
|
||||
update_icons()
|
||||
// update_icons() //Handled in update_transform(), leaving this here as a reminder
|
||||
update_fire()
|
||||
update_transform()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_transform() //The old method of updating lying/standing was update_icons(). Aliens still expect that.
|
||||
if(lying > 0)
|
||||
lying = 90 //Anything else looks retarded
|
||||
update_icons()
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_hud()
|
||||
if(client)
|
||||
@@ -87,18 +86,12 @@
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_fire()
|
||||
overlays -= overlays_lying[X_FIRE_LAYER]
|
||||
overlays -= overlays_standing[X_FIRE_LAYER]
|
||||
if(on_fire)
|
||||
overlays_lying[X_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Lying", "layer"= -X_FIRE_LAYER)
|
||||
overlays_standing[X_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -X_FIRE_LAYER)
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[X_FIRE_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[X_FIRE_LAYER]
|
||||
overlays += overlays_standing[X_FIRE_LAYER]
|
||||
return
|
||||
else
|
||||
overlays_lying[X_FIRE_LAYER] = null
|
||||
overlays_standing[X_FIRE_LAYER] = null
|
||||
|
||||
//Xeno Overlays Indexes//////////
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
|
||||
if(stat == DEAD)
|
||||
icon_state = "larva[state]_dead"
|
||||
else if (handcuffed || legcuffed)
|
||||
else if (handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
|
||||
icon_state = "larva[state]_cuff"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "larva[state]_sleep"
|
||||
else if (stunned)
|
||||
icon_state = "larva[state]_stun"
|
||||
else if(lying || resting)
|
||||
icon_state = "larva[state]_sleep"
|
||||
else
|
||||
icon_state = "larva[state]"
|
||||
|
||||
/mob/living/carbon/alien/larva/update_transform() //All this is handled in update_icons()
|
||||
return update_icons()
|
||||
@@ -3,12 +3,9 @@
|
||||
///////////////////////
|
||||
/* Keep these comments up-to-date if you -insist- on hurting my code-baby ;_;
|
||||
This system allows you to update individual mob-overlays, without regenerating them all each time.
|
||||
When we generate overlays we do not generate either lying or standing, as used to happen.
|
||||
Instead, we generate both standing and lying stances and store them in two fixed-length lists,
|
||||
both using the same list-index. (The index values are defines within this file.
|
||||
When we generate overlays we generate the standing version and then rotate the mob as necessary..
|
||||
|
||||
As of the time of writing there are 20 layers within this list. Please try to keep this from increasing.
|
||||
var/overlays_lying[20] //For the lying down stance
|
||||
As of the time of writing there are 20 layers within this list. Please try to keep this from increasing. //22 and counting, good job guys
|
||||
var/overlays_standing[20] //For the standing stance
|
||||
|
||||
Most of the time we only wish to update one overlay:
|
||||
@@ -21,10 +18,7 @@ the appropriate update_X proc.
|
||||
|
||||
Note: Recent changes by aranclanos+carn:
|
||||
update_icons() no longer needs to be called.
|
||||
This unfortunately means that cloaking is not working properly at time of writing,
|
||||
however the system is easier to use. update_icons() should not be called unless you absolutely -know- you need it.
|
||||
One such example would be when var/lying changes state (because every overlay needs to be updated, but not regenerated). In these
|
||||
very specific cases, update_icons() will be faster than calling each update_X proc individually.
|
||||
the system is easier to use. update_icons() should not be called unless you absolutely -know- you need it.
|
||||
IN ALL OTHER CASES it's better to just call the specific update_X procs.
|
||||
|
||||
All of this means that this code is more maintainable, faster and still fairly easy to use.
|
||||
@@ -58,6 +52,7 @@ There are several things that need to be remembered:
|
||||
|
||||
If you have any questions/constructive-comments/bugs-to-report
|
||||
Please contact me on #coderbus IRC. ~Carnie x
|
||||
//Carn can sometimes be hard to reach now. However IRC is still your best bet for getting help.
|
||||
*/
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
@@ -85,9 +80,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
#define FIRE_LAYER 1 //If you're on fire
|
||||
#define TOTAL_LAYERS 22 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/list/overlays_lying[TOTAL_LAYERS]
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/human/proc/update_base_icon_state()
|
||||
@@ -102,37 +95,32 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
base_icon_state = "husk"
|
||||
else
|
||||
base_icon_state = "[skin_tone]_[(gender == FEMALE) ? "f" : "m"]"
|
||||
icon_state = "[base_icon_state]_s"
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/apply_overlay(cache_index)
|
||||
var/image/I = lying ? overlays_lying[cache_index] : overlays_standing[cache_index]
|
||||
var/image/I = overlays_standing[cache_index]
|
||||
if(I)
|
||||
overlays += I
|
||||
|
||||
/mob/living/carbon/human/proc/remove_overlay(cache_index)
|
||||
if(overlays_lying[cache_index])
|
||||
overlays -= overlays_lying[cache_index]
|
||||
overlays_lying[cache_index] = null
|
||||
if(overlays_standing[cache_index])
|
||||
overlays -= overlays_standing[cache_index]
|
||||
overlays_standing[cache_index] = null
|
||||
|
||||
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
|
||||
|
||||
//UPDATES OVERLAYS FROM OVERLAYS_STANDING
|
||||
//TODO: Remove all instances where this proc is called. It used to be the fastest way to swap between standing/lying.
|
||||
/mob/living/carbon/human/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays.Cut()
|
||||
|
||||
if(lying) //can't be cloaked whilst lying down
|
||||
icon_state = "[base_icon_state]_l"
|
||||
for(var/thing in overlays_lying)
|
||||
if(thing) overlays += thing
|
||||
else
|
||||
icon_state = "[base_icon_state]_s"
|
||||
update_hud() //TODO: remove the need for this
|
||||
|
||||
if(overlays.len != overlays_standing.len)
|
||||
overlays.Cut()
|
||||
|
||||
for(var/thing in overlays_standing)
|
||||
if(thing) overlays += thing
|
||||
|
||||
update_transform()
|
||||
|
||||
|
||||
//DAMAGE OVERLAYS
|
||||
@@ -141,17 +129,13 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
remove_overlay(DAMAGE_LAYER)
|
||||
|
||||
var/image/standing = image("icon"='icons/mob/dam_human.dmi', "icon_state"="blank", "layer"=-DAMAGE_LAYER)
|
||||
var/image/lying = image("icon"='icons/mob/dam_human.dmi', "icon_state"="blank2", "layer"=-DAMAGE_LAYER)
|
||||
overlays_standing[DAMAGE_LAYER] = standing
|
||||
overlays_lying[DAMAGE_LAYER] = lying
|
||||
|
||||
for(var/obj/item/organ/limb/O in organs)
|
||||
if(O.brutestate)
|
||||
standing.overlays += "[O.icon_state]_[O.brutestate]0" //we're adding icon_states of the base image as overlays //made icon_name redundant - RR
|
||||
lying.overlays += "[O.icon_state]2_[O.brutestate]0"
|
||||
standing.overlays += "[O.icon]_[O.brutestate]0" //we're adding icon_states of the base image as overlays
|
||||
if(O.burnstate)
|
||||
standing.overlays += "[O.icon_state]_0[O.burnstate]"
|
||||
lying.overlays += "[O.icon_state]2_0[O.burnstate]"
|
||||
standing.overlays += "[O.icon]_0[O.burnstate]"
|
||||
|
||||
apply_overlay(DAMAGE_LAYER)
|
||||
|
||||
@@ -168,46 +152,30 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
//base icons
|
||||
var/datum/sprite_accessory/S
|
||||
var/list/standing = list()
|
||||
var/list/lying = list()
|
||||
|
||||
if(facial_hair_style)
|
||||
S = facial_hair_styles_list[facial_hair_style]
|
||||
if(S)
|
||||
var/icon/facial_s = icon("icon"=S.icon, "icon_state"="[S.icon_state]_s")
|
||||
var/icon/facial_l = icon("icon"=S.icon, "icon_state"="[S.icon_state]_l")
|
||||
|
||||
var/image/img_facial_s = image("icon"=facial_s, "layer"=-HAIR_LAYER)
|
||||
var/image/img_facial_l = image("icon"=facial_l, "layer"=-HAIR_LAYER)
|
||||
var/image/img_facial_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
var/new_color = "#" + facial_hair_color
|
||||
img_facial_l.color = new_color
|
||||
img_facial_s.color = new_color
|
||||
|
||||
standing += img_facial_s
|
||||
lying += img_facial_l
|
||||
|
||||
//Applies the debrained overlay if there is no brain
|
||||
if(!getorgan(/obj/item/organ/brain))
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state"="debrained_s", "layer"=-HAIR_LAYER)
|
||||
lying += image("icon"='icons/mob/human_face.dmi', "icon_state"="debrained_l", "layer"=-HAIR_LAYER)
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s", "layer" = -HAIR_LAYER)
|
||||
else if(hair_style)
|
||||
S = hair_styles_list[hair_style]
|
||||
if(S)
|
||||
var/icon/hair_s = icon("icon"=S.icon, "icon_state"="[S.icon_state]_s")
|
||||
var/icon/hair_l = icon("icon"=S.icon, "icon_state"="[S.icon_state]_l")
|
||||
|
||||
var/image/img_hair_s = image("icon"=hair_s, "layer"=-HAIR_LAYER)
|
||||
var/image/img_hair_l = image("icon"=hair_l, "layer"=-HAIR_LAYER)
|
||||
var/image/img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
var/new_color = "#" + hair_color
|
||||
img_hair_s.color = new_color
|
||||
img_hair_l.color = new_color
|
||||
|
||||
standing += img_hair_s
|
||||
lying += img_hair_l
|
||||
|
||||
if(lying.len)
|
||||
overlays_lying[HAIR_LAYER] = lying
|
||||
if(standing.len)
|
||||
overlays_standing[HAIR_LAYER] = standing
|
||||
|
||||
@@ -218,25 +186,18 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
remove_overlay(MUTATIONS_LAYER)
|
||||
|
||||
var/list/standing = list()
|
||||
var/list/lying = list()
|
||||
|
||||
var/g = (gender == FEMALE) ? "f" : "m"
|
||||
for(var/mut in mutations)
|
||||
switch(mut)
|
||||
if(HULK)
|
||||
lying += image("icon"='icons/effects/genetics.dmi', "icon_state"="hulk_[g]_l", "layer"=-MUTATIONS_LAYER)
|
||||
standing += image("icon"='icons/effects/genetics.dmi', "icon_state"="hulk_[g]_s", "layer"=-MUTATIONS_LAYER)
|
||||
if(COLD_RESISTANCE)
|
||||
lying += image("icon"='icons/effects/genetics.dmi', "icon_state"="fire_l", "layer"=-MUTATIONS_LAYER)
|
||||
standing += image("icon"='icons/effects/genetics.dmi', "icon_state"="fire_s", "layer"=-MUTATIONS_LAYER)
|
||||
if(TK)
|
||||
lying += image("icon"='icons/effects/genetics.dmi', "icon_state"="telekinesishead_l", "layer"=-MUTATIONS_LAYER)
|
||||
standing += image("icon"='icons/effects/genetics.dmi', "icon_state"="telekinesishead_s", "layer"=-MUTATIONS_LAYER)
|
||||
if(LASER)
|
||||
lying += image("icon"='icons/effects/genetics.dmi', "icon_state"="lasereyes_l", "layer"=-MUTATIONS_LAYER)
|
||||
standing += image("icon"='icons/effects/genetics.dmi', "icon_state"="lasereyes_s", "layer"=-MUTATIONS_LAYER)
|
||||
if(lying.len)
|
||||
overlays_lying[MUTATIONS_LAYER] = lying
|
||||
if(standing.len)
|
||||
overlays_standing[MUTATIONS_LAYER] = standing
|
||||
|
||||
@@ -247,41 +208,31 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
remove_overlay(BODY_LAYER)
|
||||
|
||||
update_base_icon_state()
|
||||
icon_state = "[base_icon_state]_[src.lying ? "l" : "s"]"
|
||||
icon_state = "[base_icon_state]_s"
|
||||
|
||||
var/list/lying = list()
|
||||
var/list/standing = list()
|
||||
|
||||
//Mouth (lipstick!)
|
||||
if(lip_style)
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_s", "layer"=-BODY_LAYER)
|
||||
lying += image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_l", "layer"=-BODY_LAYER)
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_s", "layer" = -BODY_LAYER)
|
||||
|
||||
//Eyes
|
||||
if(!dna || dna.mutantrace != "skeleton")
|
||||
var/icon/eyes_s = icon('icons/mob/human_face.dmi', "eyes_s")
|
||||
var/icon/eyes_l = icon('icons/mob/human_face.dmi', "eyes_l")
|
||||
|
||||
var/image/img_eyes_s = image("icon"=eyes_s, "layer"=-BODY_LAYER)
|
||||
var/image/img_eyes_l = image("icon"=eyes_l, "layer"=-BODY_LAYER)
|
||||
var/image/img_eyes_s = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes_s", "layer" = -BODY_LAYER)
|
||||
|
||||
var/new_color = "#" + eye_color
|
||||
|
||||
img_eyes_s.color = new_color
|
||||
img_eyes_l.color = new_color
|
||||
|
||||
standing += img_eyes_s
|
||||
lying += img_eyes_l
|
||||
|
||||
//Underwear
|
||||
if(underwear)
|
||||
var/datum/sprite_accessory/underwear/U = underwear_all[underwear]
|
||||
if(U)
|
||||
standing += image("icon"=U.icon, "icon_state"="[U.icon_state]_s", "layer"=-BODY_LAYER)
|
||||
lying += image("icon"=U.icon, "icon_state"="[U.icon_state]_l", "layer"=-BODY_LAYER)
|
||||
|
||||
if(lying.len)
|
||||
overlays_lying[BODY_LAYER] = lying
|
||||
|
||||
if(standing.len)
|
||||
overlays_standing[BODY_LAYER] = standing
|
||||
|
||||
@@ -292,7 +243,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
if(on_fire)
|
||||
overlays_lying[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Lying", "layer"=-FIRE_LAYER)
|
||||
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
|
||||
|
||||
apply_overlay(FIRE_LAYER)
|
||||
@@ -301,35 +251,24 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
/mob/living/carbon/human/proc/update_augments()
|
||||
remove_overlay(AUGMENTS_LAYER)
|
||||
|
||||
var/list/lying = list()
|
||||
var/list/standing = list()
|
||||
|
||||
|
||||
if(getlimb(/obj/item/organ/limb/robot/r_arm))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="r_arm_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="r_arm_l", "layer"=-AUGMENTS_LAYER)
|
||||
if(getlimb(/obj/item/organ/limb/robot/l_arm))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="l_arm_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="l_arm_l", "layer"=-AUGMENTS_LAYER)
|
||||
|
||||
if(getlimb(/obj/item/organ/limb/robot/r_leg))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="r_leg_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="r_leg_l", "layer"=-AUGMENTS_LAYER)
|
||||
if(getlimb(/obj/item/organ/limb/robot/l_leg))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="l_leg_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="l_leg_l", "layer"=-AUGMENTS_LAYER)
|
||||
|
||||
if(getlimb(/obj/item/organ/limb/robot/chest))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="chest_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="chest_l", "layer"=-AUGMENTS_LAYER)
|
||||
if(getlimb(/obj/item/organ/limb/robot/head))
|
||||
standing += image("icon"='icons/mob/augments.dmi', "icon_state"="head_s", "layer"=-AUGMENTS_LAYER)
|
||||
lying += image("icon"='icons/mob/augments.dmi', "icon_state"="head_l", "layer"=-AUGMENTS_LAYER)
|
||||
|
||||
|
||||
|
||||
if(lying.len)
|
||||
overlays_lying[AUGMENTS_LAYER] = lying
|
||||
if(standing.len)
|
||||
overlays_standing[AUGMENTS_LAYER] = standing
|
||||
|
||||
@@ -363,6 +302,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
update_inv_legcuffed()
|
||||
update_inv_pockets()
|
||||
update_fire()
|
||||
update_transform()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
|
||||
@@ -380,12 +320,9 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
var/t_color = w_uniform.item_color
|
||||
if(!t_color) t_color = icon_state
|
||||
var/image/lying = image("icon"='icons/mob/uniform.dmi', "icon_state"="[t_color]_l", "layer"=-UNIFORM_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/uniform.dmi', "icon_state"="[t_color]_s", "layer"=-UNIFORM_LAYER)
|
||||
overlays_lying[UNIFORM_LAYER] = lying
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
|
||||
|
||||
var/G = (gender == FEMALE) ? "f" : "m"
|
||||
if(G == "f" && U.fitted == 1)
|
||||
var/index = "[t_color]_s"
|
||||
@@ -396,13 +333,11 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="uniformblood2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="uniformblood")
|
||||
|
||||
if(U.hastie)
|
||||
var/tie_color = U.hastie.item_color
|
||||
if(!tie_color) tie_color = U.hastie.icon_state
|
||||
lying.overlays += image("icon"='icons/mob/ties.dmi', "icon_state"="[tie_color]2")
|
||||
standing.overlays += image("icon"='icons/mob/ties.dmi', "icon_state"="[tie_color]")
|
||||
else
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
||||
@@ -419,7 +354,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
client.screen += wear_id
|
||||
|
||||
overlays_lying[ID_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="id2", "layer"=-ID_LAYER)
|
||||
overlays_standing[ID_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="id", "layer"=-ID_LAYER)
|
||||
|
||||
apply_overlay(ID_LAYER)
|
||||
@@ -434,17 +368,13 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
var/image/lying = image("icon"='icons/mob/hands.dmi', "icon_state"="[t_state]2", "layer"=-GLOVES_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/hands.dmi', "icon_state"="[t_state]", "layer"=-GLOVES_LAYER)
|
||||
overlays_lying[GLOVES_LAYER] = lying
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
|
||||
if(gloves.blood_DNA)
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands")
|
||||
else
|
||||
if(blood_DNA)
|
||||
overlays_lying[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands2")
|
||||
overlays_standing[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands")
|
||||
|
||||
apply_overlay(GLOVES_LAYER)
|
||||
@@ -459,7 +389,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
glasses.screen_loc = ui_glasses
|
||||
client.screen += glasses
|
||||
|
||||
overlays_lying[GLASSES_LAYER] = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]2", "layer"=-GLASSES_LAYER)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]", "layer"=-GLASSES_LAYER)
|
||||
|
||||
apply_overlay(GLASSES_LAYER)
|
||||
@@ -473,7 +402,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
ears.screen_loc = ui_ears
|
||||
client.screen += ears
|
||||
|
||||
overlays_lying[EARS_LAYER] = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]2", "layer"=-EARS_LAYER)
|
||||
overlays_standing[EARS_LAYER] = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]", "layer"=-EARS_LAYER)
|
||||
|
||||
apply_overlay(EARS_LAYER)
|
||||
@@ -487,13 +415,10 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
shoes.screen_loc = ui_shoes
|
||||
client.screen += shoes
|
||||
|
||||
var/image/lying = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]2", "layer"=-SHOES_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]", "layer"=-SHOES_LAYER)
|
||||
overlays_lying[SHOES_LAYER] = lying
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
|
||||
if(shoes.blood_DNA)
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="shoeblood2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="shoeblood")
|
||||
|
||||
apply_overlay(SHOES_LAYER)
|
||||
@@ -509,7 +434,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
var/t_state = s_store.item_state
|
||||
if(!t_state) t_state = s_store.icon_state
|
||||
overlays_lying[SUIT_STORE_LAYER] = image("icon"='icons/mob/belt_mirror.dmi', "icon_state"="[t_state]2", "layer"=-SUIT_STORE_LAYER)
|
||||
overlays_standing[SUIT_STORE_LAYER] = image("icon"='icons/mob/belt_mirror.dmi', "icon_state"="[t_state]", "layer"=-SUIT_STORE_LAYER)
|
||||
|
||||
apply_overlay(SUIT_STORE_LAYER)
|
||||
@@ -524,14 +448,11 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
head.screen_loc = ui_head //TODO
|
||||
client.screen += head
|
||||
|
||||
var/image/lying = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]2", "layer"=-HEAD_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
|
||||
|
||||
overlays_lying[HEAD_LAYER] = lying
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
|
||||
if(head.blood_DNA)
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood")
|
||||
|
||||
apply_overlay(HEAD_LAYER)
|
||||
@@ -547,7 +468,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
var/t_state = belt.item_state
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
overlays_lying[BELT_LAYER] = image("icon"='icons/mob/belt.dmi', "icon_state"="[t_state]2", "layer"=-BELT_LAYER)
|
||||
overlays_standing[BELT_LAYER] = image("icon"='icons/mob/belt.dmi', "icon_state"="[t_state]", "layer"=-BELT_LAYER)
|
||||
|
||||
apply_overlay(BELT_LAYER)
|
||||
@@ -562,9 +482,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
wear_suit.screen_loc = ui_oclothing //TODO
|
||||
client.screen += wear_suit
|
||||
|
||||
var/image/lying = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]2", "layer"=-SUIT_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]", "layer"=-SUIT_LAYER)
|
||||
overlays_lying[SUIT_LAYER] = lying
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
@@ -574,7 +492,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="[S.blood_overlay_type]blood2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="[S.blood_overlay_type]blood")
|
||||
|
||||
apply_overlay(SUIT_LAYER)
|
||||
@@ -599,15 +516,13 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
client.screen += wear_mask
|
||||
|
||||
var/image/lying = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]2", "layer"=-FACEMASK_LAYER)
|
||||
var/image/standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
|
||||
overlays_lying[FACEMASK_LAYER] = lying
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
|
||||
if(wear_mask.blood_DNA && !istype(wear_mask, /obj/item/clothing/mask/cigarette))
|
||||
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood2")
|
||||
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood")
|
||||
|
||||
|
||||
apply_overlay(FACEMASK_LAYER)
|
||||
|
||||
|
||||
@@ -620,7 +535,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
back.screen_loc = ui_back //TODO
|
||||
client.screen += back
|
||||
|
||||
overlays_lying[BACK_LAYER] = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]2", "layer"=-BACK_LAYER)
|
||||
overlays_standing[BACK_LAYER] = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
|
||||
|
||||
apply_overlay(BACK_LAYER)
|
||||
@@ -647,7 +561,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
R.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="markus")
|
||||
L.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="gabrielle")
|
||||
|
||||
overlays_lying[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff2", "layer"=-HANDCUFF_LAYER)
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff1", "layer"=-HANDCUFF_LAYER)
|
||||
else
|
||||
if(hud_used)
|
||||
@@ -663,7 +576,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
remove_overlay(LEGCUFF_LAYER)
|
||||
|
||||
if(legcuffed)
|
||||
overlays_lying[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff2", "layer"=-LEGCUFF_LAYER)
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
|
||||
|
||||
apply_overlay(LEGCUFF_LAYER)
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
M.colour = colour
|
||||
M.rabid = 1
|
||||
is_adult = 0
|
||||
maxHealth = 150
|
||||
revive()
|
||||
regenerate_icons()
|
||||
health = maxHealth
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([rand(1, 1000)])"
|
||||
return
|
||||
|
||||
if(stat == DEAD) return
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
|
||||
real_name = name
|
||||
slime_mutation = mutation_table(colour)
|
||||
coretype = text2path("/obj/item/slime_extract/[colour]")
|
||||
var/sanitizedcolour = replacetext(colour, " ", "")
|
||||
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/regenerate_icons()
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
M.colour = colour
|
||||
else
|
||||
M.colour = slime_mutation[rand(1,4)]
|
||||
M.nutrition = new_nutrition
|
||||
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1) step_away(M,src)
|
||||
babies += M
|
||||
|
||||
@@ -9,8 +9,8 @@ proc/mutation_table(var/colour)
|
||||
slime_mutation[4] = "purple"
|
||||
//Tier 2
|
||||
if("purple")
|
||||
slime_mutation[1] = "darkpurple"
|
||||
slime_mutation[2] = "darkblue"
|
||||
slime_mutation[1] = "dark purple"
|
||||
slime_mutation[2] = "dark blue"
|
||||
slime_mutation[3] = "green"
|
||||
slime_mutation[4] = "green"
|
||||
if("metal")
|
||||
@@ -21,20 +21,20 @@ proc/mutation_table(var/colour)
|
||||
if("yellow")
|
||||
slime_mutation[1] = "red"
|
||||
slime_mutation[2] = "red"
|
||||
slime_mutation[3] = "darkpurple"
|
||||
slime_mutation[3] = "dark purple"
|
||||
slime_mutation[4] = "yellow"
|
||||
if("blue")
|
||||
slime_mutation[1] = "darkblue"
|
||||
slime_mutation[1] = "dark blue"
|
||||
slime_mutation[2] = "pink"
|
||||
slime_mutation[3] = "pink"
|
||||
slime_mutation[4] = "silver"
|
||||
//Tier 3
|
||||
if("darkblue")
|
||||
if("dark blue")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "cerulean"
|
||||
slime_mutation[3] = "blue"
|
||||
slime_mutation[4] = "cerulean"
|
||||
if("darkpurple")
|
||||
if("dark purple")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "sepia"
|
||||
slime_mutation[3] = "orange"
|
||||
@@ -53,8 +53,8 @@ proc/mutation_table(var/colour)
|
||||
if("pink")
|
||||
slime_mutation[1] = "pink"
|
||||
slime_mutation[2] = "pink"
|
||||
slime_mutation[3] = "lightpink"
|
||||
slime_mutation[4] = "lightpink"
|
||||
slime_mutation[3] = "light pink"
|
||||
slime_mutation[4] = "light pink"
|
||||
if("red")
|
||||
slime_mutation[1] = "red"
|
||||
slime_mutation[2] = "red"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
var/list/overlays_lying[M_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[M_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/monkey/regenerate_icons()
|
||||
@@ -21,23 +20,17 @@
|
||||
update_inv_handcuffed(0)
|
||||
update_fire()
|
||||
update_icons()
|
||||
update_transform()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/update_icons()
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
icon_state = "monkey0"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
icon_state = "monkey1"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
icon_state = "monkey1"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
////////
|
||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
||||
@@ -45,23 +38,14 @@
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
if(client && hud_used)
|
||||
client.screen += wear_mask
|
||||
overlays -= overlays_lying[M_MASK_LAYER]
|
||||
overlays -= overlays_standing[M_MASK_LAYER]
|
||||
var/image/lying = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]2", "layer" = -M_MASK_LAYER)
|
||||
var/image/standing = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]", "layer" = -M_MASK_LAYER)
|
||||
if(!istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
overlays_lying[M_MASK_LAYER] = lying
|
||||
overlays_standing[M_MASK_LAYER] = standing
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[M_MASK_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[M_MASK_LAYER]
|
||||
overlays += overlays_standing[M_MASK_LAYER]
|
||||
else
|
||||
overlays -= overlays_lying[M_MASK_LAYER]
|
||||
overlays -= overlays_standing[M_MASK_LAYER]
|
||||
overlays_lying[M_MASK_LAYER] = null
|
||||
overlays_standing[M_MASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -103,18 +87,11 @@
|
||||
back.screen_loc = ui_monkey_back
|
||||
if(client && hud_used)
|
||||
client.screen += back
|
||||
overlays -= overlays_lying[M_BACK_LAYER]
|
||||
overlays -= overlays_standing[M_BACK_LAYER]
|
||||
overlays_lying[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]2", "layer" = -M_BACK_LAYER)
|
||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]", "layer" = -M_BACK_LAYER)
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[M_BACK_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[M_BACK_LAYER]
|
||||
overlays += overlays_standing[M_BACK_LAYER]
|
||||
else
|
||||
overlays -= overlays_lying[M_BACK_LAYER]
|
||||
overlays -= overlays_standing[M_BACK_LAYER]
|
||||
overlays_lying[M_BACK_LAYER] = null
|
||||
overlays_standing[M_BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -129,23 +106,16 @@
|
||||
var/obj/screen/inventory/L = hud_used.adding[5]
|
||||
R.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "markus")
|
||||
L.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "gabrielle")
|
||||
overlays -= overlays_lying[M_HANDCUFF_LAYER]
|
||||
overlays -= overlays_standing[M_HANDCUFF_LAYER]
|
||||
overlays_lying[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff2", "layer" = -M_HANDCUFF_LAYER)
|
||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1", "layer" = -M_HANDCUFF_LAYER)
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[M_HANDCUFF_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[M_HANDCUFF_LAYER]
|
||||
overlays += overlays_standing[M_HANDCUFF_LAYER]
|
||||
else
|
||||
if(hud_used)
|
||||
var/obj/screen/inventory/R = hud_used.adding[4]
|
||||
var/obj/screen/inventory/L = hud_used.adding[5]
|
||||
R.overlays = null
|
||||
L.overlays = null
|
||||
overlays -= overlays_lying[M_HANDCUFF_LAYER]
|
||||
overlays -= overlays_standing[M_HANDCUFF_LAYER]
|
||||
overlays_lying[M_HANDCUFF_LAYER] = null
|
||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -155,18 +125,12 @@
|
||||
client.screen |= contents
|
||||
|
||||
/mob/living/carbon/monkey/update_fire()
|
||||
overlays -= overlays_lying[M_FIRE_LAYER]
|
||||
overlays -= overlays_standing[M_FIRE_LAYER]
|
||||
if(on_fire)
|
||||
overlays_lying[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Lying", "layer"= -M_FIRE_LAYER)
|
||||
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[M_FIRE_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[M_FIRE_LAYER]
|
||||
overlays += overlays_standing[M_FIRE_LAYER]
|
||||
return
|
||||
else
|
||||
overlays_lying[M_FIRE_LAYER] = null
|
||||
overlays_standing[M_FIRE_LAYER] = null
|
||||
|
||||
|
||||
|
||||
21
code/modules/mob/living/carbon/update_icons.dm
Normal file
@@ -0,0 +1,21 @@
|
||||
//LOOK G-MA, I'VE JOINED CARBON PROCS THAT ARE IDENTICAL IN ALL CASES INTO ONE PROC, I'M BETTER THAN LIFE()
|
||||
//I thought about mob/living but silicons and simple_animals don't want this just yet.
|
||||
//Right now just handles lying down and cloaking, but could handle other cases later.
|
||||
//IMPORTANT: Multiple animate() calls do not stack well, so try to do them all at once if you can.
|
||||
/mob/living/carbon/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/final_pixel_y = 0
|
||||
var/final_dir = dir
|
||||
var/changed = 0
|
||||
|
||||
if(lying != lying_prev)
|
||||
changed++
|
||||
ntransform.TurnTo(lying_prev,lying)
|
||||
lying_prev = lying //so we don't try to animate until there's been another change.
|
||||
if(lying != 0)
|
||||
final_pixel_y = -6
|
||||
if(dir & (EAST|WEST)) //Facing east or west
|
||||
final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
|
||||
@@ -34,4 +34,4 @@
|
||||
var/update_slimes = 1
|
||||
|
||||
var/on_fire = 0 //The "Are we on fire?" var
|
||||
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
|
||||
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
else
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
SetEmagged(1)
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
user << "You emag [src]'s interface."
|
||||
@@ -518,11 +518,6 @@
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||
del(D)
|
||||
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
|
||||
@@ -984,7 +979,17 @@
|
||||
lockcharge = state
|
||||
update_canmove()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/SetEmagged(var/new_state)
|
||||
emagged = new_state
|
||||
if(new_state)
|
||||
if(src.module)
|
||||
src.module.on_emag()
|
||||
else
|
||||
if (module)
|
||||
uneq_module(module.emag)
|
||||
if(hud_used)
|
||||
hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open.
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/verb/outputlaws()
|
||||
set category = "Robot Commands"
|
||||
|
||||
@@ -11,24 +11,37 @@
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
if(modules)
|
||||
for(var/obj/O in modules)
|
||||
O.emp_act(severity)
|
||||
if(emag)
|
||||
emag.emp_act(severity)
|
||||
..()
|
||||
return
|
||||
/obj/item/weapon/robot_module/emp_act(severity)
|
||||
if(modules)
|
||||
for(var/obj/O in modules)
|
||||
O.emp_act(severity)
|
||||
if(emag)
|
||||
emag.emp_act(severity)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/robot_module/proc/get_usable_modules()
|
||||
. = modules.Copy()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R.emagged)
|
||||
. += emag
|
||||
|
||||
/obj/item/weapon/robot_module/proc/get_inactive_modules()
|
||||
. = list()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
for(var/m in get_usable_modules())
|
||||
if((m != R.module_state_1) && (m != R.module_state_2) && (m != R.module_state_3))
|
||||
. += m
|
||||
|
||||
|
||||
New()
|
||||
modules += new /obj/item/device/flashlight(src)
|
||||
modules += new /obj/item/device/flash(src)
|
||||
emag = new /obj/item/toy/sword(src)
|
||||
emag.name = "Placeholder Emag Item"
|
||||
/obj/item/weapon/robot_module/New()
|
||||
modules += new /obj/item/device/flashlight(src)
|
||||
modules += new /obj/item/device/flash(src)
|
||||
emag = new /obj/item/toy/sword(src)
|
||||
emag.name = "Placeholder Emag Item"
|
||||
// jetpack = new /obj/item/toy/sword(src)
|
||||
// jetpack.name = "Placeholder Upgrade Item"
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
@@ -41,6 +54,9 @@
|
||||
if(O)
|
||||
modules += O
|
||||
|
||||
/obj/item/weapon/robot_module/proc/on_emag()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
@@ -193,12 +209,23 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
modules += new /obj/item/borg/sight/meson(src)
|
||||
emag = new /obj/item/borg/stun(src)
|
||||
modules += new /obj/item/weapon/storage/bag/ore(src)
|
||||
modules += new /obj/item/weapon/pickaxe/borgdrill(src)
|
||||
if(R.emagged)
|
||||
modules += new /obj/item/weapon/pickaxe/diamonddrill(src)
|
||||
else
|
||||
modules += new /obj/item/weapon/pickaxe/borgdrill(src)
|
||||
modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
|
||||
on_emag()
|
||||
..()
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in modules)
|
||||
del(D)
|
||||
modules += new /obj/item/weapon/pickaxe/diamonddrill(src)
|
||||
rebuild()
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/syndicate
|
||||
name = "syndicate robot module"
|
||||
|
||||
@@ -694,23 +694,27 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
return 1
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
//Robots and brains have their own version so don't worry about them
|
||||
/mob/proc/update_canmove()
|
||||
if(buckled)
|
||||
anchored = 1
|
||||
|
||||
if(stat || weakened || paralysis || resting || (status_flags & FAKEDEATH) || buckled)
|
||||
canmove = 0
|
||||
if( istype(buckled,/obj/structure/stool/bed/chair) )
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH) )
|
||||
lying = 1
|
||||
canmove = 0
|
||||
else if( stunned )
|
||||
// lying = 0
|
||||
if(!lying)
|
||||
if(resting) //Presuming that you're resting on a bed, which would look goofy lying the wrong way
|
||||
lying = 90
|
||||
else
|
||||
lying = pick(90, 270) //180 looks like shit since BYOND inverts rather than turns in that case
|
||||
else if(stunned)
|
||||
canmove = 0
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
if(buckled)
|
||||
anchored = 1
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 90 //Everything else faces right. TODO: Allow left-facing beds
|
||||
|
||||
if(lying)
|
||||
density = 0
|
||||
@@ -722,11 +726,12 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
//Temporarily moved here from the various life() procs
|
||||
//I'm fixing stuff incrementally so this will likely find a better home.
|
||||
//It just makes sense for now. ~Carn
|
||||
if( update_icon ) //forces a full overlay update
|
||||
|
||||
if(lying != lying_prev)
|
||||
update_transform()
|
||||
if(update_icon) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
else if( lying != lying_prev )
|
||||
update_icons()
|
||||
|
||||
return canmove
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
/mob/proc/update_hud()
|
||||
return
|
||||
|
||||
/mob/proc/update_transform()
|
||||
return
|
||||
|
||||
/mob/proc/update_inv_handcuffed()
|
||||
return
|
||||
|
||||
|
||||
@@ -52,7 +52,19 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- You can simply add changelogs using AddToChangelog.exe -->
|
||||
|
||||
<!-- DO NOT REMOVE OR MOVE THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->
|
||||
<!-- DO NOT REMOVE OR MOVE THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->
|
||||
<div class='commit sansserif'>
|
||||
|
||||
|
||||
<div class='commit sansserif'>
|
||||
<h2 class='date'>21 January 2014</h2>
|
||||
<h3 class='author'>MrPerson updated:</h3>
|
||||
<ul class='changes bgimages16'>
|
||||
<li class='rscadd'>Mobs now lie down via turning icons rather than preturned sprites.</li>
|
||||
<li class='rscadd'>You can lie down facing up or down and the turn can be 90 degrees clockwise or counterclockwise.</li>
|
||||
<li class='tweak'>Resting will always make you lie to the right so you look good on beds.</li>
|
||||
<li class='wip'>Please report any bugs you find with this system.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2 class='date'>20 January 2014</h2>
|
||||
|
||||
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -36,6 +36,7 @@
|
||||
#include "code\__HELPERS\lists.dm"
|
||||
#include "code\__HELPERS\logging.dm"
|
||||
#include "code\__HELPERS\maths.dm"
|
||||
#include "code\__HELPERS\matrices.dm"
|
||||
#include "code\__HELPERS\mobs.dm"
|
||||
#include "code\__HELPERS\names.dm"
|
||||
#include "code\__HELPERS\sanitize_values.dm"
|
||||
@@ -884,6 +885,7 @@
|
||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||
#include "code\modules\mob\living\carbon\emote.dm"
|
||||
#include "code\modules\mob\living\carbon\inventory.dm"
|
||||
#include "code\modules\mob\living\carbon\update_icons.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\alien_defense.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\death.dm"
|
||||
|
||||