mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 17:11:22 +00:00
Merge remote-tracking branch 'upstream/dev' into 150819-MoreDecalsBecauseYouLoveThem
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
// Returns the hex value of a number given a value assumed to be a base-ten value
|
||||
/proc/num2hex(num, padlength)
|
||||
var/global/list/hexdigits = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
|
||||
|
||||
|
||||
. = ""
|
||||
while(num > 0)
|
||||
var/hexdigit = hexdigits[(num & 0xF) + 1]
|
||||
@@ -46,7 +46,7 @@
|
||||
num >>= 4 //go to the next half-byte
|
||||
|
||||
//pad with zeroes
|
||||
var/left = padlength - length(.)
|
||||
var/left = padlength - length(.)
|
||||
while (left-- > 0)
|
||||
. = "0[.]"
|
||||
|
||||
@@ -275,13 +275,6 @@ proc/tg_list2text(list/list, glue=",")
|
||||
if (rights & R_MENTOR) . += "[seperator]+MENTOR"
|
||||
return .
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
switch (ui_style)
|
||||
if ("old") return 'icons/mob/screen1_old.dmi'
|
||||
if ("Orange") return 'icons/mob/screen1_Orange.dmi'
|
||||
if ("Midnight") return 'icons/mob/screen1_Midnight.dmi'
|
||||
else return 'icons/mob/screen1_White.dmi'
|
||||
|
||||
// heat2color functions. Adapted from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
|
||||
/proc/heat2color(temp)
|
||||
return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp))
|
||||
|
||||
@@ -256,7 +256,7 @@ datum/hud/New(mob/owner)
|
||||
if(ishuman(mymob))
|
||||
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
|
||||
else if(issmall(mymob))
|
||||
monkey_hud(ui_style)
|
||||
monkey_hud(ui_style, ui_color, ui_alpha)
|
||||
else if(isbrain(mymob))
|
||||
brain_hud(ui_style)
|
||||
else if(isalien(mymob))
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.icon_state = "intent_"+mymob.a_intent
|
||||
using.screen_loc = ui_acti
|
||||
@@ -125,7 +124,6 @@
|
||||
if(hud_data.has_m_intent)
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
@@ -160,11 +158,10 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.set_dir(WEST)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
inv_box.icon_state = "r_hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.icon_state = "r_hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.layer = 19
|
||||
@@ -176,11 +173,10 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.set_dir(EAST)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
inv_box.icon_state = "l_hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.icon_state = "l_hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.layer = 19
|
||||
@@ -191,7 +187,6 @@
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.set_dir(SOUTH)
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
@@ -202,7 +197,6 @@
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.set_dir(SOUTH)
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
@@ -340,29 +334,31 @@
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
//mymob.gun_setting_icon.color = ui_color
|
||||
mymob.gun_setting_icon.icon = ui_style
|
||||
mymob.gun_setting_icon.color = ui_color
|
||||
mymob.gun_setting_icon.alpha = ui_alpha
|
||||
hud_elements |= mymob.gun_setting_icon
|
||||
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
//mymob.item_use_icon.color = ui_color
|
||||
mymob.item_use_icon.icon = ui_style
|
||||
mymob.item_use_icon.color = ui_color
|
||||
mymob.item_use_icon.alpha = ui_alpha
|
||||
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
//mymob.gun_move_icon.color = ui_color
|
||||
mymob.gun_move_icon.icon = ui_style
|
||||
mymob.gun_move_icon.color = ui_color
|
||||
mymob.gun_move_icon.alpha = ui_alpha
|
||||
|
||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
//mymob.gun_run_icon.color = ui_color
|
||||
mymob.gun_run_icon.icon = ui_style
|
||||
mymob.gun_run_icon.color = ui_color
|
||||
mymob.gun_run_icon.alpha = ui_alpha
|
||||
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.icon = ui_style
|
||||
mymob.radio_use_icon.color = ui_color
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.set_dir(2)
|
||||
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
@@ -8,8 +8,9 @@
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = mymob.a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
@@ -67,8 +68,9 @@
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
@@ -78,6 +80,8 @@
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
@@ -85,9 +89,10 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.set_dir(WEST)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
inv_box.icon_state = "r_hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
@@ -98,9 +103,10 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.set_dir(EAST)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
inv_box.icon_state = "l_hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
@@ -111,8 +117,9 @@
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.set_dir(SOUTH)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
@@ -120,8 +127,9 @@
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.set_dir(SOUTH)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
@@ -129,8 +137,9 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "mask"
|
||||
inv_box.set_dir(NORTH)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
@@ -139,8 +148,9 @@
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.set_dir(NORTHEAST)
|
||||
inv_box.icon = ui_style
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
@@ -149,54 +159,72 @@
|
||||
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.color = ui_color
|
||||
mymob.oxygen.alpha = ui_alpha
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen()
|
||||
mymob.pressure.icon = ui_style
|
||||
mymob.pressure.color = ui_color
|
||||
mymob.pressure.alpha = ui_alpha
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
mymob.toxin = new /obj/screen()
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.color = ui_color
|
||||
mymob.toxin.alpha = ui_alpha
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
|
||||
mymob.internals = new /obj/screen()
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.color = ui_color
|
||||
mymob.internals.alpha = ui_alpha
|
||||
mymob.internals.icon_state = "internal0"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.color = ui_color
|
||||
mymob.fire.alpha = ui_alpha
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.bodytemp = new /obj/screen()
|
||||
mymob.bodytemp.icon = ui_style
|
||||
mymob.bodytemp.color = ui_color
|
||||
mymob.bodytemp.alpha = ui_alpha
|
||||
mymob.bodytemp.icon_state = "temp1"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.color = ui_color
|
||||
mymob.healths.alpha = ui_alpha
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.color = ui_color
|
||||
mymob.pullin.alpha = ui_alpha
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
@@ -217,6 +245,8 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.color = ui_color
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "sleeper_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/list/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
@@ -39,7 +38,7 @@
|
||||
toggle_filter()
|
||||
|
||||
/obj/machinery/sleeper/update_icon()
|
||||
icon_state = "sleeper_[occupant ? "1" : "0"][orient == "RIGHT" ? "-r" : ""]"
|
||||
icon_state = "sleeper_[occupant ? "1" : "0"]"
|
||||
|
||||
/obj/machinery/sleeper/attack_hand(var/mob/user)
|
||||
if(..())
|
||||
@@ -153,10 +152,10 @@
|
||||
if(occupant)
|
||||
go_out()
|
||||
|
||||
..(severity)
|
||||
..(severity)
|
||||
/obj/machinery/sleeper/proc/toggle_filter()
|
||||
if(!occupant || !beaker)
|
||||
filtering = 0
|
||||
filtering = 0
|
||||
return
|
||||
filtering = !filtering
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell
|
||||
name = "cryo cell"
|
||||
icon = 'icons/obj/cryogenics.dmi'
|
||||
icon_state = "pod0"
|
||||
icon = 'icons/obj/cryogenics.dmi' // map only
|
||||
icon_state = "pod_preview"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/New()
|
||||
..()
|
||||
icon = 'icons/obj/cryogenics_split.dmi'
|
||||
update_icon()
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/Destroy()
|
||||
@@ -193,12 +195,28 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/update_icon()
|
||||
overlays.Cut()
|
||||
icon_state = "pod[on]"
|
||||
var/image/I
|
||||
|
||||
I = image(icon, "pod[on]_top")
|
||||
I.layer = 5 // this needs to be fairly high so it displays over most things, but it needs to be under lighting (at 10)
|
||||
I.pixel_z = 32
|
||||
overlays += I
|
||||
|
||||
if(occupant)
|
||||
var/image/pickle = image(occupant.icon, occupant.icon_state)
|
||||
pickle.overlays = occupant.overlays
|
||||
pickle.pixel_y = 20
|
||||
pickle.pixel_z = 18
|
||||
pickle.layer = 5
|
||||
overlays += pickle
|
||||
overlays += "lid[on]"
|
||||
|
||||
I = image(icon, "lid[on]")
|
||||
I.layer = 5
|
||||
overlays += I
|
||||
|
||||
I = image(icon, "lid[on]_top")
|
||||
I.layer = 5
|
||||
I.pixel_z = 32
|
||||
overlays += I
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
|
||||
if(air_contents.total_moles < 10)
|
||||
|
||||
@@ -147,20 +147,7 @@
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "cryo_rear"
|
||||
anchored = 1
|
||||
|
||||
var/orient_right = null //Flips the sprite.
|
||||
|
||||
/obj/structure/cryofeed/right
|
||||
orient_right = 1
|
||||
icon_state = "cryo_rear-r"
|
||||
|
||||
/obj/structure/cryofeed/New()
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "cryo_rear-r"
|
||||
else
|
||||
icon_state = "cryo_rear"
|
||||
..()
|
||||
dir = WEST
|
||||
|
||||
//Cryopods themselves.
|
||||
/obj/machinery/cryopod
|
||||
@@ -170,6 +157,7 @@
|
||||
icon_state = "body_scanner_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
dir = WEST
|
||||
|
||||
var/base_icon_state = "body_scanner_0"
|
||||
var/occupied_icon_state = "body_scanner_1"
|
||||
@@ -180,7 +168,6 @@
|
||||
var/disallow_occupant_types = list()
|
||||
|
||||
var/mob/occupant = null // Person waiting to be despawned.
|
||||
var/orient_right = null // Flips the sprite.
|
||||
var/time_till_despawn = 18000 // 30 minutes-ish safe period before being despawned.
|
||||
var/time_entered = 0 // Used to keep track of the safe period.
|
||||
var/obj/item/device/radio/intercom/announce //
|
||||
@@ -204,10 +191,6 @@
|
||||
/obj/item/weapon/storage/internal
|
||||
)
|
||||
|
||||
/obj/machinery/cryopod/right
|
||||
orient_right = 1
|
||||
icon_state = "body_scanner_0-r"
|
||||
|
||||
/obj/machinery/cryopod/robot
|
||||
name = "robotic storage unit"
|
||||
desc = "A storage unit for robots."
|
||||
@@ -221,18 +204,8 @@
|
||||
allow_occupant_types = list(/mob/living/silicon/robot)
|
||||
disallow_occupant_types = list(/mob/living/silicon/robot/drone)
|
||||
|
||||
/obj/machinery/cryopod/robot/right
|
||||
orient_right = 1
|
||||
icon_state = "pod_0-r"
|
||||
|
||||
/obj/machinery/cryopod/New()
|
||||
announce = new /obj/item/device/radio/intercom(src)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[base_icon_state]-r"
|
||||
else
|
||||
icon_state = base_icon_state
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/cryopod/Destroy()
|
||||
@@ -383,10 +356,7 @@
|
||||
if ((G.fields["name"] == occupant.real_name))
|
||||
qdel(G)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[base_icon_state]-r"
|
||||
else
|
||||
icon_state = base_icon_state
|
||||
icon_state = base_icon_state
|
||||
|
||||
//TODO: Check objectives/mode, update new targets if this mob is the target, spawn new antags?
|
||||
|
||||
@@ -444,10 +414,7 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[occupied_icon_state]-r"
|
||||
else
|
||||
icon_state = occupied_icon_state
|
||||
icon_state = occupied_icon_state
|
||||
|
||||
M << "<span class='notice'>[on_enter_occupant_message]</span>"
|
||||
M << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
|
||||
@@ -469,10 +436,7 @@
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[base_icon_state]-r"
|
||||
else
|
||||
icon_state = base_icon_state
|
||||
icon_state = base_icon_state
|
||||
|
||||
//Eject any items that aren't meant to be in the pod.
|
||||
var/list/items = src.contents
|
||||
@@ -522,10 +486,7 @@
|
||||
usr.loc = src
|
||||
set_occupant(usr)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[occupied_icon_state]-r"
|
||||
else
|
||||
icon_state = occupied_icon_state
|
||||
icon_state = occupied_icon_state
|
||||
|
||||
usr << "<span class='notice'>[on_enter_occupant_message]</span>"
|
||||
usr << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
|
||||
@@ -548,10 +509,7 @@
|
||||
occupant.loc = get_turf(src)
|
||||
set_occupant(null)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "[base_icon_state]-r"
|
||||
else
|
||||
icon_state = base_icon_state
|
||||
icon_state = base_icon_state
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
overlays.Cut()
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
|
||||
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
|
||||
img.pixel_x = i * 3
|
||||
overlays += img
|
||||
overlays += image('icons/obj/food.dmi', "[i][D.overlay_state]")
|
||||
i++
|
||||
|
||||
/obj/item/weapon/storage/box/donut/empty
|
||||
|
||||
@@ -3,26 +3,45 @@
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
var/cult = 0
|
||||
New()
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt","thebark","theharmbaton","theharmedbaton","thesingulo","thedrukcarp","thedrunkcarp", "scotch","officerbeersky","on"))
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
//on = 0
|
||||
//brightness_on = 4 //uncomment these when the lighting fixes get in
|
||||
return
|
||||
|
||||
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
|
||||
. = icon_states(icon)
|
||||
. -= "on"
|
||||
. -= "narsiebistro"
|
||||
. -= "empty"
|
||||
if(initial)
|
||||
. -= "Off"
|
||||
|
||||
/obj/structure/sign/double/barsign/examine(mob/user)
|
||||
..()
|
||||
switch(icon_state)
|
||||
if("Off")
|
||||
user << "It appears to be switched off."
|
||||
if("narsiebistro")
|
||||
user << "It shows a picture of a large black and red being. Spooky!"
|
||||
if("on", "empty")
|
||||
user << "The lights are on, but there's no picture."
|
||||
else
|
||||
user << "It says '[icon_state]'"
|
||||
|
||||
/obj/structure/sign/double/barsign/New()
|
||||
..()
|
||||
icon_state = pick(get_valid_states())
|
||||
|
||||
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
|
||||
if(cult)
|
||||
return ..()
|
||||
|
||||
var/obj/item/weapon/card/id/card = I.GetID()
|
||||
if(istype(card))
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
|
||||
if(!sign_type)
|
||||
return
|
||||
icon_state = sign_type
|
||||
user << "<span class='notice'>You change the barsign.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/card = I
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head", "Whiskey Implant", "Carpe Carp", "Robust Roadhouse", "Greytide", "The Redshirt", "The Bark", "The Harm Baton", "The Harmed Baton", "The Singulo", "The Druk Carp", "The Drunk Carp", "Scotch", "Officer Beersky", "On")
|
||||
if(sign_type == null)
|
||||
return
|
||||
else
|
||||
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
|
||||
src.ChangeSign(sign_type)
|
||||
user << "You change the barsign."
|
||||
return ..()
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
||||
UI_style = sanitize_inlist(UI_style, all_ui_styles, initial(UI_style))
|
||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||
default_slot = sanitize_integer(default_slot, 1, config.character_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
|
||||
@@ -157,41 +157,3 @@
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)."
|
||||
feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/change_ui()
|
||||
set name = "Change UI"
|
||||
set category = "Preferences"
|
||||
set desc = "Configure your user interface"
|
||||
|
||||
if(!ishuman(usr))
|
||||
usr << "This only for human"
|
||||
return
|
||||
|
||||
var/UI_style_new = input(usr, "Select a style, we recommend White for customization") in list("White", "Midnight", "Orange", "old")
|
||||
if(!UI_style_new) return
|
||||
|
||||
var/UI_style_alpha_new = input(usr, "Select a new alpha(transparence) parametr for UI, between 50 and 255") as num
|
||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
|
||||
var/UI_style_color_new = input(usr, "Choose your UI color, dark colors are not recommended!") as color|null
|
||||
if(!UI_style_color_new) return
|
||||
|
||||
//update UI
|
||||
var/list/icons = usr.hud_used.adding + usr.hud_used.other +usr.hud_used.hotkeybuttons
|
||||
icons.Add(usr.zone_sel)
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
|
||||
I.icon = ui_style2icon(UI_style_new)
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
|
||||
|
||||
if(alert("Like it? Save changes?",,"Yes", "No") == "Yes")
|
||||
prefs.UI_style = UI_style_new
|
||||
prefs.UI_style_alpha = UI_style_alpha_new
|
||||
prefs.UI_style_color = UI_style_color_new
|
||||
prefs.save_preferences()
|
||||
usr << "UI was saved"
|
||||
58
code/modules/client/ui_style.dm
Normal file
58
code/modules/client/ui_style.dm
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
|
||||
/var/all_ui_styles = list(
|
||||
"Midnight" = 'icons/mob/screen/midnight.dmi',
|
||||
"Orange" = 'icons/mob/screen/orange.dmi',
|
||||
"old" = 'icons/mob/screen/old.dmi',
|
||||
"White" = 'icons/mob/screen/white.dmi',
|
||||
"old-noborder" = 'icons/mob/screen/old-noborder.dmi'
|
||||
)
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
if(ui_style in all_ui_styles)
|
||||
return all_ui_styles[ui_style]
|
||||
return all_ui_styles["White"]
|
||||
|
||||
|
||||
/client/verb/change_ui()
|
||||
set name = "Change UI"
|
||||
set category = "Preferences"
|
||||
set desc = "Configure your user interface"
|
||||
|
||||
if(!ishuman(usr))
|
||||
usr << "<span class='warning'>You must be human to use this verb.</span>"
|
||||
return
|
||||
|
||||
var/UI_style_new = input(usr, "Select a style. White is recommended for customization") as null|anything in all_ui_styles
|
||||
if(!UI_style_new) return
|
||||
|
||||
var/UI_style_alpha_new = input(usr, "Select a new alpha (transparency) parameter for your UI, between 50 and 255") as null|num
|
||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
|
||||
var/UI_style_color_new = input(usr, "Choose your UI color. Dark colors are not recommended!") as color|null
|
||||
if(!UI_style_color_new) return
|
||||
|
||||
//update UI
|
||||
var/list/icons = usr.hud_used.adding + usr.hud_used.other + usr.hud_used.hotkeybuttons
|
||||
icons.Add(usr.zone_sel)
|
||||
icons.Add(usr.gun_setting_icon)
|
||||
icons.Add(usr.item_use_icon)
|
||||
icons.Add(usr.gun_move_icon)
|
||||
icons.Add(usr.gun_run_icon)
|
||||
icons.Add(usr.radio_use_icon)
|
||||
|
||||
var/icon/ic = all_ui_styles[UI_style_new]
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
|
||||
I.icon = ic
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
|
||||
if(alert("Like it? Save changes?",,"Yes", "No") == "Yes")
|
||||
prefs.UI_style = UI_style_new
|
||||
prefs.UI_style_alpha = UI_style_alpha_new
|
||||
prefs.UI_style_color = UI_style_color_new
|
||||
prefs.save_preferences()
|
||||
usr << "UI was saved"
|
||||
@@ -147,11 +147,11 @@
|
||||
src.hand = !( src.hand )
|
||||
if(hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
|
||||
if(hand) //This being 1 means the left hand is in use
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_active"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_inactive"
|
||||
hud_used.l_hand_hud_object.icon_state = "l_hand_active"
|
||||
hud_used.r_hand_hud_object.icon_state = "r_hand_inactive"
|
||||
else
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_inactive"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_active"
|
||||
hud_used.l_hand_hud_object.icon_state = "l_hand_inactive"
|
||||
hud_used.r_hand_hud_object.icon_state = "r_hand_active"
|
||||
/*if (!( src.hand ))
|
||||
src.hands.set_dir(NORTH)
|
||||
else
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
// to be drawn for the mob. This is fairly delicate, try to avoid messing with it
|
||||
// unless you know exactly what it does.
|
||||
var/list/gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1),
|
||||
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1),
|
||||
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
|
||||
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id"),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
@@ -55,13 +55,13 @@
|
||||
/datum/hud_data/diona
|
||||
has_internals = 0
|
||||
gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
|
||||
"o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_gloves, "name" = "Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_oclothing, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id"),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
@@ -69,6 +69,6 @@
|
||||
|
||||
/datum/hud_data/monkey
|
||||
gear = list(
|
||||
"mask" = list("loc" = ui_shoes, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
)
|
||||
"mask" = list("loc" = ui_shoes, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1),
|
||||
"back" = list("loc" = ui_sstore1, "name" = "Back", "slot" = slot_back, "state" = "back"),
|
||||
)
|
||||
|
||||
@@ -765,22 +765,22 @@
|
||||
|
||||
/mob/verb/eastface()
|
||||
set hidden = 1
|
||||
return facedir(EAST)
|
||||
return facedir(client.client_dir(EAST))
|
||||
|
||||
|
||||
/mob/verb/westface()
|
||||
set hidden = 1
|
||||
return facedir(WEST)
|
||||
return facedir(client.client_dir(WEST))
|
||||
|
||||
|
||||
/mob/verb/northface()
|
||||
set hidden = 1
|
||||
return facedir(NORTH)
|
||||
return facedir(client.client_dir(NORTH))
|
||||
|
||||
|
||||
/mob/verb/southface()
|
||||
set hidden = 1
|
||||
return facedir(SOUTH)
|
||||
return facedir(client.client_dir(SOUTH))
|
||||
|
||||
|
||||
//This might need a rename but it should replace the can this mob use things check
|
||||
@@ -1058,19 +1058,19 @@ mob/proc/yank_out_object()
|
||||
|
||||
/mob/verb/northfaceperm()
|
||||
set hidden = 1
|
||||
set_face_dir(NORTH)
|
||||
set_face_dir(client.client_dir(NORTH))
|
||||
|
||||
/mob/verb/southfaceperm()
|
||||
set hidden = 1
|
||||
set_face_dir(SOUTH)
|
||||
set_face_dir(client.client_dir(SOUTH))
|
||||
|
||||
/mob/verb/eastfaceperm()
|
||||
set hidden = 1
|
||||
set_face_dir(EAST)
|
||||
set_face_dir(client.client_dir(EAST))
|
||||
|
||||
/mob/verb/westfaceperm()
|
||||
set hidden = 1
|
||||
set_face_dir(WEST)
|
||||
set_face_dir(client.client_dir(WEST))
|
||||
|
||||
/mob/proc/adjustEarDamage()
|
||||
return
|
||||
|
||||
@@ -27,35 +27,43 @@
|
||||
..()
|
||||
|
||||
|
||||
/client/proc/client_dir(input)
|
||||
return turn(input, -dir2angle(dir))
|
||||
|
||||
/client/Northeast()
|
||||
swap_hand()
|
||||
return
|
||||
|
||||
|
||||
/client/Southeast()
|
||||
attack_self()
|
||||
return
|
||||
|
||||
|
||||
/client/Southwest()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
else
|
||||
usr << "\red This mob type cannot throw items."
|
||||
return
|
||||
|
||||
|
||||
diagonal_action(NORTHEAST)
|
||||
/client/Northwest()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
diagonal_action(NORTHWEST)
|
||||
/client/Southeast()
|
||||
diagonal_action(SOUTHEAST)
|
||||
/client/Southwest()
|
||||
diagonal_action(SOUTHWEST)
|
||||
|
||||
/client/proc/diagonal_action(direction)
|
||||
switch(client_dir(direction))
|
||||
if(NORTHEAST)
|
||||
swap_hand()
|
||||
return
|
||||
if(SOUTHEAST)
|
||||
attack_self()
|
||||
return
|
||||
if(SOUTHWEST)
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
else
|
||||
usr << "\red This mob type cannot throw items."
|
||||
return
|
||||
if(NORTHWEST)
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
return
|
||||
drop_item()
|
||||
else
|
||||
usr << "\red This mob type cannot drop items."
|
||||
return
|
||||
drop_item()
|
||||
else
|
||||
usr << "\red This mob type cannot drop items."
|
||||
return
|
||||
|
||||
//This gets called when you press the delete button.
|
||||
/client/verb/delete_key_pressed()
|
||||
|
||||
@@ -25,31 +25,14 @@
|
||||
..(loc)
|
||||
if(newdir)
|
||||
set_dir(newdir)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
forwards = NORTH
|
||||
backwards = SOUTH
|
||||
if(SOUTH)
|
||||
forwards = SOUTH
|
||||
backwards = NORTH
|
||||
if(EAST)
|
||||
forwards = EAST
|
||||
backwards = WEST
|
||||
if(WEST)
|
||||
forwards = WEST
|
||||
backwards = EAST
|
||||
if(NORTHEAST)
|
||||
forwards = EAST
|
||||
backwards = SOUTH
|
||||
if(NORTHWEST)
|
||||
forwards = SOUTH
|
||||
backwards = WEST
|
||||
if(SOUTHEAST)
|
||||
forwards = NORTH
|
||||
backwards = EAST
|
||||
if(SOUTHWEST)
|
||||
forwards = WEST
|
||||
backwards = NORTH
|
||||
|
||||
if(dir & (dir-1)) // Diagonal. Forwards is *away* from dir, curving to the right.
|
||||
forwards = turn(dir, 135)
|
||||
backwards = turn(dir, 45)
|
||||
else
|
||||
forwards = dir
|
||||
backwards = turn(dir, 180)
|
||||
|
||||
if(on)
|
||||
operating = 1
|
||||
setmove()
|
||||
@@ -96,7 +79,7 @@
|
||||
/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user)
|
||||
if(isrobot(user)) return //Carn: fix for borgs dropping their modules on conveyor belts
|
||||
if(I.loc != user) return // This should stop mounted modules ending up outside the module.
|
||||
|
||||
|
||||
user.drop_item(src)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user