12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
+109
-35
@@ -6,13 +6,17 @@
|
||||
|
||||
/datum/action
|
||||
var/name = "Generic Action"
|
||||
var/desc = null
|
||||
var/obj/target = null
|
||||
var/check_flags = 0
|
||||
var/processing = 0
|
||||
var/obj/screen/movable/action_button/button = null
|
||||
var/button_icon = 'icons/mob/actions.dmi'
|
||||
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND
|
||||
var/buttontooltipstyle = ""
|
||||
|
||||
var/icon_icon = 'icons/mob/actions.dmi'
|
||||
var/button_icon_state = "default"
|
||||
var/background_icon_state = "bg_default"
|
||||
var/mob/owner
|
||||
|
||||
/datum/action/New(Target)
|
||||
@@ -20,6 +24,9 @@
|
||||
button = new
|
||||
button.linked_action = src
|
||||
button.name = name
|
||||
button.actiontooltipstyle = buttontooltipstyle
|
||||
if(desc)
|
||||
button.desc = desc
|
||||
|
||||
/datum/action/Destroy()
|
||||
if(owner)
|
||||
@@ -30,25 +37,26 @@
|
||||
return ..()
|
||||
|
||||
/datum/action/proc/Grant(mob/M)
|
||||
if(owner)
|
||||
if(owner == M)
|
||||
return
|
||||
if(M)
|
||||
if(owner)
|
||||
if(owner == M)
|
||||
return
|
||||
owner = M
|
||||
M.actions += src
|
||||
if(M.client)
|
||||
M.client.screen += button
|
||||
M.update_action_buttons()
|
||||
else
|
||||
Remove(owner)
|
||||
owner = M
|
||||
M.actions += src
|
||||
if(M.client)
|
||||
M.client.screen += button
|
||||
M.update_action_buttons()
|
||||
|
||||
/datum/action/proc/Remove(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
if(M.client)
|
||||
M.client.screen -= button
|
||||
button.moved = FALSE //so the button appears in its normal position when given to another owner.
|
||||
M.actions -= src
|
||||
M.update_action_buttons()
|
||||
if(M)
|
||||
if(M.client)
|
||||
M.client.screen -= button
|
||||
M.actions -= src
|
||||
M.update_action_buttons()
|
||||
owner = null
|
||||
button.moved = FALSE //so the button appears in its normal position when given to another owner.
|
||||
|
||||
/datum/action/proc/Trigger()
|
||||
if(!IsAvailable())
|
||||
@@ -77,8 +85,15 @@
|
||||
|
||||
/datum/action/proc/UpdateButtonIcon()
|
||||
if(button)
|
||||
button.icon = button_icon
|
||||
button.icon_state = background_icon_state
|
||||
button.name = name
|
||||
button.desc = desc
|
||||
if(owner && owner.hud_used && background_icon_state == ACTION_BUTTON_DEFAULT_BACKGROUND)
|
||||
var/list/settings = owner.hud_used.get_action_buttons_icons()
|
||||
button.icon = settings["bg_icon"]
|
||||
button.icon_state = settings["bg_state"]
|
||||
else
|
||||
button.icon = button_icon
|
||||
button.icon_state = background_icon_state
|
||||
|
||||
ApplyIcon(button)
|
||||
|
||||
@@ -90,9 +105,9 @@
|
||||
|
||||
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
current_button.cut_overlays()
|
||||
if(button_icon && button_icon_state)
|
||||
if(icon_icon && button_icon_state)
|
||||
var/image/img
|
||||
img = image(button_icon, current_button, button_icon_state)
|
||||
img = image(icon_icon, current_button, button_icon_state)
|
||||
img.pixel_x = 0
|
||||
img.pixel_y = 0
|
||||
current_button.add_overlay(img)
|
||||
@@ -109,11 +124,13 @@
|
||||
/datum/action/item_action/New(Target)
|
||||
..()
|
||||
var/obj/item/I = target
|
||||
LAZYINITLIST(I.actions)
|
||||
I.actions += src
|
||||
|
||||
/datum/action/item_action/Destroy()
|
||||
var/obj/item/I = target
|
||||
I.actions -= src
|
||||
UNSETEMPTY(I.actions)
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/Trigger()
|
||||
@@ -121,7 +138,7 @@
|
||||
return 0
|
||||
if(target)
|
||||
var/obj/item/I = target
|
||||
I.ui_action_click(owner, src.type)
|
||||
I.ui_action_click(owner, src)
|
||||
return 1
|
||||
|
||||
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
@@ -133,10 +150,13 @@
|
||||
..(current_button)
|
||||
else if(target)
|
||||
var/obj/item/I = target
|
||||
var/old = I.layer
|
||||
var/old_layer = I.layer
|
||||
var/old_plane = I.plane
|
||||
I.layer = FLOAT_LAYER //AAAH
|
||||
I.plane = FLOAT_PLANE //^ what that guy said
|
||||
current_button.add_overlay(I)
|
||||
I.layer = old
|
||||
I.layer = old_layer
|
||||
I.plane = old_plane
|
||||
|
||||
/datum/action/item_action/toggle_light
|
||||
name = "Toggle Light"
|
||||
@@ -173,7 +193,7 @@
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
if(target == C.internal)
|
||||
button.icon_state = "bg_default_on"
|
||||
button.icon_state = "template_active"
|
||||
|
||||
/datum/action/item_action/toggle_mister
|
||||
name = "Toggle Mister"
|
||||
@@ -184,11 +204,52 @@
|
||||
/datum/action/item_action/toggle_helmet_light
|
||||
name = "Toggle Helmet Light"
|
||||
|
||||
/datum/action/item_action/toggle_flame
|
||||
name = "Summon/Dismiss Ratvar's Flame"
|
||||
background_icon_state = "bg_clock"
|
||||
/datum/action/item_action/toggle_unfriendly_fire
|
||||
name = "Toggle Friendly Fire \[ON\]"
|
||||
desc = "Toggles if the staff causes friendly fire."
|
||||
button_icon_state = "vortex_ff_on"
|
||||
|
||||
/datum/action/item_action/toggle_flame/IsAvailable()
|
||||
/datum/action/item_action/toggle_unfriendly_fire/Trigger()
|
||||
if(..())
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/item_action/toggle_unfriendly_fire/UpdateButtonIcon()
|
||||
if(istype(target, /obj/item/weapon/hierophant_staff))
|
||||
var/obj/item/weapon/hierophant_staff/H = target
|
||||
if(H.friendly_fire_check)
|
||||
button_icon_state = "vortex_ff_off"
|
||||
name = "Toggle Friendly Fire \[OFF\]"
|
||||
else
|
||||
button_icon_state = "vortex_ff_on"
|
||||
name = "Toggle Friendly Fire \[ON\]"
|
||||
..()
|
||||
|
||||
/datum/action/item_action/vortex_recall
|
||||
name = "Vortex Recall"
|
||||
desc = "Recall yourself, and anyone nearby, to an attuned hierophant rune at any time.<br>If no such rune exists, will produce a rune at your location."
|
||||
button_icon_state = "vortex_recall"
|
||||
|
||||
/datum/action/item_action/vortex_recall/IsAvailable()
|
||||
if(istype(target, /obj/item/weapon/hierophant_staff))
|
||||
var/obj/item/weapon/hierophant_staff/H = target
|
||||
if(H.teleporting)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/clock
|
||||
background_icon_state = "bg_clock"
|
||||
buttontooltipstyle = "clockcult"
|
||||
|
||||
/datum/action/item_action/clock/IsAvailable()
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/clock/toggle_visor
|
||||
name = "Create Judicial Marker"
|
||||
desc = "Allows you to create a stunning Judicial Marker at any location in view. Click again to disable."
|
||||
|
||||
/datum/action/item_action/clock/toggle_visor/IsAvailable()
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
return 0
|
||||
if(istype(target, /obj/item/clothing/glasses/judicial_visor))
|
||||
@@ -197,15 +258,15 @@
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/hierophant
|
||||
/datum/action/item_action/clock/hierophant
|
||||
name = "Hierophant Network"
|
||||
button_icon_state = "hierophant"
|
||||
background_icon_state = "bg_clock"
|
||||
desc = "Allows you to communicate with other Servants."
|
||||
button_icon_state = "hierophant_slab"
|
||||
|
||||
/datum/action/item_action/hierophant/IsAvailable()
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
return 0
|
||||
return ..()
|
||||
/datum/action/item_action/clock/quickbind
|
||||
name = "Quickbind"
|
||||
desc = "If you're seeing this, file a bug report."
|
||||
var/scripture_index = 0 //the index of the scripture we're associated with
|
||||
|
||||
/datum/action/item_action/toggle_helmet_flashlight
|
||||
name = "Toggle Helmet Flashlight"
|
||||
@@ -287,6 +348,7 @@
|
||||
..()
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
current_button.cut_overlays()
|
||||
if(button_icon && button_icon_state)
|
||||
var/image/img = image(button_icon, current_button, "scan_mode")
|
||||
current_button.add_overlay(img)
|
||||
@@ -393,3 +455,15 @@
|
||||
if(target && procname)
|
||||
call(target, procname)(usr)
|
||||
return 1
|
||||
|
||||
//Stickmemes
|
||||
/datum/action/item_action/stickmen
|
||||
name = "Summon Stick Minions"
|
||||
desc = "Allows you to summon faithful stickmen allies to aide you in battle."
|
||||
button_icon_state = "art_summon"
|
||||
|
||||
//surf_ss13
|
||||
/datum/action/item_action/bhop
|
||||
name = "Activate Jump Boots"
|
||||
desc = "Activates the jump boot's internal propulsion system, allowing the user to dash over 4-wide gaps."
|
||||
button_icon_state = "jetboot"
|
||||
Reference in New Issue
Block a user