forked from Drymouth-Gulch/Drymouth-Gulch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinteraction_interface.dm
55 lines (44 loc) · 1.44 KB
/
interaction_interface.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/mob/proc/try_interaction()
return
/*
/mob/MouseDrop(var/mob/dropped_on, mob/user as mob)
if(src != dropped_on && !src.restrained())
try_interaction(dropped_on)
return
return ..()
*/
/mob/living/carbon/human/MouseDrop_T(mob/M as mob, mob/user as mob)
if(M == src || src == usr || M != usr) return
if(usr.restrained()) return
user.try_interaction(src)
/mob/verb/interact_with()
set name = "Interact With"
set desc = "Perform an interaction with someone."
set category = "IC"
set src in view()
if(usr != src && !usr.restrained())
usr.try_interaction(src)
/mob/living/carbon/human/try_interaction(var/mob/partner)
var/dat = "<B><HR><FONT size=3>Interacting with \the [partner]...</FONT></B><HR>"
dat += "You...<br>[list_interaction_attributes()]<hr>"
dat += "They...<br>[partner.list_interaction_attributes()]<hr>"
make_interactions()
for(var/interaction_key in interactions)
var/datum/interaction/I = interactions[interaction_key]
if(I.evaluate_user(src) && I.evaluate_target(src, partner))
dat += I.get_action_link_for(src, partner)
var/datum/browser/popup = new(usr, "interactions", "Interactions", 340, 480)
popup.set_content(dat)
popup.open()
/*
/atom/movable/attack_hand(mob/living/user)
. = ..()
if(can_buckle && buckled_mob)
if(user_unbuckle_mob(user))
return 1
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(can_buckle && istype(M) && !buckled_mob)
if(user_buckle_mob(M, user))
return 1
*/