mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Use our quick equip instead of TGs implementation(for my sake) also a bunch of misc stuff
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
/client/verb/keyDown(_key as text)
|
||||
set instant = TRUE
|
||||
set hidden = TRUE
|
||||
to_chat(src,"You pressed:" + _key)
|
||||
keys_held[_key] = world.time
|
||||
var/movement = SSinput.movement_keys[_key]
|
||||
if(!(next_move_dir_sub & movement) && !keys_held["Ctrl"])
|
||||
@@ -34,7 +33,6 @@
|
||||
/client/verb/keyUp(_key as text)
|
||||
set instant = TRUE
|
||||
set hidden = TRUE
|
||||
to_chat(src, "You released:" + _key)
|
||||
keys_held -= _key
|
||||
var/movement = SSinput.movement_keys[_key]
|
||||
if(!(next_move_dir_add & movement))
|
||||
|
||||
@@ -2,43 +2,44 @@
|
||||
if(client.keys_held["Shift"])
|
||||
switch(_key)
|
||||
if("E") // Put held thing in belt or take out most recent thing from belt
|
||||
var/obj/item/thing = get_active_hand()
|
||||
var/obj/item/equipped_belt = get_item_by_slot(SLOT_BELT)
|
||||
if(!equipped_belt) // We also let you equip a belt like this
|
||||
if(!thing)
|
||||
to_chat(user, "<span class='notice'>You have no belt to take something out of.</span>")
|
||||
return
|
||||
if(equip_to_slot_if_possible(thing, SLOT_BELT))
|
||||
update_inv_r_hand()
|
||||
update_inv_l_hand()
|
||||
return
|
||||
if(!SEND_SIGNAL(equipped_belt, COMSIG_CONTAINS_STORAGE)) // not a storage item
|
||||
if(!thing)
|
||||
equipped_belt.attack_hand(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
|
||||
return
|
||||
if(thing) // put thing in belt
|
||||
if(!SEND_SIGNAL(equipped_belt, COMSIG_TRY_STORAGE_INSERT, thing, user.mob))
|
||||
to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
|
||||
return
|
||||
if(!equipped_belt.contents.len) // nothing to take out
|
||||
to_chat(user, "<span class='notice'>There's nothing in your belt to take out.</span>")
|
||||
return
|
||||
var/obj/item/stored = equipped_belt.contents[equipped_belt.contents.len]
|
||||
if(!stored || stored.on_found(src))
|
||||
return
|
||||
stored.attack_hand(src) // take out thing from belt
|
||||
return
|
||||
quick_equip() // Implementing the storage component is going to take way too long
|
||||
// var/obj/item/thing = get_active_hand()
|
||||
// var/obj/item/equipped_belt = get_item_by_slot(slot_belt)
|
||||
// if(!equipped_belt) // We also let you equip a belt like this
|
||||
// if(!thing)
|
||||
// to_chat(user, "<span class='notice'>You have no belt to take something out of.</span>")
|
||||
// return
|
||||
// if(equip_to_slot_if_possible(thing, slot_belt))
|
||||
// update_inv_r_hand()
|
||||
// update_inv_l_hand()
|
||||
// return
|
||||
// if(!SEND_SIGNAL(equipped_belt, COMSIG_CONTAINS_STORAGE)) // not a storage item
|
||||
// if(!thing)
|
||||
// equipped_belt.attack_hand(src)
|
||||
// else
|
||||
// to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
|
||||
// return
|
||||
// if(thing) // put thing in belt
|
||||
// if(!SEND_SIGNAL(equipped_belt, COMSIG_TRY_STORAGE_INSERT, thing, user.mob))
|
||||
// to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
|
||||
// return
|
||||
// if(!equipped_belt.contents.len) // nothing to take out
|
||||
// to_chat(user, "<span class='notice'>There's nothing in your belt to take out.</span>")
|
||||
// return
|
||||
// var/obj/item/stored = equipped_belt.contents[equipped_belt.contents.len]
|
||||
// if(!stored || stored.on_found(src))
|
||||
// return
|
||||
// stored.attack_hand(src) // take out thing from belt
|
||||
// return
|
||||
|
||||
if("B") // Put held thing in backpack or take out most recent thing from backpack
|
||||
/* if("B") // Put held thing in backpack or take out most recent thing from backpack
|
||||
var/obj/item/thing = get_active_hand()
|
||||
var/obj/item/equipped_back = get_item_by_slot(SLOT_BACK)
|
||||
var/obj/item/equipped_back = get_item_by_slot(slot_back)
|
||||
if(!equipped_back) // We also let you equip a backpack like this
|
||||
if(!thing)
|
||||
to_chat(user, "<span class='notice'>You have no backpack to take something out of.</span>")
|
||||
return
|
||||
if(equip_to_slot_if_possible(thing, SLOT_BACK))
|
||||
if(equip_to_slot_if_possible(thing, slot_back))
|
||||
update_inv_r_hand()
|
||||
update_inv_l_hand()
|
||||
return
|
||||
@@ -59,5 +60,5 @@
|
||||
if(!stored || stored.on_found(src))
|
||||
return
|
||||
stored.attack_hand(src) // take out thing from backpack
|
||||
return
|
||||
return */
|
||||
return ..()
|
||||
@@ -8,10 +8,8 @@
|
||||
// Set a client's focus to an object and override these procs on that object to let it handle keypresses
|
||||
|
||||
/datum/proc/key_down(key, client/user) // Called when a key is pressed down initially
|
||||
to_chat(src,"key pressed:" + key)
|
||||
return
|
||||
/datum/proc/key_up(key, client/user) // Called when a key is released
|
||||
to_chat(src,"key released:" + key)
|
||||
return
|
||||
/datum/proc/keyLoop(client/user) // Called once every frame
|
||||
set waitfor = FALSE
|
||||
@@ -33,7 +31,7 @@
|
||||
/client/proc/set_macros()
|
||||
set waitfor = FALSE
|
||||
|
||||
erase_all_macros()
|
||||
//erase_all_macros()
|
||||
|
||||
var/list/macro_sets = SSinput.macro_sets
|
||||
for(var/i in 1 to macro_sets.len)
|
||||
|
||||
Reference in New Issue
Block a user