mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Cleanup redundant machine stuff (#18494)
This commit is contained in:
@@ -104,21 +104,19 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
return desc
|
||||
|
||||
/datum/uplink_item/proc/buy(obj/item/uplink/hidden/U, mob/user)
|
||||
|
||||
if(!istype(U))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(user.stat || user.restrained())
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!(istype(user, /mob/living/carbon/human)))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
// If the uplink's holder is in the user's contents
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
|
||||
user.set_machine(U)
|
||||
if(cost > U.uses)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/obj/I = spawn_item(get_turf(user), U)
|
||||
|
||||
@@ -129,21 +127,23 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
log_game("[key_name(user)] purchased [name]. [name] was discounted to [cost].")
|
||||
if(!user.mind.special_role)
|
||||
message_admins("[key_name_admin(user)] purchased [name] (discounted to [cost]), as a non antagonist.")
|
||||
|
||||
else
|
||||
log_game("[key_name(user)] purchased [name].")
|
||||
if(!user.mind.special_role)
|
||||
message_admins("[key_name_admin(user)] purchased [name], as a non antagonist.")
|
||||
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
|
||||
if(istype(I,/obj/item/storage/box/) && I.contents.len>0)
|
||||
for(var/atom/o in I)
|
||||
U.purchase_log += "<BIG>[bicon(o)]</BIG>"
|
||||
|
||||
else
|
||||
U.purchase_log += "<BIG>[bicon(I)]</BIG>"
|
||||
|
||||
//U.interact(user)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user