Merge pull request #4082 from deathride58/donoritemmodularization
Donator item modularization + manual sync of sprites with upstream + manual mirrors + donor item fixes
@@ -16,17 +16,20 @@
|
|||||||
/obj/item/clothing/neck/cloak/inferno
|
/obj/item/clothing/neck/cloak/inferno
|
||||||
name = "Kiara's Cloak"
|
name = "Kiara's Cloak"
|
||||||
desc = "The design on this seems a little too familiar."
|
desc = "The design on this seems a little too familiar."
|
||||||
icon = 'icons/obj/clothing/cloaks.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "infcloak"
|
icon_state = "infcloak-i"
|
||||||
item_state = "infcloak"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "infcloak-w"
|
||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||||
|
|
||||||
/obj/item/clothing/neck/petcollar/inferno
|
/obj/item/clothing/neck/petcollar/inferno
|
||||||
name = "Kiara's Collar"
|
name = "Kiara's Collar"
|
||||||
desc = "A soft black collar that seems to stretch to fit whoever wears it."
|
desc = "A soft black collar that seems to stretch to fit whoever wears it."
|
||||||
icon_state = "infcollar"
|
icon = 'icons/obj/custom.dmi'
|
||||||
item_state = "infcollar"
|
icon_state = "infcollar-i"
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "infcollar-w"
|
||||||
item_color = null
|
item_color = null
|
||||||
tagname = null
|
tagname = null
|
||||||
|
|
||||||
@@ -43,7 +46,7 @@
|
|||||||
/obj/item/lighter/gold
|
/obj/item/lighter/gold
|
||||||
name = "\improper Engraved Zippo"
|
name = "\improper Engraved Zippo"
|
||||||
desc = "A shiny and relatively expensive zippo lighter. There's a small etched in verse on the bottom that reads, 'No Gods, No Masters, Only Man.'"
|
desc = "A shiny and relatively expensive zippo lighter. There's a small etched in verse on the bottom that reads, 'No Gods, No Masters, Only Man.'"
|
||||||
icon = 'icons/obj/cigarettes.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "gold_zippo"
|
icon_state = "gold_zippo"
|
||||||
item_state = "gold_zippo"
|
item_state = "gold_zippo"
|
||||||
w_class = WEIGHT_CLASS_TINY
|
w_class = WEIGHT_CLASS_TINY
|
||||||
@@ -58,16 +61,20 @@
|
|||||||
|
|
||||||
/obj/item/clothing/neck/scarf/zomb //Default white color, same functionality as beanies.
|
/obj/item/clothing/neck/scarf/zomb //Default white color, same functionality as beanies.
|
||||||
name = "A special scarf"
|
name = "A special scarf"
|
||||||
icon_state = "zombscarf"
|
icon = 'icons/obj/custom.dmi'
|
||||||
|
icon_state = "zombscarf-i"
|
||||||
desc = "A fashionable collar"
|
desc = "A fashionable collar"
|
||||||
item_color = "zombscarf"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_color = "zombscarf-w"
|
||||||
dog_fashion = /datum/dog_fashion/head
|
dog_fashion = /datum/dog_fashion/head
|
||||||
|
|
||||||
/obj/item/clothing/suit/toggle/labcoat/mad/red
|
/obj/item/clothing/suit/toggle/labcoat/mad/red
|
||||||
name = "\improper The Mad's labcoat"
|
name = "\improper The Mad's labcoat"
|
||||||
desc = "An oddly special looking coat."
|
desc = "An oddly special looking coat."
|
||||||
icon_state = "labred"
|
icon = 'icons/obj/custom.dmi'
|
||||||
item_state = "labred"
|
icon_state = "labred-i"
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "labred-w"
|
||||||
|
|
||||||
|
|
||||||
/*PLACEHOLDER*/
|
/*PLACEHOLDER*/
|
||||||
@@ -86,17 +93,17 @@
|
|||||||
/obj/item/clothing/neck/cloak/carrot
|
/obj/item/clothing/neck/cloak/carrot
|
||||||
name = "carrot cloak"
|
name = "carrot cloak"
|
||||||
desc = "A cloak in the shape and color of a carrot!"
|
desc = "A cloak in the shape and color of a carrot!"
|
||||||
icon = 'icons/obj/clothing/cloaks.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_override = 'icons/mob/citadel/suit.dmi'
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
icon_state = "carrotcloak"
|
icon_state = "carrotcloak-i"
|
||||||
item_state = "carrotcloak"
|
item_state = "carrotcloak-w"
|
||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||||
|
|
||||||
/obj/item/toy/plush/tree
|
/obj/item/toy/plush/tree
|
||||||
name = "christmass tree plushie"
|
name = "christmass tree plushie"
|
||||||
desc = "A festive plush that squeeks when you squeeze it!"
|
desc = "A festive plush that squeeks when you squeeze it!"
|
||||||
icon = 'icons/obj/plushes.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "pine_c"
|
icon_state = "pine_c"
|
||||||
item_state = "pine_c"
|
item_state = "pine_c"
|
||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
@@ -107,10 +114,10 @@
|
|||||||
/obj/item/clothing/neck/cloak/festive
|
/obj/item/clothing/neck/cloak/festive
|
||||||
name = "Celebratory Cloak of Morozko"
|
name = "Celebratory Cloak of Morozko"
|
||||||
desc = " It probably will protect from snow, charcoal or elves."
|
desc = " It probably will protect from snow, charcoal or elves."
|
||||||
icon = 'icons/obj/clothing/cloaks.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_override = 'icons/mob/citadel/suit.dmi'
|
icon_state = "festive-i"
|
||||||
icon_state = "festivecloak"
|
item_state = "festive-w"
|
||||||
item_state = "festiveloak"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||||
|
|
||||||
@@ -119,9 +126,10 @@
|
|||||||
|
|
||||||
/obj/item/clothing/mask/luchador/zigfie
|
/obj/item/clothing/mask/luchador/zigfie
|
||||||
name = "Alboroto Rosa mask"
|
name = "Alboroto Rosa mask"
|
||||||
icon = 'icons/mob/mask.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "lucharzigfie"
|
icon_state = "lucharzigfie-i"
|
||||||
item_state = "lucharzigfie"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "lucharzigfie-w"
|
||||||
|
|
||||||
|
|
||||||
/*PLACEHOLDER*/
|
/*PLACEHOLDER*/
|
||||||
@@ -159,8 +167,10 @@
|
|||||||
/obj/item/clothing/suit/trenchcoat/green
|
/obj/item/clothing/suit/trenchcoat/green
|
||||||
name = "Reece's Great Coat"
|
name = "Reece's Great Coat"
|
||||||
desc = "You would swear this was in your nightmares after eating too many veggies."
|
desc = "You would swear this was in your nightmares after eating too many veggies."
|
||||||
icon_state = "hos-g"
|
icon = 'icons/obj/custom.dmi'
|
||||||
item_state = "hos-g"
|
icon_state = "hos-g-i"
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "hos-g-w"
|
||||||
body_parts_covered = CHEST|GROIN|ARMS|LEGS
|
body_parts_covered = CHEST|GROIN|ARMS|LEGS
|
||||||
|
|
||||||
|
|
||||||
@@ -170,14 +180,15 @@
|
|||||||
desc = "Every good russian spaceman knows it's a good idea to bring along a couple of pints of whiskey wherever they go."
|
desc = "Every good russian spaceman knows it's a good idea to bring along a couple of pints of whiskey wherever they go."
|
||||||
icon = 'icons/obj/custom.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "russianflask"
|
icon_state = "russianflask"
|
||||||
item_state = "russianflask"
|
|
||||||
volume = 60
|
volume = 60
|
||||||
|
|
||||||
/obj/item/clothing/mask/gas/stalker
|
/obj/item/clothing/mask/gas/stalker
|
||||||
name = "S.T.A.L.K.E.R. mask"
|
name = "S.T.A.L.K.E.R. mask"
|
||||||
desc = "Smells like reactor four."
|
desc = "Smells like reactor four."
|
||||||
item_state = "stalker"
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "stalker"
|
item_state = "stalker-w"
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
icon_state = "stalker-i"
|
||||||
|
|
||||||
|
|
||||||
/*Sylas*/
|
/*Sylas*/
|
||||||
@@ -185,8 +196,9 @@
|
|||||||
name = "collar"
|
name = "collar"
|
||||||
desc = "It's a collar..."
|
desc = "It's a collar..."
|
||||||
icon = 'icons/obj/custom.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
icon_state = "petcollar-stripe"
|
icon_state = "petcollar-stripe-i"
|
||||||
item_color = "petcollar-stripe"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "petcollar-stripe-w"
|
||||||
tagname = null
|
tagname = null
|
||||||
|
|
||||||
|
|
||||||
@@ -194,17 +206,21 @@
|
|||||||
/obj/item/clothing/under/singery/custom
|
/obj/item/clothing/under/singery/custom
|
||||||
name = "bluish performer's outfit"
|
name = "bluish performer's outfit"
|
||||||
desc = "Just looking at this makes you want to sing."
|
desc = "Just looking at this makes you want to sing."
|
||||||
icon_state = "ssing"
|
icon = 'icons/obj/custom.dmi'
|
||||||
item_state = "ssing"
|
icon_state = "singer-i"
|
||||||
item_color = "ssing"
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "singer-w"
|
||||||
|
item_color = "singer-i"
|
||||||
fitted = NO_FEMALE_UNIFORM
|
fitted = NO_FEMALE_UNIFORM
|
||||||
alternate_worn_layer = ABOVE_SHOES_LAYER
|
alternate_worn_layer = ABOVE_SHOES_LAYER
|
||||||
can_adjust = 0
|
can_adjust = 0
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/shoes/sneakers/pink
|
/obj/item/clothing/shoes/sneakers/pink
|
||||||
icon_state = "pink"
|
icon = 'icons/obj/custom.dmi'
|
||||||
item_state = "pink"
|
icon_state = "pink-i"
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
item_state = "pink-w"
|
||||||
|
|
||||||
|
|
||||||
/*Fractious*/
|
/*Fractious*/
|
||||||
@@ -212,10 +228,8 @@
|
|||||||
/obj/item/clothing/suit/vermillion
|
/obj/item/clothing/suit/vermillion
|
||||||
name = "vermillion clothing"
|
name = "vermillion clothing"
|
||||||
desc = "Some clothing."
|
desc = "Some clothing."
|
||||||
icon_state = "vermillion-w"
|
icon_state = "vermillion-i"
|
||||||
item_state = "vermillion-i"
|
item_state = "vermillion-w"
|
||||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
|
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
|
||||||
icon = 'icons/obj/custom.dmi'
|
icon = 'icons/obj/custom.dmi'
|
||||||
|
icon_override = 'icons/obj/custom.dmi'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,326 +1,326 @@
|
|||||||
/datum/component/riding
|
/datum/component/riding
|
||||||
var/next_vehicle_move = 0 //used for move delays
|
var/next_vehicle_move = 0 //used for move delays
|
||||||
var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower
|
var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower
|
||||||
var/keytype
|
var/keytype
|
||||||
|
|
||||||
var/slowed = FALSE
|
var/slowed = FALSE
|
||||||
var/slowvalue = 1
|
var/slowvalue = 1
|
||||||
|
|
||||||
var/list/riding_offsets = list() //position_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.
|
var/list/riding_offsets = list() //position_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.
|
||||||
var/list/directional_vehicle_layers = list() //["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.
|
var/list/directional_vehicle_layers = list() //["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.
|
||||||
var/list/directional_vehicle_offsets = list() //same as above but instead of layer you have a list(px, py)
|
var/list/directional_vehicle_offsets = list() //same as above but instead of layer you have a list(px, py)
|
||||||
var/list/allowed_turf_typecache
|
var/list/allowed_turf_typecache
|
||||||
var/list/forbid_turf_typecache //allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
|
var/list/forbid_turf_typecache //allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
|
||||||
var/allow_one_away_from_valid_turf = TRUE //allow moving one tile away from a valid turf but not more.
|
var/allow_one_away_from_valid_turf = TRUE //allow moving one tile away from a valid turf but not more.
|
||||||
var/override_allow_spacemove = FALSE
|
var/override_allow_spacemove = FALSE
|
||||||
var/drive_verb = "drive"
|
var/drive_verb = "drive"
|
||||||
var/ride_check_rider_incapacitated = FALSE
|
var/ride_check_rider_incapacitated = FALSE
|
||||||
var/ride_check_rider_restrained = FALSE
|
var/ride_check_rider_restrained = FALSE
|
||||||
var/ride_check_ridden_incapacitated = FALSE
|
var/ride_check_ridden_incapacitated = FALSE
|
||||||
|
|
||||||
/datum/component/riding/Initialize()
|
/datum/component/riding/Initialize()
|
||||||
if(!ismovableatom(parent))
|
if(!ismovableatom(parent))
|
||||||
. = COMPONENT_INCOMPATIBLE
|
. = COMPONENT_INCOMPATIBLE
|
||||||
CRASH("RIDING COMPONENT ASSIGNED TO NON ATOM MOVABLE!")
|
CRASH("RIDING COMPONENT ASSIGNED TO NON ATOM MOVABLE!")
|
||||||
RegisterSignal(COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
|
RegisterSignal(COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
|
||||||
RegisterSignal(COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
|
RegisterSignal(COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
|
||||||
RegisterSignal(COMSIG_MOVABLE_MOVED, .proc/vehicle_moved)
|
RegisterSignal(COMSIG_MOVABLE_MOVED, .proc/vehicle_moved)
|
||||||
|
|
||||||
/datum/component/riding/proc/vehicle_mob_unbuckle(mob/living/M, force = FALSE)
|
/datum/component/riding/proc/vehicle_mob_unbuckle(mob/living/M, force = FALSE)
|
||||||
restore_position(M)
|
restore_position(M)
|
||||||
unequip_buckle_inhands(M)
|
unequip_buckle_inhands(M)
|
||||||
|
|
||||||
/datum/component/riding/proc/vehicle_mob_buckle(mob/living/M, force = FALSE)
|
/datum/component/riding/proc/vehicle_mob_buckle(mob/living/M, force = FALSE)
|
||||||
handle_vehicle_offsets()
|
handle_vehicle_offsets()
|
||||||
|
|
||||||
/datum/component/riding/proc/handle_vehicle_layer()
|
/datum/component/riding/proc/handle_vehicle_layer()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
|
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
|
||||||
. = defaults["[AM.dir]"]
|
. = defaults["[AM.dir]"]
|
||||||
if(directional_vehicle_layers["[AM.dir]"])
|
if(directional_vehicle_layers["[AM.dir]"])
|
||||||
. = directional_vehicle_layers["[AM.dir]"]
|
. = directional_vehicle_layers["[AM.dir]"]
|
||||||
if(isnull(.)) //you can set it to null to not change it.
|
if(isnull(.)) //you can set it to null to not change it.
|
||||||
. = AM.layer
|
. = AM.layer
|
||||||
AM.layer = .
|
AM.layer = .
|
||||||
|
|
||||||
/datum/component/riding/proc/set_vehicle_dir_layer(dir, layer)
|
/datum/component/riding/proc/set_vehicle_dir_layer(dir, layer)
|
||||||
directional_vehicle_layers["[dir]"] = layer
|
directional_vehicle_layers["[dir]"] = layer
|
||||||
|
|
||||||
/datum/component/riding/proc/vehicle_moved()
|
/datum/component/riding/proc/vehicle_moved()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
for(var/i in AM.buckled_mobs)
|
for(var/i in AM.buckled_mobs)
|
||||||
ride_check(i)
|
ride_check(i)
|
||||||
handle_vehicle_offsets()
|
handle_vehicle_offsets()
|
||||||
handle_vehicle_layer()
|
handle_vehicle_layer()
|
||||||
|
|
||||||
/datum/component/riding/proc/ride_check(mob/living/M)
|
/datum/component/riding/proc/ride_check(mob/living/M)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
var/mob/AMM = AM
|
var/mob/AMM = AM
|
||||||
if((ride_check_rider_restrained && M.restrained(TRUE)) || (ride_check_rider_incapacitated && M.incapacitated(FALSE, TRUE)) || (ride_check_ridden_incapacitated && istype(AMM) && AMM.incapacitated(FALSE, TRUE)))
|
if((ride_check_rider_restrained && M.restrained(TRUE)) || (ride_check_rider_incapacitated && M.incapacitated(FALSE, TRUE)) || (ride_check_ridden_incapacitated && istype(AMM) && AMM.incapacitated(FALSE, TRUE)))
|
||||||
AM.visible_message("<span class='warning'>[M] falls off of [AM]!</span>")
|
AM.visible_message("<span class='warning'>[M] falls off of [AM]!</span>")
|
||||||
AM.unbuckle_mob(M)
|
AM.unbuckle_mob(M)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/component/riding/proc/force_dismount(mob/living/M)
|
/datum/component/riding/proc/force_dismount(mob/living/M)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
AM.unbuckle_mob(M)
|
AM.unbuckle_mob(M)
|
||||||
|
|
||||||
/datum/component/riding/proc/handle_vehicle_offsets()
|
/datum/component/riding/proc/handle_vehicle_offsets()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
var/AM_dir = "[AM.dir]"
|
var/AM_dir = "[AM.dir]"
|
||||||
var/passindex = 0
|
var/passindex = 0
|
||||||
if(AM.has_buckled_mobs())
|
if(AM.has_buckled_mobs())
|
||||||
for(var/m in AM.buckled_mobs)
|
for(var/m in AM.buckled_mobs)
|
||||||
passindex++
|
passindex++
|
||||||
var/mob/living/buckled_mob = m
|
var/mob/living/buckled_mob = m
|
||||||
var/list/offsets = get_offsets(passindex)
|
var/list/offsets = get_offsets(passindex)
|
||||||
var/rider_dir = get_rider_dir(passindex)
|
var/rider_dir = get_rider_dir(passindex)
|
||||||
buckled_mob.setDir(rider_dir)
|
buckled_mob.setDir(rider_dir)
|
||||||
dir_loop:
|
dir_loop:
|
||||||
for(var/offsetdir in offsets)
|
for(var/offsetdir in offsets)
|
||||||
if(offsetdir == AM_dir)
|
if(offsetdir == AM_dir)
|
||||||
var/list/diroffsets = offsets[offsetdir]
|
var/list/diroffsets = offsets[offsetdir]
|
||||||
buckled_mob.pixel_x = diroffsets[1]
|
buckled_mob.pixel_x = diroffsets[1]
|
||||||
if(diroffsets.len >= 2)
|
if(diroffsets.len >= 2)
|
||||||
buckled_mob.pixel_y = diroffsets[2]
|
buckled_mob.pixel_y = diroffsets[2]
|
||||||
if(diroffsets.len == 3)
|
if(diroffsets.len == 3)
|
||||||
buckled_mob.layer = diroffsets[3]
|
buckled_mob.layer = diroffsets[3]
|
||||||
break dir_loop
|
break dir_loop
|
||||||
var/list/static/default_vehicle_pixel_offsets = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
|
var/list/static/default_vehicle_pixel_offsets = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
|
||||||
var/px = default_vehicle_pixel_offsets[AM_dir]
|
var/px = default_vehicle_pixel_offsets[AM_dir]
|
||||||
var/py = default_vehicle_pixel_offsets[AM_dir]
|
var/py = default_vehicle_pixel_offsets[AM_dir]
|
||||||
if(directional_vehicle_offsets[AM_dir])
|
if(directional_vehicle_offsets[AM_dir])
|
||||||
if(isnull(directional_vehicle_offsets[AM_dir]))
|
if(isnull(directional_vehicle_offsets[AM_dir]))
|
||||||
px = AM.pixel_x
|
px = AM.pixel_x
|
||||||
py = AM.pixel_y
|
py = AM.pixel_y
|
||||||
else
|
else
|
||||||
px = directional_vehicle_offsets[AM_dir][1]
|
px = directional_vehicle_offsets[AM_dir][1]
|
||||||
py = directional_vehicle_offsets[AM_dir][2]
|
py = directional_vehicle_offsets[AM_dir][2]
|
||||||
AM.pixel_x = px
|
AM.pixel_x = px
|
||||||
AM.pixel_y = py
|
AM.pixel_y = py
|
||||||
|
|
||||||
/datum/component/riding/proc/set_vehicle_dir_offsets(dir, x, y)
|
/datum/component/riding/proc/set_vehicle_dir_offsets(dir, x, y)
|
||||||
directional_vehicle_offsets["[dir]"] = list(x, y)
|
directional_vehicle_offsets["[dir]"] = list(x, y)
|
||||||
|
|
||||||
//Override this to set your vehicle's various pixel offsets
|
//Override this to set your vehicle's various pixel offsets
|
||||||
/datum/component/riding/proc/get_offsets(pass_index) // list(dir = x, y, layer)
|
/datum/component/riding/proc/get_offsets(pass_index) // list(dir = x, y, layer)
|
||||||
. = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
|
. = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
|
||||||
if(riding_offsets["[pass_index]"])
|
if(riding_offsets["[pass_index]"])
|
||||||
. = riding_offsets["[pass_index]"]
|
. = riding_offsets["[pass_index]"]
|
||||||
else if(riding_offsets["[RIDING_OFFSET_ALL]"])
|
else if(riding_offsets["[RIDING_OFFSET_ALL]"])
|
||||||
. = riding_offsets["[RIDING_OFFSET_ALL]"]
|
. = riding_offsets["[RIDING_OFFSET_ALL]"]
|
||||||
|
|
||||||
/datum/component/riding/proc/set_riding_offsets(index, list/offsets)
|
/datum/component/riding/proc/set_riding_offsets(index, list/offsets)
|
||||||
if(!islist(offsets))
|
if(!islist(offsets))
|
||||||
return FALSE
|
return FALSE
|
||||||
riding_offsets["[index]"] = offsets
|
riding_offsets["[index]"] = offsets
|
||||||
|
|
||||||
//Override this to set the passengers/riders dir based on which passenger they are.
|
//Override this to set the passengers/riders dir based on which passenger they are.
|
||||||
//ie: rider facing the vehicle's dir, but passenger 2 facing backwards, etc.
|
//ie: rider facing the vehicle's dir, but passenger 2 facing backwards, etc.
|
||||||
/datum/component/riding/proc/get_rider_dir(pass_index)
|
/datum/component/riding/proc/get_rider_dir(pass_index)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
return AM.dir
|
return AM.dir
|
||||||
|
|
||||||
//KEYS
|
//KEYS
|
||||||
/datum/component/riding/proc/keycheck(mob/user)
|
/datum/component/riding/proc/keycheck(mob/user)
|
||||||
return !keytype || user.is_holding_item_of_type(keytype)
|
return !keytype || user.is_holding_item_of_type(keytype)
|
||||||
|
|
||||||
//BUCKLE HOOKS
|
//BUCKLE HOOKS
|
||||||
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
|
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
buckled_mob.pixel_x = 0
|
buckled_mob.pixel_x = 0
|
||||||
buckled_mob.pixel_y = 0
|
buckled_mob.pixel_y = 0
|
||||||
if(buckled_mob.client)
|
if(buckled_mob.client)
|
||||||
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
|
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
|
||||||
|
|
||||||
//MOVEMENT
|
//MOVEMENT
|
||||||
/datum/component/riding/proc/turf_check(turf/next, turf/current)
|
/datum/component/riding/proc/turf_check(turf/next, turf/current)
|
||||||
if(allowed_turf_typecache && !allowed_turf_typecache[next.type])
|
if(allowed_turf_typecache && !allowed_turf_typecache[next.type])
|
||||||
return (allow_one_away_from_valid_turf && allowed_turf_typecache[current.type])
|
return (allow_one_away_from_valid_turf && allowed_turf_typecache[current.type])
|
||||||
else if(forbid_turf_typecache && forbid_turf_typecache[next.type])
|
else if(forbid_turf_typecache && forbid_turf_typecache[next.type])
|
||||||
return (allow_one_away_from_valid_turf && !forbid_turf_typecache[current.type])
|
return (allow_one_away_from_valid_turf && !forbid_turf_typecache[current.type])
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/component/riding/proc/handle_ride(mob/user, direction)
|
/datum/component/riding/proc/handle_ride(mob/user, direction)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(user.incapacitated())
|
if(user.incapacitated())
|
||||||
Unbuckle(user)
|
Unbuckle(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(world.time < next_vehicle_move)
|
if(world.time < next_vehicle_move)
|
||||||
return
|
return
|
||||||
next_vehicle_move = world.time + vehicle_move_delay
|
next_vehicle_move = world.time + vehicle_move_delay
|
||||||
|
|
||||||
if(keycheck(user))
|
if(keycheck(user))
|
||||||
var/turf/next = get_step(AM, direction)
|
var/turf/next = get_step(AM, direction)
|
||||||
var/turf/current = get_turf(AM)
|
var/turf/current = get_turf(AM)
|
||||||
if(!istype(next) || !istype(current))
|
if(!istype(next) || !istype(current))
|
||||||
return //not happening.
|
return //not happening.
|
||||||
if(!turf_check(next, current))
|
if(!turf_check(next, current))
|
||||||
to_chat(user, "Your \the [AM] can not go onto [next]!")
|
to_chat(user, "Your \the [AM] can not go onto [next]!")
|
||||||
return
|
return
|
||||||
if(!Process_Spacemove(direction) || !isturf(AM.loc))
|
if(!Process_Spacemove(direction) || !isturf(AM.loc))
|
||||||
return
|
return
|
||||||
step(AM, direction)
|
step(AM, direction)
|
||||||
|
|
||||||
handle_vehicle_layer()
|
handle_vehicle_layer()
|
||||||
handle_vehicle_offsets()
|
handle_vehicle_offsets()
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to [drive_verb] [AM].</span>")
|
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to [drive_verb] [AM].</span>")
|
||||||
|
|
||||||
/datum/component/riding/proc/Unbuckle(atom/movable/M)
|
/datum/component/riding/proc/Unbuckle(atom/movable/M)
|
||||||
addtimer(CALLBACK(parent, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
|
addtimer(CALLBACK(parent, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
|
||||||
|
|
||||||
/datum/component/riding/proc/Process_Spacemove(direction)
|
/datum/component/riding/proc/Process_Spacemove(direction)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
return override_allow_spacemove || AM.has_gravity()
|
return override_allow_spacemove || AM.has_gravity()
|
||||||
|
|
||||||
/datum/component/riding/proc/account_limbs(mob/living/M)
|
/datum/component/riding/proc/account_limbs(mob/living/M)
|
||||||
if(M.get_num_legs() < 2 && !slowed)
|
if(M.get_num_legs() < 2 && !slowed)
|
||||||
vehicle_move_delay = vehicle_move_delay + slowvalue
|
vehicle_move_delay = vehicle_move_delay + slowvalue
|
||||||
slowed = TRUE
|
slowed = TRUE
|
||||||
else if(slowed)
|
else if(slowed)
|
||||||
vehicle_move_delay = vehicle_move_delay - slowvalue
|
vehicle_move_delay = vehicle_move_delay - slowvalue
|
||||||
slowed = FALSE
|
slowed = FALSE
|
||||||
|
|
||||||
///////Yes, I said humans. No, this won't end well...//////////
|
///////Yes, I said humans. No, this won't end well...//////////
|
||||||
/datum/component/riding/human
|
/datum/component/riding/human
|
||||||
|
|
||||||
/datum/component/riding/human/Initialize()
|
/datum/component/riding/human/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
RegisterSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
RegisterSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
||||||
|
|
||||||
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
|
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
|
||||||
var/mob/living/carbon/human/AM = parent
|
var/mob/living/carbon/human/AM = parent
|
||||||
if(AM.a_intent == INTENT_DISARM && (target in AM.buckled_mobs))
|
if(AM.a_intent == INTENT_DISARM && (target in AM.buckled_mobs))
|
||||||
force_dismount(target)
|
force_dismount(target)
|
||||||
|
|
||||||
/datum/component/riding/human/handle_vehicle_layer()
|
/datum/component/riding/human/handle_vehicle_layer()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
||||||
if(AM.dir == SOUTH)
|
if(AM.dir == SOUTH)
|
||||||
AM.layer = ABOVE_MOB_LAYER
|
AM.layer = ABOVE_MOB_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = OBJ_LAYER
|
AM.layer = OBJ_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = MOB_LAYER
|
AM.layer = MOB_LAYER
|
||||||
|
|
||||||
/datum/component/riding/human/force_dismount(mob/living/user)
|
/datum/component/riding/human/force_dismount(mob/living/user)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
AM.unbuckle_mob(user)
|
AM.unbuckle_mob(user)
|
||||||
user.Knockdown(60)
|
user.Knockdown(60)
|
||||||
user.visible_message("<span class='warning'>[AM] pushes [user] off of them!</span>")
|
user.visible_message("<span class='warning'>[AM] pushes [user] off of them!</span>")
|
||||||
|
|
||||||
/datum/component/riding/cyborg
|
/datum/component/riding/cyborg
|
||||||
|
|
||||||
/datum/component/riding/cyborg/ride_check(mob/user)
|
/datum/component/riding/cyborg/ride_check(mob/user)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(user.incapacitated())
|
if(user.incapacitated())
|
||||||
var/kick = TRUE
|
var/kick = TRUE
|
||||||
if(iscyborg(AM))
|
if(iscyborg(AM))
|
||||||
var/mob/living/silicon/robot/R = AM
|
var/mob/living/silicon/robot/R = AM
|
||||||
if(R.module && R.module.ride_allow_incapacitated)
|
if(R.module && R.module.ride_allow_incapacitated)
|
||||||
kick = FALSE
|
kick = FALSE
|
||||||
if(kick)
|
if(kick)
|
||||||
to_chat(user, "<span class='userdanger'>You fall off of [AM]!</span>")
|
to_chat(user, "<span class='userdanger'>You fall off of [AM]!</span>")
|
||||||
Unbuckle(user)
|
Unbuckle(user)
|
||||||
return
|
return
|
||||||
if(iscarbon(user))
|
if(iscarbon(user))
|
||||||
var/mob/living/carbon/carbonuser = user
|
var/mob/living/carbon/carbonuser = user
|
||||||
if(!carbonuser.get_num_arms())
|
if(!carbonuser.get_num_arms())
|
||||||
Unbuckle(user)
|
Unbuckle(user)
|
||||||
to_chat(user, "<span class='userdanger'>You can't grab onto [AM] with no hands!</span>")
|
to_chat(user, "<span class='userdanger'>You can't grab onto [AM] with no hands!</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/component/riding/cyborg/handle_vehicle_layer()
|
/datum/component/riding/cyborg/handle_vehicle_layer()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
||||||
if(AM.dir == SOUTH)
|
if(AM.dir == SOUTH)
|
||||||
AM.layer = ABOVE_MOB_LAYER
|
AM.layer = ABOVE_MOB_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = OBJ_LAYER
|
AM.layer = OBJ_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = MOB_LAYER
|
AM.layer = MOB_LAYER
|
||||||
|
|
||||||
/datum/component/riding/cyborg/get_offsets(pass_index) // list(dir = x, y, layer)
|
/datum/component/riding/cyborg/get_offsets(pass_index) // list(dir = x, y, layer)
|
||||||
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list( 6, 3))
|
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list( 6, 3))
|
||||||
|
|
||||||
/datum/component/riding/cyborg/handle_vehicle_offsets()
|
/datum/component/riding/cyborg/handle_vehicle_offsets()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(AM.has_buckled_mobs())
|
if(AM.has_buckled_mobs())
|
||||||
for(var/mob/living/M in AM.buckled_mobs)
|
for(var/mob/living/M in AM.buckled_mobs)
|
||||||
M.setDir(AM.dir)
|
M.setDir(AM.dir)
|
||||||
if(iscyborg(AM))
|
if(iscyborg(AM))
|
||||||
var/mob/living/silicon/robot/R = AM
|
var/mob/living/silicon/robot/R = AM
|
||||||
if(istype(R.module))
|
if(istype(R.module))
|
||||||
M.pixel_x = R.module.ride_offset_x[dir2text(AM.dir)]
|
M.pixel_x = R.module.ride_offset_x[dir2text(AM.dir)]
|
||||||
M.pixel_y = R.module.ride_offset_y[dir2text(AM.dir)]
|
M.pixel_y = R.module.ride_offset_y[dir2text(AM.dir)]
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/datum/component/riding/cyborg/force_dismount(mob/living/M)
|
/datum/component/riding/cyborg/force_dismount(mob/living/M)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
AM.unbuckle_mob(M)
|
AM.unbuckle_mob(M)
|
||||||
var/turf/target = get_edge_target_turf(AM, AM.dir)
|
var/turf/target = get_edge_target_turf(AM, AM.dir)
|
||||||
var/turf/targetm = get_step(get_turf(AM), AM.dir)
|
var/turf/targetm = get_step(get_turf(AM), AM.dir)
|
||||||
M.Move(targetm)
|
M.Move(targetm)
|
||||||
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
|
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
|
||||||
M.throw_at(target, 14, 5, AM)
|
M.throw_at(target, 14, 5, AM)
|
||||||
M.Knockdown(60)
|
M.Knockdown(60)
|
||||||
|
|
||||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
|
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
var/amount_equipped = 0
|
var/amount_equipped = 0
|
||||||
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
||||||
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
||||||
inhand.rider = user
|
inhand.rider = user
|
||||||
inhand.parent = AM
|
inhand.parent = AM
|
||||||
if(user.put_in_hands(inhand, TRUE))
|
if(user.put_in_hands(inhand, TRUE))
|
||||||
amount_equipped++
|
amount_equipped++
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
if(amount_equipped >= amount_required)
|
if(amount_equipped >= amount_required)
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
unequip_buckle_inhands(user)
|
unequip_buckle_inhands(user)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
for(var/obj/item/riding_offhand/O in user.contents)
|
for(var/obj/item/riding_offhand/O in user.contents)
|
||||||
if(O.parent != AM)
|
if(O.parent != AM)
|
||||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||||
continue
|
continue
|
||||||
if(O.selfdeleting)
|
if(O.selfdeleting)
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
qdel(O)
|
qdel(O)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/item/riding_offhand
|
/obj/item/riding_offhand
|
||||||
name = "offhand"
|
name = "offhand"
|
||||||
icon = 'icons/obj/items_and_weapons.dmi'
|
icon = 'icons/obj/items_and_weapons.dmi'
|
||||||
icon_state = "offhand"
|
icon_state = "offhand"
|
||||||
w_class = WEIGHT_CLASS_HUGE
|
w_class = WEIGHT_CLASS_HUGE
|
||||||
flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1
|
flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1
|
||||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||||
var/mob/living/carbon/rider
|
var/mob/living/carbon/rider
|
||||||
var/mob/living/parent
|
var/mob/living/parent
|
||||||
var/selfdeleting = FALSE
|
var/selfdeleting = FALSE
|
||||||
|
|
||||||
/obj/item/riding_offhand/dropped()
|
/obj/item/riding_offhand/dropped()
|
||||||
selfdeleting = TRUE
|
selfdeleting = TRUE
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/item/riding_offhand/equipped()
|
/obj/item/riding_offhand/equipped()
|
||||||
if(loc != rider)
|
if(loc != rider)
|
||||||
selfdeleting = TRUE
|
selfdeleting = TRUE
|
||||||
qdel(src)
|
qdel(src)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/item/riding_offhand/Destroy()
|
/obj/item/riding_offhand/Destroy()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(selfdeleting)
|
if(selfdeleting)
|
||||||
if(rider in AM.buckled_mobs)
|
if(rider in AM.buckled_mobs)
|
||||||
AM.unbuckle_mob(rider)
|
AM.unbuckle_mob(rider)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -1,204 +1,204 @@
|
|||||||
GLOBAL_LIST_EMPTY(uplinks)
|
GLOBAL_LIST_EMPTY(uplinks)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uplinks
|
* Uplinks
|
||||||
*
|
*
|
||||||
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
||||||
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
||||||
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
||||||
**/
|
**/
|
||||||
/datum/component/uplink
|
/datum/component/uplink
|
||||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||||
var/name = "syndicate uplink"
|
var/name = "syndicate uplink"
|
||||||
var/active = FALSE
|
var/active = FALSE
|
||||||
var/lockable = TRUE
|
var/lockable = TRUE
|
||||||
var/locked = TRUE
|
var/locked = TRUE
|
||||||
var/telecrystals
|
var/telecrystals
|
||||||
var/selected_cat
|
var/selected_cat
|
||||||
var/owner = null
|
var/owner = null
|
||||||
var/datum/game_mode/gamemode
|
var/datum/game_mode/gamemode
|
||||||
var/spent_telecrystals = 0
|
var/spent_telecrystals = 0
|
||||||
var/datum/uplink_purchase_log/purchase_log
|
var/datum/uplink_purchase_log/purchase_log
|
||||||
var/list/uplink_items
|
var/list/uplink_items
|
||||||
var/hidden_crystals = 0
|
var/hidden_crystals = 0
|
||||||
|
|
||||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
||||||
if(!isitem(parent))
|
if(!isitem(parent))
|
||||||
return COMPONENT_INCOMPATIBLE
|
return COMPONENT_INCOMPATIBLE
|
||||||
GLOB.uplinks += src
|
GLOB.uplinks += src
|
||||||
uplink_items = get_uplink_items(gamemode)
|
uplink_items = get_uplink_items(gamemode)
|
||||||
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||||
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||||
owner = _owner
|
owner = _owner
|
||||||
if(owner)
|
if(owner)
|
||||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||||
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
||||||
else
|
else
|
||||||
purchase_log = new(owner, src)
|
purchase_log = new(owner, src)
|
||||||
lockable = _lockable
|
lockable = _lockable
|
||||||
active = _enabled
|
active = _enabled
|
||||||
gamemode = _gamemode
|
gamemode = _gamemode
|
||||||
telecrystals = starting_tc
|
telecrystals = starting_tc
|
||||||
if(!lockable)
|
if(!lockable)
|
||||||
active = TRUE
|
active = TRUE
|
||||||
locked = FALSE
|
locked = FALSE
|
||||||
|
|
||||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||||
lockable |= U.lockable
|
lockable |= U.lockable
|
||||||
active |= U.active
|
active |= U.active
|
||||||
if(!gamemode)
|
if(!gamemode)
|
||||||
gamemode = U.gamemode
|
gamemode = U.gamemode
|
||||||
telecrystals += U.telecrystals
|
telecrystals += U.telecrystals
|
||||||
if(purchase_log && U.purchase_log)
|
if(purchase_log && U.purchase_log)
|
||||||
purchase_log.MergeWithAndDel(U.purchase_log)
|
purchase_log.MergeWithAndDel(U.purchase_log)
|
||||||
|
|
||||||
/datum/component/uplink/Destroy()
|
/datum/component/uplink/Destroy()
|
||||||
GLOB.uplinks -= src
|
GLOB.uplinks -= src
|
||||||
gamemode = null
|
gamemode = null
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
||||||
if(!silent)
|
if(!silent)
|
||||||
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
||||||
var/amt = TC.amount
|
var/amt = TC.amount
|
||||||
telecrystals += amt
|
telecrystals += amt
|
||||||
TC.use(amt)
|
TC.use(amt)
|
||||||
|
|
||||||
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
||||||
gamemode = _gamemode
|
gamemode = _gamemode
|
||||||
uplink_items = get_uplink_items(gamemode)
|
uplink_items = get_uplink_items(gamemode)
|
||||||
|
|
||||||
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
|
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
|
||||||
if(!active)
|
if(!active)
|
||||||
return //no hitting everyone/everything just to try to slot tcs in!
|
return //no hitting everyone/everything just to try to slot tcs in!
|
||||||
if(istype(I, /obj/item/stack/telecrystal))
|
if(istype(I, /obj/item/stack/telecrystal))
|
||||||
LoadTC(user, I)
|
LoadTC(user, I)
|
||||||
for(var/item in subtypesof(/datum/uplink_item))
|
for(var/item in subtypesof(/datum/uplink_item))
|
||||||
var/datum/uplink_item/UI = item
|
var/datum/uplink_item/UI = item
|
||||||
var/path = null
|
var/path = null
|
||||||
if(initial(UI.refund_path))
|
if(initial(UI.refund_path))
|
||||||
path = initial(UI.refund_path)
|
path = initial(UI.refund_path)
|
||||||
else
|
else
|
||||||
path = initial(UI.item)
|
path = initial(UI.item)
|
||||||
var/cost = 0
|
var/cost = 0
|
||||||
if(initial(UI.refund_amount))
|
if(initial(UI.refund_amount))
|
||||||
cost = initial(UI.refund_amount)
|
cost = initial(UI.refund_amount)
|
||||||
else
|
else
|
||||||
cost = initial(UI.cost)
|
cost = initial(UI.cost)
|
||||||
var/refundable = initial(UI.refundable)
|
var/refundable = initial(UI.refundable)
|
||||||
if(I.type == path && refundable && I.check_uplink_validity())
|
if(I.type == path && refundable && I.check_uplink_validity())
|
||||||
telecrystals += cost
|
telecrystals += cost
|
||||||
spent_telecrystals -= cost
|
spent_telecrystals -= cost
|
||||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||||
qdel(I)
|
qdel(I)
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/component/uplink/proc/interact(mob/user)
|
/datum/component/uplink/proc/interact(mob/user)
|
||||||
if(locked)
|
if(locked)
|
||||||
return
|
return
|
||||||
active = TRUE
|
active = TRUE
|
||||||
if(user)
|
if(user)
|
||||||
ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||||
active = TRUE
|
active = TRUE
|
||||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||||
if(!ui)
|
if(!ui)
|
||||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||||
ui.set_style("syndicate")
|
ui.set_style("syndicate")
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|
||||||
/datum/component/uplink/ui_data(mob/user)
|
/datum/component/uplink/ui_data(mob/user)
|
||||||
if(!user.mind)
|
if(!user.mind)
|
||||||
return
|
return
|
||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
data["telecrystals"] = telecrystals
|
data["telecrystals"] = telecrystals
|
||||||
data["lockable"] = lockable
|
data["lockable"] = lockable
|
||||||
|
|
||||||
data["categories"] = list()
|
data["categories"] = list()
|
||||||
for(var/category in uplink_items)
|
for(var/category in uplink_items)
|
||||||
var/list/cat = list(
|
var/list/cat = list(
|
||||||
"name" = category,
|
"name" = category,
|
||||||
"items" = (category == selected_cat ? list() : null))
|
"items" = (category == selected_cat ? list() : null))
|
||||||
if(category == selected_cat)
|
if(category == selected_cat)
|
||||||
for(var/item in uplink_items[category])
|
for(var/item in uplink_items[category])
|
||||||
var/datum/uplink_item/I = uplink_items[category][item]
|
var/datum/uplink_item/I = uplink_items[category][item]
|
||||||
if(I.limited_stock == 0)
|
if(I.limited_stock == 0)
|
||||||
continue
|
continue
|
||||||
if(I.restricted_roles.len)
|
if(I.restricted_roles.len)
|
||||||
var/is_inaccessible = 1
|
var/is_inaccessible = 1
|
||||||
for(var/R in I.restricted_roles)
|
for(var/R in I.restricted_roles)
|
||||||
if(R == user.mind.assigned_role)
|
if(R == user.mind.assigned_role)
|
||||||
is_inaccessible = 0
|
is_inaccessible = 0
|
||||||
if(is_inaccessible)
|
if(is_inaccessible)
|
||||||
continue
|
continue
|
||||||
cat["items"] += list(list(
|
cat["items"] += list(list(
|
||||||
"name" = I.name,
|
"name" = I.name,
|
||||||
"cost" = I.cost,
|
"cost" = I.cost,
|
||||||
"desc" = I.desc,
|
"desc" = I.desc,
|
||||||
))
|
))
|
||||||
data["categories"] += list(cat)
|
data["categories"] += list(cat)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
/datum/component/uplink/ui_act(action, params)
|
/datum/component/uplink/ui_act(action, params)
|
||||||
if(!active)
|
if(!active)
|
||||||
return
|
return
|
||||||
|
|
||||||
switch(action)
|
switch(action)
|
||||||
if("buy")
|
if("buy")
|
||||||
var/item = params["item"]
|
var/item = params["item"]
|
||||||
|
|
||||||
var/list/buyable_items = list()
|
var/list/buyable_items = list()
|
||||||
for(var/category in uplink_items)
|
for(var/category in uplink_items)
|
||||||
buyable_items += uplink_items[category]
|
buyable_items += uplink_items[category]
|
||||||
|
|
||||||
if(item in buyable_items)
|
if(item in buyable_items)
|
||||||
var/datum/uplink_item/I = buyable_items[item]
|
var/datum/uplink_item/I = buyable_items[item]
|
||||||
MakePurchase(usr, I)
|
MakePurchase(usr, I)
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("lock")
|
if("lock")
|
||||||
active = FALSE
|
active = FALSE
|
||||||
locked = TRUE
|
locked = TRUE
|
||||||
telecrystals += hidden_crystals
|
telecrystals += hidden_crystals
|
||||||
hidden_crystals = 0
|
hidden_crystals = 0
|
||||||
SStgui.close_uis(src)
|
SStgui.close_uis(src)
|
||||||
if("select")
|
if("select")
|
||||||
selected_cat = params["category"]
|
selected_cat = params["category"]
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
||||||
if(!istype(U))
|
if(!istype(U))
|
||||||
return
|
return
|
||||||
if (!user || user.incapacitated())
|
if (!user || user.incapacitated())
|
||||||
return
|
return
|
||||||
|
|
||||||
if(telecrystals < U.cost || U.limited_stock == 0)
|
if(telecrystals < U.cost || U.limited_stock == 0)
|
||||||
return
|
return
|
||||||
telecrystals -= U.cost
|
telecrystals -= U.cost
|
||||||
|
|
||||||
var/atom/A = U.spawn_item(get_turf(user), src, user)
|
var/atom/A = U.spawn_item(get_turf(user), src, user)
|
||||||
if(U.purchase_log_vis && purchase_log)
|
if(U.purchase_log_vis && purchase_log)
|
||||||
var/obj/item/storage/box/B = A
|
var/obj/item/storage/box/B = A
|
||||||
var/list/atom/logging = list()
|
var/list/atom/logging = list()
|
||||||
if(istype(B) && B.contents.len > 0)
|
if(istype(B) && B.contents.len > 0)
|
||||||
logging |= list(B)
|
logging |= list(B)
|
||||||
else
|
else
|
||||||
logging |= A
|
logging |= A
|
||||||
for(var/atom/_logging in logging)
|
for(var/atom/_logging in logging)
|
||||||
purchase_log.LogPurchase(_logging, U.cost)
|
purchase_log.LogPurchase(_logging, U.cost)
|
||||||
|
|
||||||
if(U.limited_stock > 0)
|
if(U.limited_stock > 0)
|
||||||
U.limited_stock -= 1
|
U.limited_stock -= 1
|
||||||
|
|
||||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
|
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
|
||||||
if(ishuman(user) && istype(A, /obj/item))
|
if(ishuman(user) && istype(A, /obj/item))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.put_in_hands(A))
|
if(H.put_in_hands(A))
|
||||||
to_chat(H, "[A] materializes into your hands!")
|
to_chat(H, "[A] materializes into your hands!")
|
||||||
else
|
else
|
||||||
to_chat(H, "\The [A] materializes onto the floor.")
|
to_chat(H, "\The [A] materializes onto the floor.")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -897,6 +897,9 @@
|
|||||||
to_chat(user,"<span class='warning'>[src] suddenly vanishes!</span>")
|
to_chat(user,"<span class='warning'>[src] suddenly vanishes!</span>")
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
/obj/item/spellbook/oneuse/random
|
||||||
|
icon_state = "random_book"
|
||||||
|
|
||||||
/obj/item/spellbook/oneuse/random/Initialize()
|
/obj/item/spellbook/oneuse/random/Initialize()
|
||||||
..()
|
..()
|
||||||
var/static/banned_spells = list(/obj/item/spellbook/oneuse/mimery_blockade, /obj/item/spellbook/oneuse/mimery_guns)
|
var/static/banned_spells = list(/obj/item/spellbook/oneuse/mimery_blockade, /obj/item/spellbook/oneuse/mimery_guns)
|
||||||
|
|||||||
@@ -678,6 +678,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
|||||||
|
|
||||||
/obj/machinery/vending/snack/random
|
/obj/machinery/vending/snack/random
|
||||||
name = "\improper Random Snackies"
|
name = "\improper Random Snackies"
|
||||||
|
icon_state = "random_snack"
|
||||||
desc = "Uh oh!"
|
desc = "Uh oh!"
|
||||||
|
|
||||||
/obj/machinery/vending/snack/random/Initialize()
|
/obj/machinery/vending/snack/random/Initialize()
|
||||||
@@ -730,6 +731,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
|||||||
|
|
||||||
/obj/machinery/vending/cola/random
|
/obj/machinery/vending/cola/random
|
||||||
name = "\improper Random Drinkies"
|
name = "\improper Random Drinkies"
|
||||||
|
icon_state = "random_cola"
|
||||||
desc = "Uh oh!"
|
desc = "Uh oh!"
|
||||||
|
|
||||||
/obj/machinery/vending/cola/random/Initialize()
|
/obj/machinery/vending/cola/random/Initialize()
|
||||||
|
|||||||
@@ -25,9 +25,11 @@
|
|||||||
|
|
||||||
/obj/item/lipstick/random
|
/obj/item/lipstick/random
|
||||||
name = "lipstick"
|
name = "lipstick"
|
||||||
|
icon_state = "random_lipstick"
|
||||||
|
|
||||||
/obj/item/lipstick/random/New()
|
/obj/item/lipstick/random/New()
|
||||||
..()
|
..()
|
||||||
|
icon_state = "lipstick"
|
||||||
colour = pick("red","purple","lime","black","green","blue","white")
|
colour = pick("red","purple","lime","black","green","blue","white")
|
||||||
name = "[colour] lipstick"
|
name = "[colour] lipstick"
|
||||||
|
|
||||||
|
|||||||
@@ -488,16 +488,14 @@
|
|||||||
|
|
||||||
/obj/item/device/flashlight/glowstick/random
|
/obj/item/device/flashlight/glowstick/random
|
||||||
name = "random colored glowstick"
|
name = "random colored glowstick"
|
||||||
|
icon_state = "random_glowstick"
|
||||||
|
color = null
|
||||||
|
|
||||||
/obj/item/device/flashlight/glowstick/random/Initialize()
|
/obj/item/device/flashlight/glowstick/random/Initialize()
|
||||||
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
|
|
||||||
glowtypes -= /obj/item/device/flashlight/glowstick/random
|
|
||||||
|
|
||||||
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
|
|
||||||
|
|
||||||
name = initial(glowtype.name)
|
|
||||||
color = initial(glowtype.color)
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
var/T = pick(typesof(/obj/item/device/flashlight/glowstick) - /obj/item/device/flashlight/glowstick/random)
|
||||||
|
new T(loc)
|
||||||
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
/obj/item/device/flashlight/spotlight //invisible lighting source
|
/obj/item/device/flashlight/spotlight //invisible lighting source
|
||||||
name = "disco light"
|
name = "disco light"
|
||||||
|
|||||||
@@ -289,6 +289,9 @@
|
|||||||
fix()
|
fix()
|
||||||
|
|
||||||
//Random colour tapes
|
//Random colour tapes
|
||||||
|
/obj/item/device/tape/random
|
||||||
|
icon_state = "random_tape"
|
||||||
|
|
||||||
/obj/item/device/tape/random/New()
|
/obj/item/device/tape/random/New()
|
||||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
|
|
||||||
// A collection of pre-set uplinks, for admin spawns.
|
// A collection of pre-set uplinks, for admin spawns.
|
||||||
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||||
. = ..()
|
. = ..()
|
||||||
icon_state = "radio"
|
icon_state = "radio"
|
||||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||||
|
|
||||||
/obj/item/device/radio/uplink/nuclear/Initialize()
|
/obj/item/device/radio/uplink/nuclear/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||||
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||||
|
|
||||||
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||||
. = ..()
|
. = ..()
|
||||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||||
|
|
||||||
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||||
. = ..()
|
. = ..()
|
||||||
LoadComponent(/datum/component/uplink)
|
LoadComponent(/datum/component/uplink)
|
||||||
traitor_unlock_degrees = 360
|
traitor_unlock_degrees = 360
|
||||||
|
|
||||||
/obj/item/device/radio/uplink/old
|
/obj/item/device/radio/uplink/old
|
||||||
name = "dusty radio"
|
name = "dusty radio"
|
||||||
desc = "A dusty looking radio."
|
desc = "A dusty looking radio."
|
||||||
|
|
||||||
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
|
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
|
||||||
. = ..()
|
. = ..()
|
||||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||||
hidden_uplink.name = "dusty radio"
|
hidden_uplink.name = "dusty radio"
|
||||||
|
|||||||
@@ -129,6 +129,9 @@
|
|||||||
|
|
||||||
|
|
||||||
//random clusterbuster spawner
|
//random clusterbuster spawner
|
||||||
|
/obj/item/grenade/clusterbuster/random
|
||||||
|
icon_state = "random_clusterbang"
|
||||||
|
|
||||||
/obj/item/grenade/clusterbuster/random/New()
|
/obj/item/grenade/clusterbuster/random/New()
|
||||||
var/real_type = pick(subtypesof(/obj/item/grenade/clusterbuster))
|
var/real_type = pick(subtypesof(/obj/item/grenade/clusterbuster))
|
||||||
new real_type(loc)
|
new real_type(loc)
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
/obj/item/implant/uplink
|
/obj/item/implant/uplink
|
||||||
name = "uplink implant"
|
name = "uplink implant"
|
||||||
desc = "Sneeki breeki."
|
desc = "Sneeki breeki."
|
||||||
icon = 'icons/obj/radio.dmi'
|
icon = 'icons/obj/radio.dmi'
|
||||||
icon_state = "radio"
|
icon_state = "radio"
|
||||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||||
var/starting_tc = 0
|
var/starting_tc = 0
|
||||||
|
|
||||||
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
||||||
. = ..()
|
. = ..()
|
||||||
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||||
|
|
||||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||||
if(hidden_uplink)
|
if(hidden_uplink)
|
||||||
for(var/X in target.implants)
|
for(var/X in target.implants)
|
||||||
if(istype(X, type))
|
if(istype(X, type))
|
||||||
var/obj/item/implant/imp_e = X
|
var/obj/item/implant/imp_e = X
|
||||||
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
|
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
|
||||||
if(their_hidden_uplink)
|
if(their_hidden_uplink)
|
||||||
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
qdel(imp_e) //INFERIOR AND EMPTY!
|
qdel(imp_e) //INFERIOR AND EMPTY!
|
||||||
|
|
||||||
if(..())
|
if(..())
|
||||||
if(hidden_uplink)
|
if(hidden_uplink)
|
||||||
hidden_uplink.owner = "[user.key]"
|
hidden_uplink.owner = "[user.key]"
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/item/implant/uplink/activate()
|
/obj/item/implant/uplink/activate()
|
||||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||||
if(hidden_uplink)
|
if(hidden_uplink)
|
||||||
hidden_uplink.locked = FALSE
|
hidden_uplink.locked = FALSE
|
||||||
hidden_uplink.interact(usr)
|
hidden_uplink.interact(usr)
|
||||||
|
|
||||||
/obj/item/implanter/uplink
|
/obj/item/implanter/uplink
|
||||||
name = "implanter (uplink)"
|
name = "implanter (uplink)"
|
||||||
imp_type = /obj/item/implant/uplink
|
imp_type = /obj/item/implant/uplink
|
||||||
|
|
||||||
/obj/item/implanter/uplink/precharged
|
/obj/item/implanter/uplink/precharged
|
||||||
name = "implanter (precharged uplink)"
|
name = "implanter (precharged uplink)"
|
||||||
imp_type = /obj/item/implant/uplink/precharged
|
imp_type = /obj/item/implant/uplink/precharged
|
||||||
|
|
||||||
/obj/item/implant/uplink/precharged
|
/obj/item/implant/uplink/precharged
|
||||||
starting_tc = 10
|
starting_tc = 10
|
||||||
|
|||||||
@@ -72,6 +72,9 @@
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/storage/wallet/random
|
||||||
|
icon_state = "random_wallet"
|
||||||
|
|
||||||
/obj/item/storage/wallet/random/PopulateContents()
|
/obj/item/storage/wallet/random/PopulateContents()
|
||||||
var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
||||||
var/item2_type
|
var/item2_type
|
||||||
@@ -86,3 +89,4 @@
|
|||||||
new item2_type(src)
|
new item2_type(src)
|
||||||
if(item3_type)
|
if(item3_type)
|
||||||
new item3_type(src)
|
new item3_type(src)
|
||||||
|
update_icon()
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ LINEN BINS
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/bedsheet/random
|
/obj/item/bedsheet/random
|
||||||
icon_state = "sheetrainbow"
|
icon_state = "random_bedsheet"
|
||||||
item_color = "rainbow"
|
item_color = "rainbow"
|
||||||
name = "random bedsheet"
|
name = "random bedsheet"
|
||||||
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
|
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
|
||||||
|
|||||||
@@ -285,10 +285,13 @@
|
|||||||
user.remove_alt_appearance("sneaking_mission")
|
user.remove_alt_appearance("sneaking_mission")
|
||||||
|
|
||||||
/obj/item/twohanded/required/kirbyplants/random
|
/obj/item/twohanded/required/kirbyplants/random
|
||||||
|
icon = 'icons/obj/flora/_flora.dmi'
|
||||||
|
icon_state = "random_plant"
|
||||||
var/list/static/states
|
var/list/static/states
|
||||||
|
|
||||||
/obj/item/twohanded/required/kirbyplants/random/Initialize()
|
/obj/item/twohanded/required/kirbyplants/random/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
icon = 'icons/obj/flora/plants.dmi'
|
||||||
if(!states)
|
if(!states)
|
||||||
generate_states()
|
generate_states()
|
||||||
icon_state = pick(states)
|
icon_state = pick(states)
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
/obj/item/clothing/glasses/meson/engine
|
/obj/item/clothing/glasses/meson/engine
|
||||||
name = "engineering scanner goggles"
|
name = "engineering scanner goggles"
|
||||||
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode let's you see objects contaminated by radiation."
|
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode let's you see objects contaminated by radiation."
|
||||||
icon_state = "trayson"
|
icon_state = "trayson-meson"
|
||||||
|
item_state = "trayson-meson"
|
||||||
actions_types = list(/datum/action/item_action/toggle_mode)
|
actions_types = list(/datum/action/item_action/toggle_mode)
|
||||||
origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3"
|
origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3"
|
||||||
|
|
||||||
@@ -117,14 +118,22 @@
|
|||||||
flick_overlay(pic, list(user.client), 8)
|
flick_overlay(pic, list(user.client), 8)
|
||||||
|
|
||||||
/obj/item/clothing/glasses/meson/engine/update_icon()
|
/obj/item/clothing/glasses/meson/engine/update_icon()
|
||||||
icon_state = "[initial(icon_state)]-[mode]"
|
icon_state = "trayson-[mode]"
|
||||||
if(istype(loc, /mob/living/carbon/human/))
|
update_mob()
|
||||||
var/mob/living/carbon/human/user = loc
|
|
||||||
if(user.glasses == src)
|
/obj/item/clothing/glasses/meson/engine/proc/update_mob()
|
||||||
|
item_state = icon_state
|
||||||
|
if(isliving(loc))
|
||||||
|
var/mob/living/user = loc
|
||||||
|
if(user.get_item_by_slot(slot_glasses) == src)
|
||||||
user.update_inv_glasses()
|
user.update_inv_glasses()
|
||||||
|
else
|
||||||
|
user.update_inv_hands()
|
||||||
|
|
||||||
/obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
|
/obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
|
||||||
name = "optical t-ray scanner"
|
name = "optical t-ray scanner"
|
||||||
|
icon_state = "trayson-t-ray"
|
||||||
|
item_state = "trayson-t-ray"
|
||||||
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
|
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
|
||||||
origin_tech = "materials=3;magnets=2;engineering=2"
|
origin_tech = "materials=3;magnets=2;engineering=2"
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
/obj/item/clothing/gloves/color/random
|
/obj/item/clothing/gloves/color/random
|
||||||
name = "random gloves"
|
name = "random gloves"
|
||||||
desc = "These gloves are supposed to be a random color..."
|
desc = "These gloves are supposed to be a random color..."
|
||||||
icon_state = "white"
|
icon_state = "random_gloves"
|
||||||
item_state = "wgloves"
|
item_state = "wgloves"
|
||||||
item_color = "mime"
|
item_color = "mime"
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
/obj/structure/beebox/premade/New()
|
/obj/structure/beebox/premade/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
icon_state = "beebox"
|
||||||
var/datum/reagent/R = null
|
var/datum/reagent/R = null
|
||||||
if(random_reagent)
|
if(random_reagent)
|
||||||
R = pick(subtypesof(/datum/reagent))
|
R = pick(subtypesof(/datum/reagent))
|
||||||
@@ -80,6 +81,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/beebox/premade/random
|
/obj/structure/beebox/premade/random
|
||||||
|
icon_state = "random_beebox"
|
||||||
random_reagent = TRUE
|
random_reagent = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
/obj/item/book/manual/random
|
||||||
|
icon_state = "random_book"
|
||||||
|
|
||||||
/obj/item/book/manual/random/Initialize()
|
/obj/item/book/manual/random/Initialize()
|
||||||
..()
|
..()
|
||||||
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
|
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
|
||||||
@@ -6,6 +9,7 @@
|
|||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
/obj/item/book/random
|
/obj/item/book/random
|
||||||
|
icon_state = "random_book"
|
||||||
var/amount = 1
|
var/amount = 1
|
||||||
var/category = null
|
var/category = null
|
||||||
|
|
||||||
@@ -20,6 +24,7 @@
|
|||||||
/obj/structure/bookcase/random
|
/obj/structure/bookcase/random
|
||||||
var/category = null
|
var/category = null
|
||||||
var/book_count = 2
|
var/book_count = 2
|
||||||
|
icon_state = "random_bookcase"
|
||||||
anchored = TRUE
|
anchored = TRUE
|
||||||
state = 2
|
state = 2
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/mob/living/silicon/robot/Process_Spacemove(movement_dir = 0)
|
/mob/living/silicon/robot/Process_Spacemove(movement_dir = 0)
|
||||||
if(ionpulse())
|
if(ionpulse())
|
||||||
return 1
|
return 1
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/silicon/robot/movement_delay()
|
/mob/living/silicon/robot/movement_delay()
|
||||||
. = ..()
|
. = ..()
|
||||||
var/static/config_robot_delay
|
var/static/config_robot_delay
|
||||||
if(isnull(config_robot_delay))
|
if(isnull(config_robot_delay))
|
||||||
config_robot_delay = CONFIG_GET(number/robot_delay)
|
config_robot_delay = CONFIG_GET(number/robot_delay)
|
||||||
. += speed + config_robot_delay
|
. += speed + config_robot_delay
|
||||||
|
|
||||||
/mob/living/silicon/robot/mob_negates_gravity()
|
/mob/living/silicon/robot/mob_negates_gravity()
|
||||||
return magpulse
|
return magpulse
|
||||||
|
|
||||||
/mob/living/silicon/robot/mob_has_gravity()
|
/mob/living/silicon/robot/mob_has_gravity()
|
||||||
return ..() || mob_negates_gravity()
|
return ..() || mob_negates_gravity()
|
||||||
|
|
||||||
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
|
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
|
||||||
if(!magpulse)
|
if(!magpulse)
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
if(51 to INFINITY)
|
if(51 to INFINITY)
|
||||||
icon_state = "full"
|
icon_state = "full"
|
||||||
|
|
||||||
|
/obj/item/reagent_containers/blood/random
|
||||||
|
icon_state = "random_bloodpack"
|
||||||
|
|
||||||
/obj/item/reagent_containers/blood/random/Initialize()
|
/obj/item/reagent_containers/blood/random/Initialize()
|
||||||
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L")
|
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L")
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
/obj/vehicle/ridden
|
/obj/vehicle/ridden
|
||||||
name = "ridden vehicle"
|
name = "ridden vehicle"
|
||||||
can_buckle = TRUE
|
can_buckle = TRUE
|
||||||
max_buckled_mobs = 1
|
max_buckled_mobs = 1
|
||||||
buckle_lying = FALSE
|
buckle_lying = FALSE
|
||||||
default_driver_move = FALSE
|
default_driver_move = FALSE
|
||||||
var/legs_required = 2
|
var/legs_required = 2
|
||||||
var/arms_requires = 0 //why not?
|
var/arms_requires = 0 //why not?
|
||||||
|
|
||||||
/obj/vehicle/ridden/Initialize()
|
/obj/vehicle/ridden/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
LoadComponent(/datum/component/riding)
|
LoadComponent(/datum/component/riding)
|
||||||
|
|
||||||
/obj/vehicle/ridden/examine(mob/user)
|
/obj/vehicle/ridden/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
to_chat(user, "<span class='notice'>Put a key inside it by clicking it with the key. If there's a key inside, you can remove it via Alt-Click!</span>")
|
to_chat(user, "<span class='notice'>Put a key inside it by clicking it with the key. If there's a key inside, you can remove it via Alt-Click!</span>")
|
||||||
|
|
||||||
/obj/vehicle/ridden/generate_action_type(actiontype)
|
/obj/vehicle/ridden/generate_action_type(actiontype)
|
||||||
var/datum/action/vehicle/ridden/A = ..()
|
var/datum/action/vehicle/ridden/A = ..()
|
||||||
. = A
|
. = A
|
||||||
if(istype(A))
|
if(istype(A))
|
||||||
A.vehicle_ridden_target = src
|
A.vehicle_ridden_target = src
|
||||||
|
|
||||||
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
|
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
|
||||||
remove_occupant(M)
|
remove_occupant(M)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
|
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
|
||||||
add_occupant(M)
|
add_occupant(M)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
|
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
|
||||||
if(key_type && !is_key(inserted_key) && is_key(I))
|
if(key_type && !is_key(inserted_key) && is_key(I))
|
||||||
if(user.transferItemToLoc(I, src))
|
if(user.transferItemToLoc(I, src))
|
||||||
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
|
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
|
||||||
if(inserted_key) //just in case there's an invalid key
|
if(inserted_key) //just in case there's an invalid key
|
||||||
inserted_key.forceMove(drop_location())
|
inserted_key.forceMove(drop_location())
|
||||||
inserted_key = I
|
inserted_key = I
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>[I] seems to be stuck to your hand!</span>")
|
to_chat(user, "<span class='notice'>[I] seems to be stuck to your hand!</span>")
|
||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/AltClick(mob/user)
|
/obj/vehicle/ridden/AltClick(mob/user)
|
||||||
if(user.Adjacent(src) && inserted_key)
|
if(user.Adjacent(src) && inserted_key)
|
||||||
if(!is_occupant(user))
|
if(!is_occupant(user))
|
||||||
to_chat(user, "<span class='notice'>You must be riding the [src] to remove [src]'s key!</span>")
|
to_chat(user, "<span class='notice'>You must be riding the [src] to remove [src]'s key!</span>")
|
||||||
return
|
return
|
||||||
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
|
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
|
||||||
inserted_key.forceMove(drop_location())
|
inserted_key.forceMove(drop_location())
|
||||||
user.put_in_hands(inserted_key)
|
user.put_in_hands(inserted_key)
|
||||||
inserted_key = null
|
inserted_key = null
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/driver_move(mob/user, direction)
|
/obj/vehicle/ridden/driver_move(mob/user, direction)
|
||||||
if(key_type && !is_key(inserted_key))
|
if(key_type && !is_key(inserted_key))
|
||||||
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
|
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
var/datum/component/riding/R = GetComponent(/datum/component/riding)
|
var/datum/component/riding/R = GetComponent(/datum/component/riding)
|
||||||
R.handle_ride(user, direction)
|
R.handle_ride(user, direction)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
|
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
|
||||||
if(user.incapacitated())
|
if(user.incapacitated())
|
||||||
return
|
return
|
||||||
for(var/atom/movable/A in get_turf(src))
|
for(var/atom/movable/A in get_turf(src))
|
||||||
if(A.density)
|
if(A.density)
|
||||||
if(A != src && A != M)
|
if(A != src && A != M)
|
||||||
return
|
return
|
||||||
M.forceMove(get_turf(src))
|
M.forceMove(get_turf(src))
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||||
if(!force && occupant_amount() >= max_occupants)
|
if(!force && occupant_amount() >= max_occupants)
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -1,112 +1,112 @@
|
|||||||
//VEHICLE DEFAULT HANDLING
|
//VEHICLE DEFAULT HANDLING
|
||||||
/obj/vehicle/proc/generate_actions()
|
/obj/vehicle/proc/generate_actions()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/vehicle/proc/generate_action_type(actiontype)
|
/obj/vehicle/proc/generate_action_type(actiontype)
|
||||||
var/datum/action/vehicle/A = new actiontype
|
var/datum/action/vehicle/A = new actiontype
|
||||||
if(!istype(A))
|
if(!istype(A))
|
||||||
return
|
return
|
||||||
A.vehicle_target = src
|
A.vehicle_target = src
|
||||||
return A
|
return A
|
||||||
|
|
||||||
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
|
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
|
||||||
autogrant_actions_passenger += actiontype
|
autogrant_actions_passenger += actiontype
|
||||||
for(var/i in occupants)
|
for(var/i in occupants)
|
||||||
grant_passenger_actions(i) //refresh
|
grant_passenger_actions(i) //refresh
|
||||||
|
|
||||||
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
|
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
|
||||||
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
|
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
|
||||||
autogrant_actions_controller["[control_flag]"] += actiontype
|
autogrant_actions_controller["[control_flag]"] += actiontype
|
||||||
for(var/i in occupants)
|
for(var/i in occupants)
|
||||||
grant_controller_actions(i) //refresh
|
grant_controller_actions(i) //refresh
|
||||||
|
|
||||||
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
|
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
|
||||||
if(!occupants[m] || !actiontype)
|
if(!occupants[m] || !actiontype)
|
||||||
return FALSE
|
return FALSE
|
||||||
LAZYINITLIST(occupant_actions[m])
|
LAZYINITLIST(occupant_actions[m])
|
||||||
if(occupant_actions[m][actiontype])
|
if(occupant_actions[m][actiontype])
|
||||||
return TRUE
|
return TRUE
|
||||||
var/datum/action/action = generate_action_type(actiontype)
|
var/datum/action/action = generate_action_type(actiontype)
|
||||||
action.Grant(m)
|
action.Grant(m)
|
||||||
occupant_actions[m][action.type] = action
|
occupant_actions[m][action.type] = action
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
|
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
|
||||||
if(!occupants[m] || !actiontype)
|
if(!occupants[m] || !actiontype)
|
||||||
return FALSE
|
return FALSE
|
||||||
LAZYINITLIST(occupant_actions[m])
|
LAZYINITLIST(occupant_actions[m])
|
||||||
if(occupant_actions[m][actiontype])
|
if(occupant_actions[m][actiontype])
|
||||||
var/datum/action/action = occupant_actions[m][actiontype]
|
var/datum/action/action = occupant_actions[m][actiontype]
|
||||||
action.Remove(m)
|
action.Remove(m)
|
||||||
occupant_actions[m] -= actiontype
|
occupant_actions[m] -= actiontype
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/grant_passenger_actions(mob/M)
|
/obj/vehicle/proc/grant_passenger_actions(mob/M)
|
||||||
for(var/v in autogrant_actions_passenger)
|
for(var/v in autogrant_actions_passenger)
|
||||||
grant_action_type_to_mob(v, M)
|
grant_action_type_to_mob(v, M)
|
||||||
|
|
||||||
/obj/vehicle/proc/remove_passenger_actions(mob/M)
|
/obj/vehicle/proc/remove_passenger_actions(mob/M)
|
||||||
for(var/v in autogrant_actions_passenger)
|
for(var/v in autogrant_actions_passenger)
|
||||||
remove_action_type_from_mob(v, M)
|
remove_action_type_from_mob(v, M)
|
||||||
|
|
||||||
/obj/vehicle/proc/grant_controller_actions(mob/M)
|
/obj/vehicle/proc/grant_controller_actions(mob/M)
|
||||||
if(!istype(M) || !occupants[M])
|
if(!istype(M) || !occupants[M])
|
||||||
return FALSE
|
return FALSE
|
||||||
for(var/i in GLOB.bitflags)
|
for(var/i in GLOB.bitflags)
|
||||||
if(occupants[M] & i)
|
if(occupants[M] & i)
|
||||||
grant_controller_actions_by_flag(M, i)
|
grant_controller_actions_by_flag(M, i)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/remove_controller_actions(mob/M)
|
/obj/vehicle/proc/remove_controller_actions(mob/M)
|
||||||
if(!istype(M) || !occupants[M])
|
if(!istype(M) || !occupants[M])
|
||||||
return FALSE
|
return FALSE
|
||||||
for(var/i in GLOB.bitflags)
|
for(var/i in GLOB.bitflags)
|
||||||
remove_controller_actions_by_flag(M, i)
|
remove_controller_actions_by_flag(M, i)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
|
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
|
||||||
if(!istype(M) || !autogrant_actions_controller["[flag]"])
|
if(!istype(M) || !autogrant_actions_controller["[flag]"])
|
||||||
return FALSE
|
return FALSE
|
||||||
for(var/v in autogrant_actions_controller["[flag]"])
|
for(var/v in autogrant_actions_controller["[flag]"])
|
||||||
grant_action_type_to_mob(v, M)
|
grant_action_type_to_mob(v, M)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
|
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
|
||||||
if(!istype(M) || autogrant_actions_controller["[flag]"])
|
if(!istype(M) || autogrant_actions_controller["[flag]"])
|
||||||
return FALSE
|
return FALSE
|
||||||
for(var/v in autogrant_actions_controller["[flag]"])
|
for(var/v in autogrant_actions_controller["[flag]"])
|
||||||
remove_action_type_from_mob(v, M)
|
remove_action_type_from_mob(v, M)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
|
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return FALSE
|
return FALSE
|
||||||
LAZYINITLIST(occupant_actions[M])
|
LAZYINITLIST(occupant_actions[M])
|
||||||
for(var/path in occupant_actions[M])
|
for(var/path in occupant_actions[M])
|
||||||
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
|
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
|
||||||
var/datum/action/action = occupant_actions[M]
|
var/datum/action/action = occupant_actions[M]
|
||||||
action.Remove(M)
|
action.Remove(M)
|
||||||
occupant_actions -= M
|
occupant_actions -= M
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
//ACTION DATUMS
|
//ACTION DATUMS
|
||||||
|
|
||||||
/datum/action/vehicle
|
/datum/action/vehicle
|
||||||
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
|
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
|
||||||
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
|
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
|
||||||
button_icon_state = "vehicle_eject"
|
button_icon_state = "vehicle_eject"
|
||||||
var/obj/vehicle/vehicle_target
|
var/obj/vehicle/vehicle_target
|
||||||
|
|
||||||
/datum/action/vehicle/sealed
|
/datum/action/vehicle/sealed
|
||||||
var/obj/vehicle/sealed/vehicle_entered_target
|
var/obj/vehicle/sealed/vehicle_entered_target
|
||||||
|
|
||||||
/datum/action/vehicle/sealed/climb_out
|
/datum/action/vehicle/sealed/climb_out
|
||||||
name = "Climb Out"
|
name = "Climb Out"
|
||||||
desc = "Climb out of your vehicle!"
|
desc = "Climb out of your vehicle!"
|
||||||
|
|
||||||
/datum/action/vehicle/sealed/climb_out/Trigger()
|
/datum/action/vehicle/sealed/climb_out/Trigger()
|
||||||
if(..() && istype(vehicle_entered_target))
|
if(..() && istype(vehicle_entered_target))
|
||||||
vehicle_entered_target.mob_try_exit(owner, owner)
|
vehicle_entered_target.mob_try_exit(owner, owner)
|
||||||
|
|
||||||
/datum/action/vehicle/ridden
|
/datum/action/vehicle/ridden
|
||||||
var/obj/vehicle/ridden/vehicle_ridden_target
|
var/obj/vehicle/ridden/vehicle_ridden_target
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
/obj/item/key
|
/obj/item/key
|
||||||
name = "key"
|
name = "key"
|
||||||
desc = "A small grey key."
|
desc = "A small grey key."
|
||||||
icon = 'icons/obj/vehicles.dmi'
|
icon = 'icons/obj/vehicles.dmi'
|
||||||
icon_state = "key"
|
icon_state = "key"
|
||||||
w_class = WEIGHT_CLASS_TINY
|
w_class = WEIGHT_CLASS_TINY
|
||||||
|
|
||||||
/obj/item/key/security
|
/obj/item/key/security
|
||||||
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
|
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
|
||||||
icon_state = "keysec"
|
icon_state = "keysec"
|
||||||
|
|
||||||
/obj/item/key/janitor
|
/obj/item/key/janitor
|
||||||
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
|
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
|
||||||
icon_state = "keyjanitor"
|
icon_state = "keyjanitor"
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 323 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.7 KiB |