Fix signularity_pull leaving ghost item in your inventory slot

* It called u_equip()  Nothing should call u_equip(), bad!
* Also replaced magic numbers with defined constants while I was checking singularity code.
This commit is contained in:
Leshana
2017-03-20 21:28:35 -04:00
parent e2b3f0b9c1
commit 3a4bc3d897
2 changed files with 17 additions and 17 deletions

View File

@@ -29,7 +29,7 @@
if(current_size >= STAGE_THREE) if(current_size >= STAGE_THREE)
var/list/handlist = list(l_hand, r_hand) var/list/handlist = list(l_hand, r_hand)
for(var/obj/item/hand in handlist) for(var/obj/item/hand in handlist)
if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && u_equip(hand)) if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && unEquip(hand))
step_towards(hand, src) step_towards(hand, src)
src << "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>" src << "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>"
apply_effect(current_size * 3, IRRADIATE) apply_effect(current_size * 3, IRRADIATE)

View File

@@ -298,7 +298,7 @@
if(target && prob(60)) if(target && prob(60))
movement_dir = get_dir(src,target) //moves to a singulo beacon, if there is one movement_dir = get_dir(src,target) //moves to a singulo beacon, if there is one
if(current_size >= 9)//The superlarge one does not care about things in its way if(current_size >= STAGE_FIVE)//The superlarge one does not care about things in its way
spawn(0) spawn(0)
step(src, movement_dir) step(src, movement_dir)
spawn(1) spawn(1)
@@ -319,17 +319,17 @@
var/steps = 0 var/steps = 0
if(!step) if(!step)
switch(current_size) switch(current_size)
if(1) if(STAGE_ONE)
steps = 1 steps = 1
if(3) if(STAGE_TWO)
steps = 3//Yes this is right steps = 3//Yes this is right
if(5) if(STAGE_THREE)
steps = 3 steps = 3
if(7) if(STAGE_FOUR)
steps = 4 steps = 4
if(9) if(STAGE_FIVE)
steps = 5 steps = 5
if(11) if(STAGE_SUPER)
steps = 6 steps = 6
else else
steps = step steps = step
@@ -397,7 +397,7 @@
mezzer() mezzer()
else else
return 0 return 0
if(current_size == 11) if(current_size == STAGE_SUPER)
smwave() smwave()
return 1 return 1
@@ -429,18 +429,18 @@
if(M.stat == CONSCIOUS) if(M.stat == CONSCIOUS)
if (istype(M,/mob/living/carbon/human)) if (istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(istype(H.glasses,/obj/item/clothing/glasses/meson) && current_size != 11) if(istype(H.glasses,/obj/item/clothing/glasses/meson) && current_size != STAGE_SUPER)
H << "<span class=\"notice\">You look directly into The [src.name], good thing you had your protective eyewear on!</span>" H << "<span class=\"notice\">You look directly into The [src.name], good thing you had your protective eyewear on!</span>"
return return
else else
H << "<span class=\"warning\">You look directly into The [src.name], but your eyewear does absolutely nothing to protect you from it!</span>" H << "<span class=\"warning\">You look directly into The [src.name], but your eyewear does absolutely nothing to protect you from it!</span>"
M << "<span class='danger'>You look directly into The [src.name] and feel [current_size == 11 ? "helpless" : "weak"].</span>" M << "<span class='danger'>You look directly into The [src.name] and feel [current_size == STAGE_SUPER ? "helpless" : "weak"].</span>"
M.apply_effect(3, STUN) M.apply_effect(3, STUN)
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] stares blankly at The []!</span>", M, src), 1) O.show_message(text("<span class='danger'>[] stares blankly at The []!</span>", M, src), 1)
/obj/singularity/proc/emp_area() /obj/singularity/proc/emp_area()
if(current_size != 11) if(current_size != STAGE_SUPER)
empulse(src, 4, 6, 8, 10) empulse(src, 4, 6, 8, 10)
else else
empulse(src, 12, 14, 16, 18) empulse(src, 12, 14, 16, 18)
@@ -467,15 +467,15 @@
overlays = 0 overlays = 0
move_self = 0 move_self = 0
switch (current_size) switch (current_size)
if(1) if(STAGE_ONE)
overlays += image('icons/obj/singularity.dmi',"chain_s1") overlays += image('icons/obj/singularity.dmi',"chain_s1")
if(3) if(STAGE_TWO)
overlays += image('icons/effects/96x96.dmi',"chain_s3") overlays += image('icons/effects/96x96.dmi',"chain_s3")
if(5) if(STAGE_THREE)
overlays += image('icons/effects/160x160.dmi',"chain_s5") overlays += image('icons/effects/160x160.dmi',"chain_s5")
if(7) if(STAGE_FOUR)
overlays += image('icons/effects/224x224.dmi',"chain_s7") overlays += image('icons/effects/224x224.dmi',"chain_s7")
if(9) if(STAGE_FIVE)
overlays += image('icons/effects/288x288.dmi',"chain_s9") overlays += image('icons/effects/288x288.dmi',"chain_s9")
/obj/singularity/proc/on_release() /obj/singularity/proc/on_release()