Merge branch 'pr/21'
This commit is contained in:
@@ -616,7 +616,7 @@ RLD
|
||||
name = "rapid-light-device (RLD)"
|
||||
desc = "A device used to rapidly provide lighting sources to an area. Reload with metal, plasteel, glass or compressed matter cartridges."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rld-5"
|
||||
icon_state = "rld"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
matter = 500
|
||||
@@ -625,6 +625,7 @@ RLD
|
||||
var/mode = LIGHT_MODE
|
||||
actions_types = list(/datum/action/item_action/pick_color)
|
||||
ammo_sections = 5
|
||||
has_ammobar = TRUE
|
||||
|
||||
var/wallcost = 10
|
||||
var/floorcost = 15
|
||||
@@ -638,6 +639,10 @@ RLD
|
||||
var/color_choice = null
|
||||
|
||||
|
||||
/obj/item/construction/rld/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/construction/rld/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
color_choice = input(user,"","Choose Color",color_choice) as color
|
||||
@@ -645,9 +650,10 @@ RLD
|
||||
..()
|
||||
|
||||
/obj/item/construction/rld/update_icon()
|
||||
icon_state = "rld-[round((matter/max_matter) * 5, 1)]"
|
||||
..()
|
||||
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
add_overlay("rld_light[ratio]")
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "rapid cable layer"
|
||||
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcl-0"
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
var/obj/structure/cable/last
|
||||
var/obj/item/stack/cable_coil/loaded
|
||||
@@ -92,22 +92,32 @@
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-empty"
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(61 to INFINITY)
|
||||
icon_state = "rcl-30"
|
||||
item_state = "rcl"
|
||||
cable_amount = 3
|
||||
if(31 to 60)
|
||||
icon_state = "rcl-20"
|
||||
item_state = "rcl"
|
||||
cable_amount = 2
|
||||
if(1 to 30)
|
||||
icon_state = "rcl-10"
|
||||
item_state = "rcl"
|
||||
cable_amount = 1
|
||||
else
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rcl"
|
||||
item_state = "rcl"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
@@ -302,6 +312,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
to_chat(user, "Color changed to [cwname]!")
|
||||
if(loaded)
|
||||
loaded.item_color= colors[current_color_index]
|
||||
update_icon()
|
||||
if(wiring_gui_menu)
|
||||
wiringGuiUpdate(user)
|
||||
else if(istype(action, /datum/action/item_action/rcl_gui))
|
||||
@@ -318,13 +329,29 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rclg-0"
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(1 to INFINITY)
|
||||
icon_state = "rclg-1"
|
||||
item_state = "rcl"
|
||||
if(20 to INFINITY)
|
||||
cable_amount = 3
|
||||
if(10 to 19)
|
||||
cable_amount = 2
|
||||
if(1 to 9)
|
||||
cable_amount = 1
|
||||
else
|
||||
icon_state = "rclg-1"
|
||||
item_state = "rclg-1"
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rclg"
|
||||
item_state = "rclg"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
/obj/item/his_grace/proc/consume(mob/living/meal) //Here's your dinner, Mr. Grace.
|
||||
if(!meal)
|
||||
return
|
||||
var/victims = 0
|
||||
meal.visible_message("<span class='warning'>[src] swings open and devours [meal]!</span>", "<span class='his_grace big bold'>[src] consumes you!</span>")
|
||||
meal.adjustBruteLoss(200)
|
||||
playsound(meal, 'sound/misc/desceration-02.ogg', 75, 1)
|
||||
@@ -185,7 +186,10 @@
|
||||
bloodthirst = max(LAZYLEN(contents), 1) //Never fully sated, and His hunger will only grow.
|
||||
else
|
||||
bloodthirst = HIS_GRACE_CONSUME_OWNER
|
||||
if(LAZYLEN(contents) >= victims_needed)
|
||||
for(var/mob/living/C in contents)
|
||||
if(C.mind)
|
||||
victims++
|
||||
if(victims >= victims_needed)
|
||||
ascend()
|
||||
update_stats()
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
name = "inconspicious box"
|
||||
desc = "It's so normal that you didn't notice it before."
|
||||
icon_state = "agentbox"
|
||||
max_integrity = 1
|
||||
use_mob_movespeed = TRUE
|
||||
|
||||
/obj/structure/closet/cardboard/agent/proc/go_invisible()
|
||||
|
||||
@@ -653,6 +653,9 @@
|
||||
icon_state = "sheath"
|
||||
item_state = "sheath"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/list/fitting_swords = list(/obj/item/melee/sabre, /obj/item/melee/baton/stunsword)
|
||||
var/starting_sword = /obj/item/melee/sabre
|
||||
var/sword_overlay
|
||||
|
||||
/obj/item/storage/belt/sabre/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -660,35 +663,7 @@
|
||||
STR.max_items = 1
|
||||
STR.rustle_sound = FALSE
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/melee/sabre
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier
|
||||
name = "rapier sheath"
|
||||
desc = "A black, thin sheath that looks to house only a long thin blade. Feels like its made of metal."
|
||||
icon_state = "rsheath"
|
||||
item_state = "rsheath"
|
||||
force = 5
|
||||
throwforce = 15
|
||||
block_chance = 30
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "slashes", "prods", "pokes")
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier/ComponentInitialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.max_items = 1
|
||||
STR.rustle_sound = FALSE
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/melee/rapier
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //To thin to block bullets
|
||||
return ..()
|
||||
STR.can_hold = typecacheof(fitting_swords)
|
||||
|
||||
/obj/item/storage/belt/sabre/examine(mob/user)
|
||||
..()
|
||||
@@ -709,18 +684,40 @@
|
||||
/obj/item/storage/belt/sabre/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
sword_overlay = null
|
||||
if(contents.len)
|
||||
icon_state += "-sabre"
|
||||
item_state += "-sabre"
|
||||
var/obj/item/I = contents[1]
|
||||
sword_overlay = initial(I.icon_state)
|
||||
add_overlay("-[sword_overlay]")
|
||||
item_state += "-[I.icon_state]"
|
||||
if(loc && isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.regenerate_icons()
|
||||
..()
|
||||
|
||||
/obj/item/storage/belt/sabre/worn_overlays(isinhands, icon_file)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
. += mutable_appearance(icon_file, "-[sword_overlay]")
|
||||
|
||||
/obj/item/storage/belt/sabre/PopulateContents()
|
||||
new /obj/item/melee/sabre(src)
|
||||
new starting_sword(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier/PopulateContents()
|
||||
new /obj/item/melee/rapier(src)
|
||||
update_icon()
|
||||
/obj/item/storage/belt/sabre/rapier
|
||||
name = "rapier sheath"
|
||||
desc = "A black, thin sheath that looks to house only a long thin blade. Feels like its made of metal."
|
||||
icon_state = "rsheath"
|
||||
item_state = "rsheath"
|
||||
force = 5
|
||||
throwforce = 15
|
||||
block_chance = 30
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "slashes", "prods", "pokes")
|
||||
fitting_swords = list(/obj/item/melee/rapier)
|
||||
starting_sword = /obj/item/melee/rapier
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //To thin to block bullets
|
||||
return ..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
AddComponent(component_type)
|
||||
|
||||
/obj/item/storage/AllowDrop()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/contents_explosion(severity, target)
|
||||
for(var/atom/A in contents)
|
||||
|
||||
Reference in New Issue
Block a user