Replaces a bunch of obj vars (and emagged on machinery/items) with obj_flags (#34078)

* It works, but is it worth it?

* bitfield helpers take 1

* Would this work?

* remove dangling debug code

* rebase & fixes

* vv bitfield stuff, reading

* DNM oceans of shitcode DNM

* honk

* honk2

* plonk

* rebase & fix
This commit is contained in:
vuonojenmustaturska
2018-01-22 20:19:46 +01:00
committed by AnturK
parent 70bec96f9c
commit 6406896df1
110 changed files with 624 additions and 447 deletions
@@ -44,7 +44,7 @@
var/list/data = list()
var/can_go_home = FALSE
data["emagged"] = emagged
data["emagged"] = (obj_flags & EMAGGED) ? 1 : 0
if(inserted_id)
data["id"] = inserted_id
data["id_name"] = inserted_id.registered_name
@@ -101,13 +101,13 @@
if(3)
to_chat(usr, "<span class='notice'>No permission to dock could be granted.</span>")
else
if(!emagged)
if(!(obj_flags & EMAGGED))
Radio.set_frequency(FREQ_SECURITY)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY, get_spans(), get_default_language())
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
if(emagged)
if(obj_flags & EMAGGED)
return 1 //Shuttle is emagged, let any ol' person through
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
@@ -119,8 +119,8 @@
qdel(src)
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
if(!emagged)
emagged = TRUE
if(!(obj_flags & EMAGGED))
obj_flags |= EMAGGED
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
+6 -6
View File
@@ -21,11 +21,11 @@
anchored = TRUE
/obj/structure/stacklifter/attack_hand(mob/living/user)
if(in_use)
if(obj_flags & IN_USE)
to_chat(user, "It's already in use - wait a bit.")
return
else
in_use = 1
obj_flags |= IN_USE
icon_state = "fitnesslifter2"
user.setDir(SOUTH)
user.Stun(80)
@@ -44,7 +44,7 @@
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
playsound(user, 'sound/machines/click.ogg', 60, 1)
in_use = 0
obj_flags &= ~IN_USE
user.pixel_y = 0
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnesslifter"
@@ -59,11 +59,11 @@
anchored = TRUE
/obj/structure/weightlifter/attack_hand(mob/living/user)
if(in_use)
if(obj_flags & IN_USE)
to_chat(user, "It's already in use - wait a bit.")
return
else
in_use = 1
obj_flags |= IN_USE
icon_state = "fitnessweight-c"
user.setDir(SOUTH)
user.Stun(80)
@@ -88,7 +88,7 @@
animate(user, pixel_y = 2, time = 3)
sleep(3)
playsound(user, 'sound/machines/click.ogg', 60, 1)
in_use = 0
obj_flags &= ~IN_USE
animate(user, pixel_y = 0, time = 3)
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnessweight"